Element的el-cascader级联选择器组件获取选中的label(一)
时间:2020-05-15 13:23:02
收藏:0
阅读:1505
方法一:给cascader
组件赋值一个别名ref="myCascader"
(注意:2.9.2 版本之前可用的方法)
1 this.$refs[‘myCascader‘].currentLabels
方法二:在 2.9.2 后官方新增了 getCheckedNodes() 方法
1 this.$refs.myCascader.getCheckedNodes()[0].pathLabels
原文:https://www.cnblogs.com/dreamstartplace/p/12894030.html
评论(0)