cnetong-core-frontend
Version:
- CURD组件的编辑对话框增加按钮slot
32 lines (30 loc) • 682 B
JavaScript
import Emitter from "element-ui/lib/mixins/emitter";
/**
* 选择器基础类
*/
export default {
mixins: [Emitter],
data() {
return {};
},
methods: {
/**
* 响应选中 一条
* @param {Object} row
*/
selectTableRow(row) {
// 如果在 EtSelector 中包裹,要通知
this.dispatch("EtSelector", "selectTableRow", row);
this.$emit("select", row);
},
/**
* 响应选中 一组
* @param {Array} selection
*/
selectTable(selection) {
// 如果在 EtSelector 中包裹,要通知
this.dispatch("EtSelector", "selectTable", [selection]);
this.$emit("select", [selection]);
}
}
};