vxe-table 3.13.16 → 3.13.18
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 +68 -85
- package/es/style.css +1 -1
- package/es/table/module/custom/panel.js +25 -27
- package/es/table/module/edit/mixin.js +3 -5
- 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/columnInfo.js +30 -32
- package/es/table/src/methods.js +113 -68
- package/es/table/src/table.js +16 -18
- package/es/table/src/util.js +5 -7
- package/es/toolbar/src/toolbar.js +18 -26
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/grid/src/grid.js +69 -98
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +356 -365
- 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 +3 -5
- 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/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/columnInfo.js +32 -34
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/methods.js +121 -65
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +13 -15
- 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 +18 -26
- 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 +70 -85
- package/packages/table/module/custom/panel.ts +25 -27
- package/packages/table/module/edit/mixin.ts +3 -5
- 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/columnInfo.ts +30 -32
- package/packages/table/src/methods.ts +115 -66
- package/packages/table/src/table.ts +13 -15
- package/packages/table/src/util.ts +4 -6
- package/packages/toolbar/src/toolbar.ts +18 -26
- /package/es/{iconfont.1740799948632.ttf → iconfont.1741140503645.ttf} +0 -0
- /package/es/{iconfont.1740799948632.woff → iconfont.1741140503645.woff} +0 -0
- /package/es/{iconfont.1740799948632.woff2 → iconfont.1741140503645.woff2} +0 -0
- /package/lib/{iconfont.1740799948632.ttf → iconfont.1741140503645.ttf} +0 -0
- /package/lib/{iconfont.1740799948632.woff → iconfont.1741140503645.woff} +0 -0
- /package/lib/{iconfont.1740799948632.woff2 → iconfont.1741140503645.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)
|
|
@@ -529,34 +527,30 @@ export default {
|
|
|
529
527
|
// if (proxyConfig && (data || (proxyOpts.form && formOpts.data))) {
|
|
530
528
|
// errLog('vxe.error.errConflicts', ['grid.data', 'grid.proxy-config'])
|
|
531
529
|
// }
|
|
532
|
-
if (
|
|
533
|
-
|
|
534
|
-
warnLog('vxe.error.delProp', ['grid.toolbar', 'grid.toolbar-config']);
|
|
535
|
-
}
|
|
536
|
-
if (this.toolbarConfig && !XEUtils.isObject(this.toolbarConfig)) {
|
|
537
|
-
warnLog('vxe.error.errProp', [`grid.toolbar-config=${this.toolbarConfig}`, 'grid.toolbar-config={}']);
|
|
538
|
-
}
|
|
539
|
-
// if (proxyOpts.props) {
|
|
540
|
-
// warnLog('vxe.error.delProp', ['proxy-config.props', 'proxy-config.response'])
|
|
541
|
-
// }
|
|
530
|
+
if (this.toolbar) {
|
|
531
|
+
warnLog('vxe.error.delProp', ['grid.toolbar', 'grid.toolbar-config']);
|
|
542
532
|
}
|
|
543
|
-
if (
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
533
|
+
if (this.toolbarConfig && !XEUtils.isObject(this.toolbarConfig)) {
|
|
534
|
+
warnLog('vxe.error.errProp', [`grid.toolbar-config=${this.toolbarConfig}`, 'grid.toolbar-config={}']);
|
|
535
|
+
}
|
|
536
|
+
// if (proxyOpts.props) {
|
|
537
|
+
// warnLog('vxe.error.delProp', ['proxy-config.props', 'proxy-config.response'])
|
|
538
|
+
// }
|
|
539
|
+
// 使用已安装的组件,如果未安装则不渲染
|
|
540
|
+
const VxeUIFormComponent = VxeUI.getComponent('VxeForm');
|
|
541
|
+
const VxeUIPagerComponent = VxeUI.getComponent('VxePager');
|
|
542
|
+
$xeGrid.$nextTick(() => {
|
|
543
|
+
if (props.formConfig) {
|
|
544
|
+
if (!VxeUIFormComponent) {
|
|
545
|
+
errLog('vxe.error.reqComp', ['vxe-form']);
|
|
552
546
|
}
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
547
|
+
}
|
|
548
|
+
if (props.pagerConfig) {
|
|
549
|
+
if (!VxeUIPagerComponent) {
|
|
550
|
+
errLog('vxe.error.reqComp', ['vxe-pager']);
|
|
557
551
|
}
|
|
558
|
-
}
|
|
559
|
-
}
|
|
552
|
+
}
|
|
553
|
+
});
|
|
560
554
|
this.initPages();
|
|
561
555
|
globalEvents.on(this, 'keydown', this.handleGlobalKeydownEvent);
|
|
562
556
|
},
|
|
@@ -577,6 +571,7 @@ export default {
|
|
|
577
571
|
const vSize = $xeGrid.computeSize;
|
|
578
572
|
const styles = $xeGrid.computeStyles;
|
|
579
573
|
return h('div', {
|
|
574
|
+
ref: 'refElem',
|
|
580
575
|
class: ['vxe-grid', {
|
|
581
576
|
[`size--${vSize}`]: vSize,
|
|
582
577
|
'is--animat': !!this.animat,
|
|
@@ -599,18 +594,30 @@ export default {
|
|
|
599
594
|
}
|
|
600
595
|
return [];
|
|
601
596
|
},
|
|
602
|
-
getParentHeight() {
|
|
603
|
-
const { $el, isZMax } = this;
|
|
604
|
-
return (isZMax ? getDomNode().visibleHeight : XEUtils.toNumber(getComputedStyle($el.parentNode).height)) - this.getExcludeHeight();
|
|
605
|
-
},
|
|
606
597
|
/**
|
|
607
598
|
* 获取需要排除的高度
|
|
608
599
|
*/
|
|
609
600
|
getExcludeHeight() {
|
|
610
|
-
const
|
|
611
|
-
const
|
|
612
|
-
const
|
|
613
|
-
|
|
601
|
+
const $xeGrid = this;
|
|
602
|
+
const reactData = $xeGrid;
|
|
603
|
+
const { isZMax } = reactData;
|
|
604
|
+
const el = $xeGrid.$refs.refElem;
|
|
605
|
+
const formWrapper = $xeGrid.$refs.refFormWrapper;
|
|
606
|
+
const toolbarWrapper = $xeGrid.$refs.refToolbarWrapper;
|
|
607
|
+
const topWrapper = $xeGrid.$refs.refTopWrapper;
|
|
608
|
+
const bottomWrapper = $xeGrid.$refs.refBottomWrapper;
|
|
609
|
+
const pagerWrapper = $xeGrid.$refs.refPagerWrapper;
|
|
610
|
+
const parentPaddingSize = isZMax ? 0 : getPaddingTopBottomSize(el.parentNode);
|
|
611
|
+
return parentPaddingSize + getPaddingTopBottomSize(el) + getOffsetHeight(formWrapper) + getOffsetHeight(toolbarWrapper) + getOffsetHeight(topWrapper) + getOffsetHeight(bottomWrapper) + getOffsetHeight(pagerWrapper);
|
|
612
|
+
},
|
|
613
|
+
getParentHeight() {
|
|
614
|
+
const $xeGrid = this;
|
|
615
|
+
const reactData = $xeGrid;
|
|
616
|
+
const el = $xeGrid.$refs.refElem;
|
|
617
|
+
if (el) {
|
|
618
|
+
return (reactData.isZMax ? getDomNode().visibleHeight : XEUtils.toNumber(getComputedStyle(el.parentNode).height)) - $xeGrid.getExcludeHeight();
|
|
619
|
+
}
|
|
620
|
+
return 0;
|
|
614
621
|
},
|
|
615
622
|
initToolbar() {
|
|
616
623
|
this.$nextTick(() => {
|
|
@@ -831,9 +838,7 @@ export default {
|
|
|
831
838
|
});
|
|
832
839
|
}
|
|
833
840
|
else {
|
|
834
|
-
|
|
835
|
-
errLog('vxe.error.notFunc', ['proxy-config.ajax.query']);
|
|
836
|
-
}
|
|
841
|
+
errLog('vxe.error.notFunc', ['proxy-config.ajax.query']);
|
|
837
842
|
}
|
|
838
843
|
break;
|
|
839
844
|
}
|
|
@@ -859,10 +864,8 @@ export default {
|
|
|
859
864
|
$xetable.setPendingRow(removeRecords, false);
|
|
860
865
|
if (isRespMsg) {
|
|
861
866
|
// 检测弹窗模块
|
|
862
|
-
if (
|
|
863
|
-
|
|
864
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
865
|
-
}
|
|
867
|
+
if (!VxeUI.modal) {
|
|
868
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
866
869
|
}
|
|
867
870
|
VxeUI.modal.message({ content: this.getRespMsg(rest, 'vxe.grid.delSuccess'), status: 'success' });
|
|
868
871
|
}
|
|
@@ -881,10 +884,8 @@ export default {
|
|
|
881
884
|
this.tableLoading = false;
|
|
882
885
|
if (isRespMsg) {
|
|
883
886
|
// 检测弹窗模块
|
|
884
|
-
if (
|
|
885
|
-
|
|
886
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
887
|
-
}
|
|
887
|
+
if (!VxeUI.modal) {
|
|
888
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
888
889
|
}
|
|
889
890
|
VxeUI.modal.message({ id: code, content: this.getRespMsg(rest, 'vxe.grid.operError'), status: 'error' });
|
|
890
891
|
}
|
|
@@ -898,19 +899,15 @@ export default {
|
|
|
898
899
|
else {
|
|
899
900
|
if (isActiveMsg) {
|
|
900
901
|
// 检测弹窗模块
|
|
901
|
-
if (
|
|
902
|
-
|
|
903
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
904
|
-
}
|
|
902
|
+
if (!VxeUI.modal) {
|
|
903
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
905
904
|
}
|
|
906
905
|
VxeUI.modal.message({ id: code, content: getI18n('vxe.grid.selectOneRecord'), status: 'warning' });
|
|
907
906
|
}
|
|
908
907
|
}
|
|
909
908
|
}
|
|
910
909
|
else {
|
|
911
|
-
|
|
912
|
-
errLog('vxe.error.notFunc', ['proxy-config.ajax.delete']);
|
|
913
|
-
}
|
|
910
|
+
errLog('vxe.error.notFunc', ['proxy-config.ajax.delete']);
|
|
914
911
|
}
|
|
915
912
|
break;
|
|
916
913
|
}
|
|
@@ -949,10 +946,8 @@ export default {
|
|
|
949
946
|
$xetable.clearPendingRow();
|
|
950
947
|
if (isRespMsg) {
|
|
951
948
|
// 检测弹窗模块
|
|
952
|
-
if (
|
|
953
|
-
|
|
954
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
955
|
-
}
|
|
949
|
+
if (!VxeUI.modal) {
|
|
950
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
956
951
|
}
|
|
957
952
|
VxeUI.modal.message({ content: this.getRespMsg(rest, 'vxe.grid.saveSuccess'), status: 'success' });
|
|
958
953
|
}
|
|
@@ -971,10 +966,8 @@ export default {
|
|
|
971
966
|
this.tableLoading = false;
|
|
972
967
|
if (isRespMsg) {
|
|
973
968
|
// 检测弹窗模块
|
|
974
|
-
if (
|
|
975
|
-
|
|
976
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
977
|
-
}
|
|
969
|
+
if (!VxeUI.modal) {
|
|
970
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
978
971
|
}
|
|
979
972
|
VxeUI.modal.message({ id: code, content: this.getRespMsg(rest, 'vxe.grid.operError'), status: 'error' });
|
|
980
973
|
}
|
|
@@ -987,10 +980,8 @@ export default {
|
|
|
987
980
|
else {
|
|
988
981
|
if (isActiveMsg) {
|
|
989
982
|
// 检测弹窗模块
|
|
990
|
-
if (
|
|
991
|
-
|
|
992
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
993
|
-
}
|
|
983
|
+
if (!VxeUI.modal) {
|
|
984
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
994
985
|
}
|
|
995
986
|
VxeUI.modal.message({ id: code, content: getI18n('vxe.grid.dataUnchanged'), status: 'info' });
|
|
996
987
|
}
|
|
@@ -998,9 +989,7 @@ export default {
|
|
|
998
989
|
});
|
|
999
990
|
}
|
|
1000
991
|
else {
|
|
1001
|
-
|
|
1002
|
-
errLog('vxe.error.notFunc', ['proxy-config.ajax.save']);
|
|
1003
|
-
}
|
|
992
|
+
errLog('vxe.error.notFunc', ['proxy-config.ajax.save']);
|
|
1004
993
|
}
|
|
1005
994
|
break;
|
|
1006
995
|
}
|
|
@@ -1011,9 +1000,7 @@ export default {
|
|
|
1011
1000
|
gCommandOpts.commandMethod({ code, button, $grid: this, $table: $xetable }, ...args);
|
|
1012
1001
|
}
|
|
1013
1002
|
else {
|
|
1014
|
-
|
|
1015
|
-
errLog('vxe.error.notCommands', [code]);
|
|
1016
|
-
}
|
|
1003
|
+
errLog('vxe.error.notCommands', [code]);
|
|
1017
1004
|
}
|
|
1018
1005
|
}
|
|
1019
1006
|
}
|
|
@@ -1041,10 +1028,8 @@ export default {
|
|
|
1041
1028
|
}
|
|
1042
1029
|
else {
|
|
1043
1030
|
// 检测弹窗模块
|
|
1044
|
-
if (
|
|
1045
|
-
|
|
1046
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
1047
|
-
}
|
|
1031
|
+
if (!VxeUI.modal) {
|
|
1032
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
1048
1033
|
}
|
|
1049
1034
|
VxeUI.modal.message({ id: `msg_${code}`, content: getI18n('vxe.grid.selectOneRecord'), status: 'warning' });
|
|
1050
1035
|
}
|
|
@@ -1094,10 +1079,8 @@ export default {
|
|
|
1094
1079
|
else {
|
|
1095
1080
|
if (isActiveMsg) {
|
|
1096
1081
|
// 检测弹窗模块
|
|
1097
|
-
if (
|
|
1098
|
-
|
|
1099
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
1100
|
-
}
|
|
1082
|
+
if (!VxeUI.modal) {
|
|
1083
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
1101
1084
|
}
|
|
1102
1085
|
VxeUI.modal.message({ id: code, content: getI18n('vxe.grid.selectOneRecord'), status: 'warning' });
|
|
1103
1086
|
}
|