2019-10-10 06:30:04 +00:00
|
|
|
## 测试
|
|
|
|
|
2019-11-22 12:33:17 +00:00
|
|
|
:::demo
|
|
|
|
```html
|
|
|
|
<div id="demo1" class="xm-select-demo"></div>
|
|
|
|
|
|
|
|
<script>
|
2019-10-10 06:30:04 +00:00
|
|
|
var demo1 = xmSelect.render({
|
2019-11-19 12:13:50 +00:00
|
|
|
el: '#demo1',
|
2020-02-10 06:39:38 +00:00
|
|
|
autoRow: true,
|
2020-07-31 04:11:39 +00:00
|
|
|
filterable: true,
|
2020-11-26 06:44:46 +00:00
|
|
|
tree: {
|
|
|
|
show: true,
|
|
|
|
showFolderIcon: true,
|
|
|
|
showLine: true,
|
|
|
|
indent: 20,
|
|
|
|
expandedKeys: [ -3 ],
|
2020-11-26 10:17:45 +00:00
|
|
|
simple: true,
|
2020-11-27 11:19:22 +00:00
|
|
|
clickExpand: false,
|
|
|
|
clickCheck: false,
|
2020-11-26 06:44:46 +00:00
|
|
|
},
|
|
|
|
toolbar: {
|
|
|
|
show: true,
|
|
|
|
list: ['ALL', 'REVERSE', 'CLEAR']
|
|
|
|
},
|
|
|
|
filterable: true,
|
|
|
|
height: 'auto',
|
|
|
|
data(){
|
|
|
|
return [
|
|
|
|
{name: '销售员', value: -1, disabled: true, children: [
|
|
|
|
{name: '张三1', value: 1, selected: true, children: []},
|
|
|
|
{name: '李四1', value: 2, selected: true},
|
|
|
|
{name: '王五1', value: 3, disabled: true},
|
|
|
|
]},
|
|
|
|
{name: '奖品', value: -2, children: [
|
|
|
|
{name: '奖品3', value: -3, children: [
|
|
|
|
{name: '苹果3', value: 14, selected: true},
|
|
|
|
{name: '香蕉3', value: 15},
|
|
|
|
{name: '葡萄3', value: 16},
|
|
|
|
]},
|
|
|
|
{name: '苹果2', value: 4, selected: true, disabled: true},
|
|
|
|
{name: '香蕉2', value: 5},
|
|
|
|
{name: '葡萄2', value: 6},
|
|
|
|
]},
|
|
|
|
]
|
|
|
|
},
|
|
|
|
iconfont: {
|
|
|
|
select: '',
|
|
|
|
unselect: '',
|
|
|
|
half: '',
|
2020-05-04 10:56:31 +00:00
|
|
|
},
|
2019-10-10 06:30:04 +00:00
|
|
|
})
|
2019-12-18 06:38:35 +00:00
|
|
|
|
2019-11-22 12:33:17 +00:00
|
|
|
</script>
|
|
|
|
```
|
2019-10-10 06:30:04 +00:00
|
|
|
:::
|