我是靠谱客的博主 尊敬中心,这篇文章主要介绍ElementUI - 调用组件中提供的方法,现在分享给大家,希望可以做个参考。

前言

     在使用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内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(142)

评论列表共有 0 条评论

立即
投稿
返回
顶部