hrsass-components 2.0.9 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/hrsass-components.js +19 -12
- package/lib/hrsass-components.min.js +1 -1
- package/package.json +1 -1
- package/rollup.build.css +130 -130
package/lib/hrsass-components.js
CHANGED
|
@@ -65,7 +65,7 @@ var contentStyle = _interopDefault(require('!!raw-loader!tinymce/skins/content/d
|
|
|
65
65
|
var SvgPanZoom = _interopDefault(require('svg-pan-zoom'));
|
|
66
66
|
var saveSvgAsPng = require('save-svg-as-png');
|
|
67
67
|
|
|
68
|
-
var version = "2.0
|
|
68
|
+
var version = "2.1.0";
|
|
69
69
|
|
|
70
70
|
/**
|
|
71
71
|
* 版本号
|
|
@@ -7034,6 +7034,10 @@ var HrTableBase = {
|
|
|
7034
7034
|
},
|
|
7035
7035
|
mounted: function mounted() {
|
|
7036
7036
|
this.refresh();
|
|
7037
|
+
window.addEventListener("resize", this._getScroll);
|
|
7038
|
+
},
|
|
7039
|
+
destoryed: function destoryed() {
|
|
7040
|
+
window.removeEventListener("resize", this._getScroll);
|
|
7037
7041
|
},
|
|
7038
7042
|
computed: {
|
|
7039
7043
|
sortOrderColumn: function sortOrderColumn() {
|
|
@@ -7379,7 +7383,7 @@ var HrTableBase = {
|
|
|
7379
7383
|
isReal: false
|
|
7380
7384
|
};
|
|
7381
7385
|
var filedEncryptObj = encryptObj[columnName];
|
|
7382
|
-
console.log(encryptObj);
|
|
7386
|
+
// console.log(encryptObj);
|
|
7383
7387
|
if (filedEncryptObj.isReal) {
|
|
7384
7388
|
record[columnName] = filedEncryptObj.encryptValue;
|
|
7385
7389
|
} else if (filedEncryptObj.realValue) {
|
|
@@ -7391,7 +7395,7 @@ var HrTableBase = {
|
|
|
7391
7395
|
id: id
|
|
7392
7396
|
}).then(function (res) {
|
|
7393
7397
|
if (res && res.msg) {
|
|
7394
|
-
console.log(res);
|
|
7398
|
+
// console.log(res);
|
|
7395
7399
|
return;
|
|
7396
7400
|
}
|
|
7397
7401
|
filedEncryptObj.encryptValue = record[columnName]; //加密值
|
|
@@ -7527,7 +7531,8 @@ var HrTableBase = {
|
|
|
7527
7531
|
if (parent) {
|
|
7528
7532
|
parent.width = totalW;
|
|
7529
7533
|
} else {
|
|
7530
|
-
var
|
|
7534
|
+
var _this$$el;
|
|
7535
|
+
var minWidth = (((_this$$el = this.$el) === null || _this$$el === void 0 ? void 0 : _this$$el.clientWidth) || 0) - (this._hasScroll() ? 20 : 0) - 62 - this._getActionWidth();
|
|
7531
7536
|
// const minWidth = this.$el.clientWidth - 62 - this._getActionWidth() - 17;
|
|
7532
7537
|
var diff = minWidth - totalW;
|
|
7533
7538
|
var colDiff = Math.floor(diff / cols.length);
|
|
@@ -7635,7 +7640,7 @@ var HrTableBase = {
|
|
|
7635
7640
|
_downLoadAction: function _downLoadAction(e) {
|
|
7636
7641
|
var columnList = this.columnList;
|
|
7637
7642
|
var columns = this._getDownLoadColumns(_.cloneDeep(columnList));
|
|
7638
|
-
console.log("start download", columns, e);
|
|
7643
|
+
// console.log("start download", columns, e);
|
|
7639
7644
|
this.$emit("download", columns, e);
|
|
7640
7645
|
},
|
|
7641
7646
|
getDownConfirmInfo: function getDownConfirmInfo() {
|
|
@@ -7697,10 +7702,12 @@ var HrTableBase = {
|
|
|
7697
7702
|
}
|
|
7698
7703
|
},
|
|
7699
7704
|
_getScroll: function _getScroll() {
|
|
7705
|
+
var _this$$el2;
|
|
7706
|
+
console.log('getScroll------------');
|
|
7700
7707
|
var _getOptionProps7 = getOptionProps(this),
|
|
7701
7708
|
maxWidth = _getOptionProps7.maxWidth,
|
|
7702
7709
|
height = _getOptionProps7.height;
|
|
7703
|
-
maxWidth = this.$el.clientWidth - (this._hasScroll() ? 20 : 0);
|
|
7710
|
+
maxWidth = (((_this$$el2 = this.$el) === null || _this$$el2 === void 0 ? void 0 : _this$$el2.clientWidth) || 0) - (this._hasScroll() ? 20 : 0);
|
|
7704
7711
|
var scroll = {};
|
|
7705
7712
|
var scrollW = this.columnWidth ? Object.values(this.columnWidth).reduce(function (total, num) {
|
|
7706
7713
|
return total + num + 17;
|
|
@@ -7719,7 +7726,7 @@ var HrTableBase = {
|
|
|
7719
7726
|
_toConsumableArray(this.$refs.table.$el.querySelectorAll('div[class^="ant-table-fixed-"] .ant-table-body-inner')).map(function (item) {
|
|
7720
7727
|
item.style.overflowX = 'hidden';
|
|
7721
7728
|
});
|
|
7722
|
-
} else if (this.$refs.table) {
|
|
7729
|
+
} else if (this.$refs.table && this.dataList.length > 0) {
|
|
7723
7730
|
_toConsumableArray(this.$refs.table.$el.querySelectorAll('div[class^="ant-table-fixed-"] .ant-table-body-inner')).map(function (item) {
|
|
7724
7731
|
item.style.overflowX = 'scroll';
|
|
7725
7732
|
});
|
|
@@ -7749,10 +7756,10 @@ var HrTableBase = {
|
|
|
7749
7756
|
return height;
|
|
7750
7757
|
},
|
|
7751
7758
|
_getActionWidth: function _getActionWidth() {
|
|
7752
|
-
var _vnode$, _vnode$2, _vnode$3, _actionList$propsData, _actionList$children;
|
|
7759
|
+
var _vnode$, _vnode$2, _vnode$3, _actionList$propsData, _actionList$propsData2, _actionList$children;
|
|
7753
7760
|
var action = this.$props.action,
|
|
7754
7761
|
scrollW = 0;
|
|
7755
|
-
console.log('hasScroll: ', this._hasScroll());
|
|
7762
|
+
// console.log('hasScroll: ', this._hasScroll());
|
|
7756
7763
|
if (this._hasScroll()) {
|
|
7757
7764
|
scrollW = 17;
|
|
7758
7765
|
}
|
|
@@ -7761,7 +7768,7 @@ var HrTableBase = {
|
|
|
7761
7768
|
if (this.dataList.length === 0) return 100 + scrollW;
|
|
7762
7769
|
var vnode = this.$scopedSlots.action && this.$scopedSlots.action(this.dataList[0].id, this.dataList[0]);
|
|
7763
7770
|
var actionList = (vnode === null || vnode === void 0 || (_vnode$ = vnode[0]) === null || _vnode$ === void 0 || (_vnode$ = _vnode$.componentOptions) === null || _vnode$ === void 0 ? void 0 : _vnode$.tag) === 'hr-button-list' ? vnode === null || vnode === void 0 || (_vnode$2 = vnode[0]) === null || _vnode$2 === void 0 ? void 0 : _vnode$2.componentOptions : vnode === null || vnode === void 0 || (_vnode$3 = vnode[0]) === null || _vnode$3 === void 0 || (_vnode$3 = _vnode$3.componentOptions) === null || _vnode$3 === void 0 || (_vnode$3 = _vnode$3.children) === null || _vnode$3 === void 0 || (_vnode$3 = _vnode$3[0]) === null || _vnode$3 === void 0 ? void 0 : _vnode$3.componentOptions;
|
|
7764
|
-
var len = actionList ? (actionList === null || actionList === void 0 || (_actionList$propsData = actionList.propsData) === null || _actionList$propsData === void 0 ? void 0 : _actionList$propsData.count) || (actionList === null || actionList === void 0 || (_actionList$children = actionList.children) === null || _actionList$children === void 0 ? void 0 : _actionList$children.length) || 0 : 0;
|
|
7771
|
+
var len = actionList ? (actionList === null || actionList === void 0 || (_actionList$propsData = actionList.propsData) === null || _actionList$propsData === void 0 ? void 0 : _actionList$propsData.count) === 0 ? 0 : (actionList === null || actionList === void 0 || (_actionList$propsData2 = actionList.propsData) === null || _actionList$propsData2 === void 0 ? void 0 : _actionList$propsData2.count) || (actionList === null || actionList === void 0 || (_actionList$children = actionList.children) === null || _actionList$children === void 0 ? void 0 : _actionList$children.length) || 0 : 0;
|
|
7765
7772
|
var actionWidth = len * 100;
|
|
7766
7773
|
if (!actionWidth) return 100;
|
|
7767
7774
|
this.actionWidth = actionWidth;
|
|
@@ -7914,7 +7921,7 @@ var HrTableBase = {
|
|
|
7914
7921
|
return false;
|
|
7915
7922
|
},
|
|
7916
7923
|
drop: function drop(event) {
|
|
7917
|
-
console.log("drag: drop", event);
|
|
7924
|
+
// console.log("drag: drop", event);
|
|
7918
7925
|
}
|
|
7919
7926
|
}
|
|
7920
7927
|
};
|
|
@@ -7922,7 +7929,7 @@ var HrTableBase = {
|
|
|
7922
7929
|
return toolbar;
|
|
7923
7930
|
};
|
|
7924
7931
|
var tableColumns = this._getTableColumns();
|
|
7925
|
-
console.log('tableColumns-----ref', this.$refs);
|
|
7932
|
+
// console.log('tableColumns-----ref', this.$refs);
|
|
7926
7933
|
return h("div", {
|
|
7927
7934
|
"class": classNames(prefixCls, cls)
|
|
7928
7935
|
}, [h(antDesignVue.Table, _objectSpread$c({}, hrTableProps), [tableColumns.length > 0 ? tableColumns : this._renderColumns(columnList), $scopedSlots.action && h(antDesignVue.Table.Column, {
|