vue elementui级联选择器change事件如何获取当前label值,谢谢
网上搜到的方法
this.$refs['cascaderAddr'].currentLabels
获取到是undefiend
vue elementui级联选择器change事件如何获取当前label值,谢谢
网上搜到的方法
this.$refs['cascaderAddr'].currentLabels
获取到是undefiend
<el-cascader
v-model="value"
ref="cascaderAddr"
:options="options"
@change="handleChange"
</el-cascader>
这样获取
this.$refs.cascaderAddr.inputValue
因为value是不停变换的,所以通过下面方法或者(单选)
this.$refs.cascaderAddr.getCheckedNodes()[0].pathLabels);
5 回答4.9k 阅读✓ 已解决
4 回答3.2k 阅读✓ 已解决
2 回答4.8k 阅读✓ 已解决
4 回答4.4k 阅读✓ 已解决
4 回答1.9k 阅读✓ 已解决
2 回答2.6k 阅读✓ 已解决
2 回答2.6k 阅读✓ 已解决
不太明白为什么要获取
label
,value
和label
给成一样的?当然不考虑为什么的话,可以通过他内部的方法实现。
https://www.lilnong.top/stati...