1/el-table中ref的用法:
普通用法: ref=“refs” 查找时使用this.$refs.refs
2/组件中ref的用法:
<child ref="childRef"></child>
查找时this.$refs.childRef找到的是子组件
如果子组件里el-table不是唯一组件,this.$refs.childRef.$children[0]找到table组件
vue组件中ref的用法
最新推荐文章于 2024-05-26 03:38:41 发布
1/el-table中ref的用法:
普通用法: ref=“refs” 查找时使用this.$refs.refs
2/组件中ref的用法:
<child ref="childRef"></child>
查找时this.$refs.childRef找到的是子组件
如果子组件里el-table不是唯一组件,this.$refs.childRef.$children[0]找到table组件