<uni-data-picker :localdata="items" @change="onchange" @nodeclick="onnodeclick">
</uni-data-picker>
// data
items: [{
text: '一年级',
value: '1-0',
children: [{
text: '1.1班',
value: '1-1'
},
{
text: '1.2班',
value: '1-2'
}
]
},
{
text: '二年级',
value: '2-0'
},
{
text: '三年级',
value: '3-0'
}
],
// methods
onchange(e) {
console.log('onchange')
const value = e.detail.value
},
onnodeclick(node) {
console.log('onnodeclick')
},