62 lines
1.6 KiB
Markdown
62 lines
1.6 KiB
Markdown
|
|
### liu-folding-panel适用于uni-app项目的二级树形折叠面板组件
|
||
|
|
### 本组件目前兼容微信小程序、H5
|
||
|
|
### 本组件支持自定义二级树形折叠面板,可以折叠/展开的内容区域
|
||
|
|
# --- 扫码预览、关注我们 ---
|
||
|
|
|
||
|
|
## 扫码关注公众号,查看更多插件信息,预览插件效果!
|
||
|
|
|
||
|
|

|
||
|
|
|
||
|
|
### 使用示例
|
||
|
|
```
|
||
|
|
<template>
|
||
|
|
<view class="page-main">
|
||
|
|
<liu-folding-panel :dataList="dataList" @change="change"></liu-folding-panel>
|
||
|
|
</view>
|
||
|
|
</template>
|
||
|
|
|
||
|
|
<script>
|
||
|
|
export default {
|
||
|
|
data() {
|
||
|
|
return {
|
||
|
|
dataList: [{
|
||
|
|
name: '一级标题',
|
||
|
|
childs: [{
|
||
|
|
name: '二级标题'
|
||
|
|
}, {
|
||
|
|
name: '二级标题'
|
||
|
|
}, {
|
||
|
|
name: '二级标题'
|
||
|
|
}]
|
||
|
|
}, {
|
||
|
|
name: '一级标题',
|
||
|
|
childs: [{
|
||
|
|
name: '二级标题'
|
||
|
|
}, {
|
||
|
|
name: '二级标题'
|
||
|
|
}, {
|
||
|
|
name: '二级标题'
|
||
|
|
}]
|
||
|
|
}]
|
||
|
|
}
|
||
|
|
},
|
||
|
|
methods: {
|
||
|
|
change(e) {
|
||
|
|
console.log('点击二级信息:' + JSON.stringify(e))
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
</script>
|
||
|
|
```
|
||
|
|
|
||
|
|
### 属性说明
|
||
|
|
| 名称 | 类型 | 默认值 | 描述 |
|
||
|
|
| ----------------------------|--------------- | ---------------------- | ---------------|
|
||
|
|
| dataList | Array | | 数据源
|
||
|
|
| img1 | String | | 一级列表图标
|
||
|
|
| img2 | String | | 二级列表图标
|
||
|
|
| @change | Function | | 点击二级信息回调事件
|
||
|
|
|
||
|
|
|
||
|
|
|