vxe-table 3.14.0-beta.0 → 3.14.0-beta.2
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/grid/src/grid.js +60 -75
- package/es/style.css +1 -1
- package/es/table/module/custom/panel.js +25 -27
- package/es/table/module/edit/mixin.js +1 -1
- package/es/table/module/export/export-panel.js +22 -24
- package/es/table/module/export/import-panel.js +14 -16
- package/es/table/module/export/mixin.js +15 -31
- package/es/table/module/keyboard/mixin.js +3 -2
- package/es/table/module/validator/mixin.js +1 -3
- package/es/table/render/index.js +2 -4
- package/es/table/src/body.js +2 -2
- package/es/table/src/column.js +2 -2
- package/es/table/src/columnInfo.js +30 -32
- package/es/table/src/group.js +2 -2
- package/es/table/src/methods.js +128 -97
- package/es/table/src/table.js +17 -19
- package/es/table/src/util.js +5 -7
- package/es/toolbar/src/toolbar.js +20 -28
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/grid/src/grid.js +61 -88
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +372 -380
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/custom/panel.js +31 -33
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/mixin.js +1 -1
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/module/export/export-panel.js +22 -24
- package/lib/table/module/export/export-panel.min.js +1 -1
- package/lib/table/module/export/import-panel.js +14 -16
- package/lib/table/module/export/import-panel.min.js +1 -1
- package/lib/table/module/export/mixin.js +15 -31
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/module/keyboard/mixin.js +3 -2
- package/lib/table/module/keyboard/mixin.min.js +1 -1
- package/lib/table/module/validator/mixin.js +1 -3
- package/lib/table/module/validator/mixin.min.js +1 -1
- package/lib/table/render/index.js +2 -4
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/body.js +2 -1
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/column.js +3 -2
- package/lib/table/src/columnInfo.js +32 -34
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/group.js +3 -2
- package/lib/table/src/methods.js +138 -94
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +14 -16
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +4 -6
- package/lib/table/src/util.min.js +1 -1
- package/lib/toolbar/src/toolbar.js +21 -28
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +62 -75
- package/packages/table/module/custom/panel.ts +25 -27
- package/packages/table/module/edit/mixin.ts +1 -1
- package/packages/table/module/export/export-panel.ts +22 -24
- package/packages/table/module/export/import-panel.ts +14 -16
- package/packages/table/module/export/mixin.ts +15 -31
- package/packages/table/module/keyboard/mixin.ts +6 -2
- package/packages/table/module/validator/mixin.ts +1 -3
- package/packages/table/render/index.ts +2 -4
- package/packages/table/src/body.ts +2 -2
- package/packages/table/src/column.ts +2 -2
- package/packages/table/src/columnInfo.ts +30 -32
- package/packages/table/src/group.ts +2 -2
- package/packages/table/src/methods.ts +140 -104
- package/packages/table/src/table.ts +14 -16
- package/packages/table/src/util.ts +4 -6
- package/packages/toolbar/src/toolbar.ts +20 -28
- /package/es/{iconfont.1740732119954.ttf → iconfont.1741079977180.ttf} +0 -0
- /package/es/{iconfont.1740732119954.woff → iconfont.1741079977180.woff} +0 -0
- /package/es/{iconfont.1740732119954.woff2 → iconfont.1741079977180.woff2} +0 -0
- /package/lib/{iconfont.1740732119954.ttf → iconfont.1741079977180.ttf} +0 -0
- /package/lib/{iconfont.1740732119954.woff → iconfont.1741079977180.woff} +0 -0
- /package/lib/{iconfont.1740732119954.woff2 → iconfont.1741079977180.woff2} +0 -0
package/es/grid/src/grid.js
CHANGED
|
@@ -66,9 +66,7 @@ function getFuncSlot($xeGrid, optSlots, slotKey) {
|
|
|
66
66
|
return slots[funcSlot];
|
|
67
67
|
}
|
|
68
68
|
else {
|
|
69
|
-
|
|
70
|
-
errLog('vxe.error.notSlot', [funcSlot]);
|
|
71
|
-
}
|
|
69
|
+
errLog('vxe.error.notSlot', [funcSlot]);
|
|
72
70
|
}
|
|
73
71
|
}
|
|
74
72
|
else {
|
|
@@ -149,7 +147,7 @@ function renderForm(h, _vm) {
|
|
|
149
147
|
if (hasForm) {
|
|
150
148
|
return h('div', {
|
|
151
149
|
key: 'form',
|
|
152
|
-
ref: '
|
|
150
|
+
ref: 'refFormWrapper',
|
|
153
151
|
class: 'vxe-grid--form-wrapper'
|
|
154
152
|
}, formSlot ? formSlot.call(_vm, { $grid: _vm }, h) : renderDefaultForm(h, _vm));
|
|
155
153
|
}
|
|
@@ -165,7 +163,7 @@ function renderToolbar(h, _vm) {
|
|
|
165
163
|
if (hasToolbar) {
|
|
166
164
|
return h('div', {
|
|
167
165
|
key: 'toolbar',
|
|
168
|
-
ref: '
|
|
166
|
+
ref: 'refToolbarWrapper',
|
|
169
167
|
class: 'vxe-grid--toolbar-wrapper'
|
|
170
168
|
}, toolbarSlot
|
|
171
169
|
? toolbarSlot.call(_vm, { $grid: _vm }, h)
|
|
@@ -188,7 +186,7 @@ function renderTop(h, _vm) {
|
|
|
188
186
|
return topSlot
|
|
189
187
|
? h('div', {
|
|
190
188
|
key: 'top',
|
|
191
|
-
ref: '
|
|
189
|
+
ref: 'refTopWrapper',
|
|
192
190
|
class: 'vxe-grid--top-wrapper'
|
|
193
191
|
}, topSlot.call(_vm, { $grid: _vm }, h))
|
|
194
192
|
: _e();
|
|
@@ -239,7 +237,7 @@ function renderBottom(h, _vm) {
|
|
|
239
237
|
return bottomSlot
|
|
240
238
|
? h('div', {
|
|
241
239
|
key: 'bottom',
|
|
242
|
-
ref: '
|
|
240
|
+
ref: 'refBottomWrapper',
|
|
243
241
|
class: 'vxe-grid--bottom-wrapper'
|
|
244
242
|
}, bottomSlot.call(_vm, { $grid: _vm }, h))
|
|
245
243
|
: _e();
|
|
@@ -257,7 +255,7 @@ function renderPager(h, $xeGrid) {
|
|
|
257
255
|
if (hasPager) {
|
|
258
256
|
return h('div', {
|
|
259
257
|
key: 'pager',
|
|
260
|
-
ref: '
|
|
258
|
+
ref: 'refPagerWrapper',
|
|
261
259
|
class: 'vxe-grid--pager-wrapper'
|
|
262
260
|
}, pagerSlot
|
|
263
261
|
? pagerSlot.call($xeGrid, { $grid: $xeGrid }, h)
|
|
@@ -542,23 +540,21 @@ export default {
|
|
|
542
540
|
// warnLog('vxe.error.delProp', ['proxy-config.props', 'proxy-config.response'])
|
|
543
541
|
// }
|
|
544
542
|
}
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
if (
|
|
551
|
-
|
|
552
|
-
errLog('vxe.error.reqComp', ['vxe-form']);
|
|
553
|
-
}
|
|
543
|
+
// 使用已安装的组件,如果未安装则不渲染
|
|
544
|
+
const VxeUIFormComponent = VxeUI.getComponent('VxeForm');
|
|
545
|
+
const VxeUIPagerComponent = VxeUI.getComponent('VxePager');
|
|
546
|
+
$xeGrid.$nextTick(() => {
|
|
547
|
+
if (props.formConfig) {
|
|
548
|
+
if (!VxeUIFormComponent) {
|
|
549
|
+
errLog('vxe.error.reqComp', ['vxe-form']);
|
|
554
550
|
}
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
551
|
+
}
|
|
552
|
+
if (props.pagerConfig) {
|
|
553
|
+
if (!VxeUIPagerComponent) {
|
|
554
|
+
errLog('vxe.error.reqComp', ['vxe-pager']);
|
|
559
555
|
}
|
|
560
|
-
}
|
|
561
|
-
}
|
|
556
|
+
}
|
|
557
|
+
});
|
|
562
558
|
this.initPages();
|
|
563
559
|
globalEvents.on(this, 'keydown', this.handleGlobalKeydownEvent);
|
|
564
560
|
},
|
|
@@ -579,6 +575,7 @@ export default {
|
|
|
579
575
|
const vSize = $xeGrid.computeSize;
|
|
580
576
|
const styles = $xeGrid.computeStyles;
|
|
581
577
|
return h('div', {
|
|
578
|
+
ref: 'refElem',
|
|
582
579
|
class: ['vxe-grid', {
|
|
583
580
|
[`size--${vSize}`]: vSize,
|
|
584
581
|
'is--animat': !!this.animat,
|
|
@@ -601,18 +598,30 @@ export default {
|
|
|
601
598
|
}
|
|
602
599
|
return [];
|
|
603
600
|
},
|
|
604
|
-
getParentHeight() {
|
|
605
|
-
const { $el, isZMax } = this;
|
|
606
|
-
return (isZMax ? getDomNode().visibleHeight : XEUtils.toNumber(getComputedStyle($el.parentNode).height)) - this.getExcludeHeight();
|
|
607
|
-
},
|
|
608
601
|
/**
|
|
609
602
|
* 获取需要排除的高度
|
|
610
603
|
*/
|
|
611
604
|
getExcludeHeight() {
|
|
612
|
-
const
|
|
613
|
-
const
|
|
614
|
-
const
|
|
615
|
-
|
|
605
|
+
const $xeGrid = this;
|
|
606
|
+
const reactData = $xeGrid;
|
|
607
|
+
const { isZMax } = reactData;
|
|
608
|
+
const el = $xeGrid.$refs.refElem;
|
|
609
|
+
const formWrapper = $xeGrid.$refs.refFormWrapper;
|
|
610
|
+
const toolbarWrapper = $xeGrid.$refs.refToolbarWrapper;
|
|
611
|
+
const topWrapper = $xeGrid.$refs.refTopWrapper;
|
|
612
|
+
const bottomWrapper = $xeGrid.$refs.refBottomWrapper;
|
|
613
|
+
const pagerWrapper = $xeGrid.$refs.refPagerWrapper;
|
|
614
|
+
const parentPaddingSize = isZMax ? 0 : getPaddingTopBottomSize(el.parentNode);
|
|
615
|
+
return parentPaddingSize + getPaddingTopBottomSize(el) + getOffsetHeight(formWrapper) + getOffsetHeight(toolbarWrapper) + getOffsetHeight(topWrapper) + getOffsetHeight(bottomWrapper) + getOffsetHeight(pagerWrapper);
|
|
616
|
+
},
|
|
617
|
+
getParentHeight() {
|
|
618
|
+
const $xeGrid = this;
|
|
619
|
+
const reactData = $xeGrid;
|
|
620
|
+
const el = $xeGrid.$refs.refElem;
|
|
621
|
+
if (el) {
|
|
622
|
+
return (reactData.isZMax ? getDomNode().visibleHeight : XEUtils.toNumber(getComputedStyle(el.parentNode).height)) - $xeGrid.getExcludeHeight();
|
|
623
|
+
}
|
|
624
|
+
return 0;
|
|
616
625
|
},
|
|
617
626
|
initToolbar() {
|
|
618
627
|
this.$nextTick(() => {
|
|
@@ -841,9 +850,7 @@ export default {
|
|
|
841
850
|
});
|
|
842
851
|
}
|
|
843
852
|
else {
|
|
844
|
-
|
|
845
|
-
errLog('vxe.error.notFunc', ['proxy-config.ajax.query']);
|
|
846
|
-
}
|
|
853
|
+
errLog('vxe.error.notFunc', ['proxy-config.ajax.query']);
|
|
847
854
|
}
|
|
848
855
|
break;
|
|
849
856
|
}
|
|
@@ -869,10 +876,8 @@ export default {
|
|
|
869
876
|
$xeTable.setPendingRow(removeRecords, false);
|
|
870
877
|
if (isRespMsg) {
|
|
871
878
|
// 检测弹窗模块
|
|
872
|
-
if (
|
|
873
|
-
|
|
874
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
875
|
-
}
|
|
879
|
+
if (!VxeUI.modal) {
|
|
880
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
876
881
|
}
|
|
877
882
|
VxeUI.modal.message({ content: this.getRespMsg(rest, 'vxe.grid.delSuccess'), status: 'success' });
|
|
878
883
|
}
|
|
@@ -891,10 +896,8 @@ export default {
|
|
|
891
896
|
this.tableLoading = false;
|
|
892
897
|
if (isRespMsg) {
|
|
893
898
|
// 检测弹窗模块
|
|
894
|
-
if (
|
|
895
|
-
|
|
896
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
897
|
-
}
|
|
899
|
+
if (!VxeUI.modal) {
|
|
900
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
898
901
|
}
|
|
899
902
|
VxeUI.modal.message({ id: code, content: this.getRespMsg(rest, 'vxe.grid.operError'), status: 'error' });
|
|
900
903
|
}
|
|
@@ -908,19 +911,15 @@ export default {
|
|
|
908
911
|
else {
|
|
909
912
|
if (isActiveMsg) {
|
|
910
913
|
// 检测弹窗模块
|
|
911
|
-
if (
|
|
912
|
-
|
|
913
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
914
|
-
}
|
|
914
|
+
if (!VxeUI.modal) {
|
|
915
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
915
916
|
}
|
|
916
917
|
VxeUI.modal.message({ id: code, content: getI18n('vxe.grid.selectOneRecord'), status: 'warning' });
|
|
917
918
|
}
|
|
918
919
|
}
|
|
919
920
|
}
|
|
920
921
|
else {
|
|
921
|
-
|
|
922
|
-
errLog('vxe.error.notFunc', ['proxy-config.ajax.delete']);
|
|
923
|
-
}
|
|
922
|
+
errLog('vxe.error.notFunc', ['proxy-config.ajax.delete']);
|
|
924
923
|
}
|
|
925
924
|
break;
|
|
926
925
|
}
|
|
@@ -959,10 +958,8 @@ export default {
|
|
|
959
958
|
$xeTable.clearPendingRow();
|
|
960
959
|
if (isRespMsg) {
|
|
961
960
|
// 检测弹窗模块
|
|
962
|
-
if (
|
|
963
|
-
|
|
964
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
965
|
-
}
|
|
961
|
+
if (!VxeUI.modal) {
|
|
962
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
966
963
|
}
|
|
967
964
|
VxeUI.modal.message({ content: this.getRespMsg(rest, 'vxe.grid.saveSuccess'), status: 'success' });
|
|
968
965
|
}
|
|
@@ -981,10 +978,8 @@ export default {
|
|
|
981
978
|
this.tableLoading = false;
|
|
982
979
|
if (isRespMsg) {
|
|
983
980
|
// 检测弹窗模块
|
|
984
|
-
if (
|
|
985
|
-
|
|
986
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
987
|
-
}
|
|
981
|
+
if (!VxeUI.modal) {
|
|
982
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
988
983
|
}
|
|
989
984
|
VxeUI.modal.message({ id: code, content: this.getRespMsg(rest, 'vxe.grid.operError'), status: 'error' });
|
|
990
985
|
}
|
|
@@ -997,10 +992,8 @@ export default {
|
|
|
997
992
|
else {
|
|
998
993
|
if (isActiveMsg) {
|
|
999
994
|
// 检测弹窗模块
|
|
1000
|
-
if (
|
|
1001
|
-
|
|
1002
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
1003
|
-
}
|
|
995
|
+
if (!VxeUI.modal) {
|
|
996
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
1004
997
|
}
|
|
1005
998
|
VxeUI.modal.message({ id: code, content: getI18n('vxe.grid.dataUnchanged'), status: 'info' });
|
|
1006
999
|
}
|
|
@@ -1008,9 +1001,7 @@ export default {
|
|
|
1008
1001
|
});
|
|
1009
1002
|
}
|
|
1010
1003
|
else {
|
|
1011
|
-
|
|
1012
|
-
errLog('vxe.error.notFunc', ['proxy-config.ajax.save']);
|
|
1013
|
-
}
|
|
1004
|
+
errLog('vxe.error.notFunc', ['proxy-config.ajax.save']);
|
|
1014
1005
|
}
|
|
1015
1006
|
break;
|
|
1016
1007
|
}
|
|
@@ -1021,9 +1012,7 @@ export default {
|
|
|
1021
1012
|
gCommandOpts.commandMethod({ code, button, $grid: this, $table: $xeTable }, ...args);
|
|
1022
1013
|
}
|
|
1023
1014
|
else {
|
|
1024
|
-
|
|
1025
|
-
errLog('vxe.error.notCommands', [code]);
|
|
1026
|
-
}
|
|
1015
|
+
errLog('vxe.error.notCommands', [code]);
|
|
1027
1016
|
}
|
|
1028
1017
|
}
|
|
1029
1018
|
}
|
|
@@ -1051,10 +1040,8 @@ export default {
|
|
|
1051
1040
|
}
|
|
1052
1041
|
else {
|
|
1053
1042
|
// 检测弹窗模块
|
|
1054
|
-
if (
|
|
1055
|
-
|
|
1056
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
1057
|
-
}
|
|
1043
|
+
if (!VxeUI.modal) {
|
|
1044
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
1058
1045
|
}
|
|
1059
1046
|
VxeUI.modal.message({ id: `msg_${code}`, content: getI18n('vxe.grid.selectOneRecord'), status: 'warning' });
|
|
1060
1047
|
}
|
|
@@ -1104,10 +1091,8 @@ export default {
|
|
|
1104
1091
|
else {
|
|
1105
1092
|
if (isActiveMsg) {
|
|
1106
1093
|
// 检测弹窗模块
|
|
1107
|
-
if (
|
|
1108
|
-
|
|
1109
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
1110
|
-
}
|
|
1094
|
+
if (!VxeUI.modal) {
|
|
1095
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
1111
1096
|
}
|
|
1112
1097
|
VxeUI.modal.message({ id: code, content: getI18n('vxe.grid.selectOneRecord'), status: 'warning' });
|
|
1113
1098
|
}
|