更新记录

4.2(2024-04-25)

组件优化

4.1(2023-10-20)

v-for增加key, 提升微信小程序性能

4.0.2(2023-09-30)

修复了组件bug

查看更多

平台兼容性

Vue2 Vue3
App 快应用 微信小程序 支付宝小程序 百度小程序 字节小程序 QQ小程序
HBuilderX 3.7.0 app-vue app-nvue
钉钉小程序 快手小程序 飞书小程序 京东小程序
H5-Safari Android Browser 微信浏览器(Android) QQ浏览器(Android) Chrome IE Edge Firefox PC-Safari

chenchuang-ownershipstructure

使用方法

<!-- treeName:树形结构的主题名称 treeData: 树形结构的填充数据  目前支持三级树形结构-->
<chenchuang-ownershipstructure v-if="(curTreeName.length > 0)" :treeName="curTreeName" :treeData="curTreeData">
</chenchuang-ownershipstructure>

HTML代码实现部分

<template>
    <view class="content">

        <!-- treeName:树形结构的主题名称 treeData: 树形结构的填充数据 -->
        <chenchuang-ownershipstructure v-if="(curTreeName.length > 0)" :treeName="curTreeName" :treeData="curTreeData">
        </chenchuang-ownershipstructure>

    </view>
</template>

<script>
    export default {

        data() {
            return {
                title: 'Hello',
                curTreeName: '',
                curTreeData: []
            }
        },
        onLoad() {

            this.curTreeName = "广州汽车集团股份有限公司";

            let tmpArr = [];
            for (let i = 0; i < 4; i++) {

                // 模拟企业控股数据
                let s = {
                    'ratio': '20%',
                    'amount': '1000000万',
                    'label': '广州|先进制造业|高新技术',
                    'investName': '广州汽车工业集团有限公司' + i,
                    'investType': '0',
                    'invests': [{
                            'ratio': '20%',
                            'amount': '100000万',
                            'label': '广州|汽车|高新技术',
                            'investName': '广汽丰田股份有限公司',
                            'investType': '0',
                        },
                        {
                            'ratio': '10%',
                            'amount': '90000万',
                            'label': '广州|工业|高新技术',
                            'investName': '中国机械工业集团有限公司',
                            'investType': '0',
                        },

                        {
                            'ratio': '10%',
                            'amount': '900万',
                            'label': '股东',
                            'investName': '曾庆洪',
                            'investType': '1',
                        },
                        {
                            'ratio': '10%',
                            'amount': '900万',
                            'label': '股东',
                            'investName': '吴松',
                            'investType': '1',
                        }
                    ]

                };

                let tmpDict = Object.assign(s, {
                    "isOpen": false
                });
                tmpArr.push(tmpDict);

            }

            // 模拟个人控股数据
            let t = {
                'ratio': '10%',
                'amount': '900万',
                'label': '股东',
                'investName': '曾庆洪',
                'investType': '1',
                'invests': []

            };
            let tmpDict = Object.assign(t, {
                "isOpen": false
            });
            tmpArr.push(tmpDict);

            this.curTreeData = tmpArr;
        },
        methods: {

        }
    }
</script>

<!-- /*

*/ -->
<style>
    page {
        background-color: #f6f6f6;

    }

    .content {
        display: flex;
        flex-direction: column;

    }
</style>

隐私、权限声明

1. 本插件需要申请的系统权限列表:

2. 本插件采集的数据、发送的服务器地址、以及数据用途说明:

3. 本插件是否包含广告,如包含需详细说明广告表达方式、展示频率:

许可协议

MIT协议

使用中有什么不明白的地方,就向插件作者提问吧~ 我要提问