Skip to content
目录

父组件调用子组件方法

父组件

javascript
<fill-select :mutiple="true" ref="fillSelect"/>

import FillSelect from '@/components/BackfillTreeSelect.vue'

export default {
  components: { FillSelect }
}

// 调用子组件方法
this.$refs.fillSelect.clearSingleOrg()

子组件

javascript
clearSingleOrg () {
  this.orgs = []
  this.orgValue = ''
},