vxe-table 3.9.0-rc.9 → 3.9.0
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/README.md +1 -1
- package/es/grid/src/grid.js +120 -66
- package/es/grid/style.css +0 -1
- package/es/grid/style.min.css +1 -1
- package/es/index.esm.js +22 -3
- package/es/locale/lang/en-US.js +2 -1
- package/es/locale/lang/es-ES.js +2 -1
- package/es/locale/lang/hu-HU.js +2 -1
- package/es/locale/lang/ja-JP.js +2 -1
- package/es/locale/lang/ko-KR.js +2 -1
- package/es/locale/lang/pt-BR.js +2 -1
- package/es/locale/lang/ru-RU.js +2 -1
- package/es/locale/lang/uk-UA.js +2 -1
- package/es/locale/lang/vi-VN.js +2 -1
- package/es/locale/lang/zh-CHT.js +2 -1
- package/es/locale/lang/zh-CN.js +2 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/panel.js +183 -173
- package/es/table/module/edit/mixin.js +33 -24
- package/es/table/module/export/export-panel.js +32 -4
- package/es/table/module/export/import-panel.js +25 -6
- package/es/table/module/export/mixin.js +11 -11
- package/es/table/module/menu/mixin.js +2 -2
- package/es/table/module/validator/mixin.js +4 -4
- package/es/table/render/index.js +17 -11
- package/es/table/src/body.js +1 -0
- package/es/table/src/columnInfo.js +3 -3
- package/es/table/src/methods.js +54 -42
- package/es/table/src/props.js +65 -15
- package/es/table/src/table.js +91 -57
- package/es/table/src/util.js +3 -2
- package/es/table/style.css +37 -48
- package/es/table/style.min.css +1 -1
- package/es/toolbar/src/toolbar.js +21 -7
- package/es/toolbar/style.css +0 -1
- package/es/toolbar/style.min.css +1 -1
- package/es/ui/index.js +5 -3
- package/es/ui/src/log.js +1 -1
- package/es/vxe-grid/style.css +0 -1
- package/es/vxe-grid/style.min.css +1 -1
- package/es/vxe-table/style.css +37 -48
- package/es/vxe-table/style.min.css +1 -1
- package/es/vxe-toolbar/style.css +0 -1
- package/es/vxe-toolbar/style.min.css +1 -1
- package/lib/colgroup/index.js +3 -3
- package/lib/colgroup/index.min.js +1 -1
- package/lib/column/index.js +3 -3
- package/lib/column/index.min.js +1 -1
- package/lib/components.js +9 -11
- package/lib/components.min.js +1 -1
- package/lib/grid/index.js +3 -3
- package/lib/grid/index.min.js +1 -1
- package/lib/grid/src/grid.js +581 -491
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/grid/style/style.css +0 -1
- package/lib/grid/style/style.min.css +1 -1
- package/lib/index.common.js +3 -4
- package/lib/index.umd.js +9174 -17260
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/en-US.js +2 -1
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +2 -1
- package/lib/locale/lang/es-ES.js +2 -1
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +2 -1
- package/lib/locale/lang/hu-HU.js +2 -1
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +2 -1
- package/lib/locale/lang/ja-JP.js +2 -1
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +2 -1
- package/lib/locale/lang/ko-KR.js +2 -1
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +2 -1
- package/lib/locale/lang/pt-BR.js +2 -1
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +2 -1
- package/lib/locale/lang/ru-RU.js +2 -1
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +2 -1
- package/lib/locale/lang/uk-UA.js +2 -1
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +2 -1
- package/lib/locale/lang/vi-VN.js +2 -1
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/zh-CHT.js +2 -1
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +2 -1
- package/lib/locale/lang/zh-CN.js +2 -1
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +2 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/index.js +4 -4
- package/lib/table/index.min.js +1 -1
- package/lib/table/module/custom/mixin.js +53 -44
- package/lib/table/module/custom/mixin.min.js +1 -1
- package/lib/table/module/custom/panel.js +310 -239
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/mixin.js +436 -371
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/module/export/export-panel.js +136 -106
- package/lib/table/module/export/export-panel.min.js +1 -1
- package/lib/table/module/export/import-panel.js +75 -54
- package/lib/table/module/export/import-panel.min.js +1 -1
- package/lib/table/module/export/mixin.js +592 -597
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/module/export/util.js +6 -4
- package/lib/table/module/export/util.min.js +1 -1
- package/lib/table/module/filter/mixin.js +147 -118
- package/lib/table/module/filter/mixin.min.js +1 -1
- package/lib/table/module/filter/panel.js +86 -65
- package/lib/table/module/filter/panel.min.js +1 -1
- package/lib/table/module/keyboard/mixin.js +163 -151
- package/lib/table/module/keyboard/mixin.min.js +1 -1
- package/lib/table/module/menu/mixin.js +125 -114
- package/lib/table/module/menu/mixin.min.js +1 -1
- package/lib/table/module/menu/panel.js +36 -34
- package/lib/table/module/menu/panel.min.js +1 -1
- package/lib/table/module/validator/mixin.js +225 -214
- package/lib/table/module/validator/mixin.min.js +1 -1
- package/lib/table/render/index.js +401 -297
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/body.js +411 -349
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +470 -344
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/column.js +10 -10
- package/lib/table/src/column.min.js +1 -1
- package/lib/table/src/columnInfo.js +46 -55
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/footer.js +157 -132
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/group.js +1 -1
- package/lib/table/src/group.min.js +1 -1
- package/lib/table/src/header.js +170 -153
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/methods.js +2758 -2478
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/props.js +33 -74
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +465 -424
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +143 -131
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +37 -48
- package/lib/table/style/style.min.css +1 -1
- package/lib/toolbar/index.js +3 -3
- package/lib/toolbar/index.min.js +1 -1
- package/lib/toolbar/src/toolbar.js +332 -284
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/toolbar/style/style.css +0 -1
- package/lib/toolbar/style/style.min.css +1 -1
- package/lib/ui/index.js +50 -41
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/comp.js +2 -3
- package/lib/ui/src/comp.min.js +1 -1
- package/lib/ui/src/dom.js +29 -28
- package/lib/ui/src/dom.min.js +1 -1
- package/lib/ui/src/log.js +6 -4
- package/lib/ui/src/log.min.js +1 -1
- package/lib/ui/src/utils.js +7 -7
- package/lib/v-x-e-table/index.js +3 -4
- package/lib/v-x-e-table/index.min.js +1 -1
- package/lib/vxe-colgroup/index.js +3 -4
- package/lib/vxe-colgroup/index.min.js +1 -1
- package/lib/vxe-column/index.js +3 -4
- package/lib/vxe-column/index.min.js +1 -1
- package/lib/vxe-grid/index.js +3 -4
- package/lib/vxe-grid/index.min.js +1 -1
- package/lib/vxe-grid/style/style.css +0 -1
- package/lib/vxe-grid/style/style.min.css +1 -1
- package/lib/vxe-table/index.js +3 -4
- package/lib/vxe-table/index.min.js +1 -1
- package/lib/vxe-table/style/style.css +37 -48
- package/lib/vxe-table/style/style.min.css +1 -1
- package/lib/vxe-toolbar/index.js +3 -4
- package/lib/vxe-toolbar/index.min.js +1 -1
- package/lib/vxe-toolbar/style/style.css +0 -1
- package/lib/vxe-toolbar/style/style.min.css +1 -1
- package/lib/vxe-ui/index.js +3 -4
- package/lib/vxe-ui/index.min.js +1 -1
- package/lib/vxe-v-x-e-table/index.js +3 -4
- package/lib/vxe-v-x-e-table/index.min.js +1 -1
- package/package.json +5 -4
- package/packages/grid/src/grid.ts +127 -65
- package/packages/locale/lang/en-US.ts +2 -1
- package/packages/locale/lang/es-ES.ts +2 -1
- package/packages/locale/lang/hu-HU.ts +2 -1
- package/packages/locale/lang/ja-JP.ts +2 -1
- package/packages/locale/lang/ko-KR.ts +2 -1
- package/packages/locale/lang/pt-BR.ts +2 -1
- package/packages/locale/lang/ru-RU.ts +2 -1
- package/packages/locale/lang/uk-UA.ts +2 -1
- package/packages/locale/lang/vi-VN.ts +2 -1
- package/packages/locale/lang/zh-CHT.ts +2 -1
- package/packages/locale/lang/zh-CN.ts +2 -1
- package/packages/table/module/custom/panel.ts +186 -175
- package/packages/table/module/edit/mixin.ts +32 -23
- package/packages/table/module/export/export-panel.ts +36 -4
- package/packages/table/module/export/import-panel.ts +29 -6
- package/packages/table/module/export/mixin.ts +11 -11
- package/packages/table/module/menu/mixin.ts +2 -2
- package/packages/table/module/validator/mixin.ts +4 -4
- package/packages/table/render/index.ts +20 -11
- package/packages/table/src/body.ts +1 -0
- package/packages/table/src/columnInfo.ts +3 -3
- package/packages/table/src/methods.ts +53 -42
- package/packages/table/src/props.ts +68 -15
- package/packages/table/src/table.ts +99 -54
- package/packages/table/src/util.ts +3 -2
- package/packages/toolbar/src/toolbar.ts +21 -7
- package/packages/ui/index.ts +3 -1
- package/styles/components/table.scss +82 -17
- package/types/all.d.ts +1 -0
- /package/es/{iconfont.1726453742001.ttf → iconfont.1728348263835.ttf} +0 -0
- /package/es/{iconfont.1726453742001.woff → iconfont.1728348263835.woff} +0 -0
- /package/es/{iconfont.1726453742001.woff2 → iconfont.1728348263835.woff2} +0 -0
- /package/lib/{iconfont.1726453742001.ttf → iconfont.1728348263835.ttf} +0 -0
- /package/lib/{iconfont.1726453742001.woff → iconfont.1728348263835.woff} +0 -0
- /package/lib/{iconfont.1726453742001.woff2 → iconfont.1728348263835.woff2} +0 -0
|
@@ -559,7 +559,7 @@ function downloadFile($xetable, opts, content) {
|
|
|
559
559
|
saveLocalFile({ filename, type, content }).then(() => {
|
|
560
560
|
if (opts.message !== false) {
|
|
561
561
|
// 检测弹窗模块
|
|
562
|
-
if (process.env.
|
|
562
|
+
if (process.env.NODE_ENV === 'development') {
|
|
563
563
|
if (!VxeUI.modal) {
|
|
564
564
|
errLog('vxe.error.reqModule', ['Modal']);
|
|
565
565
|
}
|
|
@@ -777,7 +777,7 @@ function handleImport($xetable, content, opts) {
|
|
|
777
777
|
}
|
|
778
778
|
if (opts.message !== false) {
|
|
779
779
|
// 检测弹窗模块
|
|
780
|
-
if (process.env.
|
|
780
|
+
if (process.env.NODE_ENV === 'development') {
|
|
781
781
|
if (!VxeUI.modal) {
|
|
782
782
|
errLog('vxe.error.reqModule', ['Modal']);
|
|
783
783
|
}
|
|
@@ -793,7 +793,7 @@ function handleImport($xetable, content, opts) {
|
|
|
793
793
|
}
|
|
794
794
|
else if (opts.message !== false) {
|
|
795
795
|
// 检测弹窗模块
|
|
796
|
-
if (process.env.
|
|
796
|
+
if (process.env.NODE_ENV === 'development') {
|
|
797
797
|
if (!VxeUI.modal) {
|
|
798
798
|
errLog('vxe.error.reqModule', ['Modal']);
|
|
799
799
|
}
|
|
@@ -812,7 +812,7 @@ function handleFileImport($xetable, file, opts) {
|
|
|
812
812
|
if (!importMethod && !XEUtils.includes(XEUtils.keys(importOpts._typeMaps), type)) {
|
|
813
813
|
if (opts.message !== false) {
|
|
814
814
|
// 检测弹窗模块
|
|
815
|
-
if (process.env.
|
|
815
|
+
if (process.env.NODE_ENV === 'development') {
|
|
816
816
|
if (!VxeUI.modal) {
|
|
817
817
|
errLog('vxe.error.reqModule', ['Modal']);
|
|
818
818
|
}
|
|
@@ -865,7 +865,7 @@ function handleFileImport($xetable, file, opts) {
|
|
|
865
865
|
}
|
|
866
866
|
else {
|
|
867
867
|
// 不支持的浏览器
|
|
868
|
-
if (process.env.
|
|
868
|
+
if (process.env.NODE_ENV === 'development') {
|
|
869
869
|
errLog('vxe.error.notExp');
|
|
870
870
|
}
|
|
871
871
|
_importResolve({ status: true });
|
|
@@ -921,7 +921,7 @@ export function readLocalFile(options = {}) {
|
|
|
921
921
|
else {
|
|
922
922
|
if (options.message !== false) {
|
|
923
923
|
// 检测弹窗模块
|
|
924
|
-
if (process.env.
|
|
924
|
+
if (process.env.NODE_ENV === 'development') {
|
|
925
925
|
if (!VxeUI.modal) {
|
|
926
926
|
errLog('vxe.error.reqModule', ['Modal']);
|
|
927
927
|
}
|
|
@@ -1239,7 +1239,7 @@ export default {
|
|
|
1239
1239
|
}
|
|
1240
1240
|
// 检查类型,如果为自定义导出,则不需要校验类型
|
|
1241
1241
|
if (!opts.exportMethod && !XEUtils.includes(XEUtils.keys(exportOpts._typeMaps), type)) {
|
|
1242
|
-
if (process.env.
|
|
1242
|
+
if (process.env.NODE_ENV === 'development') {
|
|
1243
1243
|
errLog('vxe.error.notType', [type]);
|
|
1244
1244
|
}
|
|
1245
1245
|
const params = { status: false };
|
|
@@ -1262,7 +1262,7 @@ export default {
|
|
|
1262
1262
|
}
|
|
1263
1263
|
}
|
|
1264
1264
|
else if (mode === 'all') {
|
|
1265
|
-
if (process.env.
|
|
1265
|
+
if (process.env.NODE_ENV === 'development') {
|
|
1266
1266
|
if (!$xegrid) {
|
|
1267
1267
|
warnLog('vxe.error.errProp', ['all', 'mode=current,selected']);
|
|
1268
1268
|
}
|
|
@@ -1272,7 +1272,7 @@ export default {
|
|
|
1272
1272
|
const ajaxMethods = ajax.queryAll;
|
|
1273
1273
|
const queryAllSuccessMethods = ajax.queryAllSuccess;
|
|
1274
1274
|
const queryAllErrorMethods = ajax.queryAllError;
|
|
1275
|
-
if (process.env.
|
|
1275
|
+
if (process.env.NODE_ENV === 'development') {
|
|
1276
1276
|
if (!ajaxMethods) {
|
|
1277
1277
|
warnLog('vxe.error.notFunc', ['proxy-config.ajax.queryAll']);
|
|
1278
1278
|
}
|
|
@@ -1443,7 +1443,7 @@ export default {
|
|
|
1443
1443
|
},
|
|
1444
1444
|
_openExport(options) {
|
|
1445
1445
|
const { exportOpts } = this;
|
|
1446
|
-
if (process.env.
|
|
1446
|
+
if (process.env.NODE_ENV === 'development') {
|
|
1447
1447
|
if (!this.exportConfig) {
|
|
1448
1448
|
errLog('vxe.error.reqProp', ['export-config']);
|
|
1449
1449
|
}
|
|
@@ -1452,7 +1452,7 @@ export default {
|
|
|
1452
1452
|
},
|
|
1453
1453
|
_openPrint(options) {
|
|
1454
1454
|
const { printOpts } = this;
|
|
1455
|
-
if (process.env.
|
|
1455
|
+
if (process.env.NODE_ENV === 'development') {
|
|
1456
1456
|
if (!this.printConfig) {
|
|
1457
1457
|
errLog('vxe.error.reqProp', ['print-config']);
|
|
1458
1458
|
}
|
|
@@ -110,7 +110,7 @@ export default {
|
|
|
110
110
|
this.handleOpenMenuEvent(evnt, layout, params);
|
|
111
111
|
// 在 v4 中废弃事件 cell-context-menu、header-cell-context-menu、footer-cell-context-menu
|
|
112
112
|
if (this.$listeners[`${typePrefix}cell-context-menu`]) {
|
|
113
|
-
if (process.env.
|
|
113
|
+
if (process.env.NODE_ENV === 'development') {
|
|
114
114
|
warnLog('vxe.error.delEvent', [`${typePrefix}cell-context-menu`, `${typePrefix}cell-menu`]);
|
|
115
115
|
}
|
|
116
116
|
this.emitEvent(`${typePrefix}cell-context-menu`, params, evnt);
|
|
@@ -267,7 +267,7 @@ export default {
|
|
|
267
267
|
}
|
|
268
268
|
// 在 v4 中废弃事件 context-menu-click
|
|
269
269
|
if (this.$listeners['context-menu-click']) {
|
|
270
|
-
if (process.env.
|
|
270
|
+
if (process.env.NODE_ENV === 'development') {
|
|
271
271
|
warnLog('vxe.error.delEvent', ['context-menu-click', 'menu-click']);
|
|
272
272
|
}
|
|
273
273
|
this.emitEvent('context-menu-click', params, evnt);
|
|
@@ -67,7 +67,7 @@ export default {
|
|
|
67
67
|
* 完整校验,和 validate 的区别就是会给有效数据中的每一行进行校验
|
|
68
68
|
*/
|
|
69
69
|
_fullValidate(rows, cb) {
|
|
70
|
-
if (process.env.
|
|
70
|
+
if (process.env.NODE_ENV === 'development') {
|
|
71
71
|
if (XEUtils.isFunction(cb)) {
|
|
72
72
|
warnLog('vxe.error.notValidators', ['fullValidate(rows, callback)', 'fullValidate(rows)']);
|
|
73
73
|
}
|
|
@@ -78,7 +78,7 @@ export default {
|
|
|
78
78
|
* 快速校验,如果存在记录不通过的记录,则返回不再继续校验(异步校验除外)
|
|
79
79
|
*/
|
|
80
80
|
_validate(rows, cb) {
|
|
81
|
-
if (process.env.
|
|
81
|
+
if (process.env.NODE_ENV === 'development') {
|
|
82
82
|
if (XEUtils.isFunction(cb)) {
|
|
83
83
|
warnLog('vxe.error.notValidators', ['validate(rows, callback)', 'validate(rows)']);
|
|
84
84
|
}
|
|
@@ -314,13 +314,13 @@ export default {
|
|
|
314
314
|
customValid = gvItem.cellValidatorMethod(validParams);
|
|
315
315
|
}
|
|
316
316
|
else {
|
|
317
|
-
if (process.env.
|
|
317
|
+
if (process.env.NODE_ENV === 'development') {
|
|
318
318
|
warnLog('vxe.error.notValidators', [validator]);
|
|
319
319
|
}
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
322
|
else {
|
|
323
|
-
if (process.env.
|
|
323
|
+
if (process.env.NODE_ENV === 'development') {
|
|
324
324
|
errLog('vxe.error.notValidators', [validator]);
|
|
325
325
|
}
|
|
326
326
|
}
|
package/es/table/render/index.js
CHANGED
|
@@ -15,7 +15,7 @@ function getFormatDate(value, props, defaultFormat) {
|
|
|
15
15
|
return XEUtils.toDateString(parseDate(value, props), dateConfig.labelFormat || defaultFormat);
|
|
16
16
|
}
|
|
17
17
|
function getLabelFormatDate(value, props) {
|
|
18
|
-
return getFormatDate(value, props, getI18n(`vxe.input.date.labelFormat.${props.type}`));
|
|
18
|
+
return getFormatDate(value, props, getI18n(`vxe.input.date.labelFormat.${props.type || 'date'}`));
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* 已废弃
|
|
@@ -588,15 +588,7 @@ renderer.mixin({
|
|
|
588
588
|
const { row, column } = params;
|
|
589
589
|
let cellValue = XEUtils.get(row, column.field);
|
|
590
590
|
if (cellValue) {
|
|
591
|
-
|
|
592
|
-
case 'date':
|
|
593
|
-
case 'week':
|
|
594
|
-
case 'month':
|
|
595
|
-
case 'quarter':
|
|
596
|
-
case 'year':
|
|
597
|
-
cellValue = getLabelFormatDate(cellValue, props);
|
|
598
|
-
break;
|
|
599
|
-
}
|
|
591
|
+
cellValue = getLabelFormatDate(cellValue, props);
|
|
600
592
|
}
|
|
601
593
|
return getCellLabelVNs(h, renderOpts, params, cellValue);
|
|
602
594
|
},
|
|
@@ -605,7 +597,8 @@ renderer.mixin({
|
|
|
605
597
|
tableFilterDefaultMethod: handleFilterMethod
|
|
606
598
|
},
|
|
607
599
|
VxeTextarea: {
|
|
608
|
-
tableAutoFocus: '
|
|
600
|
+
tableAutoFocus: 'textarea',
|
|
601
|
+
renderTableEdit: defaultEditRender
|
|
609
602
|
},
|
|
610
603
|
VxeButton: {
|
|
611
604
|
renderTableDefault: buttonCellRender
|
|
@@ -700,6 +693,19 @@ renderer.mixin({
|
|
|
700
693
|
];
|
|
701
694
|
}
|
|
702
695
|
},
|
|
696
|
+
VxeTextEllipsis: {
|
|
697
|
+
renderTableDefault(h, renderOpts, params) {
|
|
698
|
+
const { row, column } = params;
|
|
699
|
+
const { props } = renderOpts;
|
|
700
|
+
const cellValue = getCellValue(row, column);
|
|
701
|
+
return [
|
|
702
|
+
h(getDefaultComponent(renderOpts), {
|
|
703
|
+
props: Object.assign(Object.assign({}, props), { content: cellValue }),
|
|
704
|
+
on: getEditOns(renderOpts, params)
|
|
705
|
+
})
|
|
706
|
+
];
|
|
707
|
+
}
|
|
708
|
+
},
|
|
703
709
|
// 以下已废弃
|
|
704
710
|
$input: {
|
|
705
711
|
tableAutoFocus: '.vxe-input--inner',
|
package/es/table/src/body.js
CHANGED
|
@@ -236,6 +236,7 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
|
|
|
236
236
|
'col--tree-node': treeNode,
|
|
237
237
|
'col--edit': isEdit,
|
|
238
238
|
'col--ellipsis': hasEllipsis,
|
|
239
|
+
'col--height': !!rowOpts.height,
|
|
239
240
|
'fixed--hidden': fixedHiddenColumn,
|
|
240
241
|
'col--dirty': isDirty,
|
|
241
242
|
'col--active': editConfig && isEdit && (actived.row === row && (actived.column === column || editOpts.mode === 'row')),
|
|
@@ -11,7 +11,7 @@ export class ColumnInfo {
|
|
|
11
11
|
const proxyOpts = $xegrid ? $xegrid.proxyOpts : null;
|
|
12
12
|
const formatter = _vm.formatter;
|
|
13
13
|
const visible = XEUtils.isBoolean(_vm.visible) ? _vm.visible : true;
|
|
14
|
-
if (process.env.
|
|
14
|
+
if (process.env.NODE_ENV === 'development') {
|
|
15
15
|
const types = ['seq', 'checkbox', 'radio', 'expand', 'html'];
|
|
16
16
|
if (_vm.type && types.indexOf(_vm.type) === -1) {
|
|
17
17
|
warnLog('vxe.error.errProp', [`type=${_vm.type}`, types.join(', ')]);
|
|
@@ -39,13 +39,13 @@ export class ColumnInfo {
|
|
|
39
39
|
if (formatter) {
|
|
40
40
|
if (XEUtils.isString(formatter)) {
|
|
41
41
|
const gFormatOpts = formats.get(formatter) || XEUtils[formatter];
|
|
42
|
-
if (!gFormatOpts || !XEUtils.isFunction(gFormatOpts.cellFormatMethod)) {
|
|
42
|
+
if (!gFormatOpts || !XEUtils.isFunction(gFormatOpts.tableCellFormatMethod || gFormatOpts.cellFormatMethod)) {
|
|
43
43
|
errLog('vxe.error.notFormats', [formatter]);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
else if (XEUtils.isArray(formatter)) {
|
|
47
47
|
const gFormatOpts = formats.get(formatter[0]) || XEUtils[formatter[0]];
|
|
48
|
-
if (!gFormatOpts || !XEUtils.isFunction(gFormatOpts.cellFormatMethod)) {
|
|
48
|
+
if (!gFormatOpts || !XEUtils.isFunction(gFormatOpts.tableCellFormatMethod || gFormatOpts.cellFormatMethod)) {
|
|
49
49
|
errLog('vxe.error.notFormats', [formatter[0]]);
|
|
50
50
|
}
|
|
51
51
|
}
|
package/es/table/src/methods.js
CHANGED
|
@@ -90,14 +90,15 @@ function computeVirtualX(_vm) {
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
return { toVisibleIndex: Math.max(0, toVisibleIndex), visibleSize: Math.max(
|
|
93
|
+
return { toVisibleIndex: Math.max(0, toVisibleIndex), visibleSize: Math.max(6, visibleSize) };
|
|
94
94
|
}
|
|
95
|
-
return { toVisibleIndex: 0, visibleSize:
|
|
95
|
+
return { toVisibleIndex: 0, visibleSize: 6 };
|
|
96
96
|
}
|
|
97
97
|
function computeVirtualY(_vm) {
|
|
98
|
-
const { $refs,
|
|
98
|
+
const { $refs, computeSize, rowHeightMaps } = _vm;
|
|
99
99
|
const { tableHeader, tableBody } = $refs;
|
|
100
100
|
const tableBodyElem = tableBody ? tableBody.$el : null;
|
|
101
|
+
const vSize = computeSize;
|
|
101
102
|
if (tableBodyElem) {
|
|
102
103
|
const tableHeaderElem = tableHeader ? tableHeader.$el : null;
|
|
103
104
|
let rowHeight = 0;
|
|
@@ -382,7 +383,7 @@ const Methods = {
|
|
|
382
383
|
if (treeConfig) {
|
|
383
384
|
// 树结构自动转换
|
|
384
385
|
if (treeOpts.transform) {
|
|
385
|
-
if (process.env.
|
|
386
|
+
if (process.env.NODE_ENV === 'development') {
|
|
386
387
|
if (!treeOpts.rowField) {
|
|
387
388
|
errLog('vxe.error.reqProp', ['table.tree-config.rowField']);
|
|
388
389
|
}
|
|
@@ -437,7 +438,7 @@ const Methods = {
|
|
|
437
438
|
if (keepSource) {
|
|
438
439
|
this.cacheSourceMap(fullData);
|
|
439
440
|
}
|
|
440
|
-
if (process.env.
|
|
441
|
+
if (process.env.NODE_ENV === 'development') {
|
|
441
442
|
if (sYLoad) {
|
|
442
443
|
if (!(this.height || this.maxHeight)) {
|
|
443
444
|
errLog('vxe.error.reqProp', ['table.height | table.max-height | table.scroll-y={enabled: false}']);
|
|
@@ -571,7 +572,7 @@ const Methods = {
|
|
|
571
572
|
this.tableData = tableData.slice(0);
|
|
572
573
|
}
|
|
573
574
|
else {
|
|
574
|
-
if (process.env.
|
|
575
|
+
if (process.env.NODE_ENV === 'development') {
|
|
575
576
|
warnLog('vxe.error.reqProp', ['keep-source']);
|
|
576
577
|
}
|
|
577
578
|
}
|
|
@@ -621,7 +622,7 @@ const Methods = {
|
|
|
621
622
|
this.clearMergeCells();
|
|
622
623
|
this.clearMergeFooterItems();
|
|
623
624
|
this.handleTableData(true);
|
|
624
|
-
if (process.env.
|
|
625
|
+
if (process.env.NODE_ENV === 'development') {
|
|
625
626
|
if ((this.scrollXLoad || this.scrollYLoad) && this.expandColumn) {
|
|
626
627
|
warnLog('vxe.error.scrollErrProp', ['column.type=expand']);
|
|
627
628
|
}
|
|
@@ -761,7 +762,7 @@ const Methods = {
|
|
|
761
762
|
const { id: colid, field, fixed, type, treeNode } = column;
|
|
762
763
|
const rest = { column, colid, index, items, parent };
|
|
763
764
|
if (field) {
|
|
764
|
-
if (process.env.
|
|
765
|
+
if (process.env.NODE_ENV === 'development') {
|
|
765
766
|
if (fullColumnFieldData[field]) {
|
|
766
767
|
warnLog('vxe.error.colRepet', ['field', field]);
|
|
767
768
|
}
|
|
@@ -775,7 +776,7 @@ const Methods = {
|
|
|
775
776
|
htmlColumn = column;
|
|
776
777
|
}
|
|
777
778
|
if (treeNode) {
|
|
778
|
-
if (process.env.
|
|
779
|
+
if (process.env.NODE_ENV === 'development') {
|
|
779
780
|
if (treeNodeColumn) {
|
|
780
781
|
warnLog('vxe.error.colRepet', ['tree-node', treeNode]);
|
|
781
782
|
}
|
|
@@ -785,7 +786,7 @@ const Methods = {
|
|
|
785
786
|
}
|
|
786
787
|
}
|
|
787
788
|
else if (type === 'expand') {
|
|
788
|
-
if (process.env.
|
|
789
|
+
if (process.env.NODE_ENV === 'development') {
|
|
789
790
|
if (expandColumn) {
|
|
790
791
|
warnLog('vxe.error.colRepet', ['type', type]);
|
|
791
792
|
}
|
|
@@ -794,7 +795,7 @@ const Methods = {
|
|
|
794
795
|
expandColumn = column;
|
|
795
796
|
}
|
|
796
797
|
}
|
|
797
|
-
if (process.env.
|
|
798
|
+
if (process.env.NODE_ENV === 'development') {
|
|
798
799
|
if (type === 'checkbox') {
|
|
799
800
|
if (checkboxColumn) {
|
|
800
801
|
warnLog('vxe.error.colRepet', ['type', type]);
|
|
@@ -812,7 +813,7 @@ const Methods = {
|
|
|
812
813
|
}
|
|
813
814
|
}
|
|
814
815
|
}
|
|
815
|
-
if (process.env.
|
|
816
|
+
if (process.env.NODE_ENV === 'development') {
|
|
816
817
|
if (this.showOverflow && column.showOverflow === false) {
|
|
817
818
|
warnLog('vxe.error.errConflicts', [`table.show-overflow=${this.showOverflow}`, `column.show-overflow=${column.showOverflow}`]);
|
|
818
819
|
}
|
|
@@ -823,7 +824,7 @@ const Methods = {
|
|
|
823
824
|
warnLog('vxe.error.errConflicts', [`table.show-footer-overflow=${this.showFooterOverflow}`, `column.show-footer-overflow=${column.showFooterOverflow}`]);
|
|
824
825
|
}
|
|
825
826
|
}
|
|
826
|
-
if (process.env.
|
|
827
|
+
if (process.env.NODE_ENV === 'development') {
|
|
827
828
|
if (htmlColumn) {
|
|
828
829
|
if (!columnOpts.useKey) {
|
|
829
830
|
errLog('vxe.error.reqProp', ['column-config.useKey', 'column.type=html']);
|
|
@@ -852,7 +853,7 @@ const Methods = {
|
|
|
852
853
|
else {
|
|
853
854
|
tableFullColumn.forEach(handleFunc);
|
|
854
855
|
}
|
|
855
|
-
if (process.env.
|
|
856
|
+
if (process.env.NODE_ENV === 'development') {
|
|
856
857
|
if (expandColumn && this.mouseOpts.area) {
|
|
857
858
|
errLog('vxe.error.errConflicts', ['mouse-config.area', 'column.type=expand']);
|
|
858
859
|
}
|
|
@@ -923,7 +924,7 @@ const Methods = {
|
|
|
923
924
|
},
|
|
924
925
|
// 在 v3 中废弃
|
|
925
926
|
_getRowIndex(row) {
|
|
926
|
-
if (process.env.
|
|
927
|
+
if (process.env.NODE_ENV === 'development') {
|
|
927
928
|
warnLog('vxe.error.delFunc', ['_getRowIndex', 'getVTRowIndex']);
|
|
928
929
|
}
|
|
929
930
|
return this.getVTRowIndex(row);
|
|
@@ -937,7 +938,7 @@ const Methods = {
|
|
|
937
938
|
},
|
|
938
939
|
// 在 v3 中废弃
|
|
939
940
|
$getRowIndex(row) {
|
|
940
|
-
if (process.env.
|
|
941
|
+
if (process.env.NODE_ENV === 'development') {
|
|
941
942
|
warnLog('vxe.error.delFunc', ['$getRowIndex', 'getVMRowIndex']);
|
|
942
943
|
}
|
|
943
944
|
return this.getVMRowIndex(row);
|
|
@@ -958,7 +959,7 @@ const Methods = {
|
|
|
958
959
|
},
|
|
959
960
|
// 在 v3 中废弃
|
|
960
961
|
_getColumnIndex(column) {
|
|
961
|
-
if (process.env.
|
|
962
|
+
if (process.env.NODE_ENV === 'development') {
|
|
962
963
|
warnLog('vxe.error.delFunc', ['_getColumnIndex', 'getVTColumnIndex']);
|
|
963
964
|
}
|
|
964
965
|
return this.getVTColumnIndex(column);
|
|
@@ -972,7 +973,7 @@ const Methods = {
|
|
|
972
973
|
},
|
|
973
974
|
// 在 v3 中废弃
|
|
974
975
|
$getColumnIndex(column) {
|
|
975
|
-
if (process.env.
|
|
976
|
+
if (process.env.NODE_ENV === 'development') {
|
|
976
977
|
warnLog('vxe.error.delFunc', ['$getColumnIndex', 'getVMColumnIndex']);
|
|
977
978
|
}
|
|
978
979
|
return this.getVMColumnIndex(column);
|
|
@@ -1060,7 +1061,7 @@ const Methods = {
|
|
|
1060
1061
|
revertData(rows, field) {
|
|
1061
1062
|
const { keepSource, tableSourceData, treeConfig } = this;
|
|
1062
1063
|
if (!keepSource) {
|
|
1063
|
-
if (process.env.
|
|
1064
|
+
if (process.env.NODE_ENV === 'development') {
|
|
1064
1065
|
warnLog('vxe.error.reqProp', ['keep-source']);
|
|
1065
1066
|
}
|
|
1066
1067
|
return this.$nextTick();
|
|
@@ -1173,11 +1174,13 @@ const Methods = {
|
|
|
1173
1174
|
const formatParams = { cellValue, row, rowIndex: this.getRowIndex(row), column, columnIndex: this.getColumnIndex(column) };
|
|
1174
1175
|
if (XEUtils.isString(formatter)) {
|
|
1175
1176
|
const gFormatOpts = formats.get(formatter);
|
|
1176
|
-
|
|
1177
|
+
const tcFormatMethod = gFormatOpts ? (gFormatOpts.tableCellFormatMethod || gFormatOpts.cellFormatMethod) : null;
|
|
1178
|
+
cellLabel = tcFormatMethod ? tcFormatMethod(formatParams) : '';
|
|
1177
1179
|
}
|
|
1178
1180
|
else if (XEUtils.isArray(formatter)) {
|
|
1179
1181
|
const gFormatOpts = formats.get(formatter[0]);
|
|
1180
|
-
|
|
1182
|
+
const tcFormatMethod = gFormatOpts ? (gFormatOpts.tableCellFormatMethod || gFormatOpts.cellFormatMethod) : null;
|
|
1183
|
+
cellLabel = tcFormatMethod ? tcFormatMethod(formatParams, ...formatter.slice(1)) : '';
|
|
1181
1184
|
}
|
|
1182
1185
|
else {
|
|
1183
1186
|
cellLabel = formatter(formatParams);
|
|
@@ -1387,8 +1390,8 @@ const Methods = {
|
|
|
1387
1390
|
if (valueList.length && !allRemoteFilter) {
|
|
1388
1391
|
const { filterMethod, filterRender, field } = column;
|
|
1389
1392
|
const compConf = isEnableConf(filterRender) ? renderer.get(filterRender.name) : null;
|
|
1390
|
-
const compFilterMethod = compConf
|
|
1391
|
-
const
|
|
1393
|
+
const compFilterMethod = compConf ? (compConf.tableFilterMethod || compConf.filterMethod) : null;
|
|
1394
|
+
const tdFilterMethod = compConf ? (compConf.tableFilterDefaultMethod || compConf.defaultTableFilterMethod || compConf.defaultFilterMethod) : null;
|
|
1392
1395
|
const cellValue = getCellValue(row, column);
|
|
1393
1396
|
if (filterMethod) {
|
|
1394
1397
|
return itemList.some((item) => filterMethod({ value: item.value, option: item, cellValue, row, column, $table: this }));
|
|
@@ -1399,8 +1402,8 @@ const Methods = {
|
|
|
1399
1402
|
else if (allFilterMethod) {
|
|
1400
1403
|
return allFilterMethod({ options: itemList, values: valueList, cellValue, row, column });
|
|
1401
1404
|
}
|
|
1402
|
-
else if (
|
|
1403
|
-
return itemList.some((item) =>
|
|
1405
|
+
else if (tdFilterMethod) {
|
|
1406
|
+
return itemList.some((item) => tdFilterMethod({ value: item.value, option: item, cellValue, row, column, $table: this }));
|
|
1404
1407
|
}
|
|
1405
1408
|
return valueList.indexOf(XEUtils.get(row, field)) > -1;
|
|
1406
1409
|
}
|
|
@@ -2003,7 +2006,7 @@ const Methods = {
|
|
|
2003
2006
|
this.hasFixedColumn = leftList.length > 0 || rightList.length > 0;
|
|
2004
2007
|
Object.assign(columnStore, { leftList, centerList, rightList });
|
|
2005
2008
|
if (scrollXLoad) {
|
|
2006
|
-
if (process.env.
|
|
2009
|
+
if (process.env.NODE_ENV === 'development') {
|
|
2007
2010
|
// if (this.showHeader && !this.showHeaderOverflow) {
|
|
2008
2011
|
// warnLog('vxe.error.reqProp', ['show-header-overflow'])
|
|
2009
2012
|
// }
|
|
@@ -2126,6 +2129,10 @@ const Methods = {
|
|
|
2126
2129
|
const bodyElem = tableBody ? tableBody.$el : null;
|
|
2127
2130
|
const headerElem = tableHeader ? tableHeader.$el : null;
|
|
2128
2131
|
const footerElem = tableFooter ? tableFooter.$el : null;
|
|
2132
|
+
const el = this.$el;
|
|
2133
|
+
if (!el || !el.clientWidth) {
|
|
2134
|
+
return this.$nextTick();
|
|
2135
|
+
}
|
|
2129
2136
|
if (bodyElem) {
|
|
2130
2137
|
this.calcCellWidth();
|
|
2131
2138
|
this.autoCellWidth(headerElem, bodyElem, footerElem);
|
|
@@ -2158,10 +2165,21 @@ const Methods = {
|
|
|
2158
2165
|
paddingSize = Math.floor(XEUtils.toNumber(cellStyle.paddingLeft) + XEUtils.toNumber(cellStyle.paddingRight)) + 2;
|
|
2159
2166
|
}
|
|
2160
2167
|
let colWidth = column.renderAutoWidth - paddingSize;
|
|
2161
|
-
XEUtils.arrayEach(cellElList, (
|
|
2162
|
-
const
|
|
2163
|
-
|
|
2164
|
-
|
|
2168
|
+
XEUtils.arrayEach(cellElList, (itemEl) => {
|
|
2169
|
+
const cellEl = itemEl;
|
|
2170
|
+
const thElem = cellEl.parentNode;
|
|
2171
|
+
let titleWidth = 0;
|
|
2172
|
+
if (`${thElem.tagName}`.toLowerCase() === 'th') {
|
|
2173
|
+
XEUtils.arrayEach(cellEl.children, (btnEl) => {
|
|
2174
|
+
titleWidth += btnEl.offsetWidth + 1;
|
|
2175
|
+
});
|
|
2176
|
+
}
|
|
2177
|
+
else {
|
|
2178
|
+
const labelEl = cellEl.firstChild;
|
|
2179
|
+
titleWidth = labelEl.offsetWidth;
|
|
2180
|
+
}
|
|
2181
|
+
if (titleWidth) {
|
|
2182
|
+
colWidth = Math.max(colWidth, Math.ceil(titleWidth) + 4);
|
|
2165
2183
|
}
|
|
2166
2184
|
});
|
|
2167
2185
|
column.renderAutoWidth = colWidth + paddingSize;
|
|
@@ -2587,7 +2605,7 @@ const Methods = {
|
|
|
2587
2605
|
// 兼容老版本
|
|
2588
2606
|
if (!evntList.length && type === 'event.clearEdit') {
|
|
2589
2607
|
evntList = interceptor.get('event.clearActived');
|
|
2590
|
-
if (process.env.
|
|
2608
|
+
if (process.env.NODE_ENV === 'development') {
|
|
2591
2609
|
if (evntList.length) {
|
|
2592
2610
|
warnLog('vxe.error.delEvent', ['event.clearActived', 'event.clearEdit']);
|
|
2593
2611
|
}
|
|
@@ -3012,12 +3030,6 @@ const Methods = {
|
|
|
3012
3030
|
setCellValue(selected.row, selected.column, null);
|
|
3013
3031
|
this.handleEdit(selected.args, evnt);
|
|
3014
3032
|
}
|
|
3015
|
-
const afterEditMethod = editOpts.afterEditMethod;
|
|
3016
|
-
if (afterEditMethod) {
|
|
3017
|
-
this.$nextTick(() => {
|
|
3018
|
-
afterEditMethod(params);
|
|
3019
|
-
});
|
|
3020
|
-
}
|
|
3021
3033
|
}
|
|
3022
3034
|
}
|
|
3023
3035
|
}
|
|
@@ -4457,7 +4469,7 @@ const Methods = {
|
|
|
4457
4469
|
},
|
|
4458
4470
|
// 在 v3 中废弃
|
|
4459
4471
|
getSortColumn() {
|
|
4460
|
-
if (process.env.
|
|
4472
|
+
if (process.env.NODE_ENV === 'development') {
|
|
4461
4473
|
warnLog('vxe.error.delFunc', ['getSortColumn', 'getSortColumns']);
|
|
4462
4474
|
}
|
|
4463
4475
|
return XEUtils.find(this.tableFullColumn, column => (column.sortable || column.remoteSort) && column.order);
|
|
@@ -4554,7 +4566,7 @@ const Methods = {
|
|
|
4554
4566
|
return this.$nextTick();
|
|
4555
4567
|
},
|
|
4556
4568
|
reloadExpandContent(row) {
|
|
4557
|
-
if (process.env.
|
|
4569
|
+
if (process.env.NODE_ENV === 'development') {
|
|
4558
4570
|
warnLog('vxe.error.delFunc', ['reloadExpandContent', 'reloadRowExpand']);
|
|
4559
4571
|
}
|
|
4560
4572
|
// 即将废弃
|
|
@@ -4721,7 +4733,7 @@ const Methods = {
|
|
|
4721
4733
|
return !!rowExpandedMaps[rowid];
|
|
4722
4734
|
},
|
|
4723
4735
|
isExpandByRow(row) {
|
|
4724
|
-
if (process.env.
|
|
4736
|
+
if (process.env.NODE_ENV === 'development') {
|
|
4725
4737
|
warnLog('vxe.error.delFunc', ['isExpandByRow', 'isRowExpandByRow']);
|
|
4726
4738
|
}
|
|
4727
4739
|
// 即将废弃
|
|
@@ -4839,7 +4851,7 @@ const Methods = {
|
|
|
4839
4851
|
return this.$nextTick();
|
|
4840
4852
|
},
|
|
4841
4853
|
reloadTreeChilds(row) {
|
|
4842
|
-
if (process.env.
|
|
4854
|
+
if (process.env.NODE_ENV === 'development') {
|
|
4843
4855
|
warnLog('vxe.error.delFunc', ['reloadTreeChilds', 'reloadTreeExpand']);
|
|
4844
4856
|
}
|
|
4845
4857
|
// 即将废弃
|
|
@@ -5615,7 +5627,7 @@ const Methods = {
|
|
|
5615
5627
|
const funcs = 'setFilter,openFilter,clearFilter,getCheckedFilters,updateFilterOptionStatus,closeMenu,setActiveCellArea,getActiveCellArea,getCellAreas,clearCellAreas,copyCellArea,cutCellArea,pasteCellArea,getCopyCellArea,getCopyCellAreas,clearCopyCellArea,setCellAreas,openFNR,openFind,openReplace,closeFNR,getSelectedCell,clearSelected,insert,insertAt,insertNextAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,clearEdit,clearActived,getEditRecord,getActiveRecord,isEditByRow,isActiveByRow,setEditRow,setActiveRow,setEditCell,setActiveCell,setSelectCell,clearValidate,fullValidate,validate,openExport,openPrint,getPrintHtml,exportData,openImport,importData,saveFile,readFile,importByFile,print,openCustom,closeCustom'.split(',');
|
|
5616
5628
|
funcs.forEach(name => {
|
|
5617
5629
|
Methods[name] = function (...args) {
|
|
5618
|
-
if (process.env.
|
|
5630
|
+
if (process.env.NODE_ENV === 'development') {
|
|
5619
5631
|
if (!this[`_${name}`]) {
|
|
5620
5632
|
if ('openExport,openPrint,exportData,openImport,importData,saveFile,readFile,importByFile,print'.split(',').includes(name)) {
|
|
5621
5633
|
errLog('vxe.error.reqModule', ['VxeTableExportModule']);
|
package/es/table/src/props.js
CHANGED
|
@@ -8,39 +8,89 @@ export default {
|
|
|
8
8
|
// 表格的高度
|
|
9
9
|
height: [Number, String],
|
|
10
10
|
// 表格的最小高度
|
|
11
|
-
minHeight: {
|
|
11
|
+
minHeight: {
|
|
12
|
+
type: [Number, String],
|
|
13
|
+
default: () => getConfig().table.minHeight
|
|
14
|
+
},
|
|
12
15
|
// 表格的最大高度
|
|
13
16
|
maxHeight: [Number, String],
|
|
14
17
|
// 已废弃,被 column-config.resizable 替换
|
|
15
|
-
resizable: {
|
|
18
|
+
resizable: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: () => getConfig().table.resizable
|
|
21
|
+
},
|
|
16
22
|
// 是否带有斑马纹
|
|
17
|
-
stripe: {
|
|
23
|
+
stripe: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: () => getConfig().table.stripe
|
|
26
|
+
},
|
|
18
27
|
// 是否带有边框
|
|
19
|
-
border: {
|
|
28
|
+
border: {
|
|
29
|
+
type: [Boolean, String],
|
|
30
|
+
default: () => getConfig().table.border
|
|
31
|
+
},
|
|
32
|
+
// 单元格是否有边距
|
|
33
|
+
padding: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: () => getConfig().table.padding
|
|
36
|
+
},
|
|
20
37
|
// 是否圆角边框
|
|
21
|
-
round: {
|
|
38
|
+
round: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: () => getConfig().table.round
|
|
41
|
+
},
|
|
22
42
|
// 表格的尺寸
|
|
23
|
-
size: {
|
|
43
|
+
size: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: () => getConfig().table.size || getConfig().size
|
|
46
|
+
},
|
|
24
47
|
// 列的宽度是否自撑开(可能会被废弃的参数,不要使用)
|
|
25
|
-
fit: {
|
|
48
|
+
fit: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: () => getConfig().table.fit
|
|
51
|
+
},
|
|
26
52
|
// 表格是否加载中
|
|
27
53
|
loading: Boolean,
|
|
28
54
|
// 所有的列对其方式
|
|
29
|
-
align: {
|
|
55
|
+
align: {
|
|
56
|
+
type: String,
|
|
57
|
+
default: () => getConfig().table.align
|
|
58
|
+
},
|
|
30
59
|
// 所有的表头列的对齐方式
|
|
31
|
-
headerAlign: {
|
|
60
|
+
headerAlign: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: () => getConfig().table.headerAlign
|
|
63
|
+
},
|
|
32
64
|
// 所有的表尾列的对齐方式
|
|
33
|
-
footerAlign: {
|
|
65
|
+
footerAlign: {
|
|
66
|
+
type: String,
|
|
67
|
+
default: () => getConfig().table.footerAlign
|
|
68
|
+
},
|
|
34
69
|
// 是否显示表头
|
|
35
|
-
showHeader: {
|
|
70
|
+
showHeader: {
|
|
71
|
+
type: Boolean,
|
|
72
|
+
default: () => getConfig().table.showHeader
|
|
73
|
+
},
|
|
36
74
|
// 已废弃,被 row-config.isCurrent 替换
|
|
37
|
-
highlightCurrentRow: {
|
|
75
|
+
highlightCurrentRow: {
|
|
76
|
+
type: Boolean,
|
|
77
|
+
default: () => getConfig().table.highlightCurrentRow
|
|
78
|
+
},
|
|
38
79
|
// 已废弃,被 row-config.isHover 替换
|
|
39
|
-
highlightHoverRow: {
|
|
80
|
+
highlightHoverRow: {
|
|
81
|
+
type: Boolean,
|
|
82
|
+
default: () => getConfig().table.highlightHoverRow
|
|
83
|
+
},
|
|
40
84
|
// 已废弃,被 column-config.isCurrent 替换
|
|
41
|
-
highlightCurrentColumn: {
|
|
85
|
+
highlightCurrentColumn: {
|
|
86
|
+
type: Boolean,
|
|
87
|
+
default: () => getConfig().table.highlightCurrentColumn
|
|
88
|
+
},
|
|
42
89
|
// 已废弃,被 column-config.isHover 替换
|
|
43
|
-
highlightHoverColumn: {
|
|
90
|
+
highlightHoverColumn: {
|
|
91
|
+
type: Boolean,
|
|
92
|
+
default: () => getConfig().table.highlightHoverColumn
|
|
93
|
+
},
|
|
44
94
|
// 已废弃,直接删除
|
|
45
95
|
highlightCell: Boolean,
|
|
46
96
|
// 是否显示表尾合计
|