vxe-table-select-area
Version:
一个基于 vxe-table 的可区域选中复制、粘贴的组件
50 lines (49 loc) • 1.59 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _constant = require("../../select-area/common/constant");
var _common = require("../../select-area/common");
var _default = {
name: 'VxeSelectAreaDom',
props: {
// value: Boolean,
// icon: String,
// text: String,
// domRect: Object
},
mounted: function mounted() {
var _this = this.$parent.$parent;
_this.$on(_constant.EMIT_EVENTS.CELL_SELECTION_RANGE_DATA_CHANGE, function (newData) {
_this.cellSelectionRangeDataChange(newData);
});
},
// methods: {
// },
render: function render(h) {
var _this = this.$parent.$parent;
// middle
var middleSelectionCurrent = _this.getSelectionCurrent({
fixedType: ''
});
var middleSelectionArea = _this.getSelectionAreas({
fixedType: ''
});
var middleAutoFillArea = middleSelectionCurrent.autoFillArea || middleSelectionArea.autoFillArea;
// console.log(middleSelectionArea)
return h('div', {
"class": (0, _common.clsName)('selection-wrapper'),
style: {
visibility: this.isCellEditing ? 'hidden' : ''
}
}, [h('div', {
"class": (0, _common.clsName)('selection-fixed-left')
}, []), h('div', {
"class": (0, _common.clsName)('selection-middle')
}, [middleSelectionCurrent.selectionCurrent, middleSelectionArea.normalArea, middleAutoFillArea, middleSelectionArea.normalAreaLayer]), h('div', {
"class": (0, _common.clsName)('selection-fixed-right')
})]);
}
};
exports["default"] = _default;