问题描述:elementui的级联选择cascader中通过搜索选取的节点后,在@change中使用获取选中节点的方法getCheckedNodes,获取结果为空数组
解决方案:
在this.$nextTick中获取,如下:
handleChange(value) {
this.$nextTick(() => {
this.$refs['cascader'].getCheckedNodes()
})
}
问题描述:elementui的级联选择cascader中通过搜索选取的节点后,在@change中使用获取选中节点的方法getCheckedNodes,获取结果为空数组
解决方案:
在this.$nextTick中获取,如下:
handleChange(value) {
this.$nextTick(() => {
this.$refs['cascader'].getCheckedNodes()
})
}