(vue)子组件绑定的ref使用
父组件:
//嵌入子组件SelectRowModel
<SelectRowModal ref="selectRowModalRef" :loading="uploadLoading" @ok="look" />//方法
look({ dataRow, headerRow }) {...
}
触发子组件的show()方法
this.$refs.selectRowModalRef.show();
子组件:
<template>
...
</template>show() {this.dialogFormVisible = true
},
触发父组件里ok绑定的look()方法并传值
this.$emit('ok', {...this.formData
})