mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-27 05:00:48 +08:00
588 B
588 B
Change Debug
<n-select
v-model="node"
:options="[{label: 'a', value: 'a'},{label: 'b', value: 'b'},{label: 'c', value: 'c'}]"
clearable
filterable
:disabled="!editable"
placeholder="Please Select"
multiple
@change="nodeChange"
/>
export default {
data () {
return {
node: null,
editable: true
}
},
watch: {
node (newValue, oldValue) {
console.log('watch node', newValue === oldValue, newValue, oldValue)
}
},
methods: {
nodeChange (value) {
console.log('handle node change', value)
}
}
}