vxe-table 3.21.1 → 3.21.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/locale/lang/ar-EG.js +2 -2
- package/es/locale/lang/de-DE.js +2 -2
- package/es/locale/lang/en-US.js +2 -2
- package/es/locale/lang/es-ES.js +2 -2
- package/es/locale/lang/fr-FR.js +2 -2
- package/es/locale/lang/hu-HU.js +2 -2
- package/es/locale/lang/hy-AM.js +2 -2
- package/es/locale/lang/id-ID.js +2 -2
- package/es/locale/lang/it-IT.js +2 -2
- package/es/locale/lang/ja-JP.js +2 -2
- package/es/locale/lang/ko-KR.js +2 -2
- package/es/locale/lang/ms-MY.js +2 -2
- package/es/locale/lang/nb-NO.js +2 -2
- package/es/locale/lang/pt-BR.js +2 -2
- package/es/locale/lang/ru-RU.js +2 -2
- package/es/locale/lang/th-TH.js +2 -2
- package/es/locale/lang/ug-CN.js +2 -2
- package/es/locale/lang/uk-UA.js +2 -2
- package/es/locale/lang/uz-UZ.js +2 -2
- package/es/locale/lang/vi-VN.js +2 -2
- package/es/locale/lang/zh-CHT.js +2 -2
- package/es/locale/lang/zh-CN.js +2 -2
- package/es/style.css +1 -1
- package/es/table/module/custom/panel.js +1 -2
- package/es/table/module/menu/mixin.js +3 -2
- package/es/table/module/validator/mixin.js +4 -4
- package/es/table/src/cell.js +1 -1
- package/es/table/src/column.js +2 -0
- package/es/table/src/columnInfo.js +1 -0
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +16 -14
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +2 -2
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/ar-EG.umd.js +2 -2
- package/lib/locale/lang/de-DE.js +2 -2
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/de-DE.umd.js +2 -2
- package/lib/locale/lang/en-US.js +2 -2
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +2 -2
- package/lib/locale/lang/es-ES.js +2 -2
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +2 -2
- package/lib/locale/lang/fr-FR.js +2 -2
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/fr-FR.umd.js +2 -2
- package/lib/locale/lang/hu-HU.js +2 -2
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +2 -2
- package/lib/locale/lang/hy-AM.js +2 -2
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/hy-AM.umd.js +2 -2
- package/lib/locale/lang/id-ID.js +2 -2
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/id-ID.umd.js +2 -2
- package/lib/locale/lang/it-IT.js +2 -2
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/it-IT.umd.js +2 -2
- package/lib/locale/lang/ja-JP.js +2 -2
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +2 -2
- package/lib/locale/lang/ko-KR.js +2 -2
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +2 -2
- package/lib/locale/lang/ms-MY.js +2 -2
- package/lib/locale/lang/ms-MY.min.js +1 -1
- package/lib/locale/lang/ms-MY.umd.js +2 -2
- package/lib/locale/lang/nb-NO.js +2 -2
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/nb-NO.umd.js +2 -2
- package/lib/locale/lang/pt-BR.js +2 -2
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +2 -2
- package/lib/locale/lang/ru-RU.js +2 -2
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +2 -2
- package/lib/locale/lang/th-TH.js +2 -2
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/th-TH.umd.js +2 -2
- package/lib/locale/lang/ug-CN.js +2 -2
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/ug-CN.umd.js +2 -2
- package/lib/locale/lang/uk-UA.js +2 -2
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +2 -2
- package/lib/locale/lang/uz-UZ.js +2 -2
- package/lib/locale/lang/uz-UZ.min.js +1 -1
- package/lib/locale/lang/uz-UZ.umd.js +2 -2
- package/lib/locale/lang/vi-VN.js +2 -2
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/vi-VN.umd.js +2 -2
- package/lib/locale/lang/zh-CHT.js +2 -2
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +2 -2
- package/lib/locale/lang/zh-CN.js +2 -2
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +2 -2
- package/lib/style.css +1 -1
- package/lib/table/module/custom/panel.js +1 -3
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/menu/mixin.js +3 -2
- package/lib/table/module/menu/mixin.min.js +1 -1
- package/lib/table/module/validator/mixin.js +4 -4
- package/lib/table/module/validator/mixin.min.js +1 -1
- package/lib/table/src/cell.js +1 -1
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/column.js +2 -0
- package/lib/table/src/column.min.js +1 -1
- package/lib/table/src/columnInfo.js +1 -0
- package/lib/table/src/columnInfo.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 +2 -2
- package/packages/locale/lang/de-DE.ts +2 -2
- package/packages/locale/lang/en-US.ts +2 -2
- package/packages/locale/lang/es-ES.ts +2 -2
- package/packages/locale/lang/fr-FR.ts +2 -2
- package/packages/locale/lang/hu-HU.ts +2 -2
- package/packages/locale/lang/hy-AM.ts +2 -2
- package/packages/locale/lang/id-ID.ts +2 -2
- package/packages/locale/lang/it-IT.ts +2 -2
- package/packages/locale/lang/ja-JP.ts +2 -2
- package/packages/locale/lang/ko-KR.ts +2 -2
- package/packages/locale/lang/ms-MY.ts +2 -2
- package/packages/locale/lang/nb-NO.ts +2 -2
- package/packages/locale/lang/pt-BR.ts +2 -2
- package/packages/locale/lang/ru-RU.ts +2 -2
- package/packages/locale/lang/th-TH.ts +2 -2
- package/packages/locale/lang/ug-CN.ts +2 -2
- package/packages/locale/lang/uk-UA.ts +2 -2
- package/packages/locale/lang/uz-UZ.ts +2 -2
- package/packages/locale/lang/vi-VN.ts +2 -2
- package/packages/locale/lang/zh-CHT.ts +2 -2
- package/packages/locale/lang/zh-CN.ts +2 -2
- package/packages/table/module/custom/panel.ts +1 -2
- package/packages/table/module/menu/mixin.ts +3 -2
- package/packages/table/module/validator/mixin.ts +4 -4
- package/packages/table/src/cell.ts +1 -1
- package/packages/table/src/column.ts +2 -0
- package/packages/table/src/columnInfo.ts +1 -0
- /package/es/{iconfont.1779447236462.ttf → iconfont.1779778409753.ttf} +0 -0
- /package/es/{iconfont.1779447236462.woff → iconfont.1779778409753.woff} +0 -0
- /package/es/{iconfont.1779447236462.woff2 → iconfont.1779778409753.woff2} +0 -0
- /package/lib/{iconfont.1779447236462.ttf → iconfont.1779778409753.ttf} +0 -0
- /package/lib/{iconfont.1779447236462.woff → iconfont.1779778409753.woff} +0 -0
- /package/lib/{iconfont.1779447236462.woff2 → iconfont.1779778409753.woff2} +0 -0
|
@@ -747,10 +747,9 @@ export default {
|
|
|
747
747
|
const { treeConfig, rowGroupConfig, aggregateConfig } = tableProps;
|
|
748
748
|
const { isCustomStatus, customColumnList, isCustomDragStatus } = tableReactData;
|
|
749
749
|
const customOpts = $xeTable.computeCustomOpts;
|
|
750
|
-
const { immediate } = customOpts;
|
|
751
750
|
const columnDragOpts = $xeTable.computeColumnDragOpts;
|
|
752
751
|
const { popupStyle } = customStore;
|
|
753
|
-
const { checkMethod, visibleMethod, allowVisible, allowSort, allowFixed, allowGroup, allowValues, trigger, placement, showSortDragButton, showSortMoveButton, showSortPutButton } = customOpts;
|
|
752
|
+
const { immediate, checkMethod, visibleMethod, allowVisible, allowSort, allowFixed, allowGroup, allowValues, trigger, placement, showSortDragButton, showSortMoveButton, showSortPutButton } = customOpts;
|
|
754
753
|
const isMaxFixedColumn = $xeTable.computeIsMaxFixedColumn;
|
|
755
754
|
const vSize = $xeTable.computeSize;
|
|
756
755
|
const { isCrossDrag } = columnDragOpts;
|
|
@@ -309,8 +309,9 @@ export default {
|
|
|
309
309
|
if (!menu.loading && !menu.disabled && (menu.code || !menu.children || !menu.children.length)) {
|
|
310
310
|
const gMenuOpts = menus.get(menu.code);
|
|
311
311
|
const params = Object.assign({}, internalData._currMenuParams, { menu, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, $event: evnt });
|
|
312
|
-
|
|
313
|
-
|
|
312
|
+
const tmMethod = gMenuOpts ? (gMenuOpts.tableMenuMethod || gMenuOpts.menuMethod) : null;
|
|
313
|
+
if (tmMethod) {
|
|
314
|
+
tmMethod(params, evnt);
|
|
314
315
|
}
|
|
315
316
|
// 在 v4 中废弃事件 context-menu-click
|
|
316
317
|
if ($xeTable.$listeners['context-menu-click']) {
|
|
@@ -378,9 +378,9 @@ export default {
|
|
|
378
378
|
},
|
|
379
379
|
hasCellRules(type, row, column) {
|
|
380
380
|
const { editRules } = this;
|
|
381
|
-
const {
|
|
382
|
-
if (
|
|
383
|
-
const rules = XEUtils.get(editRules,
|
|
381
|
+
const { field } = column;
|
|
382
|
+
if (field && editRules) {
|
|
383
|
+
const rules = column.rules ? column.rules : XEUtils.get(editRules, field);
|
|
384
384
|
return rules && XEUtils.find(rules, rule => type === 'all' || !rule.trigger || type === rule.trigger);
|
|
385
385
|
}
|
|
386
386
|
return false;
|
|
@@ -408,7 +408,7 @@ export default {
|
|
|
408
408
|
const errorRules = [];
|
|
409
409
|
const syncValidList = [];
|
|
410
410
|
if (field && editRules) {
|
|
411
|
-
const rules = XEUtils.get(editRules, field);
|
|
411
|
+
const rules = column.rules ? column.rules : XEUtils.get(editRules, field);
|
|
412
412
|
if (rules) {
|
|
413
413
|
const cellValue = XEUtils.isUndefined(val) ? XEUtils.get(row, field) : val;
|
|
414
414
|
rules.forEach((rule) => {
|
package/es/table/src/cell.js
CHANGED
|
@@ -1110,7 +1110,7 @@ export const Cell = {
|
|
|
1110
1110
|
const editRenderOpts = isEnableEdit && isEnableConf(editRender) ? editRender : null;
|
|
1111
1111
|
let isRequired = false;
|
|
1112
1112
|
if (editRules) {
|
|
1113
|
-
const columnRules = XEUtils.get(editRules, column.field);
|
|
1113
|
+
const columnRules = column.rules ? column.rules : XEUtils.get(editRules, column.field);
|
|
1114
1114
|
if (columnRules) {
|
|
1115
1115
|
isRequired = columnRules.some((rule) => rule.required);
|
|
1116
1116
|
}
|
package/es/table/src/column.js
CHANGED
|
@@ -108,6 +108,7 @@ export class ColumnInfo {
|
|
|
108
108
|
filterRecoverMethod: _vm.filterRecoverMethod,
|
|
109
109
|
filterRender: filterRender,
|
|
110
110
|
floatingFilters: _vm.floatingFilters,
|
|
111
|
+
rules: _vm.rules,
|
|
111
112
|
rowGroupNode: _vm.rowGroupNode,
|
|
112
113
|
treeNode: _vm.treeNode,
|
|
113
114
|
dragSort: _vm.dragSort,
|
package/es/ui/index.js
CHANGED
package/es/ui/src/log.js
CHANGED
package/lib/index.umd.js
CHANGED
|
@@ -3311,7 +3311,7 @@ function getClass(property, params) {
|
|
|
3311
3311
|
/* unused harmony import specifier */ var VxeUI;
|
|
3312
3312
|
|
|
3313
3313
|
|
|
3314
|
-
const version = "3.21.
|
|
3314
|
+
const version = "3.21.2";
|
|
3315
3315
|
core_.VxeUI.version = version;
|
|
3316
3316
|
core_.VxeUI.tableVersion = version;
|
|
3317
3317
|
core_.VxeUI.setConfig({
|
|
@@ -3842,7 +3842,7 @@ var es_iterator_some = __webpack_require__(3579);
|
|
|
3842
3842
|
const {
|
|
3843
3843
|
log: log_log
|
|
3844
3844
|
} = core_.VxeUI;
|
|
3845
|
-
const log_version = `table v${"3.21.
|
|
3845
|
+
const log_version = `table v${"3.21.2"}`;
|
|
3846
3846
|
const warnLog = log_log.create('warn', log_version);
|
|
3847
3847
|
const errLog = log_log.create('error', log_version);
|
|
3848
3848
|
;// ./packages/table/src/columnInfo.ts
|
|
@@ -3971,6 +3971,7 @@ class ColumnInfo {
|
|
|
3971
3971
|
filterRecoverMethod: _vm.filterRecoverMethod,
|
|
3972
3972
|
filterRender: filterRender,
|
|
3973
3973
|
floatingFilters: _vm.floatingFilters,
|
|
3974
|
+
rules: _vm.rules,
|
|
3974
3975
|
rowGroupNode: _vm.rowGroupNode,
|
|
3975
3976
|
treeNode: _vm.treeNode,
|
|
3976
3977
|
dragSort: _vm.dragSort,
|
|
@@ -6779,7 +6780,7 @@ const Cell = {
|
|
|
6779
6780
|
const editRenderOpts = isEnableEdit && isEnableConf(editRender) ? editRender : null;
|
|
6780
6781
|
let isRequired = false;
|
|
6781
6782
|
if (editRules) {
|
|
6782
|
-
const columnRules = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(editRules, column.field);
|
|
6783
|
+
const columnRules = column.rules ? column.rules : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(editRules, column.field);
|
|
6783
6784
|
if (columnRules) {
|
|
6784
6785
|
isRequired = columnRules.some(rule => rule.required);
|
|
6785
6786
|
}
|
|
@@ -7033,6 +7034,8 @@ const columnProps = {
|
|
|
7033
7034
|
filterRender: Object,
|
|
7034
7035
|
// 是否显示浮动筛选
|
|
7035
7036
|
floatingFilters: Object,
|
|
7037
|
+
// 列的校验规则
|
|
7038
|
+
rules: Array,
|
|
7036
7039
|
// 设置为分组节点
|
|
7037
7040
|
rowGroupNode: Boolean,
|
|
7038
7041
|
// 设置为树节点
|
|
@@ -11405,14 +11408,12 @@ function panel_hideDropTip($xeTableCustomPanel) {
|
|
|
11405
11408
|
isCustomDragStatus
|
|
11406
11409
|
} = tableReactData;
|
|
11407
11410
|
const customOpts = $xeTable.computeCustomOpts;
|
|
11408
|
-
const {
|
|
11409
|
-
immediate
|
|
11410
|
-
} = customOpts;
|
|
11411
11411
|
const columnDragOpts = $xeTable.computeColumnDragOpts;
|
|
11412
11412
|
const {
|
|
11413
11413
|
popupStyle
|
|
11414
11414
|
} = customStore;
|
|
11415
11415
|
const {
|
|
11416
|
+
immediate,
|
|
11416
11417
|
checkMethod,
|
|
11417
11418
|
visibleMethod,
|
|
11418
11419
|
allowVisible,
|
|
@@ -14482,8 +14483,9 @@ const {
|
|
|
14482
14483
|
$gantt: $xeGantt,
|
|
14483
14484
|
$event: evnt
|
|
14484
14485
|
});
|
|
14485
|
-
|
|
14486
|
-
|
|
14486
|
+
const tmMethod = gMenuOpts ? gMenuOpts.tableMenuMethod || gMenuOpts.menuMethod : null;
|
|
14487
|
+
if (tmMethod) {
|
|
14488
|
+
tmMethod(params, evnt);
|
|
14487
14489
|
}
|
|
14488
14490
|
// 在 v4 中废弃事件 context-menu-click
|
|
14489
14491
|
if ($xeTable.$listeners['context-menu-click']) {
|
|
@@ -18839,10 +18841,10 @@ function beginValidate($xeTable, rows, cols, cb, isFull) {
|
|
|
18839
18841
|
editRules
|
|
18840
18842
|
} = this;
|
|
18841
18843
|
const {
|
|
18842
|
-
|
|
18844
|
+
field
|
|
18843
18845
|
} = column;
|
|
18844
|
-
if (
|
|
18845
|
-
const rules = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(editRules,
|
|
18846
|
+
if (field && editRules) {
|
|
18847
|
+
const rules = column.rules ? column.rules : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(editRules, field);
|
|
18846
18848
|
return rules && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().find(rules, rule => type === 'all' || !rule.trigger || type === rule.trigger);
|
|
18847
18849
|
}
|
|
18848
18850
|
return false;
|
|
@@ -18874,7 +18876,7 @@ function beginValidate($xeTable, rows, cols, cb, isFull) {
|
|
|
18874
18876
|
const errorRules = [];
|
|
18875
18877
|
const syncValidList = [];
|
|
18876
18878
|
if (field && editRules) {
|
|
18877
|
-
const rules = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(editRules, field);
|
|
18879
|
+
const rules = column.rules ? column.rules : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(editRules, field);
|
|
18878
18880
|
if (rules) {
|
|
18879
18881
|
const cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(val) ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, field) : val;
|
|
18880
18882
|
rules.forEach(rule => {
|
|
@@ -27064,7 +27066,7 @@ const Toolbar = VxeToolbar;
|
|
|
27064
27066
|
cstmDragTarget: '移动:{0}',
|
|
27065
27067
|
setting: {
|
|
27066
27068
|
colSort: '排序',
|
|
27067
|
-
sortHelpTip: '
|
|
27069
|
+
sortHelpTip: '点击图标开始拖动',
|
|
27068
27070
|
colTitle: '列标题',
|
|
27069
27071
|
colResizable: '列宽(像素)',
|
|
27070
27072
|
colVisible: '是否显示',
|
|
@@ -27550,7 +27552,7 @@ const Toolbar = VxeToolbar;
|
|
|
27550
27552
|
groupPlaceholder: '拖至此处进行分组',
|
|
27551
27553
|
valuesPlaceholder: '拖至此处进行聚合',
|
|
27552
27554
|
dragExistCol: '该列已存在',
|
|
27553
|
-
sortHelpTip: '
|
|
27555
|
+
sortHelpTip: '点击图标开始拖动'
|
|
27554
27556
|
},
|
|
27555
27557
|
aggFuncs: {
|
|
27556
27558
|
sum: '求和',
|