iview 下拉select样式_Vue.js相关:iview实现select tree树形下拉框的示例代码
Vue.js相關(guān):iview實現(xiàn)select tree樹形下拉框的示例代碼
發(fā)布于 2020-3-16|
復(fù)制鏈接
摘記: 本文介紹了iview實現(xiàn)select tree樹形下拉框的示例代碼,分享給大家,具體如下:html部分
```xhtml
```
數(shù)據(jù)部分
```javascript
e ..
本文介紹了iview實現(xiàn)select tree樹形下拉框的示例代碼,分享給大家,具體如下:html部分
```xhtml
```
數(shù)據(jù)部分
```javascript
export const treeData= [
{
title: 'parent 1',
expand: true,
selected: true,
value: '1',
children: [
{
title: 'parent 1-1',
expand: true,
value: '11',
children: [
{
value: '111',
title: 'leaf 1-1-1'
},
{
value: '112',
title: 'leaf 1-1-2'
}
]
},
{
title: 'parent 1-2',
value: '12',
expand: true,
children: [
{
value: '121',
title: 'leaf 1-2-1'
},
{
value: '122',
title: 'leaf 1-2-2'
}
]
}
]
}
];
```
js部分
```javascript
// 子節(jié)點(diǎn)的option
renderContent (h, { root, node, data }) {
return h('Option', {
style: {
display: 'inline-block',
margin: '0'
},
props:{
value: data.value
}
}, data.title);
},
```
總結(jié)
以上是生活随笔為你收集整理的iview 下拉select样式_Vue.js相关:iview实现select tree树形下拉框的示例代码的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 世界上首枚3D打印火箭未能进入轨道 官方
- 下一篇: 千元神机?华为畅享60发布 6000毫安