快速实现前端仿企查查、天眼查关联投资结构 股权结构 树形结构 控股结构, 下载请访问uni-app插件市场:https://ext.dcloud.net.cn/plugin?id=12073
效果图如下:
**html部分**
<template>
<view class="content">
<CCBCashTree v-if="(curTreeName.length > 0)" :treeName="curTreeName" :treeData="curTreeData">
</CCBCashTree>
</view>
</template>
**js部分(引入组件, 并初始化数据)**
<script>
import CCBCashTree from ‘@/components/CCBCashTree.vue’
export default {
components: {
CCBCashTree
},
data() {
return {
title: 'Hello',
curTreeName: '',
curTreeData: []
}
},
onLoad() {
this.curTreeName = "股权结构";
let tmpArr = [];
for (let i = 0; i < 6; i++) {
let s = {
'ratio': '10%',
'amount': '13900万',
'label': '广州|先进制造业|高新技术',
'investName': '广东生益股份',
'investType': '0',
'invests':[{'ratio': '10%',
'amount': '3900万',
'label': '广州|PCB|高新技术',
'investName': '广东生益股线路板',
'investType': '0',}]
};
let tmpDict = Object.assign(s, {
"isOpen": false
});
tmpArr.push(tmpDict);
}
this.curTreeData = tmpArr;
},
methods: {
}
}
标签:curTreeData,天眼,tmpArr,curTreeName,let,股权结构,仿企,结构 From: https://www.cnblogs.com/ccVue/p/17435868.html