💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
# 组件名:hsType(分类组件) ### 作者:屈磊 ### 效果: ![](https://img.kancloud.cn/42/88/4288b24ae173aa57d2706956e73a2ba2_1108x350.png) ![](https://img.kancloud.cn/ab/0e/ab0e5f1c85cdaf0ba7ed592f57948e52_955x337.png) ## 使用方式: ``` import hsType from './commons/hs-type.vue' <!-- 在对应页面使用 --> <hsType @onClickClassify="onClickClassify" /> <hsType @onClickClassify="onClickClassify" /> <hsType :custom-text="customText" @clickShow="clickShow" @onClickClassify="onClickClassify" /> 数据:  classify:[{ id: 0, value: '',  text: '全部'  },{  id: 1,  value: '1', text: '海贼王' },]  ```                                                   ### 说明: <!--clickShow 点击展开收起 (自定义文字时调用,默认文字时候 不需要) --> clickShow(res) { this.customText = res ? '修改后文字' : '自定义文字' }, <!--c分类点击事件 --> onClickClassify(item, index) { console.log('Observer:', item, index) } ``` ### 注意: 使用组件时请清除组件的默认数据 classify 为了确保页面拖动事件生效,请在数据接收成功后调用组件 ### 参数: | 参数 | 作用 | 类型 | 默认 | 是否必传 | 属性 | | --- | --- | --- | --- | --- | --- | | classify | 分类数据 | Array | | 是 | | | typeLabel | 分类名称 | String | 分类名称 | 是 | | | customText | 自定义文字 | String | 展开 | 否 | |