vxe-table 3.21.21 → 3.21.22
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/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/locale/lang/ar-EG.js +4 -0
- package/es/locale/lang/de-DE.js +4 -0
- package/es/locale/lang/en-US.js +4 -0
- package/es/locale/lang/es-ES.js +4 -0
- package/es/locale/lang/fr-FR.js +4 -0
- package/es/locale/lang/hu-HU.js +4 -0
- package/es/locale/lang/hy-AM.js +4 -0
- package/es/locale/lang/id-ID.js +4 -0
- package/es/locale/lang/it-IT.js +4 -0
- package/es/locale/lang/ja-JP.js +4 -0
- package/es/locale/lang/ko-KR.js +4 -0
- package/es/locale/lang/ms-MY.js +4 -0
- package/es/locale/lang/nb-NO.js +4 -0
- package/es/locale/lang/pt-BR.js +4 -0
- package/es/locale/lang/ru-RU.js +4 -0
- package/es/locale/lang/th-TH.js +4 -0
- package/es/locale/lang/ug-CN.js +4 -0
- package/es/locale/lang/uk-UA.js +4 -0
- package/es/locale/lang/uz-UZ.js +4 -0
- package/es/locale/lang/vi-VN.js +4 -0
- package/es/locale/lang/zh-CHT.js +4 -0
- package/es/locale/lang/zh-CN.js +4 -0
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/mixin.js +32 -26
- package/es/table/module/custom/panel.js +7 -0
- package/es/table/module/edit/mixin.js +12 -6
- package/es/table/src/methods.js +5 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +59 -36
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +4 -0
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/ar-EG.umd.js +4 -0
- package/lib/locale/lang/de-DE.js +4 -0
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/de-DE.umd.js +4 -0
- package/lib/locale/lang/en-US.js +4 -0
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +4 -0
- package/lib/locale/lang/es-ES.js +4 -0
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +4 -0
- package/lib/locale/lang/fr-FR.js +4 -0
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/fr-FR.umd.js +4 -0
- package/lib/locale/lang/hu-HU.js +4 -0
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +4 -0
- package/lib/locale/lang/hy-AM.js +4 -0
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/hy-AM.umd.js +4 -0
- package/lib/locale/lang/id-ID.js +4 -0
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/id-ID.umd.js +4 -0
- package/lib/locale/lang/it-IT.js +4 -0
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/it-IT.umd.js +4 -0
- package/lib/locale/lang/ja-JP.js +4 -0
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +4 -0
- package/lib/locale/lang/ko-KR.js +4 -0
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +4 -0
- package/lib/locale/lang/ms-MY.js +4 -0
- package/lib/locale/lang/ms-MY.min.js +1 -1
- package/lib/locale/lang/ms-MY.umd.js +4 -0
- package/lib/locale/lang/nb-NO.js +4 -0
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/nb-NO.umd.js +4 -0
- package/lib/locale/lang/pt-BR.js +4 -0
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +4 -0
- package/lib/locale/lang/ru-RU.js +4 -0
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +4 -0
- package/lib/locale/lang/th-TH.js +4 -0
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/th-TH.umd.js +4 -0
- package/lib/locale/lang/ug-CN.js +4 -0
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/ug-CN.umd.js +4 -0
- package/lib/locale/lang/uk-UA.js +4 -0
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +4 -0
- package/lib/locale/lang/uz-UZ.js +4 -0
- package/lib/locale/lang/uz-UZ.min.js +1 -1
- package/lib/locale/lang/uz-UZ.umd.js +4 -0
- package/lib/locale/lang/vi-VN.js +4 -0
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/vi-VN.umd.js +4 -0
- package/lib/locale/lang/zh-CHT.js +4 -0
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +4 -0
- package/lib/locale/lang/zh-CN.js +4 -0
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +4 -0
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/mixin.js +32 -26
- package/lib/table/module/custom/mixin.min.js +1 -1
- package/lib/table/module/custom/panel.js +7 -0
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/mixin.js +12 -6
- package/lib/table/src/methods.js +2 -2
- package/lib/table/src/methods.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/locale/lang/ar-EG.ts +4 -0
- package/packages/locale/lang/de-DE.ts +4 -0
- package/packages/locale/lang/en-US.ts +4 -0
- package/packages/locale/lang/es-ES.ts +4 -0
- package/packages/locale/lang/fr-FR.ts +4 -0
- package/packages/locale/lang/hu-HU.ts +4 -0
- package/packages/locale/lang/hy-AM.ts +4 -0
- package/packages/locale/lang/id-ID.ts +4 -0
- package/packages/locale/lang/it-IT.ts +4 -0
- package/packages/locale/lang/ja-JP.ts +4 -0
- package/packages/locale/lang/ko-KR.ts +4 -0
- package/packages/locale/lang/ms-MY.ts +4 -0
- package/packages/locale/lang/nb-NO.ts +4 -0
- package/packages/locale/lang/pt-BR.ts +4 -0
- package/packages/locale/lang/ru-RU.ts +4 -0
- package/packages/locale/lang/th-TH.ts +4 -0
- package/packages/locale/lang/ug-CN.ts +4 -0
- package/packages/locale/lang/uk-UA.ts +4 -0
- package/packages/locale/lang/uz-UZ.ts +4 -0
- package/packages/locale/lang/vi-VN.ts +4 -0
- package/packages/locale/lang/zh-CHT.ts +4 -0
- package/packages/locale/lang/zh-CN.ts +4 -0
- package/packages/table/module/custom/mixin.ts +31 -25
- package/packages/table/module/custom/panel.ts +7 -0
- package/packages/table/module/edit/mixin.ts +18 -6
- package/packages/table/src/methods.ts +4 -1
- package/packages/table/src/table.ts +6 -6
- package/styles/theme/base.scss +2 -1
- /package/es/{iconfont.1782656027274.ttf → iconfont.1782890276645.ttf} +0 -0
- /package/es/{iconfont.1782656027274.woff → iconfont.1782890276645.woff} +0 -0
- /package/es/{iconfont.1782656027274.woff2 → iconfont.1782890276645.woff2} +0 -0
- /package/lib/{iconfont.1782656027274.ttf → iconfont.1782890276645.ttf} +0 -0
- /package/lib/{iconfont.1782656027274.woff → iconfont.1782890276645.woff} +0 -0
- /package/lib/{iconfont.1782656027274.woff2 → iconfont.1782890276645.woff2} +0 -0
|
@@ -150,42 +150,44 @@ export default {
|
|
|
150
150
|
}
|
|
151
151
|
return $xeTable.openCustom();
|
|
152
152
|
},
|
|
153
|
-
_saveCustom() {
|
|
153
|
+
_saveCustom(isDirectly) {
|
|
154
154
|
const $xeTable = this;
|
|
155
155
|
const reactData = $xeTable;
|
|
156
156
|
const internalData = $xeTable;
|
|
157
157
|
const { customColumnList, aggHandleFields, rowGroupList } = reactData;
|
|
158
158
|
const customOpts = $xeTable.computeCustomOpts;
|
|
159
159
|
const { allowVisible, allowSort, allowFixed, allowResizable, allowGroup, allowValues } = customOpts;
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
else {
|
|
166
|
-
if (allowSort) {
|
|
167
|
-
const sortIndex = index + 1;
|
|
168
|
-
column.renderSortNumber = sortIndex;
|
|
160
|
+
if (!isDirectly) {
|
|
161
|
+
XEUtils.eachTree(customColumnList, (column, index, items, path, parentColumn) => {
|
|
162
|
+
if (parentColumn) {
|
|
163
|
+
// 更新子列信息
|
|
164
|
+
column.fixed = parentColumn.fixed;
|
|
169
165
|
}
|
|
170
|
-
|
|
171
|
-
|
|
166
|
+
else {
|
|
167
|
+
if (allowSort) {
|
|
168
|
+
const sortIndex = index + 1;
|
|
169
|
+
column.renderSortNumber = sortIndex;
|
|
170
|
+
}
|
|
171
|
+
if (allowFixed) {
|
|
172
|
+
column.fixed = column.renderFixed;
|
|
173
|
+
}
|
|
172
174
|
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
175
|
+
if (allowResizable) {
|
|
176
|
+
if (column.renderVisible && (!column.children || !column.children.length)) {
|
|
177
|
+
if (column.renderResizeWidth !== column.renderWidth) {
|
|
178
|
+
column.resizeWidth = column.renderResizeWidth;
|
|
179
|
+
column.renderWidth = column.renderResizeWidth;
|
|
180
|
+
}
|
|
179
181
|
}
|
|
180
182
|
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
}
|
|
188
|
-
}
|
|
183
|
+
if (allowVisible) {
|
|
184
|
+
column.visible = column.renderVisible;
|
|
185
|
+
}
|
|
186
|
+
if (allowGroup && allowValues) {
|
|
187
|
+
column.aggFunc = column.renderAggFn;
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
}
|
|
189
191
|
reactData.isCustomStatus = true;
|
|
190
192
|
if (allowGroup && allowValues && !!$xeTable.handlePivotTableAggData) {
|
|
191
193
|
if (rowGroupList.length !== aggHandleFields.length || rowGroupList.some((conf, i) => conf.field !== aggHandleFields[i])) {
|
|
@@ -365,11 +367,13 @@ export default {
|
|
|
365
367
|
if (customStore.visible) {
|
|
366
368
|
$xeTable.closeCustom();
|
|
367
369
|
emitCustomEvent($xeTable, 'close', evnt);
|
|
370
|
+
$xeTable.dispatchEvent('custom-close', {}, evnt);
|
|
368
371
|
}
|
|
369
372
|
else {
|
|
370
373
|
customStore.btnEl = evnt.target;
|
|
371
374
|
$xeTable.openCustom();
|
|
372
375
|
emitCustomEvent($xeTable, 'open', evnt);
|
|
376
|
+
$xeTable.dispatchEvent('custom-open', {}, evnt);
|
|
373
377
|
}
|
|
374
378
|
},
|
|
375
379
|
customOpenEvent(evnt) {
|
|
@@ -381,6 +385,7 @@ export default {
|
|
|
381
385
|
customStore.btnEl = evnt.target;
|
|
382
386
|
$xeTable.openCustom();
|
|
383
387
|
emitCustomEvent($xeTable, 'open', evnt);
|
|
388
|
+
$xeTable.dispatchEvent('custom-open', {}, evnt);
|
|
384
389
|
}
|
|
385
390
|
},
|
|
386
391
|
customCloseEvent(evnt) {
|
|
@@ -391,6 +396,7 @@ export default {
|
|
|
391
396
|
customStore.activeBtn = false;
|
|
392
397
|
$xeTable.closeCustom();
|
|
393
398
|
emitCustomEvent($xeTable, 'close', evnt);
|
|
399
|
+
$xeTable.dispatchEvent('custom-close', {}, evnt);
|
|
394
400
|
}
|
|
395
401
|
},
|
|
396
402
|
handleUpdateCustomColumn() {
|
|
@@ -159,13 +159,16 @@ export default {
|
|
|
159
159
|
$xeTable.saveCustom();
|
|
160
160
|
$xeTable.closeCustom();
|
|
161
161
|
$xeTable.emitCustomEvent('confirm', $event);
|
|
162
|
+
$xeTable.dispatchEvent('custom-confirm', {}, $event);
|
|
162
163
|
$xeTable.emitCustomEvent('close', $event);
|
|
164
|
+
$xeTable.dispatchEvent('custom-close', {}, $event);
|
|
163
165
|
},
|
|
164
166
|
cancelCloseEvent({ $event }) {
|
|
165
167
|
const $xeTableCustomPanel = this;
|
|
166
168
|
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
167
169
|
$xeTable.closeCustom();
|
|
168
170
|
$xeTable.emitCustomEvent('close', $event);
|
|
171
|
+
$xeTable.dispatchEvent('custom-close', {}, $event);
|
|
169
172
|
},
|
|
170
173
|
cancelCustomEvent({ $event }) {
|
|
171
174
|
const $xeTableCustomPanel = this;
|
|
@@ -173,7 +176,9 @@ export default {
|
|
|
173
176
|
$xeTable.cancelCustom();
|
|
174
177
|
$xeTable.closeCustom();
|
|
175
178
|
$xeTable.emitCustomEvent('cancel', $event);
|
|
179
|
+
$xeTable.dispatchEvent('custom-cancel', {}, $event);
|
|
176
180
|
$xeTable.emitCustomEvent('close', $event);
|
|
181
|
+
$xeTable.dispatchEvent('custom-close', {}, $event);
|
|
177
182
|
},
|
|
178
183
|
handleResetCustomEvent(evnt) {
|
|
179
184
|
const $xeTableCustomPanel = this;
|
|
@@ -181,7 +186,9 @@ export default {
|
|
|
181
186
|
$xeTable.resetCustom(true);
|
|
182
187
|
$xeTable.closeCustom();
|
|
183
188
|
$xeTable.emitCustomEvent('reset', evnt);
|
|
189
|
+
$xeTable.dispatchEvent('custom-reset', {}, evnt);
|
|
184
190
|
$xeTable.emitCustomEvent('close', evnt);
|
|
191
|
+
$xeTable.dispatchEvent('custom-close', {}, evnt);
|
|
185
192
|
},
|
|
186
193
|
resetCustomEvent(evnt) {
|
|
187
194
|
if (VxeUI.modal) {
|
|
@@ -528,7 +528,8 @@ export default {
|
|
|
528
528
|
* @param {*} records
|
|
529
529
|
*/
|
|
530
530
|
_insert(records) {
|
|
531
|
-
|
|
531
|
+
const $xeTable = this;
|
|
532
|
+
return handleInsertRowAt($xeTable, records, null);
|
|
532
533
|
},
|
|
533
534
|
/**
|
|
534
535
|
* 往表格指定行中插入临时数据
|
|
@@ -538,19 +539,24 @@ export default {
|
|
|
538
539
|
* @returns
|
|
539
540
|
*/
|
|
540
541
|
_insertAt(records, targetRowOrRowid) {
|
|
541
|
-
|
|
542
|
+
const $xeTable = this;
|
|
543
|
+
return handleInsertRowAt($xeTable, records, targetRowOrRowid);
|
|
542
544
|
},
|
|
543
545
|
_insertNextAt(records, targetRowOrRowid) {
|
|
544
|
-
|
|
546
|
+
const $xeTable = this;
|
|
547
|
+
return handleInsertRowAt($xeTable, records, targetRowOrRowid, true);
|
|
545
548
|
},
|
|
546
549
|
_insertChild(records, parentRowOrParentId) {
|
|
547
|
-
|
|
550
|
+
const $xeTable = this;
|
|
551
|
+
return handleInsertChildRowAt($xeTable, records, parentRowOrParentId, null);
|
|
548
552
|
},
|
|
549
553
|
_insertChildAt(records, parentRowOrParentId, targetRowOrRowid) {
|
|
550
|
-
|
|
554
|
+
const $xeTable = this;
|
|
555
|
+
return handleInsertChildRowAt($xeTable, records, parentRowOrParentId, targetRowOrRowid);
|
|
551
556
|
},
|
|
552
557
|
_insertChildNextAt(records, parentRowOrParentId, targetRowOrRowid) {
|
|
553
|
-
|
|
558
|
+
const $xeTable = this;
|
|
559
|
+
return handleInsertChildRowAt($xeTable, records, parentRowOrParentId, targetRowOrRowid, true);
|
|
554
560
|
},
|
|
555
561
|
/**
|
|
556
562
|
* 删除指定行数据
|
package/es/table/src/methods.js
CHANGED
|
@@ -2892,12 +2892,16 @@ function handleTooltip($xeTable, evnt, tipOpts, type, tdEl, overflowElem, tipEle
|
|
|
2892
2892
|
// 如果为 null 使用默认逻辑
|
|
2893
2893
|
if (XEUtils.eqNull(customContent)) {
|
|
2894
2894
|
isShow = isOver;
|
|
2895
|
+
content = cellText;
|
|
2895
2896
|
}
|
|
2896
2897
|
else if (customContent !== '' && customContent !== false) {
|
|
2897
2898
|
// 如果为 '' | false 则不显示
|
|
2898
2899
|
isShow = true;
|
|
2900
|
+
content = customContent;
|
|
2901
|
+
}
|
|
2902
|
+
else {
|
|
2903
|
+
content = cellText;
|
|
2899
2904
|
}
|
|
2900
|
-
content = cellText;
|
|
2901
2905
|
}
|
|
2902
2906
|
if (isShow && content) {
|
|
2903
2907
|
const tipContent = formatText(content);
|
package/es/ui/index.js
CHANGED
package/es/ui/src/log.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VxeUI } from '@vxe-ui/core';
|
|
2
2
|
const { log } = VxeUI;
|
|
3
|
-
const tableVersion = `table v${"3.21.
|
|
3
|
+
const tableVersion = `table v${"3.21.22"}`;
|
|
4
4
|
export function createComponentLog(name) {
|
|
5
5
|
const uiVersion = VxeUI.uiVersion ? `ui v${VxeUI.uiVersion}` : '';
|
|
6
6
|
const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
|