更新记录

1.5(2024-11-30) 下载此版本

组件优化

1.4(2024-11-30) 下载此版本

组件说明优化

1.3(2024-11-30) 下载此版本

组件优化

查看更多

平台兼容性

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

cc-classifyView

uniapp专属精品组件页面模板(由前端组件开发出品)

●组件模板规划:

由前端组件开发出品的精品组件页面模板,将陆续发布,预计高达约几百种供您使用,是快速快发项目、创业的必备精品。 合集地址: uni-app组件模板合集地址:(https://ext.dcloud.net.cn/publisher?id=274945)

●组件模板费用:

学习:免费下载,进行学习,无费用;

使用/商用:本页面地址赞赏8元后(当前项目产生赞赏订单可追溯),可终身商用;

●组件模板使用版权/商用:8元

本组件模板免费下载可供学习,如需商用,请在本组件页面模板进行赞赏8元,不赞赏可能面临侵权!保留追究知识产权法律责任! (仅需8元获取组件模板代码-物超所值,1个组件页面市场价约20-100元)

我的技术公众号(私信可加前端技术交流群)

群内气氛挺不错的,应该或许可能大概,算是为数不多的,专搞技术的前端群,偶尔聊天摸鱼

图片

使用方法


<!-- ClassifyData:分类数据  @itemClick:条目点击事件 -->
<cc-classifyView :ClassifyData="myClassifyData" @itemClick="itemClick"></cc-classifyView>

HTML代码实现部分

<template>
    <view class="content">

        <!-- ClassifyData:分类数据  @itemClick:条目点击事件 -->
        <cc-classifyView :ClassifyData="myClassifyData" @itemClick="itemClick"></cc-classifyView>

    </view>

</template>

<script lang="uts">
    // 导入模型
    import { classifyItem } from '../../uni_modules/cc-classifyView/components/cc-classifyView/classify'

    export default {
        data() {
            return {

                title: 'Hello',
                // 分类数据
                myClassifyData: [
                    {
                        id: 1,
                        parent: 0,
                        name: '手机',
                        pic: '',
                        children: [
                            {
                                id: 2,
                                parent: 1,
                                name: '手机通讯',
                                pic: '',
                                children: [
                                    {
                                        id: 3,
                                        parent: 2,
                                        name: '游戏手机',
                                        pic: 'https://img11.360buyimg.com/focus/s140x140_jfs/t11470/45/2362968077/2689/fb36d9a0/5a169238Nc8f0882b.jpg',
                                        children: []
                                    }, {
                                        id: 4,
                                        parent: 2,
                                        name: '手机',
                                        pic: 'https://img10.360buyimg.com/focus/s140x140_jfs/t11503/241/2246064496/4783/cea2850e/5a169216N0701c7f1.jpg',
                                        children: []
                                    }, {
                                        id: 5,
                                        parent: 2,
                                        name: '全面屏手机',
                                        pic: 'https://img30.360buyimg.com/focus/s140x140_jfs/t18955/187/1309277884/11517/fe100782/5ac48d27N3f5bb821.jpg',
                                        children: []
                                    },
                                ] as Array<classifyItem>
                            }, {
                                id: 24,
                                parent: 1,
                                name: '品牌',
                                pic: '',
                                children: [
                                    {
                                        id: 25,
                                        parent: 24,
                                        name: '华为',
                                        pic: 'https://img14.360buyimg.com/focus/s140x140_jfs/t11929/135/2372293765/1396/e103ec31/5a1692e2Nbea6e136.jpg',
                                        children: []
                                    }, {
                                        id: 26,
                                        parent: 24,
                                        name: '小米',
                                        pic: 'https://img30.360buyimg.com/focus/s140x140_jfs/t13411/188/926813276/3945/a4f47292/5a1692eeN105a64b4.png',
                                        children: []
                                    }, {
                                        id: 27,
                                        parent: 24,
                                        name: '荣耀',
                                        pic: 'https://img10.360buyimg.com/focus/s140x140_jfs/t12178/348/911080073/4732/db0ad9c7/5a1692e2N6df7c609.jpg',
                                        children: []
                                    }, {
                                        id: 28,
                                        parent: 24,
                                        name: '苹果',
                                        pic: 'https://img20.360buyimg.com/focus/s140x140_jfs/t13759/194/897734755/2493/1305d4c4/5a1692ebN8ae73077.jpg',
                                        children: []
                                    },
                                ] as Array<classifyItem>
                            },
                        ] as Array<classifyItem>
                    }, {
                        id: 6,
                        parent: 0,
                        name: '电脑办公',
                        pic: '',
                        children: [
                            {
                                id: 7,
                                parent: 6,
                                name: '笔记本',
                                pic: '',
                                children: [
                                    {
                                        id: 8,
                                        parent: 7,
                                        name: '轻薄本',
                                        pic: 'https://img13.360buyimg.com/focus/s140x140_jfs/t11071/195/2462134264/9117/cd0688bf/5a17ba79N18b9f3d4.png',
                                        children: []
                                    }, {
                                        id: 9,
                                        parent: 7,
                                        name: '游戏本',
                                        pic: 'https://img30.360buyimg.com/focus/s140x140_jfs/t11155/36/2330310765/10690/eb6754c3/5a17ba96N49561fea.png',
                                        children: []
                                    }, {
                                        id: 10,
                                        parent: 7,
                                        name: '办公本',
                                        pic: 'https://img20.360buyimg.com/focus/s140x140_jfs/t12499/273/957225674/6892/8281d4a7/5a17b962Nf77d9f6c.jpg',
                                        children: []
                                    },
                                ] as Array<classifyItem>
                            }
                        ] as Array<classifyItem>
                    }, {
                        id: 11,
                        parent: 0,
                        name: '服装',
                        pic: '',
                        children: [
                            {
                                id: 12,
                                parent: 11,
                                name: '男装',
                                pic: '',
                                children: [
                                    {
                                        id: 13,
                                        parent: 12,
                                        name: '风衣',
                                        pic: 'https://img20.360buyimg.com/focus/s140x140_jfs/t17890/31/1269777779/2792/917e13d0/5ac47830N63e76af2.jpg',
                                        children: []
                                    }, {
                                        id: 14,
                                        parent: 12,
                                        name: 'T恤',
                                        pic: 'https://img12.360buyimg.com/focus/s140x140_jfs/t17641/277/1305218449/8776/e5182bbe/5ac47ffaN8a7b2e14.png',
                                        children: []
                                    },
                                ] as Array<classifyItem>
                            }, {
                                id: 15,
                                parent: 11,
                                name: '女装',
                                pic: '',
                                children: [
                                    {
                                        id: 16,
                                        parent: 15,
                                        name: '连衣裙',
                                        pic: 'https://img30.360buyimg.com/focus/s140x140_jfs/t16891/72/715748110/3080/182127b5/5a9fb67aN37c4848f.jpg',
                                        children: []
                                    },
                                ] as Array<classifyItem>
                            }
                        ] as Array<classifyItem>
                    }, {
                        id: 17,
                        parent: 0,
                        name: '美妆护肤',
                        pic: '',
                        children: [
                            {
                                id: 18,
                                parent: 17,
                                name: '拔草推荐',
                                pic: '',
                                children: [
                                    {
                                        id: 19,
                                        parent: 18,
                                        name: '显白口红',
                                        pic: 'https://img10.360buyimg.com/focus/s140x140_jfs/t1/95022/3/13977/20829/5e5f2636E20222316/bbc6e2cf5b10669e.jpg',
                                        children: []
                                    }, {
                                        id: 20,
                                        parent: 18,
                                        name: '明星同款面膜',
                                        pic: 'https://img14.360buyimg.com/focus/s140x140_jfs/t1/91206/20/13565/9379/5e5f262bE45790537/0373287c48fa2317.jpg',
                                        children: []
                                    },
                                ] as Array<classifyItem>
                            }, {
                                id: 21,
                                parent: 17,
                                name: '彩妆',
                                pic: '',
                                children: [
                                    {
                                        id: 22,
                                        parent: 21,
                                        name: '美甲',
                                        pic: 'https://img11.360buyimg.com/focus/s140x140_jfs/t18340/344/2560965947/8933/468d229f/5afd3c2aN62a8f842.jpg',
                                        children: []
                                    }, {
                                        id: 23,
                                        parent: 21,
                                        name: '粉底液',
                                        pic: 'https://img20.360buyimg.com/focus/s140x140_jfs/t20692/251/127894832/28255/9c74e1cd/5afd3c1eN4eb4f341.jpg',
                                        children: []
                                    },
                                ] as Array<classifyItem>
                            }
                        ] as Array<classifyItem>
                    },
                ] as Array<classifyItem>
            }
        },
        onLoad() {

        },
        methods: {

            itemClick(item) {

                console.log("分类列表条目点击 = " + JSON.stringify(item));
            }
        }
    }
</script>

<style>
    .content {
        display: flex;
        flex-direction: column;

    }
</style>

隐私、权限声明

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

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

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

许可协议

MIT协议

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