0.0.15 • Published 4 years ago
@retailwe/ui-tree-select v0.0.15
tree-select 消息提示
引入
"usingComponents": {
"wr-tree-select": "@retailwe/ui-tree-select/index"
}
代码演示
基础用法
<tree-select
items="{{items}}"
subItems="{{subItems}}"
bind:onSelect="{{tapSelect}}"
></tree-select>
Page({
data: {
items: [{ title: 'apple' }, { title: 'sumsing' }, { title: 'xiaomi' }],
subItems: [
[{ text: 'iphone 11' }, { text: 'iphone x' }, { text: 'iphone 8' }],
[{ text: 'sumsing 20' }, { text: 'sumsing 10' }, { text: 'sumsing 9' }],
[{ text: 'xiaomi 10' }, { text: 'xiaomi 9' }, { text: 'xiaomi 6' }],
],
},
methods: {
tapSelect() {},
},
});
API
treeSelect Props
treeSelect Props
参数 | 说明 | 类型 | 默认值 | 版本 |
---|---|---|---|---|
iClass | 自定义 class 类名 | string | - | - |
| items | 标题栏列表 | array | [] | - | - | | subItems |选择栏列表 | array | [] | - | - |
treeSelect Event
事件名 | 说明 | 参数 |
---|---|---|
onSelect | 选中项时触发 | 选中项 |