vxe-table 4.2.4-beta.2 → 4.2.4
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/es/all.js +0 -2
- package/es/button/style.css +0 -5
- package/es/checkbox/src/checkbox.js +6 -0
- package/es/checkbox/src/group.js +7 -1
- package/es/edit/src/hook.js +35 -4
- package/es/form/src/form-config-item.js +152 -0
- package/es/form/src/form-gather.js +12 -3
- package/es/form/src/form-item.js +22 -3
- package/es/form/src/form.js +28 -119
- package/es/form/src/itemInfo.js +2 -0
- package/es/form/style.css +6 -6
- package/es/icon/style.css +10 -9
- package/es/input/src/input.js +50 -5
- package/es/input/style.css +5 -0
- package/es/radio/src/button.js +6 -0
- package/es/radio/src/group.js +8 -2
- package/es/radio/src/radio.js +6 -0
- package/es/select/src/select.js +7 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/switch/src/switch.js +7 -1
- package/es/table/src/table.js +3 -2
- package/es/textarea/src/textarea.js +7 -1
- package/es/tools/log.js +1 -1
- package/es/v-x-e-table/index.js +1 -1
- package/es/validator/src/hook.js +1 -1
- package/lib/all.js +15 -15
- package/lib/all.min.js +1 -1
- package/lib/button/style/style.css +0 -5
- package/lib/button/style/style.min.css +1 -1
- package/lib/checkbox/src/checkbox.js +7 -1
- package/lib/checkbox/src/checkbox.min.js +1 -1
- package/lib/checkbox/src/group.js +7 -1
- package/lib/checkbox/src/group.min.js +1 -1
- package/lib/edit/src/hook.js +35 -4
- package/lib/edit/src/hook.min.js +1 -1
- package/lib/form/src/form-config-item.js +212 -0
- package/lib/form/src/form-config-item.min.js +1 -0
- package/lib/form/src/form-gather.js +14 -3
- package/lib/form/src/form-gather.min.js +1 -1
- package/lib/form/src/form-item.js +25 -2
- package/lib/form/src/form-item.min.js +1 -1
- package/lib/form/src/form.js +30 -149
- package/lib/form/src/form.min.js +1 -1
- package/lib/form/src/itemInfo.js +2 -0
- package/lib/form/src/itemInfo.min.js +1 -1
- package/lib/form/style/style.css +6 -6
- package/lib/form/style/style.min.css +1 -1
- package/lib/icon/style/style.css +10 -9
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.umd.js +2072 -1839
- package/lib/index.umd.min.js +1 -1
- package/lib/input/src/input.js +54 -5
- package/lib/input/src/input.min.js +1 -1
- package/lib/input/style/style.css +5 -0
- package/lib/input/style/style.min.css +1 -1
- package/lib/radio/src/button.js +7 -1
- package/lib/radio/src/button.min.js +1 -1
- package/lib/radio/src/group.js +8 -2
- package/lib/radio/src/group.min.js +1 -1
- package/lib/radio/src/radio.js +7 -1
- package/lib/radio/src/radio.min.js +1 -1
- package/lib/select/src/select.js +7 -1
- package/lib/select/src/select.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/switch/src/switch.js +8 -1
- package/lib/switch/src/switch.min.js +1 -1
- package/lib/table/src/table.js +4 -2
- package/lib/table/src/table.min.js +1 -1
- package/lib/textarea/src/textarea.js +7 -1
- package/lib/textarea/src/textarea.min.js +1 -1
- package/lib/tools/log.js +1 -1
- package/lib/tools/log.min.js +1 -1
- package/lib/v-x-e-table/index.js +1 -1
- package/lib/v-x-e-table/index.min.js +1 -1
- package/lib/validator/src/hook.js +1 -1
- package/lib/validator/src/hook.min.js +1 -1
- package/package.json +2 -2
- package/packages/all.ts +0 -2
- package/packages/checkbox/src/checkbox.ts +7 -1
- package/packages/checkbox/src/group.ts +8 -2
- package/packages/edit/src/hook.ts +35 -4
- package/packages/form/src/form-config-item.ts +156 -0
- package/packages/form/src/form-gather.ts +13 -3
- package/packages/form/src/form-item.ts +24 -3
- package/packages/form/src/form.ts +28 -126
- package/packages/form/src/itemInfo.ts +2 -0
- package/packages/input/src/input.ts +54 -6
- package/packages/radio/src/button.ts +7 -1
- package/packages/radio/src/group.ts +9 -3
- package/packages/radio/src/radio.ts +7 -1
- package/packages/select/src/select.ts +8 -2
- package/packages/switch/src/switch.ts +8 -2
- package/packages/table/src/table.ts +3 -2
- package/packages/textarea/src/textarea.ts +8 -2
- package/packages/validator/src/hook.ts +1 -1
- package/styles/button.scss +0 -5
- package/styles/form.scss +17 -19
- package/styles/icon.scss +10 -9
- package/styles/input.scss +4 -0
- package/styles/variable.scss +1 -0
- package/types/all.d.ts +0 -1
- package/types/edit.d.ts +38 -5
- package/types/form-item.d.ts +10 -0
- package/types/form.d.ts +14 -2
package/lib/index.umd.js
CHANGED
|
@@ -8802,7 +8802,7 @@ var es_array_concat = __webpack_require__("99af");
|
|
|
8802
8802
|
|
|
8803
8803
|
|
|
8804
8804
|
function getLog(message, params) {
|
|
8805
|
-
return "[vxe-table v".concat("4.2.4-beta.
|
|
8805
|
+
return "[vxe-table v".concat("4.2.4-beta.3", "] ").concat(conf.i18n(message, params));
|
|
8806
8806
|
}
|
|
8807
8807
|
|
|
8808
8808
|
function outLog(type) {
|
|
@@ -10807,7 +10807,7 @@ var v_x_e_table_config = new v_x_e_table_VXETableConfig();
|
|
|
10807
10807
|
var v = 'v4';
|
|
10808
10808
|
var VXETable = {
|
|
10809
10809
|
v: v,
|
|
10810
|
-
version: "4.2.4-beta.
|
|
10810
|
+
version: "4.2.4-beta.3",
|
|
10811
10811
|
setup: setup_setup,
|
|
10812
10812
|
interceptor: interceptor,
|
|
10813
10813
|
renderer: renderer,
|
|
@@ -12768,6 +12768,9 @@ var editHook = {
|
|
|
12768
12768
|
return [];
|
|
12769
12769
|
},
|
|
12770
12770
|
getActiveRecord: function getActiveRecord() {
|
|
12771
|
+
return this.getEditRecord();
|
|
12772
|
+
},
|
|
12773
|
+
getEditRecord: function getEditRecord() {
|
|
12771
12774
|
var editStore = reactData.editStore;
|
|
12772
12775
|
var afterFullData = internalData.afterFullData;
|
|
12773
12776
|
var el = refElem.value;
|
|
@@ -12797,11 +12800,18 @@ var editHook = {
|
|
|
12797
12800
|
|
|
12798
12801
|
return null;
|
|
12799
12802
|
},
|
|
12803
|
+
clearActived: function clearActived(evnt) {
|
|
12804
|
+
// if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
12805
|
+
// warnLog('vxe.error.delFunc', ['clearActived', 'clearEdit'])
|
|
12806
|
+
// }
|
|
12807
|
+
// 即将废弃
|
|
12808
|
+
return this.clearEdit(evnt);
|
|
12809
|
+
},
|
|
12800
12810
|
|
|
12801
12811
|
/**
|
|
12802
12812
|
* 清除激活的编辑
|
|
12803
12813
|
*/
|
|
12804
|
-
|
|
12814
|
+
clearEdit: function clearEdit(evnt) {
|
|
12805
12815
|
var editStore = reactData.editStore;
|
|
12806
12816
|
var actived = editStore.actived;
|
|
12807
12817
|
var row = actived.row,
|
|
@@ -12837,30 +12847,51 @@ var editHook = {
|
|
|
12837
12847
|
removeCellSelectedClass();
|
|
12838
12848
|
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])();
|
|
12839
12849
|
},
|
|
12850
|
+
isActiveByRow: function isActiveByRow(row) {
|
|
12851
|
+
// if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
12852
|
+
// warnLog('vxe.error.delFunc', ['isActiveByRow', 'isEditByRow'])
|
|
12853
|
+
// }
|
|
12854
|
+
// 即将废弃
|
|
12855
|
+
return this.isEditByRow(row);
|
|
12856
|
+
},
|
|
12840
12857
|
|
|
12841
12858
|
/**
|
|
12842
12859
|
* 判断行是否为激活编辑状态
|
|
12843
12860
|
* @param {Row} row 行对象
|
|
12844
12861
|
*/
|
|
12845
|
-
|
|
12862
|
+
isEditByRow: function isEditByRow(row) {
|
|
12846
12863
|
var editStore = reactData.editStore;
|
|
12847
12864
|
return editStore.actived.row === row;
|
|
12848
12865
|
},
|
|
12866
|
+
setActiveRow: function setActiveRow(row) {
|
|
12867
|
+
// if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
12868
|
+
// warnLog('vxe.error.delFunc', ['setActiveRow', 'setEditRow'])
|
|
12869
|
+
// }
|
|
12870
|
+
// 即将废弃
|
|
12871
|
+
return editMethods.setEditRow(row);
|
|
12872
|
+
},
|
|
12849
12873
|
|
|
12850
12874
|
/**
|
|
12851
12875
|
* 激活行编辑
|
|
12852
12876
|
*/
|
|
12853
|
-
|
|
12877
|
+
setEditRow: function setEditRow(row) {
|
|
12854
12878
|
var visibleColumn = internalData.visibleColumn;
|
|
12855
12879
|
return $xetable.setActiveCell(row, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.find(visibleColumn, function (column) {
|
|
12856
12880
|
return isEnableConf(column.editRender);
|
|
12857
12881
|
}));
|
|
12858
12882
|
},
|
|
12883
|
+
setActiveCell: function setActiveCell(row, fieldOrColumn) {
|
|
12884
|
+
// if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
12885
|
+
// warnLog('vxe.error.delFunc', ['setActiveCell', 'setEditCell'])
|
|
12886
|
+
// }
|
|
12887
|
+
// 即将废弃
|
|
12888
|
+
return editMethods.setEditCell(row, fieldOrColumn);
|
|
12889
|
+
},
|
|
12859
12890
|
|
|
12860
12891
|
/**
|
|
12861
12892
|
* 激活单元格编辑
|
|
12862
12893
|
*/
|
|
12863
|
-
|
|
12894
|
+
setEditCell: function setEditCell(row, fieldOrColumn) {
|
|
12864
12895
|
var editConfig = props.editConfig;
|
|
12865
12896
|
var column = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isString(fieldOrColumn) ? $xetable.getColumnByField(fieldOrColumn) : fieldOrColumn;
|
|
12866
12897
|
|
|
@@ -15132,6 +15163,8 @@ var quarterSize = 8;
|
|
|
15132
15163
|
setup: function setup(props, context) {
|
|
15133
15164
|
var slots = context.slots,
|
|
15134
15165
|
emit = context.emit;
|
|
15166
|
+
var $xeform = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('$xeform', null);
|
|
15167
|
+
var $xeformiteminfo = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('$xeformiteminfo', null);
|
|
15135
15168
|
var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.uniqueId();
|
|
15136
15169
|
var computeSize = useSize(props);
|
|
15137
15170
|
var reactData = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({
|
|
@@ -15633,6 +15666,41 @@ var quarterSize = 8;
|
|
|
15633
15666
|
immediate = props.immediate;
|
|
15634
15667
|
return immediate || !(type === 'text' || type === 'number' || type === 'integer' || type === 'float');
|
|
15635
15668
|
});
|
|
15669
|
+
var computeNumValue = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () {
|
|
15670
|
+
var type = props.type;
|
|
15671
|
+
var inputValue = reactData.inputValue;
|
|
15672
|
+
var isNumType = computeIsNumType.value;
|
|
15673
|
+
|
|
15674
|
+
if (isNumType) {
|
|
15675
|
+
return type === 'integer' ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toInteger(handleNumber(inputValue)) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toNumber(handleNumber(inputValue));
|
|
15676
|
+
}
|
|
15677
|
+
|
|
15678
|
+
return 0;
|
|
15679
|
+
});
|
|
15680
|
+
var computeIsDisabledSubtractNumber = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () {
|
|
15681
|
+
var min = props.min;
|
|
15682
|
+
var inputValue = reactData.inputValue;
|
|
15683
|
+
var isNumType = computeIsNumType.value;
|
|
15684
|
+
var numValue = computeNumValue.value; // 当有值时再进行判断
|
|
15685
|
+
|
|
15686
|
+
if ((inputValue || inputValue === 0) && isNumType && min !== null) {
|
|
15687
|
+
return numValue <= external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toNumber(min);
|
|
15688
|
+
}
|
|
15689
|
+
|
|
15690
|
+
return false;
|
|
15691
|
+
});
|
|
15692
|
+
var computeIsDisabledAddNumber = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () {
|
|
15693
|
+
var max = props.max;
|
|
15694
|
+
var inputValue = reactData.inputValue;
|
|
15695
|
+
var isNumType = computeIsNumType.value;
|
|
15696
|
+
var numValue = computeNumValue.value; // 当有值时再进行判断
|
|
15697
|
+
|
|
15698
|
+
if ((inputValue || inputValue === 0) && isNumType && max !== null) {
|
|
15699
|
+
return numValue >= external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toNumber(max);
|
|
15700
|
+
}
|
|
15701
|
+
|
|
15702
|
+
return false;
|
|
15703
|
+
});
|
|
15636
15704
|
|
|
15637
15705
|
var getNumberValue = function getNumberValue(val) {
|
|
15638
15706
|
var type = props.type,
|
|
@@ -15665,7 +15733,11 @@ var quarterSize = 8;
|
|
|
15665
15733
|
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toValueString(props.modelValue) !== value) {
|
|
15666
15734
|
inputMethods.dispatchEvent('change', {
|
|
15667
15735
|
value: value
|
|
15668
|
-
}, evnt);
|
|
15736
|
+
}, evnt); // 自动更新校验状态
|
|
15737
|
+
|
|
15738
|
+
if ($xeform && $xeformiteminfo) {
|
|
15739
|
+
$xeform.triggerItemEvent(evnt, $xeformiteminfo.itemConfig.field, value);
|
|
15740
|
+
}
|
|
15669
15741
|
}
|
|
15670
15742
|
};
|
|
15671
15743
|
|
|
@@ -16085,9 +16157,10 @@ var quarterSize = 8;
|
|
|
16085
16157
|
var numberNextEvent = function numberNextEvent(evnt) {
|
|
16086
16158
|
var readonly = props.readonly,
|
|
16087
16159
|
disabled = props.disabled;
|
|
16160
|
+
var isDisabledSubtractNumber = computeIsDisabledSubtractNumber.value;
|
|
16088
16161
|
clearTimeout(downbumTimeout);
|
|
16089
16162
|
|
|
16090
|
-
if (!disabled && !readonly) {
|
|
16163
|
+
if (!disabled && !readonly && !isDisabledSubtractNumber) {
|
|
16091
16164
|
numberChange(false, evnt);
|
|
16092
16165
|
}
|
|
16093
16166
|
|
|
@@ -16104,9 +16177,10 @@ var quarterSize = 8;
|
|
|
16104
16177
|
var numberPrevEvent = function numberPrevEvent(evnt) {
|
|
16105
16178
|
var readonly = props.readonly,
|
|
16106
16179
|
disabled = props.disabled;
|
|
16180
|
+
var isDisabledAddNumber = computeIsDisabledAddNumber.value;
|
|
16107
16181
|
clearTimeout(downbumTimeout);
|
|
16108
16182
|
|
|
16109
|
-
if (!disabled && !readonly) {
|
|
16183
|
+
if (!disabled && !readonly && !isDisabledAddNumber) {
|
|
16110
16184
|
numberChange(true, evnt);
|
|
16111
16185
|
}
|
|
16112
16186
|
|
|
@@ -17300,17 +17374,23 @@ var quarterSize = 8;
|
|
|
17300
17374
|
};
|
|
17301
17375
|
|
|
17302
17376
|
var renderNumberIcon = function renderNumberIcon() {
|
|
17377
|
+
var isDisabledAddNumber = computeIsDisabledAddNumber.value;
|
|
17378
|
+
var isDisabledSubtractNumber = computeIsDisabledSubtractNumber.value;
|
|
17303
17379
|
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
17304
17380
|
class: 'vxe-input--number-suffix'
|
|
17305
17381
|
}, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
17306
|
-
class: 'vxe-input--number-prev is--prev',
|
|
17382
|
+
class: ['vxe-input--number-prev is--prev', {
|
|
17383
|
+
'is--disabled': isDisabledAddNumber
|
|
17384
|
+
}],
|
|
17307
17385
|
onMousedown: numberMousedownEvent,
|
|
17308
17386
|
onMouseup: numberStopDown,
|
|
17309
17387
|
onMouseleave: numberStopDown
|
|
17310
17388
|
}, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('i', {
|
|
17311
17389
|
class: ['vxe-input--number-prev-icon', conf.icon.INPUT_PREV_NUM]
|
|
17312
17390
|
})]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
17313
|
-
class: 'vxe-input--number-next is--next',
|
|
17391
|
+
class: ['vxe-input--number-next is--next', {
|
|
17392
|
+
'is--disabled': isDisabledSubtractNumber
|
|
17393
|
+
}],
|
|
17314
17394
|
onMousedown: numberMousedownEvent,
|
|
17315
17395
|
onMouseup: numberStopDown,
|
|
17316
17396
|
onMouseleave: numberStopDown
|
|
@@ -17612,6 +17692,8 @@ var es_string_includes = __webpack_require__("2532");
|
|
|
17612
17692
|
setup: function setup(props, context) {
|
|
17613
17693
|
var slots = context.slots,
|
|
17614
17694
|
emit = context.emit;
|
|
17695
|
+
var $xeform = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('$xeform', null);
|
|
17696
|
+
var $xeformiteminfo = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('$xeformiteminfo', null);
|
|
17615
17697
|
var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.uniqueId();
|
|
17616
17698
|
var $xecheckbox = {
|
|
17617
17699
|
xID: xID,
|
|
@@ -17646,7 +17728,11 @@ var es_string_includes = __webpack_require__("2532");
|
|
|
17646
17728
|
$xecheckboxgroup.handleChecked(params, evnt);
|
|
17647
17729
|
} else {
|
|
17648
17730
|
emit('update:modelValue', value);
|
|
17649
|
-
checkboxMethods.dispatchEvent('change', params, evnt);
|
|
17731
|
+
checkboxMethods.dispatchEvent('change', params, evnt); // 自动更新校验状态
|
|
17732
|
+
|
|
17733
|
+
if ($xeform && $xeformiteminfo) {
|
|
17734
|
+
$xeform.triggerItemEvent(evnt, $xeformiteminfo.itemConfig.field, value);
|
|
17735
|
+
}
|
|
17650
17736
|
}
|
|
17651
17737
|
}
|
|
17652
17738
|
};
|
|
@@ -17765,6 +17851,8 @@ function getOptUniqueId() {
|
|
|
17765
17851
|
setup: function setup(props, context) {
|
|
17766
17852
|
var slots = context.slots,
|
|
17767
17853
|
emit = context.emit;
|
|
17854
|
+
var $xeform = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('$xeform', null);
|
|
17855
|
+
var $xeformiteminfo = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('$xeformiteminfo', null);
|
|
17768
17856
|
var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.uniqueId();
|
|
17769
17857
|
var computeSize = useSize(props);
|
|
17770
17858
|
var reactData = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({
|
|
@@ -18122,7 +18210,11 @@ function getOptUniqueId() {
|
|
|
18122
18210
|
emit('update:modelValue', selectValue);
|
|
18123
18211
|
selectMethods.dispatchEvent('change', {
|
|
18124
18212
|
value: selectValue
|
|
18125
|
-
}, evnt);
|
|
18213
|
+
}, evnt); // 自动更新校验状态
|
|
18214
|
+
|
|
18215
|
+
if ($xeform && $xeformiteminfo) {
|
|
18216
|
+
$xeform.triggerItemEvent(evnt, $xeformiteminfo.itemConfig.field, selectValue);
|
|
18217
|
+
}
|
|
18126
18218
|
}
|
|
18127
18219
|
};
|
|
18128
18220
|
|
|
@@ -19051,6 +19143,8 @@ function getOptUniqueId() {
|
|
|
19051
19143
|
setup: function setup(props, context) {
|
|
19052
19144
|
var slots = context.slots,
|
|
19053
19145
|
emit = context.emit;
|
|
19146
|
+
var $xeform = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('$xeform', null);
|
|
19147
|
+
var $xeformiteminfo = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('$xeformiteminfo', null);
|
|
19054
19148
|
var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.uniqueId();
|
|
19055
19149
|
var $xeradiogroup = {
|
|
19056
19150
|
xID: xID,
|
|
@@ -19061,9 +19155,13 @@ function getOptUniqueId() {
|
|
|
19061
19155
|
var radioGroupMethods = {};
|
|
19062
19156
|
useSize(props);
|
|
19063
19157
|
var radioGroupPrivateMethods = {
|
|
19064
|
-
handleChecked: function handleChecked(params) {
|
|
19158
|
+
handleChecked: function handleChecked(params, evnt) {
|
|
19065
19159
|
emit('update:modelValue', params.label);
|
|
19066
|
-
radioGroupMethods.dispatchEvent('change', params);
|
|
19160
|
+
radioGroupMethods.dispatchEvent('change', params); // 自动更新校验状态
|
|
19161
|
+
|
|
19162
|
+
if ($xeform && $xeformiteminfo) {
|
|
19163
|
+
$xeform.triggerItemEvent(evnt, $xeformiteminfo.itemConfig.field, params.label);
|
|
19164
|
+
}
|
|
19067
19165
|
}
|
|
19068
19166
|
};
|
|
19069
19167
|
radioGroupMethods = {
|
|
@@ -19128,6 +19226,8 @@ function getOptUniqueId() {
|
|
|
19128
19226
|
setup: function setup(props, context) {
|
|
19129
19227
|
var slots = context.slots,
|
|
19130
19228
|
emit = context.emit;
|
|
19229
|
+
var $xeform = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('$xeform', null);
|
|
19230
|
+
var $xeformiteminfo = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('$xeformiteminfo', null);
|
|
19131
19231
|
var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.uniqueId();
|
|
19132
19232
|
var $xeradio = {
|
|
19133
19233
|
xID: xID,
|
|
@@ -19161,7 +19261,11 @@ function getOptUniqueId() {
|
|
|
19161
19261
|
emit('update:modelValue', label);
|
|
19162
19262
|
radioMethods.dispatchEvent('change', {
|
|
19163
19263
|
label: label
|
|
19164
|
-
}, evnt);
|
|
19264
|
+
}, evnt); // 自动更新校验状态
|
|
19265
|
+
|
|
19266
|
+
if ($xeform && $xeformiteminfo) {
|
|
19267
|
+
$xeform.triggerItemEvent(evnt, $xeformiteminfo.itemConfig.field, label);
|
|
19268
|
+
}
|
|
19165
19269
|
}
|
|
19166
19270
|
};
|
|
19167
19271
|
|
|
@@ -22322,7 +22426,7 @@ var validatorHook = {
|
|
|
22322
22426
|
}
|
|
22323
22427
|
} else {
|
|
22324
22428
|
var isArrType = type === 'array';
|
|
22325
|
-
var hasEmpty = isArrType ? !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isArray(cellValue) || !cellValue.length : eqEmptyValue(cellValue);
|
|
22429
|
+
var hasEmpty = isArrType || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isArray(cellValue) ? !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isArray(cellValue) || !cellValue.length : eqEmptyValue(cellValue);
|
|
22326
22430
|
|
|
22327
22431
|
if (required ? hasEmpty || validErrorRuleValue(rule, cellValue) : !hasEmpty && validErrorRuleValue(rule, cellValue)) {
|
|
22328
22432
|
validRuleErr = true;
|
|
@@ -22451,100 +22555,66 @@ var Validator = {
|
|
|
22451
22555
|
}
|
|
22452
22556
|
};
|
|
22453
22557
|
/* harmony default export */ var validator = (Validator);
|
|
22454
|
-
// CONCATENATED MODULE: ./packages/
|
|
22455
|
-
|
|
22456
|
-
|
|
22457
|
-
|
|
22458
|
-
var util_getAllColumns = function getAllColumns(columns, parentColumn) {
|
|
22459
|
-
var result = [];
|
|
22460
|
-
columns.forEach(function (column) {
|
|
22461
|
-
column.parentId = parentColumn ? parentColumn.id : null;
|
|
22462
|
-
|
|
22463
|
-
if (column.visible) {
|
|
22464
|
-
if (column.children && column.children.length && column.children.some(function (column) {
|
|
22465
|
-
return column.visible;
|
|
22466
|
-
})) {
|
|
22467
|
-
result.push(column);
|
|
22468
|
-
result.push.apply(result, _toConsumableArray(getAllColumns(column.children, column)));
|
|
22469
|
-
} else {
|
|
22470
|
-
result.push(column);
|
|
22471
|
-
}
|
|
22472
|
-
}
|
|
22473
|
-
});
|
|
22474
|
-
return result;
|
|
22475
|
-
};
|
|
22476
|
-
|
|
22477
|
-
var util_convertToRows = function convertToRows(originColumns) {
|
|
22478
|
-
var maxLevel = 1;
|
|
22479
|
-
|
|
22480
|
-
var traverse = function traverse(column, parent) {
|
|
22481
|
-
if (parent) {
|
|
22482
|
-
column.level = parent.level + 1;
|
|
22483
|
-
|
|
22484
|
-
if (maxLevel < column.level) {
|
|
22485
|
-
maxLevel = column.level;
|
|
22486
|
-
}
|
|
22487
|
-
}
|
|
22488
|
-
|
|
22489
|
-
if (column.children && column.children.length && column.children.some(function (column) {
|
|
22490
|
-
return column.visible;
|
|
22491
|
-
})) {
|
|
22492
|
-
var colSpan = 0;
|
|
22493
|
-
column.children.forEach(function (subColumn) {
|
|
22494
|
-
if (subColumn.visible) {
|
|
22495
|
-
traverse(subColumn, column);
|
|
22496
|
-
colSpan += subColumn.colSpan;
|
|
22497
|
-
}
|
|
22498
|
-
});
|
|
22499
|
-
column.colSpan = colSpan;
|
|
22500
|
-
} else {
|
|
22501
|
-
column.colSpan = 1;
|
|
22502
|
-
}
|
|
22503
|
-
};
|
|
22558
|
+
// CONCATENATED MODULE: ./packages/footer/src/footer.ts
|
|
22504
22559
|
|
|
22505
|
-
originColumns.forEach(function (column) {
|
|
22506
|
-
column.level = 1;
|
|
22507
|
-
traverse(column);
|
|
22508
|
-
});
|
|
22509
|
-
var rows = [];
|
|
22510
22560
|
|
|
22511
|
-
for (var i = 0; i < maxLevel; i++) {
|
|
22512
|
-
rows.push([]);
|
|
22513
|
-
}
|
|
22514
22561
|
|
|
22515
|
-
var allColumns = util_getAllColumns(originColumns);
|
|
22516
|
-
allColumns.forEach(function (column) {
|
|
22517
|
-
if (column.children && column.children.length && column.children.some(function (column) {
|
|
22518
|
-
return column.visible;
|
|
22519
|
-
})) {
|
|
22520
|
-
column.rowSpan = 1;
|
|
22521
|
-
} else {
|
|
22522
|
-
column.rowSpan = maxLevel - column.level + 1;
|
|
22523
|
-
}
|
|
22524
22562
|
|
|
22525
|
-
rows[column.level - 1].push(column);
|
|
22526
|
-
});
|
|
22527
|
-
return rows;
|
|
22528
|
-
};
|
|
22529
|
-
// CONCATENATED MODULE: ./packages/header/src/header.ts
|
|
22530
22563
|
|
|
22531
22564
|
|
|
22532
22565
|
|
|
22533
22566
|
|
|
22534
22567
|
|
|
22535
22568
|
|
|
22569
|
+
var renderType = 'footer';
|
|
22536
22570
|
|
|
22571
|
+
function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
|
|
22572
|
+
for (var mIndex = 0; mIndex < mergeFooterList.length; mIndex++) {
|
|
22573
|
+
var _mergeFooterList$mInd = mergeFooterList[mIndex],
|
|
22574
|
+
mergeRowIndex = _mergeFooterList$mInd.row,
|
|
22575
|
+
mergeColIndex = _mergeFooterList$mInd.col,
|
|
22576
|
+
mergeRowspan = _mergeFooterList$mInd.rowspan,
|
|
22577
|
+
mergeColspan = _mergeFooterList$mInd.colspan;
|
|
22537
22578
|
|
|
22579
|
+
if (mergeColIndex > -1 && mergeRowIndex > -1 && mergeRowspan && mergeColspan) {
|
|
22580
|
+
if (mergeRowIndex === _rowIndex && mergeColIndex === _columnIndex) {
|
|
22581
|
+
return {
|
|
22582
|
+
rowspan: mergeRowspan,
|
|
22583
|
+
colspan: mergeColspan
|
|
22584
|
+
};
|
|
22585
|
+
}
|
|
22538
22586
|
|
|
22587
|
+
if (_rowIndex >= mergeRowIndex && _rowIndex < mergeRowIndex + mergeRowspan && _columnIndex >= mergeColIndex && _columnIndex < mergeColIndex + mergeColspan) {
|
|
22588
|
+
return {
|
|
22589
|
+
rowspan: 0,
|
|
22590
|
+
colspan: 0
|
|
22591
|
+
};
|
|
22592
|
+
}
|
|
22593
|
+
}
|
|
22594
|
+
}
|
|
22595
|
+
}
|
|
22539
22596
|
|
|
22540
|
-
var
|
|
22541
|
-
|
|
22542
|
-
name: 'VxeTableHeader',
|
|
22597
|
+
/* harmony default export */ var footer = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({
|
|
22598
|
+
name: 'VxeTableFooter',
|
|
22543
22599
|
props: {
|
|
22544
|
-
|
|
22545
|
-
|
|
22546
|
-
|
|
22547
|
-
|
|
22600
|
+
footerTableData: {
|
|
22601
|
+
type: Array,
|
|
22602
|
+
default: function _default() {
|
|
22603
|
+
return [];
|
|
22604
|
+
}
|
|
22605
|
+
},
|
|
22606
|
+
tableColumn: {
|
|
22607
|
+
type: Array,
|
|
22608
|
+
default: function _default() {
|
|
22609
|
+
return [];
|
|
22610
|
+
}
|
|
22611
|
+
},
|
|
22612
|
+
fixedColumn: {
|
|
22613
|
+
type: Array,
|
|
22614
|
+
default: function _default() {
|
|
22615
|
+
return [];
|
|
22616
|
+
}
|
|
22617
|
+
},
|
|
22548
22618
|
fixedType: {
|
|
22549
22619
|
type: String,
|
|
22550
22620
|
default: null
|
|
@@ -22558,200 +22628,135 @@ var renderType = 'header';
|
|
|
22558
22628
|
tableInternalData = $xetable.internalData;
|
|
22559
22629
|
|
|
22560
22630
|
var _$xetable$getRefMaps = $xetable.getRefMaps(),
|
|
22561
|
-
|
|
22631
|
+
refTableHeader = _$xetable$getRefMaps.refTableHeader,
|
|
22562
22632
|
refTableBody = _$xetable$getRefMaps.refTableBody,
|
|
22563
|
-
|
|
22564
|
-
refRightContainer = _$xetable$getRefMaps.refRightContainer,
|
|
22565
|
-
refCellResizeBar = _$xetable$getRefMaps.refCellResizeBar;
|
|
22633
|
+
refValidTooltip = _$xetable$getRefMaps.refValidTooltip;
|
|
22566
22634
|
|
|
22567
22635
|
var _$xetable$getComputeM = $xetable.getComputeMaps(),
|
|
22636
|
+
computeTooltipOpts = _$xetable$getComputeM.computeTooltipOpts,
|
|
22568
22637
|
computeColumnOpts = _$xetable$getComputeM.computeColumnOpts;
|
|
22569
22638
|
|
|
22570
|
-
var headerColumn = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])([]);
|
|
22571
22639
|
var refElem = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
22572
|
-
var
|
|
22573
|
-
var
|
|
22574
|
-
var
|
|
22575
|
-
var
|
|
22576
|
-
|
|
22577
|
-
|
|
22578
|
-
|
|
22579
|
-
|
|
22580
|
-
|
|
22581
|
-
};
|
|
22640
|
+
var refFooterTable = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
22641
|
+
var refFooterColgroup = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
22642
|
+
var refFooterTFoot = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
22643
|
+
var refFooterXSpace = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
22644
|
+
/**
|
|
22645
|
+
* 滚动处理
|
|
22646
|
+
* 如果存在列固定左侧,同步更新滚动状态
|
|
22647
|
+
* 如果存在列固定右侧,同步更新滚动状态
|
|
22648
|
+
*/
|
|
22582
22649
|
|
|
22583
|
-
var
|
|
22584
|
-
var column = params.column;
|
|
22650
|
+
var scrollEvent = function scrollEvent(evnt) {
|
|
22585
22651
|
var fixedType = props.fixedType;
|
|
22652
|
+
var scrollXLoad = tableReactData.scrollXLoad;
|
|
22653
|
+
var lastScrollLeft = tableInternalData.lastScrollLeft;
|
|
22654
|
+
var validTip = refValidTooltip.value;
|
|
22655
|
+
var tableHeader = refTableHeader.value;
|
|
22586
22656
|
var tableBody = refTableBody.value;
|
|
22587
|
-
var
|
|
22588
|
-
var
|
|
22589
|
-
var
|
|
22590
|
-
var
|
|
22591
|
-
var
|
|
22592
|
-
|
|
22593
|
-
|
|
22594
|
-
var dragLeft = 0;
|
|
22595
|
-
var tableBodyElem = tableBody.$el;
|
|
22596
|
-
var pos = getOffsetPos(dragBtnElem, wrapperElem);
|
|
22597
|
-
var dragBtnWidth = dragBtnElem.clientWidth;
|
|
22598
|
-
var dragBtnOffsetWidth = Math.floor(dragBtnWidth / 2);
|
|
22599
|
-
var minInterval = getColMinWidth(params) - dragBtnOffsetWidth; // 列之间的最小间距
|
|
22657
|
+
var headerElem = tableHeader ? tableHeader.$el : null;
|
|
22658
|
+
var footerElem = refElem.value;
|
|
22659
|
+
var bodyElem = tableBody.$el;
|
|
22660
|
+
var scrollLeft = footerElem.scrollLeft;
|
|
22661
|
+
var isX = scrollLeft !== lastScrollLeft;
|
|
22662
|
+
tableInternalData.lastScrollLeft = scrollLeft;
|
|
22663
|
+
tableInternalData.lastScrollTime = Date.now();
|
|
22600
22664
|
|
|
22601
|
-
|
|
22602
|
-
|
|
22603
|
-
|
|
22604
|
-
var domMouseup = document.onmouseup;
|
|
22605
|
-
var isLeftFixed = fixedType === 'left';
|
|
22606
|
-
var isRightFixed = fixedType === 'right';
|
|
22607
|
-
var tableEl = tableRefElem.value; // 计算左右侧固定列偏移量
|
|
22665
|
+
if (headerElem) {
|
|
22666
|
+
headerElem.scrollLeft = scrollLeft;
|
|
22667
|
+
}
|
|
22608
22668
|
|
|
22609
|
-
|
|
22669
|
+
if (bodyElem) {
|
|
22670
|
+
bodyElem.scrollLeft = scrollLeft;
|
|
22671
|
+
}
|
|
22610
22672
|
|
|
22611
|
-
if (
|
|
22612
|
-
|
|
22613
|
-
|
|
22673
|
+
if (scrollXLoad && isX) {
|
|
22674
|
+
$xetable.triggerScrollXEvent(evnt);
|
|
22675
|
+
}
|
|
22614
22676
|
|
|
22615
|
-
|
|
22616
|
-
|
|
22617
|
-
break;
|
|
22618
|
-
} else if (!hasClass(tempCellElem, 'col--group')) {
|
|
22619
|
-
fixedOffsetWidth += tempCellElem.offsetWidth;
|
|
22620
|
-
}
|
|
22621
|
-
|
|
22622
|
-
tempCellElem = tempCellElem[siblingProp];
|
|
22623
|
-
}
|
|
22624
|
-
|
|
22625
|
-
if (isRightFixed && rightContainerElem) {
|
|
22626
|
-
dragPosLeft = rightContainerElem.offsetLeft + fixedOffsetWidth;
|
|
22627
|
-
}
|
|
22628
|
-
} // 处理拖动事件
|
|
22629
|
-
|
|
22630
|
-
|
|
22631
|
-
var updateEvent = function updateEvent(evnt) {
|
|
22632
|
-
evnt.stopPropagation();
|
|
22633
|
-
evnt.preventDefault();
|
|
22634
|
-
var offsetX = evnt.clientX - dragClientX;
|
|
22635
|
-
var left = dragPosLeft + offsetX;
|
|
22636
|
-
var scrollLeft = fixedType ? 0 : tableBodyElem.scrollLeft;
|
|
22637
|
-
|
|
22638
|
-
if (isLeftFixed) {
|
|
22639
|
-
// 左固定列(不允许超过右侧固定列、不允许超过右边距)
|
|
22640
|
-
left = Math.min(left, (rightContainerElem ? rightContainerElem.offsetLeft : tableBodyElem.clientWidth) - fixedOffsetWidth - minInterval);
|
|
22641
|
-
} else if (isRightFixed) {
|
|
22642
|
-
// 右侧固定列(不允许超过左侧固定列、不允许超过左边距)
|
|
22643
|
-
dragMinLeft = (leftContainerElem ? leftContainerElem.clientWidth : 0) + fixedOffsetWidth + minInterval;
|
|
22644
|
-
left = Math.min(left, dragPosLeft + cell.clientWidth - minInterval);
|
|
22645
|
-
} else {
|
|
22646
|
-
dragMinLeft = Math.max(tableBodyElem.scrollLeft, dragMinLeft); // left = Math.min(left, tableBodyElem.clientWidth + tableBodyElem.scrollLeft - 40)
|
|
22647
|
-
}
|
|
22648
|
-
|
|
22649
|
-
dragLeft = Math.max(left, dragMinLeft);
|
|
22650
|
-
resizeBarElem.style.left = "".concat(dragLeft - scrollLeft, "px");
|
|
22651
|
-
};
|
|
22652
|
-
|
|
22653
|
-
tableInternalData._isResize = true;
|
|
22654
|
-
addClass(tableEl, 'drag--resize');
|
|
22655
|
-
resizeBarElem.style.display = 'block';
|
|
22656
|
-
document.onmousemove = updateEvent;
|
|
22657
|
-
|
|
22658
|
-
document.onmouseup = function (evnt) {
|
|
22659
|
-
document.onmousemove = domMousemove;
|
|
22660
|
-
document.onmouseup = domMouseup;
|
|
22661
|
-
column.resizeWidth = column.renderWidth + (isRightFixed ? dragPosLeft - dragLeft : dragLeft - dragPosLeft);
|
|
22662
|
-
resizeBarElem.style.display = 'none';
|
|
22663
|
-
tableInternalData._isResize = false;
|
|
22664
|
-
tableInternalData._lastResizeTime = Date.now();
|
|
22665
|
-
$xetable.analyColumnWidth();
|
|
22666
|
-
$xetable.recalculate(true).then(function () {
|
|
22667
|
-
$xetable.saveCustomResizable();
|
|
22668
|
-
$xetable.updateCellAreas();
|
|
22669
|
-
$xetable.dispatchEvent('resizable-change', params, evnt);
|
|
22670
|
-
});
|
|
22671
|
-
removeClass(tableEl, 'drag--resize');
|
|
22672
|
-
};
|
|
22673
|
-
|
|
22674
|
-
updateEvent(evnt);
|
|
22675
|
-
|
|
22676
|
-
if ($xetable.closeMenu) {
|
|
22677
|
-
$xetable.closeMenu();
|
|
22677
|
+
if (isX && validTip && validTip.reactData.visible) {
|
|
22678
|
+
validTip.updatePlacement();
|
|
22678
22679
|
}
|
|
22680
|
+
|
|
22681
|
+
$xetable.dispatchEvent('scroll', {
|
|
22682
|
+
type: renderType,
|
|
22683
|
+
fixed: fixedType,
|
|
22684
|
+
scrollTop: bodyElem.scrollTop,
|
|
22685
|
+
scrollLeft: scrollLeft,
|
|
22686
|
+
isX: isX,
|
|
22687
|
+
isY: false
|
|
22688
|
+
}, evnt);
|
|
22679
22689
|
};
|
|
22680
22690
|
|
|
22681
|
-
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () {
|
|
22682
|
-
return props.tableColumn;
|
|
22683
|
-
}, uploadColumn);
|
|
22684
22691
|
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onMounted"])(function () {
|
|
22685
22692
|
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])(function () {
|
|
22686
22693
|
var fixedType = props.fixedType;
|
|
22687
|
-
var
|
|
22688
|
-
var
|
|
22689
|
-
var prefix = "".concat(fixedType || 'main', "-header-");
|
|
22694
|
+
var elemStore = tableInternalData.elemStore;
|
|
22695
|
+
var prefix = "".concat(fixedType || 'main', "-footer-");
|
|
22690
22696
|
elemStore["".concat(prefix, "wrapper")] = refElem;
|
|
22691
|
-
elemStore["".concat(prefix, "table")] =
|
|
22692
|
-
elemStore["".concat(prefix, "colgroup")] =
|
|
22693
|
-
elemStore["".concat(prefix, "list")] =
|
|
22694
|
-
elemStore["".concat(prefix, "xSpace")] =
|
|
22695
|
-
elemStore["".concat(prefix, "repair")] = refHeaderBorderRepair;
|
|
22696
|
-
uploadColumn();
|
|
22697
|
+
elemStore["".concat(prefix, "table")] = refFooterTable;
|
|
22698
|
+
elemStore["".concat(prefix, "colgroup")] = refFooterColgroup;
|
|
22699
|
+
elemStore["".concat(prefix, "list")] = refFooterTFoot;
|
|
22700
|
+
elemStore["".concat(prefix, "xSpace")] = refFooterXSpace;
|
|
22697
22701
|
});
|
|
22698
22702
|
});
|
|
22699
22703
|
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onUnmounted"])(function () {
|
|
22700
22704
|
var fixedType = props.fixedType;
|
|
22701
|
-
var
|
|
22702
|
-
var
|
|
22703
|
-
var prefix = "".concat(fixedType || 'main', "-header-");
|
|
22705
|
+
var elemStore = tableInternalData.elemStore;
|
|
22706
|
+
var prefix = "".concat(fixedType || 'main', "-footer-");
|
|
22704
22707
|
elemStore["".concat(prefix, "wrapper")] = null;
|
|
22705
22708
|
elemStore["".concat(prefix, "table")] = null;
|
|
22706
22709
|
elemStore["".concat(prefix, "colgroup")] = null;
|
|
22707
22710
|
elemStore["".concat(prefix, "list")] = null;
|
|
22708
22711
|
elemStore["".concat(prefix, "xSpace")] = null;
|
|
22709
|
-
elemStore["".concat(prefix, "repair")] = null;
|
|
22710
22712
|
});
|
|
22711
22713
|
|
|
22712
22714
|
var renderVN = function renderVN() {
|
|
22713
22715
|
var fixedType = props.fixedType,
|
|
22714
22716
|
fixedColumn = props.fixedColumn,
|
|
22715
|
-
tableColumn = props.tableColumn
|
|
22716
|
-
|
|
22717
|
-
|
|
22718
|
-
|
|
22719
|
-
|
|
22720
|
-
|
|
22721
|
-
|
|
22722
|
-
|
|
22723
|
-
allColumnHeaderOverflow = tableProps.showHeaderOverflow,
|
|
22724
|
-
allHeaderAlign = tableProps.headerAlign,
|
|
22717
|
+
tableColumn = props.tableColumn,
|
|
22718
|
+
footerTableData = props.footerTableData;
|
|
22719
|
+
var footerRowClassName = tableProps.footerRowClassName,
|
|
22720
|
+
footerCellClassName = tableProps.footerCellClassName,
|
|
22721
|
+
footerRowStyle = tableProps.footerRowStyle,
|
|
22722
|
+
footerCellStyle = tableProps.footerCellStyle,
|
|
22723
|
+
allFooterAlign = tableProps.footerAlign,
|
|
22724
|
+
footerSpanMethod = tableProps.footerSpanMethod,
|
|
22725
22725
|
allAlign = tableProps.align,
|
|
22726
|
-
|
|
22727
|
-
|
|
22728
|
-
|
|
22729
|
-
|
|
22726
|
+
columnKey = tableProps.columnKey,
|
|
22727
|
+
allColumnFooterOverflow = tableProps.showFooterOverflow;
|
|
22728
|
+
var visibleColumn = tableInternalData.visibleColumn;
|
|
22729
|
+
var scrollYLoad = tableReactData.scrollYLoad,
|
|
22730
22730
|
overflowX = tableReactData.overflowX,
|
|
22731
|
-
scrollbarWidth = tableReactData.scrollbarWidth
|
|
22732
|
-
|
|
22733
|
-
|
|
22731
|
+
scrollbarWidth = tableReactData.scrollbarWidth,
|
|
22732
|
+
currentColumn = tableReactData.currentColumn,
|
|
22733
|
+
mergeFooterList = tableReactData.mergeFooterList;
|
|
22734
|
+
var tooltipOpts = computeTooltipOpts.value;
|
|
22735
|
+
var columnOpts = computeColumnOpts.value; // 如果是使用优化模式
|
|
22734
22736
|
|
|
22735
|
-
if (
|
|
22736
|
-
if (
|
|
22737
|
-
if (
|
|
22737
|
+
if (fixedType) {
|
|
22738
|
+
if (scrollYLoad || allColumnFooterOverflow) {
|
|
22739
|
+
if (!mergeFooterList.length || !footerSpanMethod) {
|
|
22738
22740
|
tableColumn = fixedColumn;
|
|
22741
|
+
} else {
|
|
22742
|
+
tableColumn = visibleColumn;
|
|
22739
22743
|
}
|
|
22744
|
+
} else {
|
|
22745
|
+
tableColumn = visibleColumn;
|
|
22740
22746
|
}
|
|
22741
|
-
|
|
22742
|
-
headerGroups = [tableColumn];
|
|
22743
22747
|
}
|
|
22744
22748
|
|
|
22745
22749
|
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
22746
22750
|
ref: refElem,
|
|
22747
|
-
class: ['vxe-table--
|
|
22748
|
-
xid: xID
|
|
22751
|
+
class: ['vxe-table--footer-wrapper', fixedType ? "fixed-".concat(fixedType, "--wrapper") : 'body--wrapper'],
|
|
22752
|
+
xid: xID,
|
|
22753
|
+
onScroll: scrollEvent
|
|
22749
22754
|
}, [fixedType ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])() : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
22750
|
-
ref:
|
|
22755
|
+
ref: refFooterXSpace,
|
|
22751
22756
|
class: 'vxe-body--x-space'
|
|
22752
22757
|
}), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('table', {
|
|
22753
|
-
ref:
|
|
22754
|
-
class: 'vxe-table--
|
|
22758
|
+
ref: refFooterTable,
|
|
22759
|
+
class: 'vxe-table--footer',
|
|
22755
22760
|
xid: xID,
|
|
22756
22761
|
cellspacing: 0,
|
|
22757
22762
|
cellpadding: 0,
|
|
@@ -22761,7 +22766,7 @@ var renderType = 'header';
|
|
|
22761
22766
|
* 列宽
|
|
22762
22767
|
*/
|
|
22763
22768
|
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('colgroup', {
|
|
22764
|
-
ref:
|
|
22769
|
+
ref: refFooterColgroup
|
|
22765
22770
|
}, tableColumn.map(function (column, $columnIndex) {
|
|
22766
22771
|
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('col', {
|
|
22767
22772
|
name: column.id,
|
|
@@ -22771,136 +22776,178 @@ var renderType = 'header';
|
|
|
22771
22776
|
name: 'col_gutter'
|
|
22772
22777
|
})] : [])),
|
|
22773
22778
|
/**
|
|
22774
|
-
*
|
|
22779
|
+
* 底部
|
|
22775
22780
|
*/
|
|
22776
|
-
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('
|
|
22777
|
-
ref:
|
|
22778
|
-
},
|
|
22781
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('tfoot', {
|
|
22782
|
+
ref: refFooterTFoot
|
|
22783
|
+
}, footerTableData.map(function (list, _rowIndex) {
|
|
22784
|
+
var $rowIndex = _rowIndex;
|
|
22779
22785
|
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('tr', {
|
|
22780
|
-
class: ['vxe-
|
|
22786
|
+
class: ['vxe-footer--row', footerRowClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(footerRowClassName) ? footerRowClassName({
|
|
22781
22787
|
$table: $xetable,
|
|
22788
|
+
_rowIndex: _rowIndex,
|
|
22782
22789
|
$rowIndex: $rowIndex,
|
|
22783
22790
|
fixed: fixedType,
|
|
22784
22791
|
type: renderType
|
|
22785
|
-
}) :
|
|
22786
|
-
style:
|
|
22792
|
+
}) : footerRowClassName : ''],
|
|
22793
|
+
style: footerRowStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(footerRowStyle) ? footerRowStyle({
|
|
22787
22794
|
$table: $xetable,
|
|
22795
|
+
_rowIndex: _rowIndex,
|
|
22788
22796
|
$rowIndex: $rowIndex,
|
|
22789
22797
|
fixed: fixedType,
|
|
22790
22798
|
type: renderType
|
|
22791
|
-
}) :
|
|
22792
|
-
},
|
|
22793
|
-
var
|
|
22799
|
+
}) : footerRowStyle : null
|
|
22800
|
+
}, tableColumn.map(function (column, $columnIndex) {
|
|
22801
|
+
var _ref2;
|
|
22794
22802
|
|
|
22795
22803
|
var type = column.type,
|
|
22796
|
-
|
|
22797
|
-
|
|
22804
|
+
showFooterOverflow = column.showFooterOverflow,
|
|
22805
|
+
footerAlign = column.footerAlign,
|
|
22798
22806
|
align = column.align,
|
|
22799
|
-
|
|
22807
|
+
footerClassName = column.footerClassName;
|
|
22808
|
+
var showAllTip = tooltipOpts.showAll;
|
|
22800
22809
|
var isColGroup = column.children && column.children.length;
|
|
22801
|
-
var fixedHiddenColumn = fixedType ? column.fixed !== fixedType && !isColGroup :
|
|
22802
|
-
var
|
|
22803
|
-
var
|
|
22804
|
-
var showEllipsis =
|
|
22805
|
-
var showTitle =
|
|
22806
|
-
var showTooltip =
|
|
22810
|
+
var fixedHiddenColumn = fixedType ? column.fixed !== fixedType && !isColGroup : column.fixed && overflowX;
|
|
22811
|
+
var footOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isUndefined(showFooterOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isNull(showFooterOverflow) ? allColumnFooterOverflow : showFooterOverflow;
|
|
22812
|
+
var footAlign = footerAlign || align || allFooterAlign || allAlign;
|
|
22813
|
+
var showEllipsis = footOverflow === 'ellipsis';
|
|
22814
|
+
var showTitle = footOverflow === 'title';
|
|
22815
|
+
var showTooltip = footOverflow === true || footOverflow === 'tooltip';
|
|
22807
22816
|
var hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
22808
|
-
var
|
|
22809
|
-
|
|
22810
|
-
}
|
|
22817
|
+
var attrs = {
|
|
22818
|
+
colid: column.id
|
|
22819
|
+
};
|
|
22820
|
+
var tfOns = {};
|
|
22811
22821
|
var columnIndex = $xetable.getColumnIndex(column);
|
|
22812
22822
|
|
|
22813
22823
|
var _columnIndex = $xetable.getVTColumnIndex(column);
|
|
22814
22824
|
|
|
22825
|
+
var itemIndex = _columnIndex;
|
|
22815
22826
|
var params = {
|
|
22816
22827
|
$table: $xetable,
|
|
22828
|
+
_rowIndex: _rowIndex,
|
|
22817
22829
|
$rowIndex: $rowIndex,
|
|
22818
22830
|
column: column,
|
|
22819
22831
|
columnIndex: columnIndex,
|
|
22820
22832
|
$columnIndex: $columnIndex,
|
|
22821
22833
|
_columnIndex: _columnIndex,
|
|
22834
|
+
itemIndex: itemIndex,
|
|
22835
|
+
items: list,
|
|
22822
22836
|
fixed: fixedType,
|
|
22823
22837
|
type: renderType,
|
|
22824
|
-
|
|
22825
|
-
|
|
22826
|
-
};
|
|
22827
|
-
var thOns = {
|
|
22828
|
-
onClick: function onClick(evnt) {
|
|
22829
|
-
return $xetable.triggerHeaderCellClickEvent(evnt, params);
|
|
22830
|
-
},
|
|
22831
|
-
onDblclick: function onDblclick(evnt) {
|
|
22832
|
-
return $xetable.triggerHeaderCellDblclickEvent(evnt, params);
|
|
22833
|
-
}
|
|
22834
|
-
}; // 横向虚拟滚动不支持动态行高
|
|
22838
|
+
data: footerTableData
|
|
22839
|
+
}; // 纵向虚拟滚动不支持动态行高
|
|
22835
22840
|
|
|
22836
|
-
if (
|
|
22841
|
+
if (scrollYLoad && !hasEllipsis) {
|
|
22837
22842
|
showEllipsis = hasEllipsis = true;
|
|
22838
|
-
}
|
|
22843
|
+
}
|
|
22839
22844
|
|
|
22845
|
+
if (showTitle || showTooltip || showAllTip) {
|
|
22846
|
+
tfOns.onMouseenter = function (evnt) {
|
|
22847
|
+
if (showTitle) {
|
|
22848
|
+
updateCellTitle(evnt.currentTarget, column);
|
|
22849
|
+
} else if (showTooltip || showAllTip) {
|
|
22850
|
+
$xetable.triggerFooterTooltipEvent(evnt, params);
|
|
22851
|
+
}
|
|
22852
|
+
};
|
|
22853
|
+
}
|
|
22840
22854
|
|
|
22841
|
-
if (
|
|
22842
|
-
|
|
22843
|
-
|
|
22855
|
+
if (showTooltip || showAllTip) {
|
|
22856
|
+
tfOns.onMouseleave = function (evnt) {
|
|
22857
|
+
if (showTooltip || showAllTip) {
|
|
22858
|
+
$xetable.handleTargetLeaveEvent(evnt);
|
|
22859
|
+
}
|
|
22844
22860
|
};
|
|
22845
22861
|
}
|
|
22846
22862
|
|
|
22847
|
-
|
|
22848
|
-
|
|
22849
|
-
|
|
22850
|
-
|
|
22851
|
-
|
|
22852
|
-
|
|
22853
|
-
|
|
22854
|
-
|
|
22855
|
-
|
|
22856
|
-
|
|
22857
|
-
|
|
22858
|
-
|
|
22859
|
-
|
|
22860
|
-
|
|
22861
|
-
|
|
22862
|
-
|
|
22863
|
-
|
|
22864
|
-
|
|
22865
|
-
|
|
22866
|
-
|
|
22867
|
-
|
|
22868
|
-
|
|
22869
|
-
|
|
22870
|
-
|
|
22863
|
+
tfOns.onClick = function (evnt) {
|
|
22864
|
+
$xetable.dispatchEvent('footer-cell-click', Object.assign({
|
|
22865
|
+
cell: evnt.currentTarget
|
|
22866
|
+
}, params), evnt);
|
|
22867
|
+
};
|
|
22868
|
+
|
|
22869
|
+
tfOns.onDblclick = function (evnt) {
|
|
22870
|
+
$xetable.dispatchEvent('footer-cell-dblclick', Object.assign({
|
|
22871
|
+
cell: evnt.currentTarget
|
|
22872
|
+
}, params), evnt);
|
|
22873
|
+
}; // 合并行或列
|
|
22874
|
+
|
|
22875
|
+
|
|
22876
|
+
if (mergeFooterList.length) {
|
|
22877
|
+
var spanRest = mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex);
|
|
22878
|
+
|
|
22879
|
+
if (spanRest) {
|
|
22880
|
+
var rowspan = spanRest.rowspan,
|
|
22881
|
+
colspan = spanRest.colspan;
|
|
22882
|
+
|
|
22883
|
+
if (!rowspan || !colspan) {
|
|
22884
|
+
return null;
|
|
22885
|
+
}
|
|
22886
|
+
|
|
22887
|
+
if (rowspan > 1) {
|
|
22888
|
+
attrs.rowspan = rowspan;
|
|
22889
|
+
}
|
|
22890
|
+
|
|
22891
|
+
if (colspan > 1) {
|
|
22892
|
+
attrs.colspan = colspan;
|
|
22893
|
+
}
|
|
22871
22894
|
}
|
|
22872
|
-
}
|
|
22873
|
-
|
|
22874
|
-
|
|
22895
|
+
} else if (footerSpanMethod) {
|
|
22896
|
+
// 自定义合并方法
|
|
22897
|
+
var _ref = footerSpanMethod(params) || {},
|
|
22898
|
+
_ref$rowspan = _ref.rowspan,
|
|
22899
|
+
_rowspan = _ref$rowspan === void 0 ? 1 : _ref$rowspan,
|
|
22900
|
+
_ref$colspan = _ref.colspan,
|
|
22901
|
+
_colspan = _ref$colspan === void 0 ? 1 : _ref$colspan;
|
|
22902
|
+
|
|
22903
|
+
if (!_rowspan || !_colspan) {
|
|
22904
|
+
return null;
|
|
22905
|
+
}
|
|
22906
|
+
|
|
22907
|
+
if (_rowspan > 1) {
|
|
22908
|
+
attrs.rowspan = _rowspan;
|
|
22909
|
+
}
|
|
22910
|
+
|
|
22911
|
+
if (_colspan > 1) {
|
|
22912
|
+
attrs.colspan = _colspan;
|
|
22913
|
+
}
|
|
22914
|
+
}
|
|
22915
|
+
|
|
22916
|
+
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('td', _objectSpread2(_objectSpread2(_objectSpread2({
|
|
22917
|
+
class: ['vxe-footer--column', column.id, (_ref2 = {}, _defineProperty(_ref2, "col--".concat(footAlign), footAlign), _defineProperty(_ref2, "col--".concat(type), type), _defineProperty(_ref2, 'col--last', $columnIndex === tableColumn.length - 1), _defineProperty(_ref2, 'fixed--hidden', fixedHiddenColumn), _defineProperty(_ref2, 'col--ellipsis', hasEllipsis), _defineProperty(_ref2, 'col--current', currentColumn === column), _ref2), getPropClass(footerClassName, params), getPropClass(footerCellClassName, params)]
|
|
22918
|
+
}, attrs), {}, {
|
|
22919
|
+
style: footerCellStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(footerCellStyle) ? footerCellStyle(params) : footerCellStyle : null
|
|
22920
|
+
}, tfOns), {}, {
|
|
22921
|
+
key: columnKey || columnOpts.useKey ? column.id : $columnIndex
|
|
22922
|
+
}), [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
22923
|
+
class: ['vxe-cell', {
|
|
22924
|
+
'c--title': showTitle,
|
|
22925
|
+
'c--tooltip': showTooltip,
|
|
22926
|
+
'c--ellipsis': showEllipsis
|
|
22927
|
+
}]
|
|
22928
|
+
}, column.renderFooter(params))]);
|
|
22929
|
+
}).concat(scrollbarWidth ? [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('td', {
|
|
22930
|
+
class: 'vxe-footer--gutter col--gutter'
|
|
22875
22931
|
})] : []));
|
|
22876
|
-
}))])
|
|
22877
|
-
/**
|
|
22878
|
-
* 其他
|
|
22879
|
-
*/
|
|
22880
|
-
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
22881
|
-
ref: refHeaderBorderRepair,
|
|
22882
|
-
class: 'vxe-table--header-border-line'
|
|
22883
|
-
})]);
|
|
22932
|
+
}))])]);
|
|
22884
22933
|
};
|
|
22885
22934
|
|
|
22886
22935
|
return renderVN;
|
|
22887
22936
|
}
|
|
22888
22937
|
}));
|
|
22889
|
-
// CONCATENATED MODULE: ./packages/
|
|
22938
|
+
// CONCATENATED MODULE: ./packages/footer/index.ts
|
|
22890
22939
|
|
|
22891
22940
|
|
|
22892
22941
|
|
|
22893
22942
|
|
|
22894
|
-
var
|
|
22943
|
+
var Footer = Object.assign(footer, {
|
|
22895
22944
|
install: function install(app) {
|
|
22896
|
-
app.component(
|
|
22945
|
+
app.component(footer.name, footer);
|
|
22897
22946
|
}
|
|
22898
22947
|
});
|
|
22899
|
-
dynamicApp.component(
|
|
22900
|
-
/* harmony default export */ var
|
|
22901
|
-
// CONCATENATED MODULE: ./packages/
|
|
22902
|
-
|
|
22903
|
-
|
|
22948
|
+
dynamicApp.component(footer.name, footer);
|
|
22949
|
+
/* harmony default export */ var packages_footer = (Footer);
|
|
22950
|
+
// CONCATENATED MODULE: ./packages/table/src/cell.ts
|
|
22904
22951
|
|
|
22905
22952
|
|
|
22906
22953
|
|
|
@@ -22909,459 +22956,69 @@ dynamicApp.component(header.name, header);
|
|
|
22909
22956
|
|
|
22910
22957
|
|
|
22911
22958
|
|
|
22912
|
-
var footer_renderType = 'footer';
|
|
22913
22959
|
|
|
22914
|
-
function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
|
|
22915
|
-
for (var mIndex = 0; mIndex < mergeFooterList.length; mIndex++) {
|
|
22916
|
-
var _mergeFooterList$mInd = mergeFooterList[mIndex],
|
|
22917
|
-
mergeRowIndex = _mergeFooterList$mInd.row,
|
|
22918
|
-
mergeColIndex = _mergeFooterList$mInd.col,
|
|
22919
|
-
mergeRowspan = _mergeFooterList$mInd.rowspan,
|
|
22920
|
-
mergeColspan = _mergeFooterList$mInd.colspan;
|
|
22921
22960
|
|
|
22922
|
-
if (mergeColIndex > -1 && mergeRowIndex > -1 && mergeRowspan && mergeColspan) {
|
|
22923
|
-
if (mergeRowIndex === _rowIndex && mergeColIndex === _columnIndex) {
|
|
22924
|
-
return {
|
|
22925
|
-
rowspan: mergeRowspan,
|
|
22926
|
-
colspan: mergeColspan
|
|
22927
|
-
};
|
|
22928
|
-
}
|
|
22929
22961
|
|
|
22930
|
-
if (_rowIndex >= mergeRowIndex && _rowIndex < mergeRowIndex + mergeRowspan && _columnIndex >= mergeColIndex && _columnIndex < mergeColIndex + mergeColspan) {
|
|
22931
|
-
return {
|
|
22932
|
-
rowspan: 0,
|
|
22933
|
-
colspan: 0
|
|
22934
|
-
};
|
|
22935
|
-
}
|
|
22936
|
-
}
|
|
22937
|
-
}
|
|
22938
|
-
}
|
|
22939
22962
|
|
|
22940
|
-
|
|
22941
|
-
|
|
22942
|
-
|
|
22943
|
-
|
|
22944
|
-
|
|
22945
|
-
|
|
22946
|
-
|
|
22947
|
-
|
|
22948
|
-
},
|
|
22949
|
-
tableColumn: {
|
|
22950
|
-
type: Array,
|
|
22951
|
-
default: function _default() {
|
|
22952
|
-
return [];
|
|
22953
|
-
}
|
|
22954
|
-
},
|
|
22955
|
-
fixedColumn: {
|
|
22956
|
-
type: Array,
|
|
22957
|
-
default: function _default() {
|
|
22958
|
-
return [];
|
|
22959
|
-
}
|
|
22963
|
+
function renderHelpIcon(params) {
|
|
22964
|
+
var $table = params.$table,
|
|
22965
|
+
column = params.column;
|
|
22966
|
+
var titlePrefix = column.titlePrefix || column.titleHelp;
|
|
22967
|
+
return titlePrefix ? [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('i', {
|
|
22968
|
+
class: ['vxe-cell-help-icon', titlePrefix.icon || conf.icon.TABLE_HELP],
|
|
22969
|
+
onMouseenter: function onMouseenter(evnt) {
|
|
22970
|
+
$table.triggerHeaderHelpEvent(evnt, params);
|
|
22960
22971
|
},
|
|
22961
|
-
|
|
22962
|
-
|
|
22963
|
-
default: null
|
|
22972
|
+
onMouseleave: function onMouseleave(evnt) {
|
|
22973
|
+
$table.handleTargetLeaveEvent(evnt);
|
|
22964
22974
|
}
|
|
22965
|
-
}
|
|
22966
|
-
|
|
22967
|
-
var $xetable = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('$xetable', {});
|
|
22968
|
-
var xID = $xetable.xID,
|
|
22969
|
-
tableProps = $xetable.props,
|
|
22970
|
-
tableReactData = $xetable.reactData,
|
|
22971
|
-
tableInternalData = $xetable.internalData;
|
|
22972
|
-
|
|
22973
|
-
var _$xetable$getRefMaps = $xetable.getRefMaps(),
|
|
22974
|
-
refTableHeader = _$xetable$getRefMaps.refTableHeader,
|
|
22975
|
-
refTableBody = _$xetable$getRefMaps.refTableBody,
|
|
22976
|
-
refValidTooltip = _$xetable$getRefMaps.refValidTooltip;
|
|
22975
|
+
})] : [];
|
|
22976
|
+
}
|
|
22977
22977
|
|
|
22978
|
-
|
|
22979
|
-
|
|
22980
|
-
|
|
22978
|
+
function renderTitleContent(params, content) {
|
|
22979
|
+
var $table = params.$table,
|
|
22980
|
+
column = params.column;
|
|
22981
|
+
var props = $table.props,
|
|
22982
|
+
internalData = $table.internalData;
|
|
22981
22983
|
|
|
22982
|
-
|
|
22983
|
-
|
|
22984
|
-
var refFooterColgroup = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
22985
|
-
var refFooterTFoot = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
22986
|
-
var refFooterXSpace = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
22987
|
-
/**
|
|
22988
|
-
* 滚动处理
|
|
22989
|
-
* 如果存在列固定左侧,同步更新滚动状态
|
|
22990
|
-
* 如果存在列固定右侧,同步更新滚动状态
|
|
22991
|
-
*/
|
|
22984
|
+
var _$table$getComputeMap = $table.getComputeMaps(),
|
|
22985
|
+
computeTooltipOpts = _$table$getComputeMap.computeTooltipOpts;
|
|
22992
22986
|
|
|
22993
|
-
|
|
22994
|
-
|
|
22995
|
-
|
|
22996
|
-
|
|
22997
|
-
|
|
22998
|
-
|
|
22999
|
-
|
|
23000
|
-
|
|
23001
|
-
|
|
23002
|
-
var bodyElem = tableBody.$el;
|
|
23003
|
-
var scrollLeft = footerElem.scrollLeft;
|
|
23004
|
-
var isX = scrollLeft !== lastScrollLeft;
|
|
23005
|
-
tableInternalData.lastScrollLeft = scrollLeft;
|
|
23006
|
-
tableInternalData.lastScrollTime = Date.now();
|
|
22987
|
+
var allColumnHeaderOverflow = props.showHeaderOverflow;
|
|
22988
|
+
var type = column.type,
|
|
22989
|
+
showHeaderOverflow = column.showHeaderOverflow;
|
|
22990
|
+
var tooltipOpts = computeTooltipOpts.value;
|
|
22991
|
+
var showAllTip = tooltipOpts.showAll;
|
|
22992
|
+
var headOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isUndefined(showHeaderOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isNull(showHeaderOverflow) ? allColumnHeaderOverflow : showHeaderOverflow;
|
|
22993
|
+
var showTitle = headOverflow === 'title';
|
|
22994
|
+
var showTooltip = headOverflow === true || headOverflow === 'tooltip';
|
|
22995
|
+
var ons = {};
|
|
23007
22996
|
|
|
23008
|
-
|
|
23009
|
-
|
|
22997
|
+
if (showTitle || showTooltip || showAllTip) {
|
|
22998
|
+
ons.onMouseenter = function (evnt) {
|
|
22999
|
+
if (internalData._isResize) {
|
|
23000
|
+
return;
|
|
23010
23001
|
}
|
|
23011
23002
|
|
|
23012
|
-
if (
|
|
23013
|
-
|
|
23003
|
+
if (showTitle) {
|
|
23004
|
+
updateCellTitle(evnt.currentTarget, column);
|
|
23005
|
+
} else if (showTooltip || showAllTip) {
|
|
23006
|
+
$table.triggerHeaderTooltipEvent(evnt, params);
|
|
23014
23007
|
}
|
|
23008
|
+
};
|
|
23009
|
+
}
|
|
23015
23010
|
|
|
23016
|
-
|
|
23017
|
-
|
|
23011
|
+
if (showTooltip || showAllTip) {
|
|
23012
|
+
ons.onMouseleave = function (evnt) {
|
|
23013
|
+
if (internalData._isResize) {
|
|
23014
|
+
return;
|
|
23018
23015
|
}
|
|
23019
23016
|
|
|
23020
|
-
if (
|
|
23021
|
-
|
|
23017
|
+
if (showTooltip || showAllTip) {
|
|
23018
|
+
$table.handleTargetLeaveEvent(evnt);
|
|
23022
23019
|
}
|
|
23023
|
-
|
|
23024
|
-
$xetable.dispatchEvent('scroll', {
|
|
23025
|
-
type: footer_renderType,
|
|
23026
|
-
fixed: fixedType,
|
|
23027
|
-
scrollTop: bodyElem.scrollTop,
|
|
23028
|
-
scrollLeft: scrollLeft,
|
|
23029
|
-
isX: isX,
|
|
23030
|
-
isY: false
|
|
23031
|
-
}, evnt);
|
|
23032
23020
|
};
|
|
23033
|
-
|
|
23034
|
-
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onMounted"])(function () {
|
|
23035
|
-
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])(function () {
|
|
23036
|
-
var fixedType = props.fixedType;
|
|
23037
|
-
var elemStore = tableInternalData.elemStore;
|
|
23038
|
-
var prefix = "".concat(fixedType || 'main', "-footer-");
|
|
23039
|
-
elemStore["".concat(prefix, "wrapper")] = refElem;
|
|
23040
|
-
elemStore["".concat(prefix, "table")] = refFooterTable;
|
|
23041
|
-
elemStore["".concat(prefix, "colgroup")] = refFooterColgroup;
|
|
23042
|
-
elemStore["".concat(prefix, "list")] = refFooterTFoot;
|
|
23043
|
-
elemStore["".concat(prefix, "xSpace")] = refFooterXSpace;
|
|
23044
|
-
});
|
|
23045
|
-
});
|
|
23046
|
-
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onUnmounted"])(function () {
|
|
23047
|
-
var fixedType = props.fixedType;
|
|
23048
|
-
var elemStore = tableInternalData.elemStore;
|
|
23049
|
-
var prefix = "".concat(fixedType || 'main', "-footer-");
|
|
23050
|
-
elemStore["".concat(prefix, "wrapper")] = null;
|
|
23051
|
-
elemStore["".concat(prefix, "table")] = null;
|
|
23052
|
-
elemStore["".concat(prefix, "colgroup")] = null;
|
|
23053
|
-
elemStore["".concat(prefix, "list")] = null;
|
|
23054
|
-
elemStore["".concat(prefix, "xSpace")] = null;
|
|
23055
|
-
});
|
|
23056
|
-
|
|
23057
|
-
var renderVN = function renderVN() {
|
|
23058
|
-
var fixedType = props.fixedType,
|
|
23059
|
-
fixedColumn = props.fixedColumn,
|
|
23060
|
-
tableColumn = props.tableColumn,
|
|
23061
|
-
footerTableData = props.footerTableData;
|
|
23062
|
-
var footerRowClassName = tableProps.footerRowClassName,
|
|
23063
|
-
footerCellClassName = tableProps.footerCellClassName,
|
|
23064
|
-
footerRowStyle = tableProps.footerRowStyle,
|
|
23065
|
-
footerCellStyle = tableProps.footerCellStyle,
|
|
23066
|
-
allFooterAlign = tableProps.footerAlign,
|
|
23067
|
-
footerSpanMethod = tableProps.footerSpanMethod,
|
|
23068
|
-
allAlign = tableProps.align,
|
|
23069
|
-
columnKey = tableProps.columnKey,
|
|
23070
|
-
allColumnFooterOverflow = tableProps.showFooterOverflow;
|
|
23071
|
-
var visibleColumn = tableInternalData.visibleColumn;
|
|
23072
|
-
var scrollYLoad = tableReactData.scrollYLoad,
|
|
23073
|
-
overflowX = tableReactData.overflowX,
|
|
23074
|
-
scrollbarWidth = tableReactData.scrollbarWidth,
|
|
23075
|
-
currentColumn = tableReactData.currentColumn,
|
|
23076
|
-
mergeFooterList = tableReactData.mergeFooterList;
|
|
23077
|
-
var tooltipOpts = computeTooltipOpts.value;
|
|
23078
|
-
var columnOpts = computeColumnOpts.value; // 如果是使用优化模式
|
|
23079
|
-
|
|
23080
|
-
if (fixedType) {
|
|
23081
|
-
if (scrollYLoad || allColumnFooterOverflow) {
|
|
23082
|
-
if (!mergeFooterList.length || !footerSpanMethod) {
|
|
23083
|
-
tableColumn = fixedColumn;
|
|
23084
|
-
} else {
|
|
23085
|
-
tableColumn = visibleColumn;
|
|
23086
|
-
}
|
|
23087
|
-
} else {
|
|
23088
|
-
tableColumn = visibleColumn;
|
|
23089
|
-
}
|
|
23090
|
-
}
|
|
23091
|
-
|
|
23092
|
-
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
23093
|
-
ref: refElem,
|
|
23094
|
-
class: ['vxe-table--footer-wrapper', fixedType ? "fixed-".concat(fixedType, "--wrapper") : 'body--wrapper'],
|
|
23095
|
-
xid: xID,
|
|
23096
|
-
onScroll: scrollEvent
|
|
23097
|
-
}, [fixedType ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])() : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
23098
|
-
ref: refFooterXSpace,
|
|
23099
|
-
class: 'vxe-body--x-space'
|
|
23100
|
-
}), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('table', {
|
|
23101
|
-
ref: refFooterTable,
|
|
23102
|
-
class: 'vxe-table--footer',
|
|
23103
|
-
xid: xID,
|
|
23104
|
-
cellspacing: 0,
|
|
23105
|
-
cellpadding: 0,
|
|
23106
|
-
border: 0
|
|
23107
|
-
}, [
|
|
23108
|
-
/**
|
|
23109
|
-
* 列宽
|
|
23110
|
-
*/
|
|
23111
|
-
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('colgroup', {
|
|
23112
|
-
ref: refFooterColgroup
|
|
23113
|
-
}, tableColumn.map(function (column, $columnIndex) {
|
|
23114
|
-
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('col', {
|
|
23115
|
-
name: column.id,
|
|
23116
|
-
key: $columnIndex
|
|
23117
|
-
});
|
|
23118
|
-
}).concat(scrollbarWidth ? [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('col', {
|
|
23119
|
-
name: 'col_gutter'
|
|
23120
|
-
})] : [])),
|
|
23121
|
-
/**
|
|
23122
|
-
* 底部
|
|
23123
|
-
*/
|
|
23124
|
-
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('tfoot', {
|
|
23125
|
-
ref: refFooterTFoot
|
|
23126
|
-
}, footerTableData.map(function (list, _rowIndex) {
|
|
23127
|
-
var $rowIndex = _rowIndex;
|
|
23128
|
-
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('tr', {
|
|
23129
|
-
class: ['vxe-footer--row', footerRowClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(footerRowClassName) ? footerRowClassName({
|
|
23130
|
-
$table: $xetable,
|
|
23131
|
-
_rowIndex: _rowIndex,
|
|
23132
|
-
$rowIndex: $rowIndex,
|
|
23133
|
-
fixed: fixedType,
|
|
23134
|
-
type: footer_renderType
|
|
23135
|
-
}) : footerRowClassName : ''],
|
|
23136
|
-
style: footerRowStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(footerRowStyle) ? footerRowStyle({
|
|
23137
|
-
$table: $xetable,
|
|
23138
|
-
_rowIndex: _rowIndex,
|
|
23139
|
-
$rowIndex: $rowIndex,
|
|
23140
|
-
fixed: fixedType,
|
|
23141
|
-
type: footer_renderType
|
|
23142
|
-
}) : footerRowStyle : null
|
|
23143
|
-
}, tableColumn.map(function (column, $columnIndex) {
|
|
23144
|
-
var _ref2;
|
|
23145
|
-
|
|
23146
|
-
var type = column.type,
|
|
23147
|
-
showFooterOverflow = column.showFooterOverflow,
|
|
23148
|
-
footerAlign = column.footerAlign,
|
|
23149
|
-
align = column.align,
|
|
23150
|
-
footerClassName = column.footerClassName;
|
|
23151
|
-
var showAllTip = tooltipOpts.showAll;
|
|
23152
|
-
var isColGroup = column.children && column.children.length;
|
|
23153
|
-
var fixedHiddenColumn = fixedType ? column.fixed !== fixedType && !isColGroup : column.fixed && overflowX;
|
|
23154
|
-
var footOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isUndefined(showFooterOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isNull(showFooterOverflow) ? allColumnFooterOverflow : showFooterOverflow;
|
|
23155
|
-
var footAlign = footerAlign || align || allFooterAlign || allAlign;
|
|
23156
|
-
var showEllipsis = footOverflow === 'ellipsis';
|
|
23157
|
-
var showTitle = footOverflow === 'title';
|
|
23158
|
-
var showTooltip = footOverflow === true || footOverflow === 'tooltip';
|
|
23159
|
-
var hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
23160
|
-
var attrs = {
|
|
23161
|
-
colid: column.id
|
|
23162
|
-
};
|
|
23163
|
-
var tfOns = {};
|
|
23164
|
-
var columnIndex = $xetable.getColumnIndex(column);
|
|
23165
|
-
|
|
23166
|
-
var _columnIndex = $xetable.getVTColumnIndex(column);
|
|
23167
|
-
|
|
23168
|
-
var itemIndex = _columnIndex;
|
|
23169
|
-
var params = {
|
|
23170
|
-
$table: $xetable,
|
|
23171
|
-
_rowIndex: _rowIndex,
|
|
23172
|
-
$rowIndex: $rowIndex,
|
|
23173
|
-
column: column,
|
|
23174
|
-
columnIndex: columnIndex,
|
|
23175
|
-
$columnIndex: $columnIndex,
|
|
23176
|
-
_columnIndex: _columnIndex,
|
|
23177
|
-
itemIndex: itemIndex,
|
|
23178
|
-
items: list,
|
|
23179
|
-
fixed: fixedType,
|
|
23180
|
-
type: footer_renderType,
|
|
23181
|
-
data: footerTableData
|
|
23182
|
-
}; // 纵向虚拟滚动不支持动态行高
|
|
23183
|
-
|
|
23184
|
-
if (scrollYLoad && !hasEllipsis) {
|
|
23185
|
-
showEllipsis = hasEllipsis = true;
|
|
23186
|
-
}
|
|
23187
|
-
|
|
23188
|
-
if (showTitle || showTooltip || showAllTip) {
|
|
23189
|
-
tfOns.onMouseenter = function (evnt) {
|
|
23190
|
-
if (showTitle) {
|
|
23191
|
-
updateCellTitle(evnt.currentTarget, column);
|
|
23192
|
-
} else if (showTooltip || showAllTip) {
|
|
23193
|
-
$xetable.triggerFooterTooltipEvent(evnt, params);
|
|
23194
|
-
}
|
|
23195
|
-
};
|
|
23196
|
-
}
|
|
23197
|
-
|
|
23198
|
-
if (showTooltip || showAllTip) {
|
|
23199
|
-
tfOns.onMouseleave = function (evnt) {
|
|
23200
|
-
if (showTooltip || showAllTip) {
|
|
23201
|
-
$xetable.handleTargetLeaveEvent(evnt);
|
|
23202
|
-
}
|
|
23203
|
-
};
|
|
23204
|
-
}
|
|
23205
|
-
|
|
23206
|
-
tfOns.onClick = function (evnt) {
|
|
23207
|
-
$xetable.dispatchEvent('footer-cell-click', Object.assign({
|
|
23208
|
-
cell: evnt.currentTarget
|
|
23209
|
-
}, params), evnt);
|
|
23210
|
-
};
|
|
23211
|
-
|
|
23212
|
-
tfOns.onDblclick = function (evnt) {
|
|
23213
|
-
$xetable.dispatchEvent('footer-cell-dblclick', Object.assign({
|
|
23214
|
-
cell: evnt.currentTarget
|
|
23215
|
-
}, params), evnt);
|
|
23216
|
-
}; // 合并行或列
|
|
23217
|
-
|
|
23218
|
-
|
|
23219
|
-
if (mergeFooterList.length) {
|
|
23220
|
-
var spanRest = mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex);
|
|
23221
|
-
|
|
23222
|
-
if (spanRest) {
|
|
23223
|
-
var rowspan = spanRest.rowspan,
|
|
23224
|
-
colspan = spanRest.colspan;
|
|
23225
|
-
|
|
23226
|
-
if (!rowspan || !colspan) {
|
|
23227
|
-
return null;
|
|
23228
|
-
}
|
|
23229
|
-
|
|
23230
|
-
if (rowspan > 1) {
|
|
23231
|
-
attrs.rowspan = rowspan;
|
|
23232
|
-
}
|
|
23233
|
-
|
|
23234
|
-
if (colspan > 1) {
|
|
23235
|
-
attrs.colspan = colspan;
|
|
23236
|
-
}
|
|
23237
|
-
}
|
|
23238
|
-
} else if (footerSpanMethod) {
|
|
23239
|
-
// 自定义合并方法
|
|
23240
|
-
var _ref = footerSpanMethod(params) || {},
|
|
23241
|
-
_ref$rowspan = _ref.rowspan,
|
|
23242
|
-
_rowspan = _ref$rowspan === void 0 ? 1 : _ref$rowspan,
|
|
23243
|
-
_ref$colspan = _ref.colspan,
|
|
23244
|
-
_colspan = _ref$colspan === void 0 ? 1 : _ref$colspan;
|
|
23245
|
-
|
|
23246
|
-
if (!_rowspan || !_colspan) {
|
|
23247
|
-
return null;
|
|
23248
|
-
}
|
|
23249
|
-
|
|
23250
|
-
if (_rowspan > 1) {
|
|
23251
|
-
attrs.rowspan = _rowspan;
|
|
23252
|
-
}
|
|
23253
|
-
|
|
23254
|
-
if (_colspan > 1) {
|
|
23255
|
-
attrs.colspan = _colspan;
|
|
23256
|
-
}
|
|
23257
|
-
}
|
|
23258
|
-
|
|
23259
|
-
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('td', _objectSpread2(_objectSpread2(_objectSpread2({
|
|
23260
|
-
class: ['vxe-footer--column', column.id, (_ref2 = {}, _defineProperty(_ref2, "col--".concat(footAlign), footAlign), _defineProperty(_ref2, "col--".concat(type), type), _defineProperty(_ref2, 'col--last', $columnIndex === tableColumn.length - 1), _defineProperty(_ref2, 'fixed--hidden', fixedHiddenColumn), _defineProperty(_ref2, 'col--ellipsis', hasEllipsis), _defineProperty(_ref2, 'col--current', currentColumn === column), _ref2), getPropClass(footerClassName, params), getPropClass(footerCellClassName, params)]
|
|
23261
|
-
}, attrs), {}, {
|
|
23262
|
-
style: footerCellStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(footerCellStyle) ? footerCellStyle(params) : footerCellStyle : null
|
|
23263
|
-
}, tfOns), {}, {
|
|
23264
|
-
key: columnKey || columnOpts.useKey ? column.id : $columnIndex
|
|
23265
|
-
}), [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
23266
|
-
class: ['vxe-cell', {
|
|
23267
|
-
'c--title': showTitle,
|
|
23268
|
-
'c--tooltip': showTooltip,
|
|
23269
|
-
'c--ellipsis': showEllipsis
|
|
23270
|
-
}]
|
|
23271
|
-
}, column.renderFooter(params))]);
|
|
23272
|
-
}).concat(scrollbarWidth ? [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('td', {
|
|
23273
|
-
class: 'vxe-footer--gutter col--gutter'
|
|
23274
|
-
})] : []));
|
|
23275
|
-
}))])]);
|
|
23276
|
-
};
|
|
23277
|
-
|
|
23278
|
-
return renderVN;
|
|
23279
|
-
}
|
|
23280
|
-
}));
|
|
23281
|
-
// CONCATENATED MODULE: ./packages/footer/index.ts
|
|
23282
|
-
|
|
23283
|
-
|
|
23284
|
-
|
|
23285
|
-
|
|
23286
|
-
var Footer = Object.assign(footer, {
|
|
23287
|
-
install: function install(app) {
|
|
23288
|
-
app.component(footer.name, footer);
|
|
23289
|
-
}
|
|
23290
|
-
});
|
|
23291
|
-
dynamicApp.component(footer.name, footer);
|
|
23292
|
-
/* harmony default export */ var packages_footer = (Footer);
|
|
23293
|
-
// CONCATENATED MODULE: ./packages/table/src/cell.ts
|
|
23294
|
-
|
|
23295
|
-
|
|
23296
|
-
|
|
23297
|
-
|
|
23298
|
-
|
|
23299
|
-
|
|
23300
|
-
|
|
23301
|
-
|
|
23302
|
-
|
|
23303
|
-
|
|
23304
|
-
|
|
23305
|
-
|
|
23306
|
-
function renderHelpIcon(params) {
|
|
23307
|
-
var $table = params.$table,
|
|
23308
|
-
column = params.column;
|
|
23309
|
-
var titlePrefix = column.titlePrefix || column.titleHelp;
|
|
23310
|
-
return titlePrefix ? [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('i', {
|
|
23311
|
-
class: ['vxe-cell-help-icon', titlePrefix.icon || conf.icon.TABLE_HELP],
|
|
23312
|
-
onMouseenter: function onMouseenter(evnt) {
|
|
23313
|
-
$table.triggerHeaderHelpEvent(evnt, params);
|
|
23314
|
-
},
|
|
23315
|
-
onMouseleave: function onMouseleave(evnt) {
|
|
23316
|
-
$table.handleTargetLeaveEvent(evnt);
|
|
23317
|
-
}
|
|
23318
|
-
})] : [];
|
|
23319
|
-
}
|
|
23320
|
-
|
|
23321
|
-
function renderTitleContent(params, content) {
|
|
23322
|
-
var $table = params.$table,
|
|
23323
|
-
column = params.column;
|
|
23324
|
-
var props = $table.props,
|
|
23325
|
-
internalData = $table.internalData;
|
|
23326
|
-
|
|
23327
|
-
var _$table$getComputeMap = $table.getComputeMaps(),
|
|
23328
|
-
computeTooltipOpts = _$table$getComputeMap.computeTooltipOpts;
|
|
23329
|
-
|
|
23330
|
-
var allColumnHeaderOverflow = props.showHeaderOverflow;
|
|
23331
|
-
var type = column.type,
|
|
23332
|
-
showHeaderOverflow = column.showHeaderOverflow;
|
|
23333
|
-
var tooltipOpts = computeTooltipOpts.value;
|
|
23334
|
-
var showAllTip = tooltipOpts.showAll;
|
|
23335
|
-
var headOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isUndefined(showHeaderOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isNull(showHeaderOverflow) ? allColumnHeaderOverflow : showHeaderOverflow;
|
|
23336
|
-
var showTitle = headOverflow === 'title';
|
|
23337
|
-
var showTooltip = headOverflow === true || headOverflow === 'tooltip';
|
|
23338
|
-
var ons = {};
|
|
23339
|
-
|
|
23340
|
-
if (showTitle || showTooltip || showAllTip) {
|
|
23341
|
-
ons.onMouseenter = function (evnt) {
|
|
23342
|
-
if (internalData._isResize) {
|
|
23343
|
-
return;
|
|
23344
|
-
}
|
|
23345
|
-
|
|
23346
|
-
if (showTitle) {
|
|
23347
|
-
updateCellTitle(evnt.currentTarget, column);
|
|
23348
|
-
} else if (showTooltip || showAllTip) {
|
|
23349
|
-
$table.triggerHeaderTooltipEvent(evnt, params);
|
|
23350
|
-
}
|
|
23351
|
-
};
|
|
23352
|
-
}
|
|
23353
|
-
|
|
23354
|
-
if (showTooltip || showAllTip) {
|
|
23355
|
-
ons.onMouseleave = function (evnt) {
|
|
23356
|
-
if (internalData._isResize) {
|
|
23357
|
-
return;
|
|
23358
|
-
}
|
|
23359
|
-
|
|
23360
|
-
if (showTooltip || showAllTip) {
|
|
23361
|
-
$table.handleTargetLeaveEvent(evnt);
|
|
23362
|
-
}
|
|
23363
|
-
};
|
|
23364
|
-
}
|
|
23021
|
+
}
|
|
23365
23022
|
|
|
23366
23023
|
return [type === 'html' && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isString(content) ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', _objectSpread2({
|
|
23367
23024
|
class: 'vxe-cell--title',
|
|
@@ -27598,6 +27255,8 @@ dynamicApp.component(src_checkbox.name, src_checkbox);
|
|
|
27598
27255
|
setup: function setup(props, context) {
|
|
27599
27256
|
var slots = context.slots,
|
|
27600
27257
|
emit = context.emit;
|
|
27258
|
+
var $xeform = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('$xeform', null);
|
|
27259
|
+
var $xeformiteminfo = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('$xeformiteminfo', null);
|
|
27601
27260
|
var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.uniqueId();
|
|
27602
27261
|
var $xecheckboxgroup = {
|
|
27603
27262
|
xID: xID,
|
|
@@ -27631,7 +27290,11 @@ dynamicApp.component(src_checkbox.name, src_checkbox);
|
|
|
27631
27290
|
emit('update:modelValue', checklist);
|
|
27632
27291
|
$xecheckboxgroup.dispatchEvent('change', Object.assign({
|
|
27633
27292
|
checklist: checklist
|
|
27634
|
-
}, params), evnt);
|
|
27293
|
+
}, params), evnt); // 自动更新校验状态
|
|
27294
|
+
|
|
27295
|
+
if ($xeform && $xeformiteminfo) {
|
|
27296
|
+
$xeform.triggerItemEvent(evnt, $xeformiteminfo.itemConfig.field, checklist);
|
|
27297
|
+
}
|
|
27635
27298
|
}
|
|
27636
27299
|
};
|
|
27637
27300
|
Object.assign($xecheckboxgroup, checkboxGroupMethods, checkboxGroupPrivateMethods);
|
|
@@ -27721,6 +27384,8 @@ dynamicApp.component(src_group.name, src_group);
|
|
|
27721
27384
|
setup: function setup(props, context) {
|
|
27722
27385
|
var slots = context.slots,
|
|
27723
27386
|
emit = context.emit;
|
|
27387
|
+
var $xeform = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('$xeform', null);
|
|
27388
|
+
var $xeformiteminfo = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('$xeformiteminfo', null);
|
|
27724
27389
|
var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.uniqueId();
|
|
27725
27390
|
var computeSize = useSize(props);
|
|
27726
27391
|
var $xeradiobutton = {
|
|
@@ -27763,7 +27428,11 @@ dynamicApp.component(src_group.name, src_group);
|
|
|
27763
27428
|
emit('update:modelValue', label);
|
|
27764
27429
|
radioButtonMethods.dispatchEvent('change', {
|
|
27765
27430
|
label: label
|
|
27766
|
-
}, evnt);
|
|
27431
|
+
}, evnt); // 自动更新校验状态
|
|
27432
|
+
|
|
27433
|
+
if ($xeform && $xeformiteminfo) {
|
|
27434
|
+
$xeform.triggerItemEvent(evnt, $xeformiteminfo.itemConfig.field, label);
|
|
27435
|
+
}
|
|
27767
27436
|
}
|
|
27768
27437
|
};
|
|
27769
27438
|
|
|
@@ -27897,6 +27566,8 @@ var autoTxtElem;
|
|
|
27897
27566
|
emits: ['update:modelValue', 'input', 'keydown', 'keyup', 'click', 'change', 'focus', 'blur'],
|
|
27898
27567
|
setup: function setup(props, context) {
|
|
27899
27568
|
var emit = context.emit;
|
|
27569
|
+
var $xeform = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('$xeform', null);
|
|
27570
|
+
var $xeformiteminfo = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('$xeformiteminfo', null);
|
|
27900
27571
|
var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.uniqueId();
|
|
27901
27572
|
var computeSize = useSize(props);
|
|
27902
27573
|
var reactData = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({
|
|
@@ -27999,7 +27670,11 @@ var autoTxtElem;
|
|
|
27999
27670
|
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toValueString(props.modelValue) !== value) {
|
|
28000
27671
|
textareaMethods.dispatchEvent('change', {
|
|
28001
27672
|
value: value
|
|
28002
|
-
}, evnt);
|
|
27673
|
+
}, evnt); // 自动更新校验状态
|
|
27674
|
+
|
|
27675
|
+
if ($xeform && $xeformiteminfo) {
|
|
27676
|
+
$xeform.triggerItemEvent(evnt, $xeformiteminfo.itemConfig.field, value);
|
|
27677
|
+
}
|
|
28003
27678
|
}
|
|
28004
27679
|
};
|
|
28005
27680
|
|
|
@@ -28742,6 +28417,8 @@ var itemInfo_ItemInfo = /*#__PURE__*/function () {
|
|
|
28742
28417
|
align: item.align,
|
|
28743
28418
|
titleAlign: item.titleAlign,
|
|
28744
28419
|
titleWidth: item.titleWidth,
|
|
28420
|
+
titleColon: item.titleColon,
|
|
28421
|
+
titleAsterisk: item.titleAsterisk,
|
|
28745
28422
|
titlePrefix: item.titlePrefix,
|
|
28746
28423
|
titleSuffix: item.titleSuffix,
|
|
28747
28424
|
titleOverflow: item.titleOverflow,
|
|
@@ -28904,6 +28581,193 @@ function renderTitle($xeform, item) {
|
|
|
28904
28581
|
}, fixVNs));
|
|
28905
28582
|
return contVNs;
|
|
28906
28583
|
}
|
|
28584
|
+
// CONCATENATED MODULE: ./packages/form/src/form-config-item.ts
|
|
28585
|
+
|
|
28586
|
+
|
|
28587
|
+
|
|
28588
|
+
|
|
28589
|
+
|
|
28590
|
+
|
|
28591
|
+
|
|
28592
|
+
|
|
28593
|
+
|
|
28594
|
+
var VxeFormConfigItem = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({
|
|
28595
|
+
name: 'VxeFormConfigItem',
|
|
28596
|
+
props: {
|
|
28597
|
+
itemConfig2: Object,
|
|
28598
|
+
itemConfig: Object
|
|
28599
|
+
},
|
|
28600
|
+
setup: function setup(props) {
|
|
28601
|
+
var $xeform = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('$xeform', {});
|
|
28602
|
+
var xeformiteminfo = {
|
|
28603
|
+
itemConfig: props.itemConfig
|
|
28604
|
+
};
|
|
28605
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["provide"])('$xeformiteminfo', xeformiteminfo);
|
|
28606
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["provide"])('$xeformgather', null);
|
|
28607
|
+
|
|
28608
|
+
var renderVN = function renderVN() {
|
|
28609
|
+
var reactData = $xeform.reactData;
|
|
28610
|
+
var _$xeform$props = $xeform.props,
|
|
28611
|
+
data = _$xeform$props.data,
|
|
28612
|
+
rules = _$xeform$props.rules,
|
|
28613
|
+
allSpan = _$xeform$props.span,
|
|
28614
|
+
allAlign = _$xeform$props.align,
|
|
28615
|
+
allTitleAlign = _$xeform$props.titleAlign,
|
|
28616
|
+
allTitleWidth = _$xeform$props.titleWidth,
|
|
28617
|
+
allTitleColon = _$xeform$props.titleColon,
|
|
28618
|
+
allTitleAsterisk = _$xeform$props.titleAsterisk,
|
|
28619
|
+
allTitleOverflow = _$xeform$props.titleOverflow;
|
|
28620
|
+
|
|
28621
|
+
var _$xeform$getComputeMa = $xeform.getComputeMaps(),
|
|
28622
|
+
computeValidOpts = _$xeform$getComputeMa.computeValidOpts;
|
|
28623
|
+
|
|
28624
|
+
var item = props.itemConfig;
|
|
28625
|
+
var collapseAll = reactData.collapseAll;
|
|
28626
|
+
var validOpts = computeValidOpts.value;
|
|
28627
|
+
var slots = item.slots,
|
|
28628
|
+
title = item.title,
|
|
28629
|
+
visible = item.visible,
|
|
28630
|
+
folding = item.folding,
|
|
28631
|
+
visibleMethod = item.visibleMethod,
|
|
28632
|
+
field = item.field,
|
|
28633
|
+
collapseNode = item.collapseNode,
|
|
28634
|
+
itemRender = item.itemRender,
|
|
28635
|
+
showError = item.showError,
|
|
28636
|
+
errRule = item.errRule,
|
|
28637
|
+
className = item.className,
|
|
28638
|
+
titleOverflow = item.titleOverflow,
|
|
28639
|
+
children = item.children;
|
|
28640
|
+
var compConf = isEnableConf(itemRender) ? VXETable.renderer.get(itemRender.name) : null;
|
|
28641
|
+
var defaultSlot = slots ? slots.default : null;
|
|
28642
|
+
var titleSlot = slots ? slots.title : null;
|
|
28643
|
+
var span = item.span || allSpan;
|
|
28644
|
+
var align = item.align || allAlign;
|
|
28645
|
+
var titleAlign = item.titleAlign || allTitleAlign;
|
|
28646
|
+
var titleWidth = item.titleWidth || allTitleWidth;
|
|
28647
|
+
var titleColon = item.titleColon === null ? allTitleColon : item.titleColon;
|
|
28648
|
+
var titleAsterisk = item.titleAsterisk === null ? allTitleAsterisk : item.titleAsterisk;
|
|
28649
|
+
var itemOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isUndefined(titleOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isNull(titleOverflow) ? allTitleOverflow : titleOverflow;
|
|
28650
|
+
var showEllipsis = itemOverflow === 'ellipsis';
|
|
28651
|
+
var showTitle = itemOverflow === 'title';
|
|
28652
|
+
var showTooltip = itemOverflow === true || itemOverflow === 'tooltip';
|
|
28653
|
+
var hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
28654
|
+
var itemVisibleMethod = visibleMethod;
|
|
28655
|
+
var params = {
|
|
28656
|
+
data: data,
|
|
28657
|
+
field: field,
|
|
28658
|
+
property: field,
|
|
28659
|
+
item: item,
|
|
28660
|
+
$form: $xeform
|
|
28661
|
+
};
|
|
28662
|
+
|
|
28663
|
+
if (visible === false) {
|
|
28664
|
+
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])();
|
|
28665
|
+
}
|
|
28666
|
+
|
|
28667
|
+
var isRequired = false;
|
|
28668
|
+
|
|
28669
|
+
if (rules) {
|
|
28670
|
+
var itemRules = rules[field];
|
|
28671
|
+
|
|
28672
|
+
if (itemRules) {
|
|
28673
|
+
isRequired = itemRules.some(function (rule) {
|
|
28674
|
+
return rule.required;
|
|
28675
|
+
});
|
|
28676
|
+
}
|
|
28677
|
+
} // 如果为项集合
|
|
28678
|
+
|
|
28679
|
+
|
|
28680
|
+
var isGather = children && children.length > 0;
|
|
28681
|
+
|
|
28682
|
+
if (isGather) {
|
|
28683
|
+
var childVNs = children.map(function (childItem, index) {
|
|
28684
|
+
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])(VxeFormConfigItem, {
|
|
28685
|
+
key: index,
|
|
28686
|
+
itemConfig: childItem
|
|
28687
|
+
});
|
|
28688
|
+
});
|
|
28689
|
+
return childVNs.length ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
28690
|
+
class: ['vxe-form--gather vxe-row', item.id, span ? "vxe-col--".concat(span, " is--span") : '', className ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(className) ? className(params) : className : '']
|
|
28691
|
+
}, childVNs) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])();
|
|
28692
|
+
}
|
|
28693
|
+
|
|
28694
|
+
if (!itemVisibleMethod && compConf && compConf.itemVisibleMethod) {
|
|
28695
|
+
itemVisibleMethod = compConf.itemVisibleMethod;
|
|
28696
|
+
}
|
|
28697
|
+
|
|
28698
|
+
var contentVNs = [];
|
|
28699
|
+
|
|
28700
|
+
if (defaultSlot) {
|
|
28701
|
+
contentVNs = $xeform.callSlot(defaultSlot, params);
|
|
28702
|
+
} else if (compConf && compConf.renderItemContent) {
|
|
28703
|
+
contentVNs = compConf.renderItemContent(itemRender, params);
|
|
28704
|
+
} else if (field) {
|
|
28705
|
+
contentVNs = ["".concat(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.get(data, field))];
|
|
28706
|
+
}
|
|
28707
|
+
|
|
28708
|
+
if (collapseNode) {
|
|
28709
|
+
contentVNs.push(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
28710
|
+
class: 'vxe-form--item-trigger-node',
|
|
28711
|
+
onClick: $xeform.toggleCollapseEvent
|
|
28712
|
+
}, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
28713
|
+
class: 'vxe-form--item-trigger-text'
|
|
28714
|
+
}, collapseAll ? conf.i18n('vxe.form.unfolding') : conf.i18n('vxe.form.folding')), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('i', {
|
|
28715
|
+
class: ['vxe-form--item-trigger-icon', collapseAll ? conf.icon.FORM_FOLDING : conf.icon.FORM_UNFOLDING]
|
|
28716
|
+
})]));
|
|
28717
|
+
}
|
|
28718
|
+
|
|
28719
|
+
if (errRule && validOpts.showMessage) {
|
|
28720
|
+
contentVNs.push(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
28721
|
+
class: 'vxe-form--item-valid',
|
|
28722
|
+
style: errRule.maxWidth ? {
|
|
28723
|
+
width: "".concat(errRule.maxWidth, "px")
|
|
28724
|
+
} : null
|
|
28725
|
+
}, errRule.content));
|
|
28726
|
+
}
|
|
28727
|
+
|
|
28728
|
+
var ons = showTooltip ? {
|
|
28729
|
+
onMouseenter: function onMouseenter(evnt) {
|
|
28730
|
+
$xeform.triggerTitleTipEvent(evnt, params);
|
|
28731
|
+
},
|
|
28732
|
+
onMouseleave: $xeform.handleTitleTipLeaveEvent
|
|
28733
|
+
} : {};
|
|
28734
|
+
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
28735
|
+
class: ['vxe-form--item', item.id, span ? "vxe-col--".concat(span, " is--span") : '', className ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(className) ? className(params) : className : '', {
|
|
28736
|
+
'is--title': title,
|
|
28737
|
+
'is--colon': titleColon,
|
|
28738
|
+
'is--asterisk': titleAsterisk,
|
|
28739
|
+
'is--required': isRequired,
|
|
28740
|
+
'is--hidden': folding && collapseAll,
|
|
28741
|
+
'is--active': !itemVisibleMethod || itemVisibleMethod(params),
|
|
28742
|
+
'is--error': showError
|
|
28743
|
+
}],
|
|
28744
|
+
itemConfig: item,
|
|
28745
|
+
key: item.id
|
|
28746
|
+
}, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
28747
|
+
class: 'vxe-form--item-inner'
|
|
28748
|
+
}, [title || titleSlot ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', _objectSpread2({
|
|
28749
|
+
class: ['vxe-form--item-title', titleAlign ? "align--".concat(titleAlign) : null, {
|
|
28750
|
+
'is--ellipsis': hasEllipsis
|
|
28751
|
+
}],
|
|
28752
|
+
style: titleWidth ? {
|
|
28753
|
+
width: isNaN(titleWidth) ? titleWidth : "".concat(titleWidth, "px")
|
|
28754
|
+
} : null,
|
|
28755
|
+
title: showTitle ? getFuncText(title) : null
|
|
28756
|
+
}, ons), renderTitle($xeform, item)) : null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
28757
|
+
class: ['vxe-form--item-content', align ? "align--".concat(align) : null]
|
|
28758
|
+
}, contentVNs)])]);
|
|
28759
|
+
};
|
|
28760
|
+
|
|
28761
|
+
var $xeformconfigitem = {
|
|
28762
|
+
renderVN: renderVN
|
|
28763
|
+
};
|
|
28764
|
+
return $xeformconfigitem;
|
|
28765
|
+
},
|
|
28766
|
+
render: function render() {
|
|
28767
|
+
return this.renderVN();
|
|
28768
|
+
}
|
|
28769
|
+
});
|
|
28770
|
+
/* harmony default export */ var form_config_item = (VxeFormConfigItem);
|
|
28907
28771
|
// CONCATENATED MODULE: ./packages/form/src/form.ts
|
|
28908
28772
|
|
|
28909
28773
|
|
|
@@ -29364,7 +29228,7 @@ function getResetValue(value, resetValue) {
|
|
|
29364
29228
|
}
|
|
29365
29229
|
} else {
|
|
29366
29230
|
var isArrType = type === 'array';
|
|
29367
|
-
var hasEmpty = isArrType ? !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isArray(itemValue) || !itemValue.length : eqEmptyValue(itemValue);
|
|
29231
|
+
var hasEmpty = isArrType || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isArray(itemValue) ? !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isArray(itemValue) || !itemValue.length : eqEmptyValue(itemValue);
|
|
29368
29232
|
|
|
29369
29233
|
if (required ? hasEmpty || form_validErrorRuleValue(rule, itemValue) : !hasEmpty && form_validErrorRuleValue(rule, itemValue)) {
|
|
29370
29234
|
errorRules.push(new form_Rule(rule));
|
|
@@ -29557,22 +29421,14 @@ function getResetValue(value, resetValue) {
|
|
|
29557
29421
|
closeTooltip();
|
|
29558
29422
|
}
|
|
29559
29423
|
};
|
|
29560
|
-
/**
|
|
29561
|
-
* 更新项状态
|
|
29562
|
-
* 如果组件值 v-model 发生 change 时,调用改函数用于更新某一项编辑状态
|
|
29563
|
-
* 如果单元格配置了校验规则,则会进行校验
|
|
29564
|
-
*/
|
|
29565
|
-
|
|
29566
29424
|
|
|
29567
|
-
var
|
|
29568
|
-
|
|
29569
|
-
|
|
29570
|
-
|
|
29571
|
-
validItemRules('change', property, itemValue).then(function () {
|
|
29572
|
-
clearValidate(property);
|
|
29425
|
+
var triggerItemEvent = function triggerItemEvent(evnt, field, itemValue) {
|
|
29426
|
+
if (field) {
|
|
29427
|
+
return validItemRules(evnt ? evnt.type : 'all', field, itemValue).then(function () {
|
|
29428
|
+
clearValidate(field);
|
|
29573
29429
|
}).catch(function (_ref2) {
|
|
29574
29430
|
var rule = _ref2.rule;
|
|
29575
|
-
var item = getItemByField(
|
|
29431
|
+
var item = getItemByField(field);
|
|
29576
29432
|
|
|
29577
29433
|
if (item) {
|
|
29578
29434
|
item.showError = true;
|
|
@@ -29580,138 +29436,19 @@ function getResetValue(value, resetValue) {
|
|
|
29580
29436
|
}
|
|
29581
29437
|
});
|
|
29582
29438
|
}
|
|
29583
|
-
};
|
|
29584
|
-
|
|
29585
|
-
var renderItems = function renderItems(itemList) {
|
|
29586
|
-
var data = props.data,
|
|
29587
|
-
rules = props.rules,
|
|
29588
|
-
allTitleOverflow = props.titleOverflow;
|
|
29589
|
-
var collapseAll = reactData.collapseAll;
|
|
29590
|
-
var validOpts = computeValidOpts.value;
|
|
29591
|
-
return itemList.map(function (item) {
|
|
29592
|
-
var slots = item.slots,
|
|
29593
|
-
title = item.title,
|
|
29594
|
-
visible = item.visible,
|
|
29595
|
-
folding = item.folding,
|
|
29596
|
-
visibleMethod = item.visibleMethod,
|
|
29597
|
-
field = item.field,
|
|
29598
|
-
collapseNode = item.collapseNode,
|
|
29599
|
-
itemRender = item.itemRender,
|
|
29600
|
-
showError = item.showError,
|
|
29601
|
-
errRule = item.errRule,
|
|
29602
|
-
className = item.className,
|
|
29603
|
-
titleOverflow = item.titleOverflow,
|
|
29604
|
-
children = item.children;
|
|
29605
|
-
var compConf = isEnableConf(itemRender) ? VXETable.renderer.get(itemRender.name) : null;
|
|
29606
|
-
var defaultSlot = slots ? slots.default : null;
|
|
29607
|
-
var titleSlot = slots ? slots.title : null;
|
|
29608
|
-
var span = item.span || props.span;
|
|
29609
|
-
var align = item.align || props.align;
|
|
29610
|
-
var titleAlign = item.titleAlign || props.titleAlign;
|
|
29611
|
-
var titleWidth = item.titleWidth || props.titleWidth;
|
|
29612
|
-
var itemOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isUndefined(titleOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isNull(titleOverflow) ? allTitleOverflow : titleOverflow;
|
|
29613
|
-
var showEllipsis = itemOverflow === 'ellipsis';
|
|
29614
|
-
var showTitle = itemOverflow === 'title';
|
|
29615
|
-
var showTooltip = itemOverflow === true || itemOverflow === 'tooltip';
|
|
29616
|
-
var hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
29617
|
-
var itemVisibleMethod = visibleMethod;
|
|
29618
|
-
var params = {
|
|
29619
|
-
data: data,
|
|
29620
|
-
field: field,
|
|
29621
|
-
property: field,
|
|
29622
|
-
item: item,
|
|
29623
|
-
$form: $xeform
|
|
29624
|
-
};
|
|
29625
|
-
|
|
29626
|
-
if (visible === false) {
|
|
29627
|
-
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])();
|
|
29628
|
-
}
|
|
29629
|
-
|
|
29630
|
-
var isRequired = false;
|
|
29631
|
-
|
|
29632
|
-
if (rules) {
|
|
29633
|
-
var itemRules = rules[field];
|
|
29634
|
-
|
|
29635
|
-
if (itemRules) {
|
|
29636
|
-
isRequired = itemRules.some(function (rule) {
|
|
29637
|
-
return rule.required;
|
|
29638
|
-
});
|
|
29639
|
-
}
|
|
29640
|
-
} // 如果为项集合
|
|
29641
|
-
|
|
29642
29439
|
|
|
29643
|
-
|
|
29644
|
-
|
|
29645
|
-
|
|
29646
|
-
|
|
29647
|
-
|
|
29648
|
-
|
|
29649
|
-
|
|
29650
|
-
}
|
|
29651
|
-
|
|
29652
|
-
if (!itemVisibleMethod && compConf && compConf.itemVisibleMethod) {
|
|
29653
|
-
itemVisibleMethod = compConf.itemVisibleMethod;
|
|
29654
|
-
}
|
|
29655
|
-
|
|
29656
|
-
var contentVNs = [];
|
|
29657
|
-
|
|
29658
|
-
if (defaultSlot) {
|
|
29659
|
-
contentVNs = callSlot(defaultSlot, params);
|
|
29660
|
-
} else if (compConf && compConf.renderItemContent) {
|
|
29661
|
-
contentVNs = compConf.renderItemContent(itemRender, params);
|
|
29662
|
-
} else if (field) {
|
|
29663
|
-
contentVNs = ["".concat(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.get(data, field))];
|
|
29664
|
-
}
|
|
29665
|
-
|
|
29666
|
-
if (collapseNode) {
|
|
29667
|
-
contentVNs.push(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
29668
|
-
class: 'vxe-form--item-trigger-node',
|
|
29669
|
-
onClick: toggleCollapseEvent
|
|
29670
|
-
}, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
29671
|
-
class: 'vxe-form--item-trigger-text'
|
|
29672
|
-
}, collapseAll ? conf.i18n('vxe.form.unfolding') : conf.i18n('vxe.form.folding')), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('i', {
|
|
29673
|
-
class: ['vxe-form--item-trigger-icon', collapseAll ? conf.icon.FORM_FOLDING : conf.icon.FORM_UNFOLDING]
|
|
29674
|
-
})]));
|
|
29675
|
-
}
|
|
29440
|
+
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])();
|
|
29441
|
+
};
|
|
29442
|
+
/**
|
|
29443
|
+
* 更新项状态
|
|
29444
|
+
* 如果组件值 v-model 发生 change 时,调用改函数用于更新某一项编辑状态
|
|
29445
|
+
* 如果单元格配置了校验规则,则会进行校验
|
|
29446
|
+
*/
|
|
29676
29447
|
|
|
29677
|
-
if (errRule && validOpts.showMessage) {
|
|
29678
|
-
contentVNs.push(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
29679
|
-
class: 'vxe-form--item-valid',
|
|
29680
|
-
style: errRule.maxWidth ? {
|
|
29681
|
-
width: "".concat(errRule.maxWidth, "px")
|
|
29682
|
-
} : null
|
|
29683
|
-
}, errRule.content));
|
|
29684
|
-
}
|
|
29685
29448
|
|
|
29686
|
-
|
|
29687
|
-
|
|
29688
|
-
|
|
29689
|
-
},
|
|
29690
|
-
onMouseleave: handleTitleTipLeaveEvent
|
|
29691
|
-
} : {};
|
|
29692
|
-
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
29693
|
-
class: ['vxe-form--item', item.id, span ? "vxe-col--".concat(span, " is--span") : '', className ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(className) ? className(params) : className : '', {
|
|
29694
|
-
'is--title': title,
|
|
29695
|
-
'is--required': isRequired,
|
|
29696
|
-
'is--hidden': folding && collapseAll,
|
|
29697
|
-
'is--active': !itemVisibleMethod || itemVisibleMethod(params),
|
|
29698
|
-
'is--error': showError
|
|
29699
|
-
}],
|
|
29700
|
-
key: item.id
|
|
29701
|
-
}, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
29702
|
-
class: 'vxe-form--item-inner'
|
|
29703
|
-
}, [title || titleSlot ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', _objectSpread2({
|
|
29704
|
-
class: ['vxe-form--item-title', titleAlign ? "align--".concat(titleAlign) : null, {
|
|
29705
|
-
'is--ellipsis': hasEllipsis
|
|
29706
|
-
}],
|
|
29707
|
-
style: titleWidth ? {
|
|
29708
|
-
width: isNaN(titleWidth) ? titleWidth : "".concat(titleWidth, "px")
|
|
29709
|
-
} : null,
|
|
29710
|
-
title: showTitle ? getFuncText(title) : null
|
|
29711
|
-
}, ons), renderTitle($xeform, item)) : null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
29712
|
-
class: ['vxe-form--item-content', align ? "align--".concat(align) : null]
|
|
29713
|
-
}, contentVNs)])]);
|
|
29714
|
-
});
|
|
29449
|
+
var updateStatus = function updateStatus(scope, itemValue) {
|
|
29450
|
+
var field = scope.field;
|
|
29451
|
+
return triggerItemEvent(new Event('change'), field, itemValue);
|
|
29715
29452
|
};
|
|
29716
29453
|
|
|
29717
29454
|
formMethods = {
|
|
@@ -29733,6 +29470,7 @@ function getResetValue(value, resetValue) {
|
|
|
29733
29470
|
};
|
|
29734
29471
|
var formPrivateMethods = {
|
|
29735
29472
|
callSlot: callSlot,
|
|
29473
|
+
triggerItemEvent: triggerItemEvent,
|
|
29736
29474
|
toggleCollapseEvent: toggleCollapseEvent,
|
|
29737
29475
|
triggerTitleTipEvent: triggerTitleTipEvent,
|
|
29738
29476
|
handleTitleTipLeaveEvent: handleTitleTipLeaveEvent
|
|
@@ -29771,8 +29509,6 @@ function getResetValue(value, resetValue) {
|
|
|
29771
29509
|
var loading = props.loading,
|
|
29772
29510
|
className = props.className,
|
|
29773
29511
|
data = props.data,
|
|
29774
|
-
titleColon = props.titleColon,
|
|
29775
|
-
titleAsterisk = props.titleAsterisk,
|
|
29776
29512
|
customLayout = props.customLayout;
|
|
29777
29513
|
var formItems = reactData.formItems; // const formItems: any[] = []
|
|
29778
29514
|
|
|
@@ -29785,12 +29521,18 @@ function getResetValue(value, resetValue) {
|
|
|
29785
29521
|
items: formItems,
|
|
29786
29522
|
data: data,
|
|
29787
29523
|
$form: $xeform
|
|
29788
|
-
}) : className : '', (_ref3 = {}, _defineProperty(_ref3, "size--".concat(vSize), vSize), _defineProperty(_ref3, 'is--
|
|
29524
|
+
}) : className : '', (_ref3 = {}, _defineProperty(_ref3, "size--".concat(vSize), vSize), _defineProperty(_ref3, 'is--loading', loading), _ref3)],
|
|
29789
29525
|
onSubmit: submitEvent,
|
|
29790
29526
|
onReset: resetEvent
|
|
29791
29527
|
}, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
29792
29528
|
class: 'vxe-form--wrapper vxe-row'
|
|
29793
|
-
}, customLayout ? defaultSlot ? defaultSlot({}) : [] :
|
|
29529
|
+
}, customLayout ? defaultSlot ? defaultSlot({}) : [] : formItems.map(function (item, index) {
|
|
29530
|
+
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])(form_config_item, {
|
|
29531
|
+
key: index,
|
|
29532
|
+
itemConfig2: item,
|
|
29533
|
+
itemConfig: item
|
|
29534
|
+
});
|
|
29535
|
+
})), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
29794
29536
|
class: 'vxe-form-slots',
|
|
29795
29537
|
ref: 'hideItem'
|
|
29796
29538
|
}, customLayout ? [] : defaultSlot ? defaultSlot({}) : []), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
@@ -29810,6 +29552,9 @@ function getResetValue(value, resetValue) {
|
|
|
29810
29552
|
|
|
29811
29553
|
$xeform.renderVN = renderVN;
|
|
29812
29554
|
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["provide"])('$xeform', $xeform);
|
|
29555
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["provide"])('$xeformgather', null);
|
|
29556
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["provide"])('$xeformitem', null);
|
|
29557
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["provide"])('$xeformiteminfo', null);
|
|
29813
29558
|
return $xeform;
|
|
29814
29559
|
},
|
|
29815
29560
|
render: function render() {
|
|
@@ -29846,6 +29591,14 @@ var formItemProps = {
|
|
|
29846
29591
|
align: String,
|
|
29847
29592
|
titleAlign: String,
|
|
29848
29593
|
titleWidth: [String, Number],
|
|
29594
|
+
titleColon: {
|
|
29595
|
+
type: Boolean,
|
|
29596
|
+
default: null
|
|
29597
|
+
},
|
|
29598
|
+
titleAsterisk: {
|
|
29599
|
+
type: Boolean,
|
|
29600
|
+
default: null
|
|
29601
|
+
},
|
|
29849
29602
|
className: [String, Function],
|
|
29850
29603
|
titleOverflow: {
|
|
29851
29604
|
type: [Boolean, String],
|
|
@@ -29872,9 +29625,18 @@ var formItemProps = {
|
|
|
29872
29625
|
var slots = _ref.slots;
|
|
29873
29626
|
var refElem = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
29874
29627
|
var $xeform = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('$xeform', {});
|
|
29875
|
-
var formGather = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('xeformgather', null);
|
|
29628
|
+
var formGather = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('$xeformgather', null);
|
|
29876
29629
|
var formItem = createItem($xeform, props);
|
|
29630
|
+
var xeformitem = {
|
|
29631
|
+
formItem: formItem
|
|
29632
|
+
};
|
|
29633
|
+
var xeformiteminfo = {
|
|
29634
|
+
itemConfig: formItem
|
|
29635
|
+
};
|
|
29877
29636
|
formItem.slots = slots;
|
|
29637
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["provide"])('$xeformiteminfo', xeformiteminfo);
|
|
29638
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["provide"])('$xeformitem', xeformitem);
|
|
29639
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["provide"])('$xeformgather', null);
|
|
29878
29640
|
watchItem(props, formItem);
|
|
29879
29641
|
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onMounted"])(function () {
|
|
29880
29642
|
assemItem($xeform, refElem.value, formItem, formGather);
|
|
@@ -30009,7 +29771,13 @@ var formItemProps = {
|
|
|
30009
29771
|
});
|
|
30010
29772
|
};
|
|
30011
29773
|
|
|
30012
|
-
|
|
29774
|
+
var $xeformitem = {
|
|
29775
|
+
renderVN: renderVN
|
|
29776
|
+
};
|
|
29777
|
+
return $xeformitem;
|
|
29778
|
+
},
|
|
29779
|
+
render: function render() {
|
|
29780
|
+
return this.renderVN();
|
|
30013
29781
|
}
|
|
30014
29782
|
}));
|
|
30015
29783
|
// CONCATENATED MODULE: ./packages/form-item/index.ts
|
|
@@ -30036,14 +29804,19 @@ dynamicApp.component(form_item.name, form_item);
|
|
|
30036
29804
|
var slots = _ref.slots;
|
|
30037
29805
|
var refElem = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
30038
29806
|
var $xeform = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('$xeform', {});
|
|
30039
|
-
var formGather = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('xeformgather', null);
|
|
29807
|
+
var formGather = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('$xeformgather', null);
|
|
30040
29808
|
var defaultSlot = slots.default;
|
|
30041
29809
|
var formItem = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])(createItem($xeform, props));
|
|
30042
29810
|
var xeformitem = {
|
|
30043
29811
|
formItem: formItem
|
|
30044
29812
|
};
|
|
29813
|
+
var xeformiteminfo = {
|
|
29814
|
+
itemConfig: formItem
|
|
29815
|
+
};
|
|
30045
29816
|
formItem.children = [];
|
|
30046
|
-
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["provide"])('
|
|
29817
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["provide"])('$xeformiteminfo', xeformiteminfo);
|
|
29818
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["provide"])('$xeformgather', xeformitem);
|
|
29819
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["provide"])('$xeformitem', null);
|
|
30047
29820
|
watchItem(props, formItem);
|
|
30048
29821
|
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onMounted"])(function () {
|
|
30049
29822
|
assemItem($xeform, refElem.value, formItem, formGather);
|
|
@@ -30066,7 +29839,13 @@ dynamicApp.component(form_item.name, form_item);
|
|
|
30066
29839
|
}, defaultSlot ? defaultSlot() : []);
|
|
30067
29840
|
};
|
|
30068
29841
|
|
|
30069
|
-
|
|
29842
|
+
var $xeformgather = {
|
|
29843
|
+
renderVN: renderVN
|
|
29844
|
+
};
|
|
29845
|
+
return $xeformgather;
|
|
29846
|
+
},
|
|
29847
|
+
render: function render() {
|
|
29848
|
+
return this.renderVN();
|
|
30070
29849
|
}
|
|
30071
29850
|
}));
|
|
30072
29851
|
// CONCATENATED MODULE: ./packages/form-gather/index.ts
|
|
@@ -30313,6 +30092,8 @@ dynamicApp.component(src_option.name, src_option);
|
|
|
30313
30092
|
emits: ['update:modelValue', 'change', 'focus', 'blur'],
|
|
30314
30093
|
setup: function setup(props, context) {
|
|
30315
30094
|
var emit = context.emit;
|
|
30095
|
+
var $xeform = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('$xeform', null);
|
|
30096
|
+
var $xeformiteminfo = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('$xeformiteminfo', null);
|
|
30316
30097
|
var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.uniqueId();
|
|
30317
30098
|
var computeSize = useSize(props);
|
|
30318
30099
|
var reactData = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({
|
|
@@ -30349,7 +30130,12 @@ dynamicApp.component(src_option.name, src_option);
|
|
|
30349
30130
|
emit('update:modelValue', value);
|
|
30350
30131
|
switchMethods.dispatchEvent('change', {
|
|
30351
30132
|
value: value
|
|
30352
|
-
}, evnt);
|
|
30133
|
+
}, evnt); // 自动更新校验状态
|
|
30134
|
+
|
|
30135
|
+
if ($xeform && $xeformiteminfo) {
|
|
30136
|
+
$xeform.triggerItemEvent(evnt, $xeformiteminfo.itemConfig.field, value);
|
|
30137
|
+
}
|
|
30138
|
+
|
|
30353
30139
|
_atimeout = setTimeout(function () {
|
|
30354
30140
|
reactData.hasAnimat = false;
|
|
30355
30141
|
}, 400);
|
|
@@ -31198,1085 +30984,1441 @@ dynamicApp.component(src_list.name, src_list);
|
|
|
31198
30984
|
*/
|
|
31199
30985
|
|
|
31200
30986
|
|
|
31201
|
-
var togglePanel = function togglePanel() {
|
|
31202
|
-
if (reactData.visiblePanel) {
|
|
31203
|
-
return hidePanel();
|
|
30987
|
+
var togglePanel = function togglePanel() {
|
|
30988
|
+
if (reactData.visiblePanel) {
|
|
30989
|
+
return hidePanel();
|
|
30990
|
+
}
|
|
30991
|
+
|
|
30992
|
+
return showPanel();
|
|
30993
|
+
};
|
|
30994
|
+
|
|
30995
|
+
var handleGlobalMousewheelEvent = function handleGlobalMousewheelEvent(evnt) {
|
|
30996
|
+
var disabled = props.disabled;
|
|
30997
|
+
var visiblePanel = reactData.visiblePanel;
|
|
30998
|
+
var panelElem = refPulldowPnanel.value;
|
|
30999
|
+
|
|
31000
|
+
if (!disabled) {
|
|
31001
|
+
if (visiblePanel) {
|
|
31002
|
+
if (getEventTargetNode(evnt, panelElem).flag) {
|
|
31003
|
+
updatePlacement();
|
|
31004
|
+
} else {
|
|
31005
|
+
hidePanel();
|
|
31006
|
+
pulldownMethods.dispatchEvent('hide-panel', {}, evnt);
|
|
31007
|
+
}
|
|
31008
|
+
}
|
|
31009
|
+
}
|
|
31010
|
+
};
|
|
31011
|
+
|
|
31012
|
+
var handleGlobalMousedownEvent = function handleGlobalMousedownEvent(evnt) {
|
|
31013
|
+
var disabled = props.disabled;
|
|
31014
|
+
var visiblePanel = reactData.visiblePanel;
|
|
31015
|
+
var el = refElem.value;
|
|
31016
|
+
var panelElem = refPulldowPnanel.value;
|
|
31017
|
+
|
|
31018
|
+
if (!disabled) {
|
|
31019
|
+
reactData.isActivated = getEventTargetNode(evnt, el).flag || getEventTargetNode(evnt, panelElem).flag;
|
|
31020
|
+
|
|
31021
|
+
if (visiblePanel && !reactData.isActivated) {
|
|
31022
|
+
hidePanel();
|
|
31023
|
+
pulldownMethods.dispatchEvent('hide-panel', {}, evnt);
|
|
31024
|
+
}
|
|
31025
|
+
}
|
|
31026
|
+
};
|
|
31027
|
+
|
|
31028
|
+
var handleGlobalBlurEvent = function handleGlobalBlurEvent(evnt) {
|
|
31029
|
+
if (reactData.visiblePanel) {
|
|
31030
|
+
reactData.isActivated = false;
|
|
31031
|
+
hidePanel();
|
|
31032
|
+
pulldownMethods.dispatchEvent('hide-panel', {}, evnt);
|
|
31033
|
+
}
|
|
31034
|
+
};
|
|
31035
|
+
|
|
31036
|
+
pulldownMethods = {
|
|
31037
|
+
dispatchEvent: function dispatchEvent(type, params, evnt) {
|
|
31038
|
+
emit(type, Object.assign({
|
|
31039
|
+
$pulldown: $xepulldown,
|
|
31040
|
+
$event: evnt
|
|
31041
|
+
}, params));
|
|
31042
|
+
},
|
|
31043
|
+
isPanelVisible: isPanelVisible,
|
|
31044
|
+
togglePanel: togglePanel,
|
|
31045
|
+
showPanel: showPanel,
|
|
31046
|
+
hidePanel: hidePanel
|
|
31047
|
+
};
|
|
31048
|
+
Object.assign($xepulldown, pulldownMethods);
|
|
31049
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () {
|
|
31050
|
+
return props.modelValue;
|
|
31051
|
+
}, function (value) {
|
|
31052
|
+
if (value) {
|
|
31053
|
+
showPanel();
|
|
31054
|
+
} else {
|
|
31055
|
+
hidePanel();
|
|
31056
|
+
}
|
|
31057
|
+
});
|
|
31058
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])(function () {
|
|
31059
|
+
GlobalEvent.on($xepulldown, 'mousewheel', handleGlobalMousewheelEvent);
|
|
31060
|
+
GlobalEvent.on($xepulldown, 'mousedown', handleGlobalMousedownEvent);
|
|
31061
|
+
GlobalEvent.on($xepulldown, 'blur', handleGlobalBlurEvent);
|
|
31062
|
+
});
|
|
31063
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onUnmounted"])(function () {
|
|
31064
|
+
GlobalEvent.off($xepulldown, 'mousewheel');
|
|
31065
|
+
GlobalEvent.off($xepulldown, 'mousedown');
|
|
31066
|
+
GlobalEvent.off($xepulldown, 'blur');
|
|
31067
|
+
});
|
|
31068
|
+
|
|
31069
|
+
var renderVN = function renderVN() {
|
|
31070
|
+
var _ref, _ref2;
|
|
31071
|
+
|
|
31072
|
+
var destroyOnClose = props.destroyOnClose,
|
|
31073
|
+
transfer = props.transfer,
|
|
31074
|
+
disabled = props.disabled;
|
|
31075
|
+
var inited = reactData.inited,
|
|
31076
|
+
isActivated = reactData.isActivated,
|
|
31077
|
+
animatVisible = reactData.animatVisible,
|
|
31078
|
+
visiblePanel = reactData.visiblePanel,
|
|
31079
|
+
panelStyle = reactData.panelStyle,
|
|
31080
|
+
panelPlacement = reactData.panelPlacement;
|
|
31081
|
+
var vSize = computeSize.value;
|
|
31082
|
+
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
31083
|
+
ref: refElem,
|
|
31084
|
+
class: ['vxe-pulldown', (_ref = {}, _defineProperty(_ref, "size--".concat(vSize), vSize), _defineProperty(_ref, 'is--visivle', visiblePanel), _defineProperty(_ref, 'is--disabled', disabled), _defineProperty(_ref, 'is--active', isActivated), _ref)]
|
|
31085
|
+
}, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
31086
|
+
ref: refPulldowContent,
|
|
31087
|
+
class: 'vxe-pulldown--content'
|
|
31088
|
+
}, slots.default ? slots.default({
|
|
31089
|
+
$pulldown: $xepulldown
|
|
31090
|
+
}) : []), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Teleport"], {
|
|
31091
|
+
to: 'body',
|
|
31092
|
+
disabled: transfer ? !inited : true
|
|
31093
|
+
}, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
31094
|
+
ref: refPulldowPnanel,
|
|
31095
|
+
class: ['vxe-table--ignore-clear vxe-pulldown--panel', (_ref2 = {}, _defineProperty(_ref2, "size--".concat(vSize), vSize), _defineProperty(_ref2, 'is--transfer', transfer), _defineProperty(_ref2, 'animat--leave', animatVisible), _defineProperty(_ref2, 'animat--enter', visiblePanel), _ref2)],
|
|
31096
|
+
placement: panelPlacement,
|
|
31097
|
+
style: panelStyle
|
|
31098
|
+
}, slots.dropdown ? [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
31099
|
+
class: 'vxe-pulldown--wrapper'
|
|
31100
|
+
}, !inited || destroyOnClose && !visiblePanel && !animatVisible ? [] : slots.dropdown({
|
|
31101
|
+
$pulldown: $xepulldown
|
|
31102
|
+
}))] : [])])]);
|
|
31103
|
+
};
|
|
31104
|
+
|
|
31105
|
+
$xepulldown.renderVN = renderVN;
|
|
31106
|
+
return $xepulldown;
|
|
31107
|
+
},
|
|
31108
|
+
render: function render() {
|
|
31109
|
+
return this.renderVN();
|
|
31110
|
+
}
|
|
31111
|
+
}));
|
|
31112
|
+
// CONCATENATED MODULE: ./packages/pulldown/index.ts
|
|
31113
|
+
|
|
31114
|
+
|
|
31115
|
+
|
|
31116
|
+
|
|
31117
|
+
var Pulldown = Object.assign(pulldown, {
|
|
31118
|
+
install: function install(app) {
|
|
31119
|
+
app.component(pulldown.name, pulldown);
|
|
31120
|
+
}
|
|
31121
|
+
});
|
|
31122
|
+
dynamicApp.component(pulldown.name, pulldown);
|
|
31123
|
+
/* harmony default export */ var packages_pulldown = (Pulldown);
|
|
31124
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.promise.finally.js
|
|
31125
|
+
var es_promise_finally = __webpack_require__("a79d");
|
|
31126
|
+
|
|
31127
|
+
// CONCATENATED MODULE: ./packages/table/src/body.ts
|
|
31128
|
+
|
|
31129
|
+
|
|
31130
|
+
|
|
31131
|
+
|
|
31132
|
+
|
|
31133
|
+
|
|
31134
|
+
|
|
31135
|
+
|
|
31136
|
+
|
|
31137
|
+
|
|
31138
|
+
|
|
31139
|
+
|
|
31140
|
+
|
|
31141
|
+
|
|
31142
|
+
|
|
31143
|
+
|
|
31144
|
+
var body_renderType = 'body';
|
|
31145
|
+
var lineOffsetSizes = {
|
|
31146
|
+
mini: 3,
|
|
31147
|
+
small: 2,
|
|
31148
|
+
medium: 1
|
|
31149
|
+
};
|
|
31150
|
+
/* harmony default export */ var src_body = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({
|
|
31151
|
+
name: 'VxeTableBody',
|
|
31152
|
+
props: {
|
|
31153
|
+
tableData: Array,
|
|
31154
|
+
tableColumn: Array,
|
|
31155
|
+
fixedColumn: Array,
|
|
31156
|
+
fixedType: {
|
|
31157
|
+
type: String,
|
|
31158
|
+
default: null
|
|
31159
|
+
}
|
|
31160
|
+
},
|
|
31161
|
+
setup: function setup(props) {
|
|
31162
|
+
var $xetable = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('$xetable', {});
|
|
31163
|
+
var xesize = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('xesize', null);
|
|
31164
|
+
var xID = $xetable.xID,
|
|
31165
|
+
tableProps = $xetable.props,
|
|
31166
|
+
tableContext = $xetable.context,
|
|
31167
|
+
tableReactData = $xetable.reactData,
|
|
31168
|
+
tableInternalData = $xetable.internalData;
|
|
31169
|
+
|
|
31170
|
+
var _$xetable$getRefMaps = $xetable.getRefMaps(),
|
|
31171
|
+
refTableHeader = _$xetable$getRefMaps.refTableHeader,
|
|
31172
|
+
refTableBody = _$xetable$getRefMaps.refTableBody,
|
|
31173
|
+
refTableFooter = _$xetable$getRefMaps.refTableFooter,
|
|
31174
|
+
refTableLeftBody = _$xetable$getRefMaps.refTableLeftBody,
|
|
31175
|
+
refTableRightBody = _$xetable$getRefMaps.refTableRightBody,
|
|
31176
|
+
refValidTooltip = _$xetable$getRefMaps.refValidTooltip;
|
|
31177
|
+
|
|
31178
|
+
var _$xetable$getComputeM = $xetable.getComputeMaps(),
|
|
31179
|
+
computeEditOpts = _$xetable$getComputeM.computeEditOpts,
|
|
31180
|
+
computeMouseOpts = _$xetable$getComputeM.computeMouseOpts,
|
|
31181
|
+
computeSYOpts = _$xetable$getComputeM.computeSYOpts,
|
|
31182
|
+
computeEmptyOpts = _$xetable$getComputeM.computeEmptyOpts,
|
|
31183
|
+
computeKeyboardOpts = _$xetable$getComputeM.computeKeyboardOpts,
|
|
31184
|
+
computeTooltipOpts = _$xetable$getComputeM.computeTooltipOpts,
|
|
31185
|
+
computeRadioOpts = _$xetable$getComputeM.computeRadioOpts,
|
|
31186
|
+
computeTreeOpts = _$xetable$getComputeM.computeTreeOpts,
|
|
31187
|
+
computeCheckboxOpts = _$xetable$getComputeM.computeCheckboxOpts,
|
|
31188
|
+
computeValidOpts = _$xetable$getComputeM.computeValidOpts,
|
|
31189
|
+
computeRowOpts = _$xetable$getComputeM.computeRowOpts,
|
|
31190
|
+
computeColumnOpts = _$xetable$getComputeM.computeColumnOpts;
|
|
31191
|
+
|
|
31192
|
+
var refElem = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
31193
|
+
var refBodyTable = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
31194
|
+
var refBodyColgroup = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
31195
|
+
var refBodyTBody = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
31196
|
+
var refBodyXSpace = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
31197
|
+
var refBodyYSpace = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
31198
|
+
var refBodyEmptyBlock = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
31199
|
+
|
|
31200
|
+
var getOffsetSize = function getOffsetSize() {
|
|
31201
|
+
if (xesize) {
|
|
31202
|
+
var vSize = xesize.value;
|
|
31203
|
+
|
|
31204
|
+
if (vSize) {
|
|
31205
|
+
return lineOffsetSizes[vSize] || 0;
|
|
31206
|
+
}
|
|
31207
|
+
}
|
|
31208
|
+
|
|
31209
|
+
return 0;
|
|
31210
|
+
};
|
|
31211
|
+
|
|
31212
|
+
var countTreeExpand = function countTreeExpand(prevRow, params) {
|
|
31213
|
+
var count = 1;
|
|
31214
|
+
|
|
31215
|
+
if (!prevRow) {
|
|
31216
|
+
return count;
|
|
31217
|
+
}
|
|
31218
|
+
|
|
31219
|
+
var treeOpts = computeTreeOpts.value;
|
|
31220
|
+
var rowChildren = prevRow[treeOpts.children];
|
|
31221
|
+
|
|
31222
|
+
if ($xetable.isTreeExpandByRow(prevRow)) {
|
|
31223
|
+
for (var index = 0; index < rowChildren.length; index++) {
|
|
31224
|
+
count += countTreeExpand(rowChildren[index], params);
|
|
31225
|
+
}
|
|
31204
31226
|
}
|
|
31205
31227
|
|
|
31206
|
-
return
|
|
31228
|
+
return count;
|
|
31207
31229
|
};
|
|
31208
31230
|
|
|
31209
|
-
var
|
|
31210
|
-
var
|
|
31211
|
-
var visiblePanel = reactData.visiblePanel;
|
|
31212
|
-
var panelElem = refPulldowPnanel.value;
|
|
31231
|
+
var calcTreeLine = function calcTreeLine(params, items, rIndex) {
|
|
31232
|
+
var expandSize = 1;
|
|
31213
31233
|
|
|
31214
|
-
if (
|
|
31215
|
-
|
|
31216
|
-
if (getEventTargetNode(evnt, panelElem).flag) {
|
|
31217
|
-
updatePlacement();
|
|
31218
|
-
} else {
|
|
31219
|
-
hidePanel();
|
|
31220
|
-
pulldownMethods.dispatchEvent('hide-panel', {}, evnt);
|
|
31221
|
-
}
|
|
31222
|
-
}
|
|
31234
|
+
if (rIndex) {
|
|
31235
|
+
expandSize = countTreeExpand(items[rIndex - 1], params);
|
|
31223
31236
|
}
|
|
31224
|
-
};
|
|
31225
31237
|
|
|
31226
|
-
|
|
31227
|
-
|
|
31228
|
-
var visiblePanel = reactData.visiblePanel;
|
|
31229
|
-
var el = refElem.value;
|
|
31230
|
-
var panelElem = refPulldowPnanel.value;
|
|
31238
|
+
return tableReactData.rowHeight * expandSize - (rIndex ? 1 : 12 - getOffsetSize());
|
|
31239
|
+
}; // 滚动、拖动过程中不需要触发
|
|
31231
31240
|
|
|
31232
|
-
if (!disabled) {
|
|
31233
|
-
reactData.isActivated = getEventTargetNode(evnt, el).flag || getEventTargetNode(evnt, panelElem).flag;
|
|
31234
31241
|
|
|
31235
|
-
|
|
31236
|
-
|
|
31237
|
-
|
|
31238
|
-
|
|
31239
|
-
|
|
31242
|
+
var isOperateMouse = function isOperateMouse() {
|
|
31243
|
+
var delayHover = tableProps.delayHover;
|
|
31244
|
+
var lastScrollTime = tableInternalData.lastScrollTime,
|
|
31245
|
+
_isResize = tableInternalData._isResize;
|
|
31246
|
+
return _isResize || lastScrollTime && Date.now() < lastScrollTime + delayHover;
|
|
31240
31247
|
};
|
|
31241
31248
|
|
|
31242
|
-
var
|
|
31243
|
-
|
|
31244
|
-
|
|
31245
|
-
|
|
31246
|
-
|
|
31249
|
+
var renderLine = function renderLine(params) {
|
|
31250
|
+
var row = params.row,
|
|
31251
|
+
column = params.column;
|
|
31252
|
+
var treeConfig = tableProps.treeConfig;
|
|
31253
|
+
var treeOpts = computeTreeOpts.value;
|
|
31254
|
+
var slots = column.slots,
|
|
31255
|
+
treeNode = column.treeNode;
|
|
31256
|
+
var fullAllDataRowIdData = tableInternalData.fullAllDataRowIdData;
|
|
31257
|
+
var rowid = util_getRowid($xetable, row);
|
|
31258
|
+
var rest = fullAllDataRowIdData[rowid];
|
|
31259
|
+
var rLevel = 0;
|
|
31260
|
+
var rIndex = 0;
|
|
31261
|
+
var items = [];
|
|
31262
|
+
|
|
31263
|
+
if (rest) {
|
|
31264
|
+
rLevel = rest.level;
|
|
31265
|
+
rIndex = rest._index;
|
|
31266
|
+
items = rest.items;
|
|
31247
31267
|
}
|
|
31248
|
-
};
|
|
31249
31268
|
|
|
31250
|
-
|
|
31251
|
-
|
|
31252
|
-
emit(type, Object.assign({
|
|
31253
|
-
$pulldown: $xepulldown,
|
|
31254
|
-
$event: evnt
|
|
31255
|
-
}, params));
|
|
31256
|
-
},
|
|
31257
|
-
isPanelVisible: isPanelVisible,
|
|
31258
|
-
togglePanel: togglePanel,
|
|
31259
|
-
showPanel: showPanel,
|
|
31260
|
-
hidePanel: hidePanel
|
|
31261
|
-
};
|
|
31262
|
-
Object.assign($xepulldown, pulldownMethods);
|
|
31263
|
-
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () {
|
|
31264
|
-
return props.modelValue;
|
|
31265
|
-
}, function (value) {
|
|
31266
|
-
if (value) {
|
|
31267
|
-
showPanel();
|
|
31268
|
-
} else {
|
|
31269
|
-
hidePanel();
|
|
31269
|
+
if (slots && slots.line) {
|
|
31270
|
+
return $xetable.callSlot(slots.line, params);
|
|
31270
31271
|
}
|
|
31271
|
-
});
|
|
31272
|
-
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])(function () {
|
|
31273
|
-
GlobalEvent.on($xepulldown, 'mousewheel', handleGlobalMousewheelEvent);
|
|
31274
|
-
GlobalEvent.on($xepulldown, 'mousedown', handleGlobalMousedownEvent);
|
|
31275
|
-
GlobalEvent.on($xepulldown, 'blur', handleGlobalBlurEvent);
|
|
31276
|
-
});
|
|
31277
|
-
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onUnmounted"])(function () {
|
|
31278
|
-
GlobalEvent.off($xepulldown, 'mousewheel');
|
|
31279
|
-
GlobalEvent.off($xepulldown, 'mousedown');
|
|
31280
|
-
GlobalEvent.off($xepulldown, 'blur');
|
|
31281
|
-
});
|
|
31282
31272
|
|
|
31283
|
-
|
|
31284
|
-
|
|
31273
|
+
if (treeConfig && treeNode && treeOpts.line) {
|
|
31274
|
+
return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
31275
|
+
class: 'vxe-tree--line-wrapper'
|
|
31276
|
+
}, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
31277
|
+
class: 'vxe-tree--line',
|
|
31278
|
+
style: {
|
|
31279
|
+
height: "".concat(calcTreeLine(params, items, rIndex), "px"),
|
|
31280
|
+
left: "".concat(rLevel * treeOpts.indent + (rLevel ? 2 - getOffsetSize() : 0) + 16, "px")
|
|
31281
|
+
}
|
|
31282
|
+
})])];
|
|
31283
|
+
}
|
|
31285
31284
|
|
|
31286
|
-
|
|
31287
|
-
transfer = props.transfer,
|
|
31288
|
-
disabled = props.disabled;
|
|
31289
|
-
var inited = reactData.inited,
|
|
31290
|
-
isActivated = reactData.isActivated,
|
|
31291
|
-
animatVisible = reactData.animatVisible,
|
|
31292
|
-
visiblePanel = reactData.visiblePanel,
|
|
31293
|
-
panelStyle = reactData.panelStyle,
|
|
31294
|
-
panelPlacement = reactData.panelPlacement;
|
|
31295
|
-
var vSize = computeSize.value;
|
|
31296
|
-
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
31297
|
-
ref: refElem,
|
|
31298
|
-
class: ['vxe-pulldown', (_ref = {}, _defineProperty(_ref, "size--".concat(vSize), vSize), _defineProperty(_ref, 'is--visivle', visiblePanel), _defineProperty(_ref, 'is--disabled', disabled), _defineProperty(_ref, 'is--active', isActivated), _ref)]
|
|
31299
|
-
}, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
31300
|
-
ref: refPulldowContent,
|
|
31301
|
-
class: 'vxe-pulldown--content'
|
|
31302
|
-
}, slots.default ? slots.default({
|
|
31303
|
-
$pulldown: $xepulldown
|
|
31304
|
-
}) : []), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Teleport"], {
|
|
31305
|
-
to: 'body',
|
|
31306
|
-
disabled: transfer ? !inited : true
|
|
31307
|
-
}, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
31308
|
-
ref: refPulldowPnanel,
|
|
31309
|
-
class: ['vxe-table--ignore-clear vxe-pulldown--panel', (_ref2 = {}, _defineProperty(_ref2, "size--".concat(vSize), vSize), _defineProperty(_ref2, 'is--transfer', transfer), _defineProperty(_ref2, 'animat--leave', animatVisible), _defineProperty(_ref2, 'animat--enter', visiblePanel), _ref2)],
|
|
31310
|
-
placement: panelPlacement,
|
|
31311
|
-
style: panelStyle
|
|
31312
|
-
}, slots.dropdown ? [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
31313
|
-
class: 'vxe-pulldown--wrapper'
|
|
31314
|
-
}, !inited || destroyOnClose && !visiblePanel && !animatVisible ? [] : slots.dropdown({
|
|
31315
|
-
$pulldown: $xepulldown
|
|
31316
|
-
}))] : [])])]);
|
|
31285
|
+
return [];
|
|
31317
31286
|
};
|
|
31287
|
+
/**
|
|
31288
|
+
* 渲染列
|
|
31289
|
+
*/
|
|
31318
31290
|
|
|
31319
|
-
$xepulldown.renderVN = renderVN;
|
|
31320
|
-
return $xepulldown;
|
|
31321
|
-
},
|
|
31322
|
-
render: function render() {
|
|
31323
|
-
return this.renderVN();
|
|
31324
|
-
}
|
|
31325
|
-
}));
|
|
31326
|
-
// CONCATENATED MODULE: ./packages/pulldown/index.ts
|
|
31327
31291
|
|
|
31292
|
+
var renderColumn = function renderColumn(seq, rowid, fixedType, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, columns, items) {
|
|
31293
|
+
var _ref2;
|
|
31294
|
+
|
|
31295
|
+
var columnKey = tableProps.columnKey,
|
|
31296
|
+
height = tableProps.height,
|
|
31297
|
+
allColumnOverflow = tableProps.showOverflow,
|
|
31298
|
+
cellClassName = tableProps.cellClassName,
|
|
31299
|
+
cellStyle = tableProps.cellStyle,
|
|
31300
|
+
allAlign = tableProps.align,
|
|
31301
|
+
spanMethod = tableProps.spanMethod,
|
|
31302
|
+
mouseConfig = tableProps.mouseConfig,
|
|
31303
|
+
editConfig = tableProps.editConfig,
|
|
31304
|
+
editRules = tableProps.editRules,
|
|
31305
|
+
tooltipConfig = tableProps.tooltipConfig;
|
|
31306
|
+
var tableData = tableReactData.tableData,
|
|
31307
|
+
overflowX = tableReactData.overflowX,
|
|
31308
|
+
scrollYLoad = tableReactData.scrollYLoad,
|
|
31309
|
+
currentColumn = tableReactData.currentColumn,
|
|
31310
|
+
mergeList = tableReactData.mergeList,
|
|
31311
|
+
editStore = tableReactData.editStore,
|
|
31312
|
+
validStore = tableReactData.validStore,
|
|
31313
|
+
isAllOverflow = tableReactData.isAllOverflow;
|
|
31314
|
+
var afterFullData = tableInternalData.afterFullData;
|
|
31315
|
+
var validOpts = computeValidOpts.value;
|
|
31316
|
+
var checkboxOpts = computeCheckboxOpts.value;
|
|
31317
|
+
var editOpts = computeEditOpts.value;
|
|
31318
|
+
var tooltipOpts = computeTooltipOpts.value;
|
|
31319
|
+
var rowOpts = computeRowOpts.value;
|
|
31320
|
+
var sYOpts = computeSYOpts.value;
|
|
31321
|
+
var columnOpts = computeColumnOpts.value;
|
|
31322
|
+
var type = column.type,
|
|
31323
|
+
cellRender = column.cellRender,
|
|
31324
|
+
editRender = column.editRender,
|
|
31325
|
+
align = column.align,
|
|
31326
|
+
showOverflow = column.showOverflow,
|
|
31327
|
+
className = column.className,
|
|
31328
|
+
treeNode = column.treeNode;
|
|
31329
|
+
var actived = editStore.actived;
|
|
31330
|
+
var scrollYRHeight = sYOpts.rHeight;
|
|
31331
|
+
var rowHeight = rowOpts.height;
|
|
31332
|
+
var showAllTip = tooltipOpts.showAll;
|
|
31333
|
+
var columnIndex = $xetable.getColumnIndex(column);
|
|
31334
|
+
|
|
31335
|
+
var _columnIndex = $xetable.getVTColumnIndex(column);
|
|
31336
|
+
|
|
31337
|
+
var isEdit = isEnableConf(editRender);
|
|
31338
|
+
var fixedHiddenColumn = fixedType ? column.fixed !== fixedType : column.fixed && overflowX;
|
|
31339
|
+
var cellOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isUndefined(showOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isNull(showOverflow) ? allColumnOverflow : showOverflow;
|
|
31340
|
+
var showEllipsis = cellOverflow === 'ellipsis';
|
|
31341
|
+
var showTitle = cellOverflow === 'title';
|
|
31342
|
+
var showTooltip = cellOverflow === true || cellOverflow === 'tooltip';
|
|
31343
|
+
var hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
31344
|
+
var isDirty;
|
|
31345
|
+
var tdOns = {};
|
|
31346
|
+
var cellAlign = align || allAlign;
|
|
31347
|
+
var hasValidError = validStore.row === row && validStore.column === column;
|
|
31348
|
+
var showValidTip = editRules && validOpts.showMessage && (validOpts.message === 'default' ? height || tableData.length > 1 : validOpts.message === 'inline');
|
|
31349
|
+
var attrs = {
|
|
31350
|
+
colid: column.id
|
|
31351
|
+
};
|
|
31352
|
+
var params = {
|
|
31353
|
+
$table: $xetable,
|
|
31354
|
+
seq: seq,
|
|
31355
|
+
rowid: rowid,
|
|
31356
|
+
row: row,
|
|
31357
|
+
rowIndex: rowIndex,
|
|
31358
|
+
$rowIndex: $rowIndex,
|
|
31359
|
+
_rowIndex: _rowIndex,
|
|
31360
|
+
column: column,
|
|
31361
|
+
columnIndex: columnIndex,
|
|
31362
|
+
$columnIndex: $columnIndex,
|
|
31363
|
+
_columnIndex: _columnIndex,
|
|
31364
|
+
fixed: fixedType,
|
|
31365
|
+
type: body_renderType,
|
|
31366
|
+
isHidden: fixedHiddenColumn,
|
|
31367
|
+
level: rowLevel,
|
|
31368
|
+
visibleData: afterFullData,
|
|
31369
|
+
data: tableData,
|
|
31370
|
+
items: items
|
|
31371
|
+
}; // 虚拟滚动不支持动态高度
|
|
31372
|
+
|
|
31373
|
+
if (scrollYLoad && !hasEllipsis) {
|
|
31374
|
+
showEllipsis = hasEllipsis = true;
|
|
31375
|
+
} // hover 进入事件
|
|
31376
|
+
|
|
31377
|
+
|
|
31378
|
+
if (showTitle || showTooltip || showAllTip || tooltipConfig) {
|
|
31379
|
+
tdOns.onMouseenter = function (evnt) {
|
|
31380
|
+
if (isOperateMouse()) {
|
|
31381
|
+
return;
|
|
31382
|
+
}
|
|
31383
|
+
|
|
31384
|
+
if (showTitle) {
|
|
31385
|
+
updateCellTitle(evnt.currentTarget, column);
|
|
31386
|
+
} else if (showTooltip || showAllTip) {
|
|
31387
|
+
// 如果配置了显示 tooltip
|
|
31388
|
+
$xetable.triggerBodyTooltipEvent(evnt, params);
|
|
31389
|
+
}
|
|
31390
|
+
|
|
31391
|
+
$xetable.dispatchEvent('cell-mouseenter', Object.assign({
|
|
31392
|
+
cell: evnt.currentTarget
|
|
31393
|
+
}, params), evnt);
|
|
31394
|
+
};
|
|
31395
|
+
} // hover 退出事件
|
|
31328
31396
|
|
|
31329
31397
|
|
|
31398
|
+
if (showTooltip || showAllTip || tooltipConfig) {
|
|
31399
|
+
tdOns.onMouseleave = function (evnt) {
|
|
31400
|
+
if (isOperateMouse()) {
|
|
31401
|
+
return;
|
|
31402
|
+
}
|
|
31330
31403
|
|
|
31331
|
-
|
|
31332
|
-
|
|
31333
|
-
|
|
31334
|
-
}
|
|
31335
|
-
});
|
|
31336
|
-
dynamicApp.component(pulldown.name, pulldown);
|
|
31337
|
-
/* harmony default export */ var packages_pulldown = (Pulldown);
|
|
31338
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.promise.finally.js
|
|
31339
|
-
var es_promise_finally = __webpack_require__("a79d");
|
|
31404
|
+
if (showTooltip || showAllTip) {
|
|
31405
|
+
$xetable.handleTargetLeaveEvent(evnt);
|
|
31406
|
+
}
|
|
31340
31407
|
|
|
31341
|
-
|
|
31408
|
+
$xetable.dispatchEvent('cell-mouseleave', Object.assign({
|
|
31409
|
+
cell: evnt.currentTarget
|
|
31410
|
+
}, params), evnt);
|
|
31411
|
+
};
|
|
31412
|
+
} // 按下事件处理
|
|
31342
31413
|
|
|
31343
31414
|
|
|
31415
|
+
if (checkboxOpts.range || mouseConfig) {
|
|
31416
|
+
tdOns.onMousedown = function (evnt) {
|
|
31417
|
+
$xetable.triggerCellMousedownEvent(evnt, params);
|
|
31418
|
+
};
|
|
31419
|
+
} // 点击事件处理
|
|
31344
31420
|
|
|
31345
31421
|
|
|
31422
|
+
tdOns.onClick = function (evnt) {
|
|
31423
|
+
$xetable.triggerCellClickEvent(evnt, params);
|
|
31424
|
+
}; // 双击事件处理
|
|
31346
31425
|
|
|
31347
31426
|
|
|
31427
|
+
tdOns.onDblclick = function (evnt) {
|
|
31428
|
+
$xetable.triggerCellDblclickEvent(evnt, params);
|
|
31429
|
+
}; // 合并行或列
|
|
31348
31430
|
|
|
31349
31431
|
|
|
31432
|
+
if (mergeList.length) {
|
|
31433
|
+
var spanRest = mergeBodyMethod(mergeList, _rowIndex, _columnIndex);
|
|
31350
31434
|
|
|
31435
|
+
if (spanRest) {
|
|
31436
|
+
var rowspan = spanRest.rowspan,
|
|
31437
|
+
colspan = spanRest.colspan;
|
|
31351
31438
|
|
|
31439
|
+
if (!rowspan || !colspan) {
|
|
31440
|
+
return null;
|
|
31441
|
+
}
|
|
31352
31442
|
|
|
31443
|
+
if (rowspan > 1) {
|
|
31444
|
+
attrs.rowspan = rowspan;
|
|
31445
|
+
}
|
|
31353
31446
|
|
|
31447
|
+
if (colspan > 1) {
|
|
31448
|
+
attrs.colspan = colspan;
|
|
31449
|
+
}
|
|
31450
|
+
}
|
|
31451
|
+
} else if (spanMethod) {
|
|
31452
|
+
// 自定义合并行或列的方法
|
|
31453
|
+
var _ref = spanMethod(params) || {},
|
|
31454
|
+
_ref$rowspan = _ref.rowspan,
|
|
31455
|
+
_rowspan = _ref$rowspan === void 0 ? 1 : _ref$rowspan,
|
|
31456
|
+
_ref$colspan = _ref.colspan,
|
|
31457
|
+
_colspan = _ref$colspan === void 0 ? 1 : _ref$colspan;
|
|
31354
31458
|
|
|
31459
|
+
if (!_rowspan || !_colspan) {
|
|
31460
|
+
return null;
|
|
31461
|
+
}
|
|
31355
31462
|
|
|
31463
|
+
if (_rowspan > 1) {
|
|
31464
|
+
attrs.rowspan = _rowspan;
|
|
31465
|
+
}
|
|
31356
31466
|
|
|
31467
|
+
if (_colspan > 1) {
|
|
31468
|
+
attrs.colspan = _colspan;
|
|
31469
|
+
}
|
|
31470
|
+
} // 如果被合并不可隐藏
|
|
31357
31471
|
|
|
31358
|
-
var body_renderType = 'body';
|
|
31359
|
-
var lineOffsetSizes = {
|
|
31360
|
-
mini: 3,
|
|
31361
|
-
small: 2,
|
|
31362
|
-
medium: 1
|
|
31363
|
-
};
|
|
31364
|
-
/* harmony default export */ var src_body = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({
|
|
31365
|
-
name: 'VxeTableBody',
|
|
31366
|
-
props: {
|
|
31367
|
-
tableData: Array,
|
|
31368
|
-
tableColumn: Array,
|
|
31369
|
-
fixedColumn: Array,
|
|
31370
|
-
fixedType: {
|
|
31371
|
-
type: String,
|
|
31372
|
-
default: null
|
|
31373
|
-
}
|
|
31374
|
-
},
|
|
31375
|
-
setup: function setup(props) {
|
|
31376
|
-
var $xetable = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('$xetable', {});
|
|
31377
|
-
var xesize = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('xesize', null);
|
|
31378
|
-
var xID = $xetable.xID,
|
|
31379
|
-
tableProps = $xetable.props,
|
|
31380
|
-
tableContext = $xetable.context,
|
|
31381
|
-
tableReactData = $xetable.reactData,
|
|
31382
|
-
tableInternalData = $xetable.internalData;
|
|
31383
31472
|
|
|
31384
|
-
|
|
31385
|
-
|
|
31386
|
-
|
|
31387
|
-
|
|
31388
|
-
|
|
31389
|
-
refTableRightBody = _$xetable$getRefMaps.refTableRightBody,
|
|
31390
|
-
refValidTooltip = _$xetable$getRefMaps.refValidTooltip;
|
|
31473
|
+
if (fixedHiddenColumn && mergeList) {
|
|
31474
|
+
if (attrs.colspan > 1 || attrs.rowspan > 1) {
|
|
31475
|
+
fixedHiddenColumn = false;
|
|
31476
|
+
}
|
|
31477
|
+
} // 如果编辑列开启显示状态
|
|
31391
31478
|
|
|
31392
|
-
var _$xetable$getComputeM = $xetable.getComputeMaps(),
|
|
31393
|
-
computeEditOpts = _$xetable$getComputeM.computeEditOpts,
|
|
31394
|
-
computeMouseOpts = _$xetable$getComputeM.computeMouseOpts,
|
|
31395
|
-
computeSYOpts = _$xetable$getComputeM.computeSYOpts,
|
|
31396
|
-
computeEmptyOpts = _$xetable$getComputeM.computeEmptyOpts,
|
|
31397
|
-
computeKeyboardOpts = _$xetable$getComputeM.computeKeyboardOpts,
|
|
31398
|
-
computeTooltipOpts = _$xetable$getComputeM.computeTooltipOpts,
|
|
31399
|
-
computeRadioOpts = _$xetable$getComputeM.computeRadioOpts,
|
|
31400
|
-
computeTreeOpts = _$xetable$getComputeM.computeTreeOpts,
|
|
31401
|
-
computeCheckboxOpts = _$xetable$getComputeM.computeCheckboxOpts,
|
|
31402
|
-
computeValidOpts = _$xetable$getComputeM.computeValidOpts,
|
|
31403
|
-
computeRowOpts = _$xetable$getComputeM.computeRowOpts,
|
|
31404
|
-
computeColumnOpts = _$xetable$getComputeM.computeColumnOpts;
|
|
31405
31479
|
|
|
31406
|
-
|
|
31407
|
-
|
|
31408
|
-
|
|
31409
|
-
var refBodyTBody = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
31410
|
-
var refBodyXSpace = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
31411
|
-
var refBodyYSpace = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
31412
|
-
var refBodyEmptyBlock = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
31480
|
+
if (!fixedHiddenColumn && editConfig && (editRender || cellRender) && (editOpts.showStatus || editOpts.showUpdateStatus)) {
|
|
31481
|
+
isDirty = $xetable.isUpdateByRow(row, column.property);
|
|
31482
|
+
}
|
|
31413
31483
|
|
|
31414
|
-
|
|
31415
|
-
if (xesize) {
|
|
31416
|
-
var vSize = xesize.value;
|
|
31484
|
+
var tdVNs = [];
|
|
31417
31485
|
|
|
31418
|
-
|
|
31419
|
-
|
|
31486
|
+
if (fixedHiddenColumn && (allColumnOverflow ? isAllOverflow : allColumnOverflow)) {
|
|
31487
|
+
tdVNs.push(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
31488
|
+
class: ['vxe-cell', {
|
|
31489
|
+
'c--title': showTitle,
|
|
31490
|
+
'c--tooltip': showTooltip,
|
|
31491
|
+
'c--ellipsis': showEllipsis
|
|
31492
|
+
}],
|
|
31493
|
+
style: {
|
|
31494
|
+
maxHeight: hasEllipsis && (scrollYRHeight || rowHeight) ? "".concat(scrollYRHeight || rowHeight, "px") : ''
|
|
31495
|
+
}
|
|
31496
|
+
}));
|
|
31497
|
+
} else {
|
|
31498
|
+
// 渲染单元格
|
|
31499
|
+
tdVNs.push.apply(tdVNs, _toConsumableArray(renderLine(params)).concat([Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
31500
|
+
class: ['vxe-cell', {
|
|
31501
|
+
'c--title': showTitle,
|
|
31502
|
+
'c--tooltip': showTooltip,
|
|
31503
|
+
'c--ellipsis': showEllipsis
|
|
31504
|
+
}],
|
|
31505
|
+
style: {
|
|
31506
|
+
maxHeight: hasEllipsis && (scrollYRHeight || rowHeight) ? "".concat(scrollYRHeight || rowHeight, "px") : ''
|
|
31507
|
+
},
|
|
31508
|
+
title: showTitle ? $xetable.getCellLabel(row, column) : null
|
|
31509
|
+
}, column.renderCell(params))]));
|
|
31510
|
+
|
|
31511
|
+
if (showValidTip && hasValidError) {
|
|
31512
|
+
tdVNs.push(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
31513
|
+
class: 'vxe-cell--valid',
|
|
31514
|
+
style: validStore.rule && validStore.rule.maxWidth ? {
|
|
31515
|
+
width: "".concat(validStore.rule.maxWidth, "px")
|
|
31516
|
+
} : null
|
|
31517
|
+
}, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
31518
|
+
class: 'vxe-cell--valid-msg'
|
|
31519
|
+
}, validStore.content)]));
|
|
31420
31520
|
}
|
|
31421
31521
|
}
|
|
31422
31522
|
|
|
31423
|
-
return
|
|
31523
|
+
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('td', _objectSpread2(_objectSpread2({
|
|
31524
|
+
class: ['vxe-body--column', column.id, (_ref2 = {}, _defineProperty(_ref2, "col--".concat(cellAlign), cellAlign), _defineProperty(_ref2, "col--".concat(type), type), _defineProperty(_ref2, 'col--last', $columnIndex === columns.length - 1), _defineProperty(_ref2, 'col--tree-node', treeNode), _defineProperty(_ref2, 'col--edit', isEdit), _defineProperty(_ref2, 'col--ellipsis', hasEllipsis), _defineProperty(_ref2, 'fixed--hidden', fixedHiddenColumn), _defineProperty(_ref2, 'col--dirty', isDirty), _defineProperty(_ref2, 'col--actived', editConfig && isEdit && actived.row === row && (actived.column === column || editOpts.mode === 'row')), _defineProperty(_ref2, 'col--valid-error', hasValidError), _defineProperty(_ref2, 'col--current', currentColumn === column), _ref2), getPropClass(className, params), getPropClass(cellClassName, params)],
|
|
31525
|
+
key: columnKey || columnOpts.useKey ? column.id : $columnIndex
|
|
31526
|
+
}, attrs), {}, {
|
|
31527
|
+
style: Object.assign({
|
|
31528
|
+
height: hasEllipsis && (scrollYRHeight || rowHeight) ? "".concat(scrollYRHeight || rowHeight, "px") : ''
|
|
31529
|
+
}, cellStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(cellStyle) ? cellStyle(params) : cellStyle : null)
|
|
31530
|
+
}, tdOns), tdVNs);
|
|
31424
31531
|
};
|
|
31425
31532
|
|
|
31426
|
-
var
|
|
31427
|
-
var
|
|
31533
|
+
var renderRows = function renderRows(fixedType, tableData, tableColumn) {
|
|
31534
|
+
var stripe = tableProps.stripe,
|
|
31535
|
+
rowKey = tableProps.rowKey,
|
|
31536
|
+
highlightHoverRow = tableProps.highlightHoverRow,
|
|
31537
|
+
rowClassName = tableProps.rowClassName,
|
|
31538
|
+
rowStyle = tableProps.rowStyle,
|
|
31539
|
+
allColumnOverflow = tableProps.showOverflow,
|
|
31540
|
+
editConfig = tableProps.editConfig,
|
|
31541
|
+
treeConfig = tableProps.treeConfig;
|
|
31542
|
+
var hasFixedColumn = tableReactData.hasFixedColumn,
|
|
31543
|
+
treeExpandeds = tableReactData.treeExpandeds,
|
|
31544
|
+
scrollYLoad = tableReactData.scrollYLoad,
|
|
31545
|
+
editStore = tableReactData.editStore,
|
|
31546
|
+
rowExpandeds = tableReactData.rowExpandeds,
|
|
31547
|
+
expandColumn = tableReactData.expandColumn,
|
|
31548
|
+
selectRow = tableReactData.selectRow;
|
|
31549
|
+
var fullAllDataRowIdData = tableInternalData.fullAllDataRowIdData;
|
|
31550
|
+
var checkboxOpts = computeCheckboxOpts.value;
|
|
31551
|
+
var radioOpts = computeRadioOpts.value;
|
|
31552
|
+
var treeOpts = computeTreeOpts.value;
|
|
31553
|
+
var editOpts = computeEditOpts.value;
|
|
31554
|
+
var rowOpts = computeRowOpts.value;
|
|
31555
|
+
var transform = treeOpts.transform;
|
|
31556
|
+
var rows = [];
|
|
31557
|
+
tableData.forEach(function (row, $rowIndex) {
|
|
31558
|
+
var trOn = {};
|
|
31559
|
+
var rowIndex = $rowIndex; // 确保任何情况下 rowIndex 都精准指向真实 data 索引
|
|
31560
|
+
|
|
31561
|
+
rowIndex = $xetable.getRowIndex(row); // 事件绑定
|
|
31562
|
+
|
|
31563
|
+
if (rowOpts.isHover || highlightHoverRow) {
|
|
31564
|
+
trOn.onMouseenter = function (evnt) {
|
|
31565
|
+
if (isOperateMouse()) {
|
|
31566
|
+
return;
|
|
31567
|
+
}
|
|
31568
|
+
|
|
31569
|
+
$xetable.triggerHoverEvent(evnt, {
|
|
31570
|
+
row: row,
|
|
31571
|
+
rowIndex: rowIndex
|
|
31572
|
+
});
|
|
31573
|
+
};
|
|
31574
|
+
|
|
31575
|
+
trOn.onMouseleave = function () {
|
|
31576
|
+
if (isOperateMouse()) {
|
|
31577
|
+
return;
|
|
31578
|
+
}
|
|
31579
|
+
|
|
31580
|
+
$xetable.clearHoverRow();
|
|
31581
|
+
};
|
|
31582
|
+
}
|
|
31583
|
+
|
|
31584
|
+
var rowid = util_getRowid($xetable, row);
|
|
31585
|
+
var rest = fullAllDataRowIdData[rowid];
|
|
31586
|
+
var rowLevel = 0;
|
|
31587
|
+
var seq = -1;
|
|
31588
|
+
var _rowIndex = 0;
|
|
31589
|
+
|
|
31590
|
+
if (rest) {
|
|
31591
|
+
rowLevel = rest.level;
|
|
31592
|
+
seq = rest.seq;
|
|
31593
|
+
_rowIndex = rest._index;
|
|
31594
|
+
}
|
|
31595
|
+
|
|
31596
|
+
var params = {
|
|
31597
|
+
$table: $xetable,
|
|
31598
|
+
seq: seq,
|
|
31599
|
+
rowid: rowid,
|
|
31600
|
+
fixed: fixedType,
|
|
31601
|
+
type: body_renderType,
|
|
31602
|
+
level: rowLevel,
|
|
31603
|
+
row: row,
|
|
31604
|
+
rowIndex: rowIndex,
|
|
31605
|
+
$rowIndex: $rowIndex,
|
|
31606
|
+
_rowIndex: _rowIndex
|
|
31607
|
+
}; // 行是否被展开
|
|
31608
|
+
|
|
31609
|
+
var isExpandRow = expandColumn && rowExpandeds.length && $xetable.findRowIndexOf(rowExpandeds, row) > -1; // 树节点是否被展开
|
|
31428
31610
|
|
|
31429
|
-
|
|
31430
|
-
|
|
31431
|
-
}
|
|
31611
|
+
var isExpandTree = false;
|
|
31612
|
+
var rowChildren = []; // 处理新增状态
|
|
31432
31613
|
|
|
31433
|
-
|
|
31434
|
-
var rowChildren = prevRow[treeOpts.children];
|
|
31614
|
+
var isNewRow = false;
|
|
31435
31615
|
|
|
31436
|
-
|
|
31437
|
-
|
|
31438
|
-
count += countTreeExpand(rowChildren[index], params);
|
|
31616
|
+
if (editConfig) {
|
|
31617
|
+
isNewRow = $xetable.findRowIndexOf(editStore.insertList, row) > -1;
|
|
31439
31618
|
}
|
|
31440
|
-
}
|
|
31441
|
-
|
|
31442
|
-
return count;
|
|
31443
|
-
};
|
|
31444
|
-
|
|
31445
|
-
var calcTreeLine = function calcTreeLine(params, items, rIndex) {
|
|
31446
|
-
var expandSize = 1;
|
|
31447
31619
|
|
|
31448
|
-
|
|
31449
|
-
|
|
31450
|
-
|
|
31620
|
+
if (treeConfig && !scrollYLoad && !transform && treeExpandeds.length) {
|
|
31621
|
+
rowChildren = row[treeOpts.children];
|
|
31622
|
+
isExpandTree = rowChildren && rowChildren.length && $xetable.findRowIndexOf(treeExpandeds, row) > -1;
|
|
31623
|
+
}
|
|
31451
31624
|
|
|
31452
|
-
|
|
31453
|
-
|
|
31625
|
+
rows.push(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('tr', _objectSpread2({
|
|
31626
|
+
class: ['vxe-body--row', treeConfig ? "row--level-".concat(rowLevel) : '', {
|
|
31627
|
+
'row--stripe': stripe && ($xetable.getVTRowIndex(row) + 1) % 2 === 0,
|
|
31628
|
+
'is--new': isNewRow,
|
|
31629
|
+
'is--expand-row': isExpandRow,
|
|
31630
|
+
'is--expand-tree': isExpandTree,
|
|
31631
|
+
'row--new': isNewRow && (editOpts.showStatus || editOpts.showInsertStatus),
|
|
31632
|
+
'row--radio': radioOpts.highlight && selectRow === row,
|
|
31633
|
+
'row--checked': checkboxOpts.highlight && $xetable.isCheckedByCheckboxRow(row)
|
|
31634
|
+
}, rowClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(rowClassName) ? rowClassName(params) : rowClassName : ''],
|
|
31635
|
+
rowid: rowid,
|
|
31636
|
+
style: rowStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(rowStyle) ? rowStyle(params) : rowStyle : null,
|
|
31637
|
+
key: rowKey || rowOpts.useKey || treeConfig ? rowid : $rowIndex
|
|
31638
|
+
}, trOn), tableColumn.map(function (column, $columnIndex) {
|
|
31639
|
+
return renderColumn(seq, rowid, fixedType, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, tableColumn, tableData);
|
|
31640
|
+
}))); // 如果行被展开了
|
|
31454
31641
|
|
|
31642
|
+
if (isExpandRow) {
|
|
31643
|
+
var cellStyle;
|
|
31455
31644
|
|
|
31456
|
-
|
|
31457
|
-
|
|
31458
|
-
|
|
31459
|
-
|
|
31460
|
-
|
|
31461
|
-
};
|
|
31645
|
+
if (treeConfig) {
|
|
31646
|
+
cellStyle = {
|
|
31647
|
+
paddingLeft: "".concat(rowLevel * treeOpts.indent + 30, "px")
|
|
31648
|
+
};
|
|
31649
|
+
}
|
|
31462
31650
|
|
|
31463
|
-
|
|
31464
|
-
|
|
31465
|
-
|
|
31466
|
-
|
|
31467
|
-
|
|
31468
|
-
|
|
31469
|
-
|
|
31470
|
-
|
|
31471
|
-
|
|
31472
|
-
|
|
31473
|
-
|
|
31474
|
-
|
|
31475
|
-
|
|
31651
|
+
var showOverflow = expandColumn.showOverflow;
|
|
31652
|
+
var hasEllipsis = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isUndefined(showOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isNull(showOverflow) ? allColumnOverflow : showOverflow;
|
|
31653
|
+
var expandParams = {
|
|
31654
|
+
$table: $xetable,
|
|
31655
|
+
seq: seq,
|
|
31656
|
+
column: expandColumn,
|
|
31657
|
+
fixed: fixedType,
|
|
31658
|
+
type: body_renderType,
|
|
31659
|
+
level: rowLevel,
|
|
31660
|
+
row: row,
|
|
31661
|
+
rowIndex: rowIndex,
|
|
31662
|
+
$rowIndex: $rowIndex,
|
|
31663
|
+
_rowIndex: _rowIndex
|
|
31664
|
+
};
|
|
31665
|
+
rows.push(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('tr', _objectSpread2({
|
|
31666
|
+
class: 'vxe-body--expanded-row',
|
|
31667
|
+
key: "expand_".concat(rowid),
|
|
31668
|
+
style: rowStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(rowStyle) ? rowStyle(expandParams) : rowStyle : null
|
|
31669
|
+
}, trOn), [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('td', {
|
|
31670
|
+
class: ['vxe-body--expanded-column', {
|
|
31671
|
+
'fixed--hidden': fixedType && !hasFixedColumn,
|
|
31672
|
+
'col--ellipsis': hasEllipsis
|
|
31673
|
+
}],
|
|
31674
|
+
colspan: tableColumn.length
|
|
31675
|
+
}, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
31676
|
+
class: 'vxe-body--expanded-cell',
|
|
31677
|
+
style: cellStyle
|
|
31678
|
+
}, [expandColumn.renderData(expandParams)])])]));
|
|
31679
|
+
} // 如果是树形表格
|
|
31476
31680
|
|
|
31477
|
-
if (rest) {
|
|
31478
|
-
rLevel = rest.level;
|
|
31479
|
-
rIndex = rest._index;
|
|
31480
|
-
items = rest.items;
|
|
31481
|
-
}
|
|
31482
31681
|
|
|
31483
|
-
|
|
31484
|
-
|
|
31485
|
-
}
|
|
31682
|
+
if (treeConfig && !scrollYLoad && !transform && treeExpandeds.length) {
|
|
31683
|
+
var _rowChildren = row[treeOpts.children];
|
|
31486
31684
|
|
|
31487
|
-
|
|
31488
|
-
|
|
31489
|
-
class: 'vxe-tree--line-wrapper'
|
|
31490
|
-
}, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
31491
|
-
class: 'vxe-tree--line',
|
|
31492
|
-
style: {
|
|
31493
|
-
height: "".concat(calcTreeLine(params, items, rIndex), "px"),
|
|
31494
|
-
left: "".concat(rLevel * treeOpts.indent + (rLevel ? 2 - getOffsetSize() : 0) + 16, "px")
|
|
31685
|
+
if (_rowChildren && _rowChildren.length && $xetable.findRowIndexOf(treeExpandeds, row) > -1) {
|
|
31686
|
+
rows.push.apply(rows, _toConsumableArray(renderRows(fixedType, _rowChildren, tableColumn)));
|
|
31495
31687
|
}
|
|
31496
|
-
}
|
|
31497
|
-
}
|
|
31498
|
-
|
|
31499
|
-
return [];
|
|
31688
|
+
}
|
|
31689
|
+
});
|
|
31690
|
+
return rows;
|
|
31500
31691
|
};
|
|
31501
31692
|
/**
|
|
31502
|
-
*
|
|
31693
|
+
* 同步滚动条
|
|
31503
31694
|
*/
|
|
31504
31695
|
|
|
31505
31696
|
|
|
31506
|
-
var
|
|
31507
|
-
var _ref2;
|
|
31508
|
-
|
|
31509
|
-
var columnKey = tableProps.columnKey,
|
|
31510
|
-
height = tableProps.height,
|
|
31511
|
-
allColumnOverflow = tableProps.showOverflow,
|
|
31512
|
-
cellClassName = tableProps.cellClassName,
|
|
31513
|
-
cellStyle = tableProps.cellStyle,
|
|
31514
|
-
allAlign = tableProps.align,
|
|
31515
|
-
spanMethod = tableProps.spanMethod,
|
|
31516
|
-
mouseConfig = tableProps.mouseConfig,
|
|
31517
|
-
editConfig = tableProps.editConfig,
|
|
31518
|
-
editRules = tableProps.editRules,
|
|
31519
|
-
tooltipConfig = tableProps.tooltipConfig;
|
|
31520
|
-
var tableData = tableReactData.tableData,
|
|
31521
|
-
overflowX = tableReactData.overflowX,
|
|
31522
|
-
scrollYLoad = tableReactData.scrollYLoad,
|
|
31523
|
-
currentColumn = tableReactData.currentColumn,
|
|
31524
|
-
mergeList = tableReactData.mergeList,
|
|
31525
|
-
editStore = tableReactData.editStore,
|
|
31526
|
-
validStore = tableReactData.validStore,
|
|
31527
|
-
isAllOverflow = tableReactData.isAllOverflow;
|
|
31528
|
-
var afterFullData = tableInternalData.afterFullData;
|
|
31529
|
-
var validOpts = computeValidOpts.value;
|
|
31530
|
-
var checkboxOpts = computeCheckboxOpts.value;
|
|
31531
|
-
var editOpts = computeEditOpts.value;
|
|
31532
|
-
var tooltipOpts = computeTooltipOpts.value;
|
|
31533
|
-
var rowOpts = computeRowOpts.value;
|
|
31534
|
-
var sYOpts = computeSYOpts.value;
|
|
31535
|
-
var columnOpts = computeColumnOpts.value;
|
|
31536
|
-
var type = column.type,
|
|
31537
|
-
cellRender = column.cellRender,
|
|
31538
|
-
editRender = column.editRender,
|
|
31539
|
-
align = column.align,
|
|
31540
|
-
showOverflow = column.showOverflow,
|
|
31541
|
-
className = column.className,
|
|
31542
|
-
treeNode = column.treeNode;
|
|
31543
|
-
var actived = editStore.actived;
|
|
31544
|
-
var scrollYRHeight = sYOpts.rHeight;
|
|
31545
|
-
var rowHeight = rowOpts.height;
|
|
31546
|
-
var showAllTip = tooltipOpts.showAll;
|
|
31547
|
-
var columnIndex = $xetable.getColumnIndex(column);
|
|
31548
|
-
|
|
31549
|
-
var _columnIndex = $xetable.getVTColumnIndex(column);
|
|
31550
|
-
|
|
31551
|
-
var isEdit = isEnableConf(editRender);
|
|
31552
|
-
var fixedHiddenColumn = fixedType ? column.fixed !== fixedType : column.fixed && overflowX;
|
|
31553
|
-
var cellOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isUndefined(showOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isNull(showOverflow) ? allColumnOverflow : showOverflow;
|
|
31554
|
-
var showEllipsis = cellOverflow === 'ellipsis';
|
|
31555
|
-
var showTitle = cellOverflow === 'title';
|
|
31556
|
-
var showTooltip = cellOverflow === true || cellOverflow === 'tooltip';
|
|
31557
|
-
var hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
31558
|
-
var isDirty;
|
|
31559
|
-
var tdOns = {};
|
|
31560
|
-
var cellAlign = align || allAlign;
|
|
31561
|
-
var hasValidError = validStore.row === row && validStore.column === column;
|
|
31562
|
-
var showValidTip = editRules && validOpts.showMessage && (validOpts.message === 'default' ? height || tableData.length > 1 : validOpts.message === 'inline');
|
|
31563
|
-
var attrs = {
|
|
31564
|
-
colid: column.id
|
|
31565
|
-
};
|
|
31566
|
-
var params = {
|
|
31567
|
-
$table: $xetable,
|
|
31568
|
-
seq: seq,
|
|
31569
|
-
rowid: rowid,
|
|
31570
|
-
row: row,
|
|
31571
|
-
rowIndex: rowIndex,
|
|
31572
|
-
$rowIndex: $rowIndex,
|
|
31573
|
-
_rowIndex: _rowIndex,
|
|
31574
|
-
column: column,
|
|
31575
|
-
columnIndex: columnIndex,
|
|
31576
|
-
$columnIndex: $columnIndex,
|
|
31577
|
-
_columnIndex: _columnIndex,
|
|
31578
|
-
fixed: fixedType,
|
|
31579
|
-
type: body_renderType,
|
|
31580
|
-
isHidden: fixedHiddenColumn,
|
|
31581
|
-
level: rowLevel,
|
|
31582
|
-
visibleData: afterFullData,
|
|
31583
|
-
data: tableData,
|
|
31584
|
-
items: items
|
|
31585
|
-
}; // 虚拟滚动不支持动态高度
|
|
31697
|
+
var scrollProcessTimeout;
|
|
31586
31698
|
|
|
31587
|
-
|
|
31588
|
-
|
|
31589
|
-
|
|
31699
|
+
var syncBodyScroll = function syncBodyScroll(fixedType, scrollTop, elem1, elem2) {
|
|
31700
|
+
if (elem1 || elem2) {
|
|
31701
|
+
if (elem1) {
|
|
31702
|
+
removeScrollListener(elem1);
|
|
31703
|
+
elem1.scrollTop = scrollTop;
|
|
31704
|
+
}
|
|
31590
31705
|
|
|
31706
|
+
if (elem2) {
|
|
31707
|
+
removeScrollListener(elem2);
|
|
31708
|
+
elem2.scrollTop = scrollTop;
|
|
31709
|
+
}
|
|
31591
31710
|
|
|
31592
|
-
|
|
31593
|
-
|
|
31594
|
-
|
|
31595
|
-
|
|
31596
|
-
|
|
31711
|
+
clearTimeout(scrollProcessTimeout);
|
|
31712
|
+
scrollProcessTimeout = setTimeout(function () {
|
|
31713
|
+
// const tableBody = refTableBody.value
|
|
31714
|
+
// const leftBody = refTableLeftBody.value
|
|
31715
|
+
// const rightBody = refTableRightBody.value
|
|
31716
|
+
// const bodyElem = tableBody.$el as XEBodyScrollElement
|
|
31717
|
+
// const leftElem = leftBody ? leftBody.$el as XEBodyScrollElement : null
|
|
31718
|
+
// const rightElem = rightBody ? rightBody.$el as XEBodyScrollElement : null
|
|
31719
|
+
restoreScrollListener(elem1);
|
|
31720
|
+
restoreScrollListener(elem2); // 检查滚动条是的同步
|
|
31721
|
+
// let targetTop = bodyElem.scrollTop
|
|
31722
|
+
// if (fixedType === 'left') {
|
|
31723
|
+
// if (leftElem) {
|
|
31724
|
+
// targetTop = leftElem.scrollTop
|
|
31725
|
+
// }
|
|
31726
|
+
// } else if (fixedType === 'right') {
|
|
31727
|
+
// if (rightElem) {
|
|
31728
|
+
// targetTop = rightElem.scrollTop
|
|
31729
|
+
// }
|
|
31730
|
+
// }
|
|
31731
|
+
// setScrollTop(bodyElem, targetTop)
|
|
31732
|
+
// setScrollTop(leftElem, targetTop)
|
|
31733
|
+
// setScrollTop(rightElem, targetTop)
|
|
31734
|
+
}, 300);
|
|
31735
|
+
}
|
|
31736
|
+
};
|
|
31737
|
+
/**
|
|
31738
|
+
* 滚动处理
|
|
31739
|
+
* 如果存在列固定左侧,同步更新滚动状态
|
|
31740
|
+
* 如果存在列固定右侧,同步更新滚动状态
|
|
31741
|
+
*/
|
|
31597
31742
|
|
|
31598
|
-
if (showTitle) {
|
|
31599
|
-
updateCellTitle(evnt.currentTarget, column);
|
|
31600
|
-
} else if (showTooltip || showAllTip) {
|
|
31601
|
-
// 如果配置了显示 tooltip
|
|
31602
|
-
$xetable.triggerBodyTooltipEvent(evnt, params);
|
|
31603
|
-
}
|
|
31604
31743
|
|
|
31605
|
-
|
|
31606
|
-
|
|
31607
|
-
|
|
31608
|
-
|
|
31609
|
-
|
|
31744
|
+
var scrollEvent = function scrollEvent(evnt) {
|
|
31745
|
+
var fixedType = props.fixedType;
|
|
31746
|
+
var highlightHoverRow = tableProps.highlightHoverRow;
|
|
31747
|
+
var scrollXLoad = tableReactData.scrollXLoad,
|
|
31748
|
+
scrollYLoad = tableReactData.scrollYLoad;
|
|
31749
|
+
var elemStore = tableInternalData.elemStore,
|
|
31750
|
+
lastScrollTop = tableInternalData.lastScrollTop,
|
|
31751
|
+
lastScrollLeft = tableInternalData.lastScrollLeft;
|
|
31752
|
+
var rowOpts = computeRowOpts.value;
|
|
31753
|
+
var tableHeader = refTableHeader.value;
|
|
31754
|
+
var tableBody = refTableBody.value;
|
|
31755
|
+
var tableFooter = refTableFooter.value;
|
|
31756
|
+
var leftBody = refTableLeftBody.value;
|
|
31757
|
+
var rightBody = refTableRightBody.value;
|
|
31758
|
+
var validTip = refValidTooltip.value;
|
|
31759
|
+
var scrollBodyElem = refElem.value;
|
|
31760
|
+
var headerElem = tableHeader ? tableHeader.$el : null;
|
|
31761
|
+
var footerElem = tableFooter ? tableFooter.$el : null;
|
|
31762
|
+
var bodyElem = tableBody.$el;
|
|
31763
|
+
var leftElem = leftBody ? leftBody.$el : null;
|
|
31764
|
+
var rightElem = rightBody ? rightBody.$el : null;
|
|
31765
|
+
var bodyYRef = elemStore['main-body-ySpace'];
|
|
31766
|
+
var bodyYElem = bodyYRef ? bodyYRef.value : null;
|
|
31767
|
+
var bodyXRef = elemStore['main-body-xSpace'];
|
|
31768
|
+
var bodyXElem = bodyXRef ? bodyXRef.value : null;
|
|
31769
|
+
var bodyHeight = scrollYLoad && bodyYElem ? bodyYElem.clientHeight : bodyElem.clientHeight;
|
|
31770
|
+
var bodyWidth = scrollXLoad && bodyXElem ? bodyXElem.clientWidth : bodyElem.clientWidth;
|
|
31771
|
+
var scrollTop = scrollBodyElem.scrollTop;
|
|
31772
|
+
var scrollLeft = bodyElem.scrollLeft;
|
|
31773
|
+
var isRollX = scrollLeft !== lastScrollLeft;
|
|
31774
|
+
var isRollY = scrollTop !== lastScrollTop;
|
|
31775
|
+
tableInternalData.lastScrollTop = scrollTop;
|
|
31776
|
+
tableInternalData.lastScrollLeft = scrollLeft;
|
|
31777
|
+
tableInternalData.lastScrollTime = Date.now();
|
|
31610
31778
|
|
|
31779
|
+
if (rowOpts.isHover || highlightHoverRow) {
|
|
31780
|
+
$xetable.clearHoverRow();
|
|
31781
|
+
}
|
|
31611
31782
|
|
|
31612
|
-
if (
|
|
31613
|
-
|
|
31614
|
-
|
|
31615
|
-
|
|
31783
|
+
if (leftElem && fixedType === 'left') {
|
|
31784
|
+
scrollTop = leftElem.scrollTop;
|
|
31785
|
+
syncBodyScroll(fixedType, scrollTop, bodyElem, rightElem);
|
|
31786
|
+
} else if (rightElem && fixedType === 'right') {
|
|
31787
|
+
scrollTop = rightElem.scrollTop;
|
|
31788
|
+
syncBodyScroll(fixedType, scrollTop, bodyElem, leftElem);
|
|
31789
|
+
} else {
|
|
31790
|
+
if (isRollX) {
|
|
31791
|
+
if (headerElem) {
|
|
31792
|
+
headerElem.scrollLeft = bodyElem.scrollLeft;
|
|
31616
31793
|
}
|
|
31617
31794
|
|
|
31618
|
-
if (
|
|
31619
|
-
|
|
31795
|
+
if (footerElem) {
|
|
31796
|
+
footerElem.scrollLeft = bodyElem.scrollLeft;
|
|
31620
31797
|
}
|
|
31798
|
+
}
|
|
31621
31799
|
|
|
31622
|
-
|
|
31623
|
-
|
|
31624
|
-
}, params), evnt);
|
|
31625
|
-
};
|
|
31626
|
-
} // 按下事件处理
|
|
31627
|
-
|
|
31800
|
+
if (leftElem || rightElem) {
|
|
31801
|
+
$xetable.checkScrolling();
|
|
31628
31802
|
|
|
31629
|
-
|
|
31630
|
-
|
|
31631
|
-
|
|
31632
|
-
}
|
|
31633
|
-
}
|
|
31803
|
+
if (isRollY) {
|
|
31804
|
+
syncBodyScroll(fixedType, scrollTop, leftElem, rightElem);
|
|
31805
|
+
}
|
|
31806
|
+
}
|
|
31807
|
+
}
|
|
31634
31808
|
|
|
31809
|
+
if (scrollXLoad && isRollX) {
|
|
31810
|
+
$xetable.triggerScrollXEvent(evnt);
|
|
31811
|
+
}
|
|
31635
31812
|
|
|
31636
|
-
|
|
31637
|
-
$xetable.
|
|
31638
|
-
}
|
|
31813
|
+
if (scrollYLoad && isRollY) {
|
|
31814
|
+
$xetable.triggerScrollYEvent(evnt);
|
|
31815
|
+
}
|
|
31639
31816
|
|
|
31817
|
+
if (isRollX && validTip && validTip.reactData.visible) {
|
|
31818
|
+
validTip.updatePlacement();
|
|
31819
|
+
}
|
|
31640
31820
|
|
|
31641
|
-
|
|
31642
|
-
|
|
31643
|
-
|
|
31821
|
+
$xetable.dispatchEvent('scroll', {
|
|
31822
|
+
type: body_renderType,
|
|
31823
|
+
fixed: fixedType,
|
|
31824
|
+
scrollTop: scrollTop,
|
|
31825
|
+
scrollLeft: scrollLeft,
|
|
31826
|
+
scrollHeight: bodyElem.scrollHeight,
|
|
31827
|
+
scrollWidth: bodyElem.scrollWidth,
|
|
31828
|
+
bodyHeight: bodyHeight,
|
|
31829
|
+
bodyWidth: bodyWidth,
|
|
31830
|
+
isX: isRollX,
|
|
31831
|
+
isY: isRollY
|
|
31832
|
+
}, evnt);
|
|
31833
|
+
};
|
|
31644
31834
|
|
|
31835
|
+
var wheelTime;
|
|
31836
|
+
var wheelYSize = 0;
|
|
31837
|
+
var wheelYInterval = 0;
|
|
31838
|
+
var wheelYTotal = 0;
|
|
31839
|
+
var isPrevWheelTop = false;
|
|
31645
31840
|
|
|
31646
|
-
|
|
31647
|
-
|
|
31841
|
+
var handleWheel = function handleWheel(evnt, isTopWheel, deltaTop, isRollX, isRollY) {
|
|
31842
|
+
var elemStore = tableInternalData.elemStore;
|
|
31843
|
+
var scrollXLoad = tableReactData.scrollXLoad,
|
|
31844
|
+
scrollYLoad = tableReactData.scrollYLoad;
|
|
31845
|
+
var tableBody = refTableBody.value;
|
|
31846
|
+
var leftBody = refTableLeftBody.value;
|
|
31847
|
+
var rightBody = refTableRightBody.value;
|
|
31848
|
+
var leftElem = leftBody ? leftBody.$el : null;
|
|
31849
|
+
var rightElem = rightBody ? rightBody.$el : null;
|
|
31850
|
+
var bodyElem = tableBody.$el;
|
|
31851
|
+
var bodyYRef = elemStore['main-body-ySpace'];
|
|
31852
|
+
var bodyYElem = bodyYRef ? bodyYRef.value : null;
|
|
31853
|
+
var bodyXRef = elemStore['main-body-xSpace'];
|
|
31854
|
+
var bodyXElem = bodyXRef ? bodyXRef.value : null;
|
|
31855
|
+
var bodyHeight = scrollYLoad && bodyYElem ? bodyYElem.clientHeight : bodyElem.clientHeight;
|
|
31856
|
+
var bodyWidth = scrollXLoad && bodyXElem ? bodyXElem.clientWidth : bodyElem.clientWidth;
|
|
31857
|
+
var remainSize = isPrevWheelTop === isTopWheel ? Math.max(0, wheelYSize - wheelYTotal) : 0;
|
|
31858
|
+
isPrevWheelTop = isTopWheel;
|
|
31859
|
+
wheelYSize = Math.abs(isTopWheel ? deltaTop - remainSize : deltaTop + remainSize);
|
|
31860
|
+
wheelYInterval = 0;
|
|
31861
|
+
wheelYTotal = 0;
|
|
31862
|
+
clearTimeout(wheelTime);
|
|
31648
31863
|
|
|
31649
|
-
|
|
31650
|
-
|
|
31651
|
-
|
|
31864
|
+
var handleSmooth = function handleSmooth() {
|
|
31865
|
+
if (wheelYTotal < wheelYSize) {
|
|
31866
|
+
var fixedType = props.fixedType;
|
|
31867
|
+
wheelYInterval = Math.max(5, Math.floor(wheelYInterval * 1.5));
|
|
31868
|
+
wheelYTotal = wheelYTotal + wheelYInterval;
|
|
31652
31869
|
|
|
31653
|
-
if (
|
|
31654
|
-
|
|
31870
|
+
if (wheelYTotal > wheelYSize) {
|
|
31871
|
+
wheelYInterval = wheelYInterval - (wheelYTotal - wheelYSize);
|
|
31655
31872
|
}
|
|
31656
31873
|
|
|
31657
|
-
|
|
31658
|
-
|
|
31659
|
-
|
|
31874
|
+
var scrollTop = bodyElem.scrollTop,
|
|
31875
|
+
clientHeight = bodyElem.clientHeight,
|
|
31876
|
+
scrollHeight = bodyElem.scrollHeight;
|
|
31877
|
+
var targerTop = scrollTop + wheelYInterval * (isTopWheel ? -1 : 1);
|
|
31878
|
+
bodyElem.scrollTop = targerTop;
|
|
31660
31879
|
|
|
31661
|
-
if (
|
|
31662
|
-
|
|
31880
|
+
if (leftElem) {
|
|
31881
|
+
leftElem.scrollTop = targerTop;
|
|
31663
31882
|
}
|
|
31664
|
-
}
|
|
31665
|
-
} else if (spanMethod) {
|
|
31666
|
-
// 自定义合并行或列的方法
|
|
31667
|
-
var _ref = spanMethod(params) || {},
|
|
31668
|
-
_ref$rowspan = _ref.rowspan,
|
|
31669
|
-
_rowspan = _ref$rowspan === void 0 ? 1 : _ref$rowspan,
|
|
31670
|
-
_ref$colspan = _ref.colspan,
|
|
31671
|
-
_colspan = _ref$colspan === void 0 ? 1 : _ref$colspan;
|
|
31672
|
-
|
|
31673
|
-
if (!_rowspan || !_colspan) {
|
|
31674
|
-
return null;
|
|
31675
|
-
}
|
|
31676
|
-
|
|
31677
|
-
if (_rowspan > 1) {
|
|
31678
|
-
attrs.rowspan = _rowspan;
|
|
31679
|
-
}
|
|
31680
|
-
|
|
31681
|
-
if (_colspan > 1) {
|
|
31682
|
-
attrs.colspan = _colspan;
|
|
31683
|
-
}
|
|
31684
|
-
} // 如果被合并不可隐藏
|
|
31685
|
-
|
|
31686
|
-
|
|
31687
|
-
if (fixedHiddenColumn && mergeList) {
|
|
31688
|
-
if (attrs.colspan > 1 || attrs.rowspan > 1) {
|
|
31689
|
-
fixedHiddenColumn = false;
|
|
31690
|
-
}
|
|
31691
|
-
} // 如果编辑列开启显示状态
|
|
31692
|
-
|
|
31693
|
-
|
|
31694
|
-
if (!fixedHiddenColumn && editConfig && (editRender || cellRender) && (editOpts.showStatus || editOpts.showUpdateStatus)) {
|
|
31695
|
-
isDirty = $xetable.isUpdateByRow(row, column.property);
|
|
31696
|
-
}
|
|
31697
31883
|
|
|
31698
|
-
|
|
31884
|
+
if (rightElem) {
|
|
31885
|
+
rightElem.scrollTop = targerTop;
|
|
31886
|
+
}
|
|
31699
31887
|
|
|
31700
|
-
|
|
31701
|
-
|
|
31702
|
-
class: ['vxe-cell', {
|
|
31703
|
-
'c--title': showTitle,
|
|
31704
|
-
'c--tooltip': showTooltip,
|
|
31705
|
-
'c--ellipsis': showEllipsis
|
|
31706
|
-
}],
|
|
31707
|
-
style: {
|
|
31708
|
-
maxHeight: hasEllipsis && (scrollYRHeight || rowHeight) ? "".concat(scrollYRHeight || rowHeight, "px") : ''
|
|
31888
|
+
if (isTopWheel ? targerTop < scrollHeight - clientHeight : targerTop >= 0) {
|
|
31889
|
+
wheelTime = setTimeout(handleSmooth, 10);
|
|
31709
31890
|
}
|
|
31710
|
-
}));
|
|
31711
|
-
} else {
|
|
31712
|
-
// 渲染单元格
|
|
31713
|
-
tdVNs.push.apply(tdVNs, _toConsumableArray(renderLine(params)).concat([Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
31714
|
-
class: ['vxe-cell', {
|
|
31715
|
-
'c--title': showTitle,
|
|
31716
|
-
'c--tooltip': showTooltip,
|
|
31717
|
-
'c--ellipsis': showEllipsis
|
|
31718
|
-
}],
|
|
31719
|
-
style: {
|
|
31720
|
-
maxHeight: hasEllipsis && (scrollYRHeight || rowHeight) ? "".concat(scrollYRHeight || rowHeight, "px") : ''
|
|
31721
|
-
},
|
|
31722
|
-
title: showTitle ? $xetable.getCellLabel(row, column) : null
|
|
31723
|
-
}, column.renderCell(params))]));
|
|
31724
31891
|
|
|
31725
|
-
|
|
31726
|
-
|
|
31727
|
-
|
|
31728
|
-
|
|
31729
|
-
|
|
31730
|
-
|
|
31731
|
-
|
|
31732
|
-
|
|
31733
|
-
|
|
31892
|
+
$xetable.dispatchEvent('scroll', {
|
|
31893
|
+
type: body_renderType,
|
|
31894
|
+
fixed: fixedType,
|
|
31895
|
+
scrollTop: bodyElem.scrollTop,
|
|
31896
|
+
scrollLeft: bodyElem.scrollLeft,
|
|
31897
|
+
scrollHeight: bodyElem.scrollHeight,
|
|
31898
|
+
scrollWidth: bodyElem.scrollWidth,
|
|
31899
|
+
bodyHeight: bodyHeight,
|
|
31900
|
+
bodyWidth: bodyWidth,
|
|
31901
|
+
isX: isRollX,
|
|
31902
|
+
isY: isRollY
|
|
31903
|
+
}, evnt);
|
|
31734
31904
|
}
|
|
31735
|
-
}
|
|
31905
|
+
};
|
|
31736
31906
|
|
|
31737
|
-
|
|
31738
|
-
class: ['vxe-body--column', column.id, (_ref2 = {}, _defineProperty(_ref2, "col--".concat(cellAlign), cellAlign), _defineProperty(_ref2, "col--".concat(type), type), _defineProperty(_ref2, 'col--last', $columnIndex === columns.length - 1), _defineProperty(_ref2, 'col--tree-node', treeNode), _defineProperty(_ref2, 'col--edit', isEdit), _defineProperty(_ref2, 'col--ellipsis', hasEllipsis), _defineProperty(_ref2, 'fixed--hidden', fixedHiddenColumn), _defineProperty(_ref2, 'col--dirty', isDirty), _defineProperty(_ref2, 'col--actived', editConfig && isEdit && actived.row === row && (actived.column === column || editOpts.mode === 'row')), _defineProperty(_ref2, 'col--valid-error', hasValidError), _defineProperty(_ref2, 'col--current', currentColumn === column), _ref2), getPropClass(className, params), getPropClass(cellClassName, params)],
|
|
31739
|
-
key: columnKey || columnOpts.useKey ? column.id : $columnIndex
|
|
31740
|
-
}, attrs), {}, {
|
|
31741
|
-
style: Object.assign({
|
|
31742
|
-
height: hasEllipsis && (scrollYRHeight || rowHeight) ? "".concat(scrollYRHeight || rowHeight, "px") : ''
|
|
31743
|
-
}, cellStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(cellStyle) ? cellStyle(params) : cellStyle : null)
|
|
31744
|
-
}, tdOns), tdVNs);
|
|
31907
|
+
handleSmooth();
|
|
31745
31908
|
};
|
|
31909
|
+
/**
|
|
31910
|
+
* 滚轮处理
|
|
31911
|
+
*/
|
|
31746
31912
|
|
|
31747
|
-
var renderRows = function renderRows(fixedType, tableData, tableColumn) {
|
|
31748
|
-
var stripe = tableProps.stripe,
|
|
31749
|
-
rowKey = tableProps.rowKey,
|
|
31750
|
-
highlightHoverRow = tableProps.highlightHoverRow,
|
|
31751
|
-
rowClassName = tableProps.rowClassName,
|
|
31752
|
-
rowStyle = tableProps.rowStyle,
|
|
31753
|
-
allColumnOverflow = tableProps.showOverflow,
|
|
31754
|
-
editConfig = tableProps.editConfig,
|
|
31755
|
-
treeConfig = tableProps.treeConfig;
|
|
31756
|
-
var hasFixedColumn = tableReactData.hasFixedColumn,
|
|
31757
|
-
treeExpandeds = tableReactData.treeExpandeds,
|
|
31758
|
-
scrollYLoad = tableReactData.scrollYLoad,
|
|
31759
|
-
editStore = tableReactData.editStore,
|
|
31760
|
-
rowExpandeds = tableReactData.rowExpandeds,
|
|
31761
|
-
expandColumn = tableReactData.expandColumn,
|
|
31762
|
-
selectRow = tableReactData.selectRow;
|
|
31763
|
-
var fullAllDataRowIdData = tableInternalData.fullAllDataRowIdData;
|
|
31764
|
-
var checkboxOpts = computeCheckboxOpts.value;
|
|
31765
|
-
var radioOpts = computeRadioOpts.value;
|
|
31766
|
-
var treeOpts = computeTreeOpts.value;
|
|
31767
|
-
var editOpts = computeEditOpts.value;
|
|
31768
|
-
var rowOpts = computeRowOpts.value;
|
|
31769
|
-
var transform = treeOpts.transform;
|
|
31770
|
-
var rows = [];
|
|
31771
|
-
tableData.forEach(function (row, $rowIndex) {
|
|
31772
|
-
var trOn = {};
|
|
31773
|
-
var rowIndex = $rowIndex; // 确保任何情况下 rowIndex 都精准指向真实 data 索引
|
|
31774
31913
|
|
|
31775
|
-
|
|
31914
|
+
var wheelEvent = function wheelEvent(evnt) {
|
|
31915
|
+
var deltaY = evnt.deltaY,
|
|
31916
|
+
deltaX = evnt.deltaX;
|
|
31917
|
+
var highlightHoverRow = tableProps.highlightHoverRow;
|
|
31918
|
+
var scrollYLoad = tableReactData.scrollYLoad;
|
|
31919
|
+
var lastScrollTop = tableInternalData.lastScrollTop,
|
|
31920
|
+
lastScrollLeft = tableInternalData.lastScrollLeft;
|
|
31921
|
+
var rowOpts = computeRowOpts.value;
|
|
31922
|
+
var tableBody = refTableBody.value;
|
|
31923
|
+
var scrollBodyElem = refElem.value;
|
|
31924
|
+
var bodyElem = tableBody.$el;
|
|
31925
|
+
var deltaTop = deltaY;
|
|
31926
|
+
var deltaLeft = deltaX;
|
|
31927
|
+
var isTopWheel = deltaTop < 0; // 如果滚动位置已经是顶部或底部,则不需要触发
|
|
31776
31928
|
|
|
31777
|
-
|
|
31778
|
-
|
|
31779
|
-
|
|
31780
|
-
return;
|
|
31781
|
-
}
|
|
31929
|
+
if (isTopWheel ? scrollBodyElem.scrollTop <= 0 : scrollBodyElem.scrollTop >= scrollBodyElem.scrollHeight - scrollBodyElem.clientHeight) {
|
|
31930
|
+
return;
|
|
31931
|
+
}
|
|
31782
31932
|
|
|
31783
|
-
|
|
31784
|
-
|
|
31785
|
-
|
|
31786
|
-
|
|
31787
|
-
};
|
|
31933
|
+
var scrollTop = scrollBodyElem.scrollTop + deltaTop;
|
|
31934
|
+
var scrollLeft = bodyElem.scrollLeft + deltaLeft;
|
|
31935
|
+
var isRollX = scrollLeft !== lastScrollLeft;
|
|
31936
|
+
var isRollY = scrollTop !== lastScrollTop; // 用于鼠标纵向滚轮处理
|
|
31788
31937
|
|
|
31789
|
-
|
|
31790
|
-
|
|
31791
|
-
|
|
31792
|
-
|
|
31938
|
+
if (isRollY) {
|
|
31939
|
+
evnt.preventDefault();
|
|
31940
|
+
tableInternalData.lastScrollTop = scrollTop;
|
|
31941
|
+
tableInternalData.lastScrollLeft = scrollLeft;
|
|
31942
|
+
tableInternalData.lastScrollTime = Date.now();
|
|
31793
31943
|
|
|
31794
|
-
|
|
31795
|
-
|
|
31944
|
+
if (rowOpts.isHover || highlightHoverRow) {
|
|
31945
|
+
$xetable.clearHoverRow();
|
|
31796
31946
|
}
|
|
31797
31947
|
|
|
31798
|
-
|
|
31799
|
-
var rest = fullAllDataRowIdData[rowid];
|
|
31800
|
-
var rowLevel = 0;
|
|
31801
|
-
var seq = -1;
|
|
31802
|
-
var _rowIndex = 0;
|
|
31948
|
+
handleWheel(evnt, isTopWheel, deltaTop, isRollX, isRollY);
|
|
31803
31949
|
|
|
31804
|
-
if (
|
|
31805
|
-
|
|
31806
|
-
seq = rest.seq;
|
|
31807
|
-
_rowIndex = rest._index;
|
|
31950
|
+
if (scrollYLoad) {
|
|
31951
|
+
$xetable.triggerScrollYEvent(evnt);
|
|
31808
31952
|
}
|
|
31953
|
+
}
|
|
31954
|
+
};
|
|
31809
31955
|
|
|
31810
|
-
|
|
31811
|
-
|
|
31812
|
-
|
|
31813
|
-
|
|
31814
|
-
|
|
31815
|
-
|
|
31816
|
-
|
|
31817
|
-
|
|
31818
|
-
|
|
31819
|
-
|
|
31820
|
-
|
|
31821
|
-
|
|
31956
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onMounted"])(function () {
|
|
31957
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])(function () {
|
|
31958
|
+
var fixedType = props.fixedType;
|
|
31959
|
+
var elemStore = tableInternalData.elemStore;
|
|
31960
|
+
var prefix = "".concat(fixedType || 'main', "-body-");
|
|
31961
|
+
var el = refElem.value;
|
|
31962
|
+
elemStore["".concat(prefix, "wrapper")] = refElem;
|
|
31963
|
+
elemStore["".concat(prefix, "table")] = refBodyTable;
|
|
31964
|
+
elemStore["".concat(prefix, "colgroup")] = refBodyColgroup;
|
|
31965
|
+
elemStore["".concat(prefix, "list")] = refBodyTBody;
|
|
31966
|
+
elemStore["".concat(prefix, "xSpace")] = refBodyXSpace;
|
|
31967
|
+
elemStore["".concat(prefix, "ySpace")] = refBodyYSpace;
|
|
31968
|
+
elemStore["".concat(prefix, "emptyBlock")] = refBodyEmptyBlock;
|
|
31969
|
+
el.onscroll = scrollEvent;
|
|
31970
|
+
el._onscroll = scrollEvent;
|
|
31971
|
+
});
|
|
31972
|
+
});
|
|
31973
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onBeforeUnmount"])(function () {
|
|
31974
|
+
var el = refElem.value;
|
|
31975
|
+
clearTimeout(wheelTime);
|
|
31976
|
+
el._onscroll = null;
|
|
31977
|
+
el.onscroll = null;
|
|
31978
|
+
});
|
|
31979
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onUnmounted"])(function () {
|
|
31980
|
+
var fixedType = props.fixedType;
|
|
31981
|
+
var elemStore = tableInternalData.elemStore;
|
|
31982
|
+
var prefix = "".concat(fixedType || 'main', "-body-");
|
|
31983
|
+
elemStore["".concat(prefix, "wrapper")] = null;
|
|
31984
|
+
elemStore["".concat(prefix, "table")] = null;
|
|
31985
|
+
elemStore["".concat(prefix, "colgroup")] = null;
|
|
31986
|
+
elemStore["".concat(prefix, "list")] = null;
|
|
31987
|
+
elemStore["".concat(prefix, "xSpace")] = null;
|
|
31988
|
+
elemStore["".concat(prefix, "ySpace")] = null;
|
|
31989
|
+
elemStore["".concat(prefix, "emptyBlock")] = null;
|
|
31990
|
+
});
|
|
31822
31991
|
|
|
31823
|
-
|
|
31992
|
+
var renderVN = function renderVN() {
|
|
31993
|
+
var fixedColumn = props.fixedColumn,
|
|
31994
|
+
fixedType = props.fixedType,
|
|
31995
|
+
tableColumn = props.tableColumn;
|
|
31996
|
+
var keyboardConfig = tableProps.keyboardConfig,
|
|
31997
|
+
allColumnOverflow = tableProps.showOverflow,
|
|
31998
|
+
spanMethod = tableProps.spanMethod,
|
|
31999
|
+
mouseConfig = tableProps.mouseConfig;
|
|
32000
|
+
var tableData = tableReactData.tableData,
|
|
32001
|
+
mergeList = tableReactData.mergeList,
|
|
32002
|
+
scrollYLoad = tableReactData.scrollYLoad,
|
|
32003
|
+
isAllOverflow = tableReactData.isAllOverflow;
|
|
32004
|
+
var visibleColumn = tableInternalData.visibleColumn;
|
|
32005
|
+
var slots = tableContext.slots;
|
|
32006
|
+
var sYOpts = computeSYOpts.value;
|
|
32007
|
+
var emptyOpts = computeEmptyOpts.value;
|
|
32008
|
+
var keyboardOpts = computeKeyboardOpts.value;
|
|
32009
|
+
var mouseOpts = computeMouseOpts.value; // const isMergeLeftFixedExceeded = computeIsMergeLeftFixedExceeded.value
|
|
32010
|
+
// const isMergeRightFixedExceeded = computeIsMergeRightFixedExceeded.value
|
|
32011
|
+
// 如果是使用优化模式
|
|
31824
32012
|
|
|
31825
|
-
|
|
31826
|
-
|
|
32013
|
+
if (fixedType) {
|
|
32014
|
+
if (scrollYLoad || (allColumnOverflow ? isAllOverflow : allColumnOverflow)) {
|
|
32015
|
+
if (!mergeList.length && !spanMethod && !(keyboardConfig && keyboardOpts.isMerge)) {
|
|
32016
|
+
tableColumn = fixedColumn;
|
|
32017
|
+
} else {
|
|
32018
|
+
tableColumn = visibleColumn; // 检查固定列是否被合并,合并范围是否超出固定列
|
|
32019
|
+
// if (mergeList.length && !isMergeLeftFixedExceeded && fixedType === 'left') {
|
|
32020
|
+
// tableColumn = fixedColumn
|
|
32021
|
+
// } else if (mergeList.length && !isMergeRightFixedExceeded && fixedType === 'right') {
|
|
32022
|
+
// tableColumn = fixedColumn
|
|
32023
|
+
// } else {
|
|
32024
|
+
// tableColumn = visibleColumn
|
|
32025
|
+
// }
|
|
32026
|
+
}
|
|
32027
|
+
} else {
|
|
32028
|
+
tableColumn = visibleColumn;
|
|
32029
|
+
}
|
|
32030
|
+
}
|
|
31827
32031
|
|
|
31828
|
-
|
|
32032
|
+
var emptyContent;
|
|
31829
32033
|
|
|
31830
|
-
|
|
31831
|
-
|
|
32034
|
+
if (slots.empty) {
|
|
32035
|
+
emptyContent = $xetable.callSlot(slots.empty, {
|
|
32036
|
+
$table: $xetable
|
|
32037
|
+
});
|
|
32038
|
+
} else {
|
|
32039
|
+
var compConf = emptyOpts.name ? VXETable.renderer.get(emptyOpts.name) : null;
|
|
32040
|
+
var renderEmpty = compConf ? compConf.renderEmpty : null;
|
|
32041
|
+
|
|
32042
|
+
if (renderEmpty) {
|
|
32043
|
+
emptyContent = renderEmpty(emptyOpts, {
|
|
32044
|
+
$table: $xetable
|
|
32045
|
+
});
|
|
32046
|
+
} else {
|
|
32047
|
+
emptyContent = tableProps.emptyText || conf.i18n('vxe.table.emptyText');
|
|
32048
|
+
}
|
|
32049
|
+
}
|
|
32050
|
+
|
|
32051
|
+
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', _objectSpread2({
|
|
32052
|
+
ref: refElem,
|
|
32053
|
+
class: ['vxe-table--body-wrapper', fixedType ? "fixed-".concat(fixedType, "--wrapper") : 'body--wrapper'],
|
|
32054
|
+
xid: xID
|
|
32055
|
+
}, sYOpts.mode === 'wheel' ? {
|
|
32056
|
+
onWheel: wheelEvent
|
|
32057
|
+
} : {}), [fixedType ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])() : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
32058
|
+
ref: refBodyXSpace,
|
|
32059
|
+
class: 'vxe-body--x-space'
|
|
32060
|
+
}), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
32061
|
+
ref: refBodyYSpace,
|
|
32062
|
+
class: 'vxe-body--y-space'
|
|
32063
|
+
}), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('table', {
|
|
32064
|
+
ref: refBodyTable,
|
|
32065
|
+
class: 'vxe-table--body',
|
|
32066
|
+
xid: xID,
|
|
32067
|
+
cellspacing: 0,
|
|
32068
|
+
cellpadding: 0,
|
|
32069
|
+
border: 0
|
|
32070
|
+
}, [
|
|
32071
|
+
/**
|
|
32072
|
+
* 列宽
|
|
32073
|
+
*/
|
|
32074
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('colgroup', {
|
|
32075
|
+
ref: refBodyColgroup
|
|
32076
|
+
}, tableColumn.map(function (column, $columnIndex) {
|
|
32077
|
+
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('col', {
|
|
32078
|
+
name: column.id,
|
|
32079
|
+
key: $columnIndex
|
|
32080
|
+
});
|
|
32081
|
+
})),
|
|
32082
|
+
/**
|
|
32083
|
+
* 内容
|
|
32084
|
+
*/
|
|
32085
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('tbody', {
|
|
32086
|
+
ref: refBodyTBody
|
|
32087
|
+
}, renderRows(fixedType, tableData, tableColumn))]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
32088
|
+
class: 'vxe-table--checkbox-range'
|
|
32089
|
+
}), mouseConfig && mouseOpts.area ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
32090
|
+
class: 'vxe-table--cell-area'
|
|
32091
|
+
}, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
32092
|
+
class: 'vxe-table--cell-main-area'
|
|
32093
|
+
}, mouseOpts.extension ? [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
32094
|
+
class: 'vxe-table--cell-main-area-btn',
|
|
32095
|
+
onMousedown: function onMousedown(evnt) {
|
|
32096
|
+
$xetable.triggerCellExtendMousedownEvent(evnt, {
|
|
32097
|
+
$table: $xetable,
|
|
32098
|
+
fixed: fixedType,
|
|
32099
|
+
type: body_renderType
|
|
32100
|
+
});
|
|
31832
32101
|
}
|
|
32102
|
+
})] : []), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
32103
|
+
class: 'vxe-table--cell-copy-area'
|
|
32104
|
+
}), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
32105
|
+
class: 'vxe-table--cell-extend-area'
|
|
32106
|
+
}), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
32107
|
+
class: 'vxe-table--cell-multi-area'
|
|
32108
|
+
}), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
32109
|
+
class: 'vxe-table--cell-active-area'
|
|
32110
|
+
})]) : null, !fixedType ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
32111
|
+
class: 'vxe-table--empty-block',
|
|
32112
|
+
ref: refBodyEmptyBlock
|
|
32113
|
+
}, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
32114
|
+
class: 'vxe-table--empty-content'
|
|
32115
|
+
}, emptyContent)]) : null]);
|
|
32116
|
+
};
|
|
31833
32117
|
|
|
31834
|
-
|
|
31835
|
-
|
|
31836
|
-
|
|
31837
|
-
|
|
32118
|
+
return renderVN;
|
|
32119
|
+
}
|
|
32120
|
+
}));
|
|
32121
|
+
// CONCATENATED MODULE: ./packages/header/src/util.ts
|
|
31838
32122
|
|
|
31839
|
-
rows.push(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('tr', _objectSpread2({
|
|
31840
|
-
class: ['vxe-body--row', treeConfig ? "row--level-".concat(rowLevel) : '', {
|
|
31841
|
-
'row--stripe': stripe && ($xetable.getVTRowIndex(row) + 1) % 2 === 0,
|
|
31842
|
-
'is--new': isNewRow,
|
|
31843
|
-
'is--expand-row': isExpandRow,
|
|
31844
|
-
'is--expand-tree': isExpandTree,
|
|
31845
|
-
'row--new': isNewRow && (editOpts.showStatus || editOpts.showInsertStatus),
|
|
31846
|
-
'row--radio': radioOpts.highlight && selectRow === row,
|
|
31847
|
-
'row--checked': checkboxOpts.highlight && $xetable.isCheckedByCheckboxRow(row)
|
|
31848
|
-
}, rowClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(rowClassName) ? rowClassName(params) : rowClassName : ''],
|
|
31849
|
-
rowid: rowid,
|
|
31850
|
-
style: rowStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(rowStyle) ? rowStyle(params) : rowStyle : null,
|
|
31851
|
-
key: rowKey || rowOpts.useKey || treeConfig ? rowid : $rowIndex
|
|
31852
|
-
}, trOn), tableColumn.map(function (column, $columnIndex) {
|
|
31853
|
-
return renderColumn(seq, rowid, fixedType, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, tableColumn, tableData);
|
|
31854
|
-
}))); // 如果行被展开了
|
|
31855
32123
|
|
|
31856
|
-
if (isExpandRow) {
|
|
31857
|
-
var cellStyle;
|
|
31858
32124
|
|
|
31859
|
-
|
|
31860
|
-
|
|
31861
|
-
|
|
31862
|
-
|
|
31863
|
-
}
|
|
32125
|
+
var util_getAllColumns = function getAllColumns(columns, parentColumn) {
|
|
32126
|
+
var result = [];
|
|
32127
|
+
columns.forEach(function (column) {
|
|
32128
|
+
column.parentId = parentColumn ? parentColumn.id : null;
|
|
31864
32129
|
|
|
31865
|
-
|
|
31866
|
-
|
|
31867
|
-
|
|
31868
|
-
|
|
31869
|
-
|
|
31870
|
-
|
|
31871
|
-
|
|
31872
|
-
|
|
31873
|
-
|
|
31874
|
-
|
|
31875
|
-
|
|
31876
|
-
|
|
31877
|
-
|
|
31878
|
-
};
|
|
31879
|
-
rows.push(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('tr', _objectSpread2({
|
|
31880
|
-
class: 'vxe-body--expanded-row',
|
|
31881
|
-
key: "expand_".concat(rowid),
|
|
31882
|
-
style: rowStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(rowStyle) ? rowStyle(expandParams) : rowStyle : null
|
|
31883
|
-
}, trOn), [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('td', {
|
|
31884
|
-
class: ['vxe-body--expanded-column', {
|
|
31885
|
-
'fixed--hidden': fixedType && !hasFixedColumn,
|
|
31886
|
-
'col--ellipsis': hasEllipsis
|
|
31887
|
-
}],
|
|
31888
|
-
colspan: tableColumn.length
|
|
31889
|
-
}, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
31890
|
-
class: 'vxe-body--expanded-cell',
|
|
31891
|
-
style: cellStyle
|
|
31892
|
-
}, [expandColumn.renderData(expandParams)])])]));
|
|
31893
|
-
} // 如果是树形表格
|
|
32130
|
+
if (column.visible) {
|
|
32131
|
+
if (column.children && column.children.length && column.children.some(function (column) {
|
|
32132
|
+
return column.visible;
|
|
32133
|
+
})) {
|
|
32134
|
+
result.push(column);
|
|
32135
|
+
result.push.apply(result, _toConsumableArray(getAllColumns(column.children, column)));
|
|
32136
|
+
} else {
|
|
32137
|
+
result.push(column);
|
|
32138
|
+
}
|
|
32139
|
+
}
|
|
32140
|
+
});
|
|
32141
|
+
return result;
|
|
32142
|
+
};
|
|
31894
32143
|
|
|
32144
|
+
var util_convertToRows = function convertToRows(originColumns) {
|
|
32145
|
+
var maxLevel = 1;
|
|
31895
32146
|
|
|
31896
|
-
|
|
31897
|
-
|
|
32147
|
+
var traverse = function traverse(column, parent) {
|
|
32148
|
+
if (parent) {
|
|
32149
|
+
column.level = parent.level + 1;
|
|
31898
32150
|
|
|
31899
|
-
|
|
31900
|
-
|
|
31901
|
-
|
|
32151
|
+
if (maxLevel < column.level) {
|
|
32152
|
+
maxLevel = column.level;
|
|
32153
|
+
}
|
|
32154
|
+
}
|
|
32155
|
+
|
|
32156
|
+
if (column.children && column.children.length && column.children.some(function (column) {
|
|
32157
|
+
return column.visible;
|
|
32158
|
+
})) {
|
|
32159
|
+
var colSpan = 0;
|
|
32160
|
+
column.children.forEach(function (subColumn) {
|
|
32161
|
+
if (subColumn.visible) {
|
|
32162
|
+
traverse(subColumn, column);
|
|
32163
|
+
colSpan += subColumn.colSpan;
|
|
31902
32164
|
}
|
|
31903
32165
|
});
|
|
31904
|
-
|
|
31905
|
-
}
|
|
31906
|
-
|
|
31907
|
-
|
|
31908
|
-
|
|
31909
|
-
|
|
32166
|
+
column.colSpan = colSpan;
|
|
32167
|
+
} else {
|
|
32168
|
+
column.colSpan = 1;
|
|
32169
|
+
}
|
|
32170
|
+
};
|
|
31910
32171
|
|
|
31911
|
-
|
|
32172
|
+
originColumns.forEach(function (column) {
|
|
32173
|
+
column.level = 1;
|
|
32174
|
+
traverse(column);
|
|
32175
|
+
});
|
|
32176
|
+
var rows = [];
|
|
31912
32177
|
|
|
31913
|
-
|
|
31914
|
-
|
|
31915
|
-
|
|
31916
|
-
removeScrollListener(elem1);
|
|
31917
|
-
elem1.scrollTop = scrollTop;
|
|
31918
|
-
}
|
|
32178
|
+
for (var i = 0; i < maxLevel; i++) {
|
|
32179
|
+
rows.push([]);
|
|
32180
|
+
}
|
|
31919
32181
|
|
|
31920
|
-
|
|
31921
|
-
|
|
31922
|
-
|
|
31923
|
-
|
|
32182
|
+
var allColumns = util_getAllColumns(originColumns);
|
|
32183
|
+
allColumns.forEach(function (column) {
|
|
32184
|
+
if (column.children && column.children.length && column.children.some(function (column) {
|
|
32185
|
+
return column.visible;
|
|
32186
|
+
})) {
|
|
32187
|
+
column.rowSpan = 1;
|
|
32188
|
+
} else {
|
|
32189
|
+
column.rowSpan = maxLevel - column.level + 1;
|
|
32190
|
+
}
|
|
31924
32191
|
|
|
31925
|
-
|
|
31926
|
-
|
|
31927
|
-
|
|
31928
|
-
|
|
31929
|
-
|
|
31930
|
-
// const bodyElem = tableBody.$el as XEBodyScrollElement
|
|
31931
|
-
// const leftElem = leftBody ? leftBody.$el as XEBodyScrollElement : null
|
|
31932
|
-
// const rightElem = rightBody ? rightBody.$el as XEBodyScrollElement : null
|
|
31933
|
-
restoreScrollListener(elem1);
|
|
31934
|
-
restoreScrollListener(elem2); // 检查滚动条是的同步
|
|
31935
|
-
// let targetTop = bodyElem.scrollTop
|
|
31936
|
-
// if (fixedType === 'left') {
|
|
31937
|
-
// if (leftElem) {
|
|
31938
|
-
// targetTop = leftElem.scrollTop
|
|
31939
|
-
// }
|
|
31940
|
-
// } else if (fixedType === 'right') {
|
|
31941
|
-
// if (rightElem) {
|
|
31942
|
-
// targetTop = rightElem.scrollTop
|
|
31943
|
-
// }
|
|
31944
|
-
// }
|
|
31945
|
-
// setScrollTop(bodyElem, targetTop)
|
|
31946
|
-
// setScrollTop(leftElem, targetTop)
|
|
31947
|
-
// setScrollTop(rightElem, targetTop)
|
|
31948
|
-
}, 300);
|
|
31949
|
-
}
|
|
31950
|
-
};
|
|
31951
|
-
/**
|
|
31952
|
-
* 滚动处理
|
|
31953
|
-
* 如果存在列固定左侧,同步更新滚动状态
|
|
31954
|
-
* 如果存在列固定右侧,同步更新滚动状态
|
|
31955
|
-
*/
|
|
32192
|
+
rows[column.level - 1].push(column);
|
|
32193
|
+
});
|
|
32194
|
+
return rows;
|
|
32195
|
+
};
|
|
32196
|
+
// CONCATENATED MODULE: ./packages/header/src/header.ts
|
|
31956
32197
|
|
|
31957
32198
|
|
|
31958
|
-
var scrollEvent = function scrollEvent(evnt) {
|
|
31959
|
-
var fixedType = props.fixedType;
|
|
31960
|
-
var highlightHoverRow = tableProps.highlightHoverRow;
|
|
31961
|
-
var scrollXLoad = tableReactData.scrollXLoad,
|
|
31962
|
-
scrollYLoad = tableReactData.scrollYLoad;
|
|
31963
|
-
var elemStore = tableInternalData.elemStore,
|
|
31964
|
-
lastScrollTop = tableInternalData.lastScrollTop,
|
|
31965
|
-
lastScrollLeft = tableInternalData.lastScrollLeft;
|
|
31966
|
-
var rowOpts = computeRowOpts.value;
|
|
31967
|
-
var tableHeader = refTableHeader.value;
|
|
31968
|
-
var tableBody = refTableBody.value;
|
|
31969
|
-
var tableFooter = refTableFooter.value;
|
|
31970
|
-
var leftBody = refTableLeftBody.value;
|
|
31971
|
-
var rightBody = refTableRightBody.value;
|
|
31972
|
-
var validTip = refValidTooltip.value;
|
|
31973
|
-
var scrollBodyElem = refElem.value;
|
|
31974
|
-
var headerElem = tableHeader ? tableHeader.$el : null;
|
|
31975
|
-
var footerElem = tableFooter ? tableFooter.$el : null;
|
|
31976
|
-
var bodyElem = tableBody.$el;
|
|
31977
|
-
var leftElem = leftBody ? leftBody.$el : null;
|
|
31978
|
-
var rightElem = rightBody ? rightBody.$el : null;
|
|
31979
|
-
var bodyYRef = elemStore['main-body-ySpace'];
|
|
31980
|
-
var bodyYElem = bodyYRef ? bodyYRef.value : null;
|
|
31981
|
-
var bodyXRef = elemStore['main-body-xSpace'];
|
|
31982
|
-
var bodyXElem = bodyXRef ? bodyXRef.value : null;
|
|
31983
|
-
var bodyHeight = scrollYLoad && bodyYElem ? bodyYElem.clientHeight : bodyElem.clientHeight;
|
|
31984
|
-
var bodyWidth = scrollXLoad && bodyXElem ? bodyXElem.clientWidth : bodyElem.clientWidth;
|
|
31985
|
-
var scrollTop = scrollBodyElem.scrollTop;
|
|
31986
|
-
var scrollLeft = bodyElem.scrollLeft;
|
|
31987
|
-
var isRollX = scrollLeft !== lastScrollLeft;
|
|
31988
|
-
var isRollY = scrollTop !== lastScrollTop;
|
|
31989
|
-
tableInternalData.lastScrollTop = scrollTop;
|
|
31990
|
-
tableInternalData.lastScrollLeft = scrollLeft;
|
|
31991
|
-
tableInternalData.lastScrollTime = Date.now();
|
|
31992
32199
|
|
|
31993
|
-
if (rowOpts.isHover || highlightHoverRow) {
|
|
31994
|
-
$xetable.clearHoverRow();
|
|
31995
|
-
}
|
|
31996
32200
|
|
|
31997
|
-
if (leftElem && fixedType === 'left') {
|
|
31998
|
-
scrollTop = leftElem.scrollTop;
|
|
31999
|
-
syncBodyScroll(fixedType, scrollTop, bodyElem, rightElem);
|
|
32000
|
-
} else if (rightElem && fixedType === 'right') {
|
|
32001
|
-
scrollTop = rightElem.scrollTop;
|
|
32002
|
-
syncBodyScroll(fixedType, scrollTop, bodyElem, leftElem);
|
|
32003
|
-
} else {
|
|
32004
|
-
if (isRollX) {
|
|
32005
|
-
if (headerElem) {
|
|
32006
|
-
headerElem.scrollLeft = bodyElem.scrollLeft;
|
|
32007
|
-
}
|
|
32008
32201
|
|
|
32009
|
-
if (footerElem) {
|
|
32010
|
-
footerElem.scrollLeft = bodyElem.scrollLeft;
|
|
32011
|
-
}
|
|
32012
|
-
}
|
|
32013
32202
|
|
|
32014
|
-
if (leftElem || rightElem) {
|
|
32015
|
-
$xetable.checkScrolling();
|
|
32016
32203
|
|
|
32017
|
-
if (isRollY) {
|
|
32018
|
-
syncBodyScroll(fixedType, scrollTop, leftElem, rightElem);
|
|
32019
|
-
}
|
|
32020
|
-
}
|
|
32021
|
-
}
|
|
32022
32204
|
|
|
32023
|
-
if (scrollXLoad && isRollX) {
|
|
32024
|
-
$xetable.triggerScrollXEvent(evnt);
|
|
32025
|
-
}
|
|
32026
32205
|
|
|
32027
|
-
if (scrollYLoad && isRollY) {
|
|
32028
|
-
$xetable.triggerScrollYEvent(evnt);
|
|
32029
|
-
}
|
|
32030
32206
|
|
|
32031
|
-
|
|
32032
|
-
|
|
32033
|
-
|
|
32207
|
+
var header_renderType = 'header';
|
|
32208
|
+
/* harmony default export */ var header = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({
|
|
32209
|
+
name: 'VxeTableHeader',
|
|
32210
|
+
props: {
|
|
32211
|
+
tableData: Array,
|
|
32212
|
+
tableColumn: Array,
|
|
32213
|
+
tableGroupColumn: Array,
|
|
32214
|
+
fixedColumn: Array,
|
|
32215
|
+
fixedType: {
|
|
32216
|
+
type: String,
|
|
32217
|
+
default: null
|
|
32218
|
+
}
|
|
32219
|
+
},
|
|
32220
|
+
setup: function setup(props) {
|
|
32221
|
+
var $xetable = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('$xetable', {});
|
|
32222
|
+
var xID = $xetable.xID,
|
|
32223
|
+
tableProps = $xetable.props,
|
|
32224
|
+
tableReactData = $xetable.reactData,
|
|
32225
|
+
tableInternalData = $xetable.internalData;
|
|
32034
32226
|
|
|
32035
|
-
|
|
32036
|
-
|
|
32037
|
-
|
|
32038
|
-
|
|
32039
|
-
|
|
32040
|
-
|
|
32041
|
-
scrollWidth: bodyElem.scrollWidth,
|
|
32042
|
-
bodyHeight: bodyHeight,
|
|
32043
|
-
bodyWidth: bodyWidth,
|
|
32044
|
-
isX: isRollX,
|
|
32045
|
-
isY: isRollY
|
|
32046
|
-
}, evnt);
|
|
32047
|
-
};
|
|
32227
|
+
var _$xetable$getRefMaps = $xetable.getRefMaps(),
|
|
32228
|
+
tableRefElem = _$xetable$getRefMaps.refElem,
|
|
32229
|
+
refTableBody = _$xetable$getRefMaps.refTableBody,
|
|
32230
|
+
refLeftContainer = _$xetable$getRefMaps.refLeftContainer,
|
|
32231
|
+
refRightContainer = _$xetable$getRefMaps.refRightContainer,
|
|
32232
|
+
refCellResizeBar = _$xetable$getRefMaps.refCellResizeBar;
|
|
32048
32233
|
|
|
32049
|
-
var
|
|
32050
|
-
|
|
32051
|
-
var wheelYInterval = 0;
|
|
32052
|
-
var wheelYTotal = 0;
|
|
32053
|
-
var isPrevWheelTop = false;
|
|
32234
|
+
var _$xetable$getComputeM = $xetable.getComputeMaps(),
|
|
32235
|
+
computeColumnOpts = _$xetable$getComputeM.computeColumnOpts;
|
|
32054
32236
|
|
|
32055
|
-
var
|
|
32056
|
-
|
|
32057
|
-
|
|
32058
|
-
|
|
32059
|
-
|
|
32060
|
-
|
|
32061
|
-
|
|
32062
|
-
var leftElem = leftBody ? leftBody.$el : null;
|
|
32063
|
-
var rightElem = rightBody ? rightBody.$el : null;
|
|
32064
|
-
var bodyElem = tableBody.$el;
|
|
32065
|
-
var bodyYRef = elemStore['main-body-ySpace'];
|
|
32066
|
-
var bodyYElem = bodyYRef ? bodyYRef.value : null;
|
|
32067
|
-
var bodyXRef = elemStore['main-body-xSpace'];
|
|
32068
|
-
var bodyXElem = bodyXRef ? bodyXRef.value : null;
|
|
32069
|
-
var bodyHeight = scrollYLoad && bodyYElem ? bodyYElem.clientHeight : bodyElem.clientHeight;
|
|
32070
|
-
var bodyWidth = scrollXLoad && bodyXElem ? bodyXElem.clientWidth : bodyElem.clientWidth;
|
|
32071
|
-
var remainSize = isPrevWheelTop === isTopWheel ? Math.max(0, wheelYSize - wheelYTotal) : 0;
|
|
32072
|
-
isPrevWheelTop = isTopWheel;
|
|
32073
|
-
wheelYSize = Math.abs(isTopWheel ? deltaTop - remainSize : deltaTop + remainSize);
|
|
32074
|
-
wheelYInterval = 0;
|
|
32075
|
-
wheelYTotal = 0;
|
|
32076
|
-
clearTimeout(wheelTime);
|
|
32237
|
+
var headerColumn = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])([]);
|
|
32238
|
+
var refElem = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
32239
|
+
var refHeaderTable = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
32240
|
+
var refHeaderColgroup = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
32241
|
+
var refHeaderTHead = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
32242
|
+
var refHeaderXSpace = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
32243
|
+
var refHeaderBorderRepair = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
32077
32244
|
|
|
32078
|
-
|
|
32079
|
-
|
|
32080
|
-
|
|
32081
|
-
|
|
32082
|
-
wheelYTotal = wheelYTotal + wheelYInterval;
|
|
32245
|
+
var uploadColumn = function uploadColumn() {
|
|
32246
|
+
var isGroup = tableReactData.isGroup;
|
|
32247
|
+
headerColumn.value = isGroup ? util_convertToRows(props.tableGroupColumn) : [];
|
|
32248
|
+
};
|
|
32083
32249
|
|
|
32084
|
-
|
|
32085
|
-
|
|
32086
|
-
|
|
32250
|
+
var resizeMousedown = function resizeMousedown(evnt, params) {
|
|
32251
|
+
var column = params.column;
|
|
32252
|
+
var fixedType = props.fixedType;
|
|
32253
|
+
var tableBody = refTableBody.value;
|
|
32254
|
+
var leftContainerElem = refLeftContainer.value;
|
|
32255
|
+
var rightContainerElem = refRightContainer.value;
|
|
32256
|
+
var resizeBarElem = refCellResizeBar.value;
|
|
32257
|
+
var dragClientX = evnt.clientX;
|
|
32258
|
+
var wrapperElem = refElem.value;
|
|
32259
|
+
var dragBtnElem = evnt.target;
|
|
32260
|
+
var cell = params.cell = dragBtnElem.parentNode;
|
|
32261
|
+
var dragLeft = 0;
|
|
32262
|
+
var tableBodyElem = tableBody.$el;
|
|
32263
|
+
var pos = getOffsetPos(dragBtnElem, wrapperElem);
|
|
32264
|
+
var dragBtnWidth = dragBtnElem.clientWidth;
|
|
32265
|
+
var dragBtnOffsetWidth = Math.floor(dragBtnWidth / 2);
|
|
32266
|
+
var minInterval = getColMinWidth(params) - dragBtnOffsetWidth; // 列之间的最小间距
|
|
32087
32267
|
|
|
32088
|
-
|
|
32089
|
-
|
|
32090
|
-
|
|
32091
|
-
|
|
32092
|
-
|
|
32268
|
+
var dragMinLeft = pos.left - cell.clientWidth + dragBtnWidth + minInterval;
|
|
32269
|
+
var dragPosLeft = pos.left + dragBtnOffsetWidth;
|
|
32270
|
+
var domMousemove = document.onmousemove;
|
|
32271
|
+
var domMouseup = document.onmouseup;
|
|
32272
|
+
var isLeftFixed = fixedType === 'left';
|
|
32273
|
+
var isRightFixed = fixedType === 'right';
|
|
32274
|
+
var tableEl = tableRefElem.value; // 计算左右侧固定列偏移量
|
|
32093
32275
|
|
|
32094
|
-
|
|
32095
|
-
leftElem.scrollTop = targerTop;
|
|
32096
|
-
}
|
|
32276
|
+
var fixedOffsetWidth = 0;
|
|
32097
32277
|
|
|
32098
|
-
|
|
32099
|
-
|
|
32100
|
-
|
|
32278
|
+
if (isLeftFixed || isRightFixed) {
|
|
32279
|
+
var siblingProp = isLeftFixed ? 'nextElementSibling' : 'previousElementSibling';
|
|
32280
|
+
var tempCellElem = cell[siblingProp];
|
|
32101
32281
|
|
|
32102
|
-
|
|
32103
|
-
|
|
32282
|
+
while (tempCellElem) {
|
|
32283
|
+
if (hasClass(tempCellElem, 'fixed--hidden')) {
|
|
32284
|
+
break;
|
|
32285
|
+
} else if (!hasClass(tempCellElem, 'col--group')) {
|
|
32286
|
+
fixedOffsetWidth += tempCellElem.offsetWidth;
|
|
32104
32287
|
}
|
|
32105
32288
|
|
|
32106
|
-
|
|
32107
|
-
type: body_renderType,
|
|
32108
|
-
fixed: fixedType,
|
|
32109
|
-
scrollTop: bodyElem.scrollTop,
|
|
32110
|
-
scrollLeft: bodyElem.scrollLeft,
|
|
32111
|
-
scrollHeight: bodyElem.scrollHeight,
|
|
32112
|
-
scrollWidth: bodyElem.scrollWidth,
|
|
32113
|
-
bodyHeight: bodyHeight,
|
|
32114
|
-
bodyWidth: bodyWidth,
|
|
32115
|
-
isX: isRollX,
|
|
32116
|
-
isY: isRollY
|
|
32117
|
-
}, evnt);
|
|
32289
|
+
tempCellElem = tempCellElem[siblingProp];
|
|
32118
32290
|
}
|
|
32119
|
-
};
|
|
32120
32291
|
|
|
32121
|
-
|
|
32122
|
-
|
|
32123
|
-
|
|
32124
|
-
|
|
32125
|
-
*/
|
|
32292
|
+
if (isRightFixed && rightContainerElem) {
|
|
32293
|
+
dragPosLeft = rightContainerElem.offsetLeft + fixedOffsetWidth;
|
|
32294
|
+
}
|
|
32295
|
+
} // 处理拖动事件
|
|
32126
32296
|
|
|
32127
32297
|
|
|
32128
|
-
|
|
32129
|
-
|
|
32130
|
-
|
|
32131
|
-
|
|
32132
|
-
|
|
32133
|
-
|
|
32134
|
-
lastScrollLeft = tableInternalData.lastScrollLeft;
|
|
32135
|
-
var rowOpts = computeRowOpts.value;
|
|
32136
|
-
var tableBody = refTableBody.value;
|
|
32137
|
-
var scrollBodyElem = refElem.value;
|
|
32138
|
-
var bodyElem = tableBody.$el;
|
|
32139
|
-
var deltaTop = deltaY;
|
|
32140
|
-
var deltaLeft = deltaX;
|
|
32141
|
-
var isTopWheel = deltaTop < 0; // 如果滚动位置已经是顶部或底部,则不需要触发
|
|
32298
|
+
var updateEvent = function updateEvent(evnt) {
|
|
32299
|
+
evnt.stopPropagation();
|
|
32300
|
+
evnt.preventDefault();
|
|
32301
|
+
var offsetX = evnt.clientX - dragClientX;
|
|
32302
|
+
var left = dragPosLeft + offsetX;
|
|
32303
|
+
var scrollLeft = fixedType ? 0 : tableBodyElem.scrollLeft;
|
|
32142
32304
|
|
|
32143
|
-
|
|
32144
|
-
|
|
32145
|
-
|
|
32305
|
+
if (isLeftFixed) {
|
|
32306
|
+
// 左固定列(不允许超过右侧固定列、不允许超过右边距)
|
|
32307
|
+
left = Math.min(left, (rightContainerElem ? rightContainerElem.offsetLeft : tableBodyElem.clientWidth) - fixedOffsetWidth - minInterval);
|
|
32308
|
+
} else if (isRightFixed) {
|
|
32309
|
+
// 右侧固定列(不允许超过左侧固定列、不允许超过左边距)
|
|
32310
|
+
dragMinLeft = (leftContainerElem ? leftContainerElem.clientWidth : 0) + fixedOffsetWidth + minInterval;
|
|
32311
|
+
left = Math.min(left, dragPosLeft + cell.clientWidth - minInterval);
|
|
32312
|
+
} else {
|
|
32313
|
+
dragMinLeft = Math.max(tableBodyElem.scrollLeft, dragMinLeft); // left = Math.min(left, tableBodyElem.clientWidth + tableBodyElem.scrollLeft - 40)
|
|
32314
|
+
}
|
|
32146
32315
|
|
|
32147
|
-
|
|
32148
|
-
|
|
32149
|
-
|
|
32150
|
-
var isRollY = scrollTop !== lastScrollTop; // 用于鼠标纵向滚轮处理
|
|
32316
|
+
dragLeft = Math.max(left, dragMinLeft);
|
|
32317
|
+
resizeBarElem.style.left = "".concat(dragLeft - scrollLeft, "px");
|
|
32318
|
+
};
|
|
32151
32319
|
|
|
32152
|
-
|
|
32153
|
-
|
|
32154
|
-
|
|
32155
|
-
|
|
32156
|
-
tableInternalData.lastScrollTime = Date.now();
|
|
32320
|
+
tableInternalData._isResize = true;
|
|
32321
|
+
addClass(tableEl, 'drag--resize');
|
|
32322
|
+
resizeBarElem.style.display = 'block';
|
|
32323
|
+
document.onmousemove = updateEvent;
|
|
32157
32324
|
|
|
32158
|
-
|
|
32159
|
-
|
|
32160
|
-
|
|
32325
|
+
document.onmouseup = function (evnt) {
|
|
32326
|
+
document.onmousemove = domMousemove;
|
|
32327
|
+
document.onmouseup = domMouseup;
|
|
32328
|
+
column.resizeWidth = column.renderWidth + (isRightFixed ? dragPosLeft - dragLeft : dragLeft - dragPosLeft);
|
|
32329
|
+
resizeBarElem.style.display = 'none';
|
|
32330
|
+
tableInternalData._isResize = false;
|
|
32331
|
+
tableInternalData._lastResizeTime = Date.now();
|
|
32332
|
+
$xetable.analyColumnWidth();
|
|
32333
|
+
$xetable.recalculate(true).then(function () {
|
|
32334
|
+
$xetable.saveCustomResizable();
|
|
32335
|
+
$xetable.updateCellAreas();
|
|
32336
|
+
$xetable.dispatchEvent('resizable-change', params, evnt);
|
|
32337
|
+
});
|
|
32338
|
+
removeClass(tableEl, 'drag--resize');
|
|
32339
|
+
};
|
|
32161
32340
|
|
|
32162
|
-
|
|
32341
|
+
updateEvent(evnt);
|
|
32163
32342
|
|
|
32164
|
-
|
|
32165
|
-
|
|
32166
|
-
}
|
|
32343
|
+
if ($xetable.closeMenu) {
|
|
32344
|
+
$xetable.closeMenu();
|
|
32167
32345
|
}
|
|
32168
32346
|
};
|
|
32169
32347
|
|
|
32348
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () {
|
|
32349
|
+
return props.tableColumn;
|
|
32350
|
+
}, uploadColumn);
|
|
32170
32351
|
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onMounted"])(function () {
|
|
32171
32352
|
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])(function () {
|
|
32172
32353
|
var fixedType = props.fixedType;
|
|
32173
|
-
var
|
|
32174
|
-
var
|
|
32175
|
-
var
|
|
32354
|
+
var internalData = $xetable.internalData;
|
|
32355
|
+
var elemStore = internalData.elemStore;
|
|
32356
|
+
var prefix = "".concat(fixedType || 'main', "-header-");
|
|
32176
32357
|
elemStore["".concat(prefix, "wrapper")] = refElem;
|
|
32177
|
-
elemStore["".concat(prefix, "table")] =
|
|
32178
|
-
elemStore["".concat(prefix, "colgroup")] =
|
|
32179
|
-
elemStore["".concat(prefix, "list")] =
|
|
32180
|
-
elemStore["".concat(prefix, "xSpace")] =
|
|
32181
|
-
elemStore["".concat(prefix, "
|
|
32182
|
-
|
|
32183
|
-
el.onscroll = scrollEvent;
|
|
32184
|
-
el._onscroll = scrollEvent;
|
|
32358
|
+
elemStore["".concat(prefix, "table")] = refHeaderTable;
|
|
32359
|
+
elemStore["".concat(prefix, "colgroup")] = refHeaderColgroup;
|
|
32360
|
+
elemStore["".concat(prefix, "list")] = refHeaderTHead;
|
|
32361
|
+
elemStore["".concat(prefix, "xSpace")] = refHeaderXSpace;
|
|
32362
|
+
elemStore["".concat(prefix, "repair")] = refHeaderBorderRepair;
|
|
32363
|
+
uploadColumn();
|
|
32185
32364
|
});
|
|
32186
32365
|
});
|
|
32187
|
-
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onBeforeUnmount"])(function () {
|
|
32188
|
-
var el = refElem.value;
|
|
32189
|
-
clearTimeout(wheelTime);
|
|
32190
|
-
el._onscroll = null;
|
|
32191
|
-
el.onscroll = null;
|
|
32192
|
-
});
|
|
32193
32366
|
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onUnmounted"])(function () {
|
|
32194
32367
|
var fixedType = props.fixedType;
|
|
32195
|
-
var
|
|
32196
|
-
var
|
|
32368
|
+
var internalData = $xetable.internalData;
|
|
32369
|
+
var elemStore = internalData.elemStore;
|
|
32370
|
+
var prefix = "".concat(fixedType || 'main', "-header-");
|
|
32197
32371
|
elemStore["".concat(prefix, "wrapper")] = null;
|
|
32198
32372
|
elemStore["".concat(prefix, "table")] = null;
|
|
32199
32373
|
elemStore["".concat(prefix, "colgroup")] = null;
|
|
32200
32374
|
elemStore["".concat(prefix, "list")] = null;
|
|
32201
32375
|
elemStore["".concat(prefix, "xSpace")] = null;
|
|
32202
|
-
elemStore["".concat(prefix, "
|
|
32203
|
-
elemStore["".concat(prefix, "emptyBlock")] = null;
|
|
32376
|
+
elemStore["".concat(prefix, "repair")] = null;
|
|
32204
32377
|
});
|
|
32205
32378
|
|
|
32206
32379
|
var renderVN = function renderVN() {
|
|
32207
|
-
var
|
|
32208
|
-
|
|
32380
|
+
var fixedType = props.fixedType,
|
|
32381
|
+
fixedColumn = props.fixedColumn,
|
|
32209
32382
|
tableColumn = props.tableColumn;
|
|
32210
|
-
var
|
|
32211
|
-
|
|
32212
|
-
|
|
32383
|
+
var resizable = tableProps.resizable,
|
|
32384
|
+
border = tableProps.border,
|
|
32385
|
+
columnKey = tableProps.columnKey,
|
|
32386
|
+
headerRowClassName = tableProps.headerRowClassName,
|
|
32387
|
+
headerCellClassName = tableProps.headerCellClassName,
|
|
32388
|
+
headerRowStyle = tableProps.headerRowStyle,
|
|
32389
|
+
headerCellStyle = tableProps.headerCellStyle,
|
|
32390
|
+
allColumnHeaderOverflow = tableProps.showHeaderOverflow,
|
|
32391
|
+
allHeaderAlign = tableProps.headerAlign,
|
|
32392
|
+
allAlign = tableProps.align,
|
|
32213
32393
|
mouseConfig = tableProps.mouseConfig;
|
|
32214
|
-
var
|
|
32215
|
-
|
|
32216
|
-
|
|
32217
|
-
|
|
32218
|
-
|
|
32219
|
-
var
|
|
32220
|
-
var
|
|
32221
|
-
var emptyOpts = computeEmptyOpts.value;
|
|
32222
|
-
var keyboardOpts = computeKeyboardOpts.value;
|
|
32223
|
-
var mouseOpts = computeMouseOpts.value; // const isMergeLeftFixedExceeded = computeIsMergeLeftFixedExceeded.value
|
|
32224
|
-
// const isMergeRightFixedExceeded = computeIsMergeRightFixedExceeded.value
|
|
32225
|
-
// 如果是使用优化模式
|
|
32394
|
+
var isGroup = tableReactData.isGroup,
|
|
32395
|
+
currentColumn = tableReactData.currentColumn,
|
|
32396
|
+
scrollXLoad = tableReactData.scrollXLoad,
|
|
32397
|
+
overflowX = tableReactData.overflowX,
|
|
32398
|
+
scrollbarWidth = tableReactData.scrollbarWidth;
|
|
32399
|
+
var columnOpts = computeColumnOpts.value;
|
|
32400
|
+
var headerGroups = headerColumn.value; // 如果是使用优化模式
|
|
32226
32401
|
|
|
32227
|
-
if (
|
|
32228
|
-
if (
|
|
32229
|
-
if (
|
|
32402
|
+
if (!isGroup) {
|
|
32403
|
+
if (fixedType) {
|
|
32404
|
+
if (scrollXLoad || allColumnHeaderOverflow) {
|
|
32230
32405
|
tableColumn = fixedColumn;
|
|
32231
|
-
} else {
|
|
32232
|
-
tableColumn = visibleColumn; // 检查固定列是否被合并,合并范围是否超出固定列
|
|
32233
|
-
// if (mergeList.length && !isMergeLeftFixedExceeded && fixedType === 'left') {
|
|
32234
|
-
// tableColumn = fixedColumn
|
|
32235
|
-
// } else if (mergeList.length && !isMergeRightFixedExceeded && fixedType === 'right') {
|
|
32236
|
-
// tableColumn = fixedColumn
|
|
32237
|
-
// } else {
|
|
32238
|
-
// tableColumn = visibleColumn
|
|
32239
|
-
// }
|
|
32240
32406
|
}
|
|
32241
|
-
} else {
|
|
32242
|
-
tableColumn = visibleColumn;
|
|
32243
32407
|
}
|
|
32244
|
-
}
|
|
32245
|
-
|
|
32246
|
-
var emptyContent;
|
|
32247
|
-
|
|
32248
|
-
if (slots.empty) {
|
|
32249
|
-
emptyContent = $xetable.callSlot(slots.empty, {
|
|
32250
|
-
$table: $xetable
|
|
32251
|
-
});
|
|
32252
|
-
} else {
|
|
32253
|
-
var compConf = emptyOpts.name ? VXETable.renderer.get(emptyOpts.name) : null;
|
|
32254
|
-
var renderEmpty = compConf ? compConf.renderEmpty : null;
|
|
32255
32408
|
|
|
32256
|
-
|
|
32257
|
-
emptyContent = renderEmpty(emptyOpts, {
|
|
32258
|
-
$table: $xetable
|
|
32259
|
-
});
|
|
32260
|
-
} else {
|
|
32261
|
-
emptyContent = tableProps.emptyText || conf.i18n('vxe.table.emptyText');
|
|
32262
|
-
}
|
|
32409
|
+
headerGroups = [tableColumn];
|
|
32263
32410
|
}
|
|
32264
32411
|
|
|
32265
|
-
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div',
|
|
32412
|
+
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
32266
32413
|
ref: refElem,
|
|
32267
|
-
class: ['vxe-table--
|
|
32414
|
+
class: ['vxe-table--header-wrapper', fixedType ? "fixed-".concat(fixedType, "--wrapper") : 'body--wrapper'],
|
|
32268
32415
|
xid: xID
|
|
32269
|
-
},
|
|
32270
|
-
|
|
32271
|
-
} : {}), [fixedType ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])() : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
32272
|
-
ref: refBodyXSpace,
|
|
32416
|
+
}, [fixedType ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])() : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
32417
|
+
ref: refHeaderXSpace,
|
|
32273
32418
|
class: 'vxe-body--x-space'
|
|
32274
|
-
}), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
32275
|
-
ref: refBodyYSpace,
|
|
32276
|
-
class: 'vxe-body--y-space'
|
|
32277
32419
|
}), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('table', {
|
|
32278
|
-
ref:
|
|
32279
|
-
class: 'vxe-table--
|
|
32420
|
+
ref: refHeaderTable,
|
|
32421
|
+
class: 'vxe-table--header',
|
|
32280
32422
|
xid: xID,
|
|
32281
32423
|
cellspacing: 0,
|
|
32282
32424
|
cellpadding: 0,
|
|
@@ -32286,52 +32428,143 @@ var lineOffsetSizes = {
|
|
|
32286
32428
|
* 列宽
|
|
32287
32429
|
*/
|
|
32288
32430
|
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('colgroup', {
|
|
32289
|
-
ref:
|
|
32431
|
+
ref: refHeaderColgroup
|
|
32290
32432
|
}, tableColumn.map(function (column, $columnIndex) {
|
|
32291
32433
|
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('col', {
|
|
32292
32434
|
name: column.id,
|
|
32293
32435
|
key: $columnIndex
|
|
32294
32436
|
});
|
|
32295
|
-
})),
|
|
32437
|
+
}).concat(scrollbarWidth ? [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('col', {
|
|
32438
|
+
name: 'col_gutter'
|
|
32439
|
+
})] : [])),
|
|
32296
32440
|
/**
|
|
32297
|
-
*
|
|
32441
|
+
* 头部
|
|
32298
32442
|
*/
|
|
32299
|
-
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('
|
|
32300
|
-
ref:
|
|
32301
|
-
},
|
|
32302
|
-
|
|
32303
|
-
|
|
32304
|
-
class: 'vxe-table--cell-area'
|
|
32305
|
-
}, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
32306
|
-
class: 'vxe-table--cell-main-area'
|
|
32307
|
-
}, mouseOpts.extension ? [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
32308
|
-
class: 'vxe-table--cell-main-area-btn',
|
|
32309
|
-
onMousedown: function onMousedown(evnt) {
|
|
32310
|
-
$xetable.triggerCellExtendMousedownEvent(evnt, {
|
|
32443
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('thead', {
|
|
32444
|
+
ref: refHeaderTHead
|
|
32445
|
+
}, headerGroups.map(function (cols, $rowIndex) {
|
|
32446
|
+
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('tr', {
|
|
32447
|
+
class: ['vxe-header--row', headerRowClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(headerRowClassName) ? headerRowClassName({
|
|
32311
32448
|
$table: $xetable,
|
|
32449
|
+
$rowIndex: $rowIndex,
|
|
32312
32450
|
fixed: fixedType,
|
|
32313
|
-
type:
|
|
32451
|
+
type: header_renderType
|
|
32452
|
+
}) : headerRowClassName : ''],
|
|
32453
|
+
style: headerRowStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(headerRowStyle) ? headerRowStyle({
|
|
32454
|
+
$table: $xetable,
|
|
32455
|
+
$rowIndex: $rowIndex,
|
|
32456
|
+
fixed: fixedType,
|
|
32457
|
+
type: header_renderType
|
|
32458
|
+
}) : headerRowStyle : null
|
|
32459
|
+
}, cols.map(function (column, $columnIndex) {
|
|
32460
|
+
var _ref;
|
|
32461
|
+
|
|
32462
|
+
var type = column.type,
|
|
32463
|
+
showHeaderOverflow = column.showHeaderOverflow,
|
|
32464
|
+
headerAlign = column.headerAlign,
|
|
32465
|
+
align = column.align,
|
|
32466
|
+
headerClassName = column.headerClassName;
|
|
32467
|
+
var isColGroup = column.children && column.children.length;
|
|
32468
|
+
var fixedHiddenColumn = fixedType ? column.fixed !== fixedType && !isColGroup : !!column.fixed && overflowX;
|
|
32469
|
+
var headOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isUndefined(showHeaderOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isNull(showHeaderOverflow) ? allColumnHeaderOverflow : showHeaderOverflow;
|
|
32470
|
+
var headAlign = headerAlign || align || allHeaderAlign || allAlign;
|
|
32471
|
+
var showEllipsis = headOverflow === 'ellipsis';
|
|
32472
|
+
var showTitle = headOverflow === 'title';
|
|
32473
|
+
var showTooltip = headOverflow === true || headOverflow === 'tooltip';
|
|
32474
|
+
var hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
32475
|
+
var hasFilter = column.filters && column.filters.some(function (item) {
|
|
32476
|
+
return item.checked;
|
|
32314
32477
|
});
|
|
32315
|
-
|
|
32316
|
-
|
|
32317
|
-
|
|
32318
|
-
|
|
32319
|
-
|
|
32320
|
-
|
|
32321
|
-
|
|
32322
|
-
|
|
32323
|
-
|
|
32324
|
-
|
|
32325
|
-
|
|
32326
|
-
|
|
32327
|
-
|
|
32328
|
-
|
|
32329
|
-
|
|
32478
|
+
var columnIndex = $xetable.getColumnIndex(column);
|
|
32479
|
+
|
|
32480
|
+
var _columnIndex = $xetable.getVTColumnIndex(column);
|
|
32481
|
+
|
|
32482
|
+
var params = {
|
|
32483
|
+
$table: $xetable,
|
|
32484
|
+
$rowIndex: $rowIndex,
|
|
32485
|
+
column: column,
|
|
32486
|
+
columnIndex: columnIndex,
|
|
32487
|
+
$columnIndex: $columnIndex,
|
|
32488
|
+
_columnIndex: _columnIndex,
|
|
32489
|
+
fixed: fixedType,
|
|
32490
|
+
type: header_renderType,
|
|
32491
|
+
isHidden: fixedHiddenColumn,
|
|
32492
|
+
hasFilter: hasFilter
|
|
32493
|
+
};
|
|
32494
|
+
var thOns = {
|
|
32495
|
+
onClick: function onClick(evnt) {
|
|
32496
|
+
return $xetable.triggerHeaderCellClickEvent(evnt, params);
|
|
32497
|
+
},
|
|
32498
|
+
onDblclick: function onDblclick(evnt) {
|
|
32499
|
+
return $xetable.triggerHeaderCellDblclickEvent(evnt, params);
|
|
32500
|
+
}
|
|
32501
|
+
}; // 横向虚拟滚动不支持动态行高
|
|
32502
|
+
|
|
32503
|
+
if (scrollXLoad && !hasEllipsis) {
|
|
32504
|
+
showEllipsis = hasEllipsis = true;
|
|
32505
|
+
} // 按下事件处理
|
|
32506
|
+
|
|
32507
|
+
|
|
32508
|
+
if (mouseConfig) {
|
|
32509
|
+
thOns.onMousedown = function (evnt) {
|
|
32510
|
+
return $xetable.triggerHeaderCellMousedownEvent(evnt, params);
|
|
32511
|
+
};
|
|
32512
|
+
}
|
|
32513
|
+
|
|
32514
|
+
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('th', _objectSpread2(_objectSpread2({
|
|
32515
|
+
class: ['vxe-header--column', column.id, (_ref = {}, _defineProperty(_ref, "col--".concat(headAlign), headAlign), _defineProperty(_ref, "col--".concat(type), type), _defineProperty(_ref, 'col--last', $columnIndex === cols.length - 1), _defineProperty(_ref, 'col--fixed', column.fixed), _defineProperty(_ref, 'col--group', isColGroup), _defineProperty(_ref, 'col--ellipsis', hasEllipsis), _defineProperty(_ref, 'fixed--hidden', fixedHiddenColumn), _defineProperty(_ref, 'is--sortable', column.sortable), _defineProperty(_ref, 'col--filter', !!column.filters), _defineProperty(_ref, 'is--filter-active', hasFilter), _defineProperty(_ref, 'col--current', currentColumn === column), _ref), headerClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(headerClassName) ? headerClassName(params) : headerClassName : '', headerCellClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(headerCellClassName) ? headerCellClassName(params) : headerCellClassName : ''],
|
|
32516
|
+
colid: column.id,
|
|
32517
|
+
colspan: column.colSpan > 1 ? column.colSpan : null,
|
|
32518
|
+
rowspan: column.rowSpan > 1 ? column.rowSpan : null,
|
|
32519
|
+
style: headerCellStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(headerCellStyle) ? headerCellStyle(params) : headerCellStyle : null
|
|
32520
|
+
}, thOns), {}, {
|
|
32521
|
+
key: columnKey || columnOpts.useKey || isColGroup ? column.id : $columnIndex
|
|
32522
|
+
}), [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
32523
|
+
class: ['vxe-cell', {
|
|
32524
|
+
'c--title': showTitle,
|
|
32525
|
+
'c--tooltip': showTooltip,
|
|
32526
|
+
'c--ellipsis': showEllipsis
|
|
32527
|
+
}]
|
|
32528
|
+
}, column.renderHeader(params)),
|
|
32529
|
+
/**
|
|
32530
|
+
* 列宽拖动
|
|
32531
|
+
*/
|
|
32532
|
+
!fixedHiddenColumn && !isColGroup && (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isBoolean(column.resizable) ? column.resizable : columnOpts.resizable || resizable) ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
32533
|
+
class: ['vxe-resizable', {
|
|
32534
|
+
'is--line': !border || border === 'none'
|
|
32535
|
+
}],
|
|
32536
|
+
onMousedown: function onMousedown(evnt) {
|
|
32537
|
+
return resizeMousedown(evnt, params);
|
|
32538
|
+
}
|
|
32539
|
+
}) : null]);
|
|
32540
|
+
}).concat(scrollbarWidth ? [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('th', {
|
|
32541
|
+
class: 'vxe-header--gutter col--gutter'
|
|
32542
|
+
})] : []));
|
|
32543
|
+
}))]),
|
|
32544
|
+
/**
|
|
32545
|
+
* 其他
|
|
32546
|
+
*/
|
|
32547
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
32548
|
+
ref: refHeaderBorderRepair,
|
|
32549
|
+
class: 'vxe-table--header-border-line'
|
|
32550
|
+
})]);
|
|
32330
32551
|
};
|
|
32331
32552
|
|
|
32332
32553
|
return renderVN;
|
|
32333
32554
|
}
|
|
32334
32555
|
}));
|
|
32556
|
+
// CONCATENATED MODULE: ./packages/header/index.ts
|
|
32557
|
+
|
|
32558
|
+
|
|
32559
|
+
|
|
32560
|
+
|
|
32561
|
+
var Header = Object.assign(header, {
|
|
32562
|
+
install: function install(app) {
|
|
32563
|
+
app.component(header.name, header);
|
|
32564
|
+
}
|
|
32565
|
+
});
|
|
32566
|
+
dynamicApp.component(header.name, header);
|
|
32567
|
+
/* harmony default export */ var packages_header = (Header);
|
|
32335
32568
|
// CONCATENATED MODULE: ./packages/table/src/table.ts
|
|
32336
32569
|
|
|
32337
32570
|
|
|
@@ -32374,6 +32607,7 @@ var lineOffsetSizes = {
|
|
|
32374
32607
|
|
|
32375
32608
|
|
|
32376
32609
|
|
|
32610
|
+
|
|
32377
32611
|
|
|
32378
32612
|
|
|
32379
32613
|
var isWebkit = browse['-webkit'] && !browse.edge;
|
|
@@ -39384,7 +39618,7 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
39384
39618
|
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
39385
39619
|
ref: isFixedLeft ? refLeftContainer : refRightContainer,
|
|
39386
39620
|
class: "vxe-table--fixed-".concat(fixedType, "-wrapper")
|
|
39387
|
-
}, [showHeader ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])(
|
|
39621
|
+
}, [showHeader ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])(packages_header, {
|
|
39388
39622
|
ref: isFixedLeft ? refTableLeftHeader : refTableRightHeader,
|
|
39389
39623
|
fixedType: fixedType,
|
|
39390
39624
|
tableData: tableData,
|
|
@@ -39851,7 +40085,7 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
39851
40085
|
/**
|
|
39852
40086
|
* 表头
|
|
39853
40087
|
*/
|
|
39854
|
-
showHeader ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])(
|
|
40088
|
+
showHeader ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])(packages_header, {
|
|
39855
40089
|
ref: refTableHeader,
|
|
39856
40090
|
tableData: tableData,
|
|
39857
40091
|
tableColumn: tableColumn,
|
|
@@ -40330,13 +40564,12 @@ dynamicApp.component(table.name, table);
|
|
|
40330
40564
|
|
|
40331
40565
|
|
|
40332
40566
|
|
|
40333
|
-
|
|
40334
40567
|
|
|
40335
40568
|
|
|
40336
40569
|
// 按需加载的组件
|
|
40337
40570
|
|
|
40338
40571
|
var components = [// 功能模块
|
|
40339
|
-
|
|
40572
|
+
Footer, Icon, Filter, Menu, Edit, Export, Keyboard, Validator, // 可选组件
|
|
40340
40573
|
Column, Colgroup, Grid, Toolbar, Pager, Checkbox, CheckboxGroup, Radio, RadioGroup, RadioButton, Input, Textarea, Button, Modal, Tooltip, Form, FormItem, FormGather, Select, Optgroup, Option, Switch, List, Pulldown, // 核心
|
|
40341
40574
|
Table]; // 默认中文
|
|
40342
40575
|
|