前言
在使用ElementUI的tree组件时,tree组件提供相应的方法,这是在使用iviewUI中所没有的
使用方法
<template>
<el-tree
ref="tree"
:data="data"
:props="defaultProps"
accordion
@node-click="handleNodeClick">
</el-tree>
</template>
<script>
export default {
name: '',
methods: {
methods () {
// 返回目前被选中的节点所组成的数组
this.$refs.tree.getCheckedNodes()
}
}
}
</script>
最后
以上就是尊敬中心最近收集整理的关于ElementUI - 调用组件中提供的方法的全部内容,更多相关ElementUI内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复