vxe-table 3.11.32 → 3.11.34
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 +3 -0
- package/es/locale/lang/de-DE.js +3 -0
- package/es/locale/lang/en-US.js +3 -0
- package/es/locale/lang/es-ES.js +3 -0
- package/es/locale/lang/fr-FR.js +3 -0
- package/es/locale/lang/hu-HU.js +3 -0
- package/es/locale/lang/hy-AM.js +3 -0
- package/es/locale/lang/ja-JP.js +3 -0
- package/es/locale/lang/ko-KR.js +3 -0
- package/es/locale/lang/nb-NO.js +3 -0
- package/es/locale/lang/pt-BR.js +3 -0
- package/es/locale/lang/ru-RU.js +3 -0
- package/es/locale/lang/ug-CN.js +3 -0
- package/es/locale/lang/uk-UA.js +3 -0
- package/es/locale/lang/vi-VN.js +3 -0
- package/es/locale/lang/zh-CHT.js +3 -0
- package/es/locale/lang/zh-CN.js +3 -0
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/panel.js +7 -6
- package/es/table/module/export/mixin.js +23 -10
- package/es/table/render/index.js +18 -7
- package/es/table/src/body.js +10 -4
- package/es/table/src/footer.js +6 -2
- package/es/table/src/header.js +9 -6
- package/es/table/style.css +73 -27
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +5 -3
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +73 -27
- package/es/vxe-table/style.min.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +86 -51
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +3 -0
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/de-DE.js +3 -0
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/en-US.js +3 -0
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +3 -0
- package/lib/locale/lang/es-ES.js +3 -0
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +3 -0
- package/lib/locale/lang/fr-FR.js +3 -0
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/hu-HU.js +3 -0
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +3 -0
- package/lib/locale/lang/hy-AM.js +3 -0
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/ja-JP.js +3 -0
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +3 -0
- package/lib/locale/lang/ko-KR.js +3 -0
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +3 -0
- package/lib/locale/lang/nb-NO.js +3 -0
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/pt-BR.js +3 -0
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +3 -0
- package/lib/locale/lang/ru-RU.js +3 -0
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +3 -0
- package/lib/locale/lang/ug-CN.js +3 -0
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/uk-UA.js +3 -0
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +3 -0
- package/lib/locale/lang/vi-VN.js +3 -0
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/zh-CHT.js +3 -0
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +3 -0
- package/lib/locale/lang/zh-CN.js +3 -0
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +3 -0
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/panel.js +7 -14
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/export/mixin.js +26 -13
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/render/index.js +21 -7
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/body.js +8 -4
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/footer.js +6 -2
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +9 -8
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/style/style.css +73 -27
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +5 -3
- 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/lib/vxe-table/style/style.css +73 -27
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/locale/lang/ar-EG.ts +3 -0
- package/packages/locale/lang/de-DE.ts +3 -0
- package/packages/locale/lang/en-US.ts +3 -0
- package/packages/locale/lang/es-ES.ts +3 -0
- package/packages/locale/lang/fr-FR.ts +3 -0
- package/packages/locale/lang/hu-HU.ts +3 -0
- package/packages/locale/lang/hy-AM.ts +3 -0
- package/packages/locale/lang/ja-JP.ts +3 -0
- package/packages/locale/lang/ko-KR.ts +3 -0
- package/packages/locale/lang/nb-NO.ts +3 -0
- package/packages/locale/lang/pt-BR.ts +3 -0
- package/packages/locale/lang/ru-RU.ts +3 -0
- package/packages/locale/lang/ug-CN.ts +3 -0
- package/packages/locale/lang/uk-UA.ts +3 -0
- package/packages/locale/lang/vi-VN.ts +3 -0
- package/packages/locale/lang/zh-CHT.ts +3 -0
- package/packages/locale/lang/zh-CN.ts +3 -0
- package/packages/table/module/custom/panel.ts +9 -6
- package/packages/table/module/export/mixin.ts +23 -10
- package/packages/table/render/index.ts +18 -6
- package/packages/table/src/body.ts +10 -4
- package/packages/table/src/footer.ts +9 -2
- package/packages/table/src/header.ts +12 -6
- package/packages/ui/index.ts +4 -2
- package/styles/components/table.scss +90 -19
- /package/es/{iconfont.1734331305049.ttf → iconfont.1734489177027.ttf} +0 -0
- /package/es/{iconfont.1734331305049.woff → iconfont.1734489177027.woff} +0 -0
- /package/es/{iconfont.1734331305049.woff2 → iconfont.1734489177027.woff2} +0 -0
- /package/lib/{iconfont.1734331305049.ttf → iconfont.1734489177027.ttf} +0 -0
- /package/lib/{iconfont.1734331305049.woff → iconfont.1734489177027.woff} +0 -0
- /package/lib/{iconfont.1734331305049.woff2 → iconfont.1734489177027.woff2} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -2220,7 +2220,7 @@ function getClass(property, params) {
|
|
|
2220
2220
|
;// CONCATENATED MODULE: ./packages/ui/index.ts
|
|
2221
2221
|
|
|
2222
2222
|
|
|
2223
|
-
const version = "3.11.
|
|
2223
|
+
const version = "3.11.34";
|
|
2224
2224
|
core_.VxeUI.version = version;
|
|
2225
2225
|
core_.VxeUI.tableVersion = version;
|
|
2226
2226
|
core_.VxeUI.setConfig({
|
|
@@ -2262,10 +2262,12 @@ core_.VxeUI.setConfig({
|
|
|
2262
2262
|
strict: true
|
|
2263
2263
|
},
|
|
2264
2264
|
rowDragConfig: {
|
|
2265
|
-
showIcon: true
|
|
2265
|
+
showIcon: true,
|
|
2266
|
+
animation: true
|
|
2266
2267
|
},
|
|
2267
2268
|
columnDragConfig: {
|
|
2268
|
-
showIcon: true
|
|
2269
|
+
showIcon: true,
|
|
2270
|
+
animation: true
|
|
2269
2271
|
},
|
|
2270
2272
|
checkboxConfig: {
|
|
2271
2273
|
// trigger: 'default',
|
|
@@ -2790,7 +2792,7 @@ function isNodeElement(elem) {
|
|
|
2790
2792
|
const {
|
|
2791
2793
|
log: log_log
|
|
2792
2794
|
} = core_.VxeUI;
|
|
2793
|
-
const log_version = `table v${"3.11.
|
|
2795
|
+
const log_version = `table v${"3.11.34"}`;
|
|
2794
2796
|
const warnLog = log_log.create('warn', log_version);
|
|
2795
2797
|
const errLog = log_log.create('error', log_version);
|
|
2796
2798
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -14042,6 +14044,7 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
|
|
|
14042
14044
|
}));
|
|
14043
14045
|
}
|
|
14044
14046
|
}
|
|
14047
|
+
const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto');
|
|
14045
14048
|
return h('td', {
|
|
14046
14049
|
class: ['vxe-body--column', column.id, {
|
|
14047
14050
|
[`col--${cellAlign}`]: cellAlign,
|
|
@@ -14051,6 +14054,7 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
|
|
|
14051
14054
|
'col--tree-node': treeNode,
|
|
14052
14055
|
'col--edit': isEdit,
|
|
14053
14056
|
'col--ellipsis': hasEllipsis,
|
|
14057
|
+
'fixed--width': !isAutoCellWidth,
|
|
14054
14058
|
'fixed--hidden': fixedHiddenColumn,
|
|
14055
14059
|
'is--drag-cell': isColDragCell,
|
|
14056
14060
|
'is--drag-disabled': isDisabledDrag,
|
|
@@ -14068,6 +14072,8 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
|
|
|
14068
14072
|
}, tdVNs);
|
|
14069
14073
|
}
|
|
14070
14074
|
function renderRows(h, _vm, $xeTable, fixedType, tableData, tableColumn) {
|
|
14075
|
+
const columnOpts = $xeTable.computeColumnOpts;
|
|
14076
|
+
const columnDragOpts = $xeTable.computeColumnDragOpts;
|
|
14071
14077
|
const {
|
|
14072
14078
|
stripe,
|
|
14073
14079
|
rowKey,
|
|
@@ -14090,7 +14096,6 @@ function renderRows(h, _vm, $xeTable, fixedType, tableData, tableColumn) {
|
|
|
14090
14096
|
fullAllDataRowIdData,
|
|
14091
14097
|
rowOpts,
|
|
14092
14098
|
pendingRowMaps,
|
|
14093
|
-
columnOpts,
|
|
14094
14099
|
isDragColMove
|
|
14095
14100
|
} = $xeTable;
|
|
14096
14101
|
const {
|
|
@@ -14186,7 +14191,7 @@ function renderRows(h, _vm, $xeTable, fixedType, tableData, tableColumn) {
|
|
|
14186
14191
|
const tdVNs = tableColumn.map((column, $columnIndex) => {
|
|
14187
14192
|
return renderColumn(h, _vm, $xeTable, seq, rowid, fixedType, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, tableColumn, tableData);
|
|
14188
14193
|
});
|
|
14189
|
-
rows.push(columnOpts.drag ? h('transition-group', {
|
|
14194
|
+
rows.push(columnOpts.drag && columnDragOpts.animation ? h('transition-group', {
|
|
14190
14195
|
props: {
|
|
14191
14196
|
tag: 'tr',
|
|
14192
14197
|
name: `vxe-header--col-list${isDragColMove ? '' : '-disabled'}`
|
|
@@ -14330,6 +14335,8 @@ function renderRows(h, _vm, $xeTable, fixedType, tableData, tableColumn) {
|
|
|
14330
14335
|
fixedColumn,
|
|
14331
14336
|
fixedType
|
|
14332
14337
|
} = this;
|
|
14338
|
+
const rowOpts = $xeTable.computeRowOpts;
|
|
14339
|
+
const rowDragOpts = $xeTable.computeRowDragOpts;
|
|
14333
14340
|
let {
|
|
14334
14341
|
$scopedSlots,
|
|
14335
14342
|
tId,
|
|
@@ -14349,7 +14356,6 @@ function renderRows(h, _vm, $xeTable, fixedType, tableData, tableColumn) {
|
|
|
14349
14356
|
mouseConfig,
|
|
14350
14357
|
mouseOpts,
|
|
14351
14358
|
sYOpts,
|
|
14352
|
-
rowOpts,
|
|
14353
14359
|
isDragRowMove
|
|
14354
14360
|
} = $xetable;
|
|
14355
14361
|
// 如果是使用优化模式
|
|
@@ -14434,7 +14440,7 @@ function renderRows(h, _vm, $xeTable, fixedType, tableData, tableColumn) {
|
|
|
14434
14440
|
/**
|
|
14435
14441
|
* 内容
|
|
14436
14442
|
*/
|
|
14437
|
-
rowOpts.drag ? h('transition-group', {
|
|
14443
|
+
rowOpts.drag && rowDragOpts.animation ? h('transition-group', {
|
|
14438
14444
|
props: {
|
|
14439
14445
|
tag: 'tbody',
|
|
14440
14446
|
name: `vxe-body--row-list${isDragRowMove ? '' : '-disabled'}`
|
|
@@ -14787,6 +14793,7 @@ const header_renderRows = (h, _vm, cols, $rowIndex) => {
|
|
|
14787
14793
|
thOns.mouseup = $xeTable.handleHeaderCellDragMouseupEvent;
|
|
14788
14794
|
}
|
|
14789
14795
|
}
|
|
14796
|
+
const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto');
|
|
14790
14797
|
return h('th', {
|
|
14791
14798
|
class: ['vxe-header--column', colid, {
|
|
14792
14799
|
[`col--${headAlign}`]: headAlign,
|
|
@@ -14795,6 +14802,7 @@ const header_renderRows = (h, _vm, cols, $rowIndex) => {
|
|
|
14795
14802
|
'col--fixed': column.fixed,
|
|
14796
14803
|
'col--group': isColGroup,
|
|
14797
14804
|
'col--ellipsis': hasEllipsis,
|
|
14805
|
+
'fixed--width': !isAutoCellWidth,
|
|
14798
14806
|
'fixed--hidden': fixedHiddenColumn,
|
|
14799
14807
|
'is--sortable': column.sortable,
|
|
14800
14808
|
'col--filter': !!column.filters,
|
|
@@ -14830,29 +14838,28 @@ const header_renderRows = (h, _vm, cols, $rowIndex) => {
|
|
|
14830
14838
|
})] : []);
|
|
14831
14839
|
};
|
|
14832
14840
|
function renderHeads(h, _vm, headerGroups) {
|
|
14833
|
-
const
|
|
14834
|
-
|
|
14835
|
-
} = _vm;
|
|
14836
|
-
const tableProps = $xetable;
|
|
14841
|
+
const $xeTable = _vm.$parent;
|
|
14842
|
+
const tableProps = $xeTable;
|
|
14837
14843
|
const {
|
|
14838
14844
|
fixedType
|
|
14839
14845
|
} = _vm;
|
|
14846
|
+
const columnOpts = $xeTable.computeColumnOpts;
|
|
14847
|
+
const columnDragOpts = $xeTable.computeColumnDragOpts;
|
|
14840
14848
|
const {
|
|
14841
14849
|
headerRowClassName,
|
|
14842
14850
|
headerRowStyle
|
|
14843
14851
|
} = tableProps;
|
|
14844
14852
|
const {
|
|
14845
14853
|
isDragColMove
|
|
14846
|
-
} = $
|
|
14847
|
-
const columnOpts = $xetable.columnOpts;
|
|
14854
|
+
} = $xeTable;
|
|
14848
14855
|
return headerGroups.map((cols, $rowIndex) => {
|
|
14849
14856
|
const params = {
|
|
14850
|
-
$table: $
|
|
14857
|
+
$table: $xeTable,
|
|
14851
14858
|
$rowIndex,
|
|
14852
14859
|
fixed: fixedType,
|
|
14853
14860
|
type: cellType
|
|
14854
14861
|
};
|
|
14855
|
-
if (columnOpts.drag) {
|
|
14862
|
+
if (columnOpts.drag && columnDragOpts.animation) {
|
|
14856
14863
|
return h('transition-group', {
|
|
14857
14864
|
props: {
|
|
14858
14865
|
tag: 'tr',
|
|
@@ -15311,11 +15318,13 @@ function footer_renderRows(h, _vm, tableColumn, footerTableData, row, $rowIndex,
|
|
|
15311
15318
|
attrs.colspan = colspan;
|
|
15312
15319
|
}
|
|
15313
15320
|
}
|
|
15321
|
+
const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto');
|
|
15314
15322
|
return h('td', {
|
|
15315
15323
|
class: ['vxe-footer--column', column.id, {
|
|
15316
15324
|
[`col--${footAlign}`]: footAlign,
|
|
15317
15325
|
[`col--${type}`]: type,
|
|
15318
15326
|
'col--last': $columnIndex === tableColumn.length - 1,
|
|
15327
|
+
'fixed--width': !isAutoCellWidth,
|
|
15319
15328
|
'fixed--hidden': fixedHiddenColumn,
|
|
15320
15329
|
'col--ellipsis': hasEllipsis,
|
|
15321
15330
|
'col--current': currentColumn === column
|
|
@@ -15337,6 +15346,9 @@ function footer_renderRows(h, _vm, tableColumn, footerTableData, row, $rowIndex,
|
|
|
15337
15346
|
})] : []);
|
|
15338
15347
|
}
|
|
15339
15348
|
function footer_renderHeads(h, _vm, footerTableData) {
|
|
15349
|
+
const $xeTable = _vm.$parent;
|
|
15350
|
+
const columnOpts = $xeTable.computeColumnOpts;
|
|
15351
|
+
const columnDragOpts = $xeTable.computeColumnDragOpts;
|
|
15340
15352
|
const {
|
|
15341
15353
|
$parent: $xetable,
|
|
15342
15354
|
fixedType,
|
|
@@ -15347,7 +15359,6 @@ function footer_renderHeads(h, _vm, footerTableData) {
|
|
|
15347
15359
|
footerRowStyle,
|
|
15348
15360
|
isDragColMove
|
|
15349
15361
|
} = $xetable;
|
|
15350
|
-
const columnOpts = $xetable.columnOpts;
|
|
15351
15362
|
return footerTableData.map((row, $rowIndex) => {
|
|
15352
15363
|
const _rowIndex = $rowIndex;
|
|
15353
15364
|
const rowParams = {
|
|
@@ -15358,7 +15369,7 @@ function footer_renderHeads(h, _vm, footerTableData) {
|
|
|
15358
15369
|
fixed: fixedType,
|
|
15359
15370
|
type: footer_renderType
|
|
15360
15371
|
};
|
|
15361
|
-
if (columnOpts.drag) {
|
|
15372
|
+
if (columnOpts.drag && columnDragOpts.animation) {
|
|
15362
15373
|
return h('transition-group', {
|
|
15363
15374
|
props: {
|
|
15364
15375
|
tag: 'tr',
|
|
@@ -16543,12 +16554,8 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
16543
16554
|
}
|
|
16544
16555
|
},
|
|
16545
16556
|
render(h) {
|
|
16546
|
-
const
|
|
16547
|
-
|
|
16548
|
-
} = this;
|
|
16549
|
-
const {
|
|
16550
|
-
customOpts
|
|
16551
|
-
} = $xetable;
|
|
16557
|
+
const $xeTable = this.$xeTable;
|
|
16558
|
+
const customOpts = $xeTable.computeCustomOpts;
|
|
16552
16559
|
if (['modal', 'drawer', 'popup'].includes(`${customOpts.mode}`)) {
|
|
16553
16560
|
return renderPopupPanel(h, this);
|
|
16554
16561
|
}
|
|
@@ -16642,12 +16649,11 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
16642
16649
|
}
|
|
16643
16650
|
},
|
|
16644
16651
|
handleOptionCheck(column) {
|
|
16645
|
-
const
|
|
16646
|
-
|
|
16647
|
-
} = this;
|
|
16652
|
+
const $xeTable = this.$xeTable;
|
|
16653
|
+
const reactData = $xeTable;
|
|
16648
16654
|
const {
|
|
16649
16655
|
customColumnList
|
|
16650
|
-
} =
|
|
16656
|
+
} = reactData;
|
|
16651
16657
|
const matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(customColumnList, item => item === column);
|
|
16652
16658
|
if (matchObj && matchObj.parent) {
|
|
16653
16659
|
const {
|
|
@@ -16661,11 +16667,9 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
16661
16667
|
}
|
|
16662
16668
|
},
|
|
16663
16669
|
changeCheckboxOption(column) {
|
|
16664
|
-
const $xeTable = this.$
|
|
16670
|
+
const $xeTable = this.$xeTable;
|
|
16665
16671
|
const reactData = $xeTable;
|
|
16666
|
-
const
|
|
16667
|
-
customOpts
|
|
16668
|
-
} = $xeTable.customOpts;
|
|
16672
|
+
const customOpts = $xeTable.computeCustomOpts;
|
|
16669
16673
|
const isChecked = !column.renderVisible;
|
|
16670
16674
|
if (customOpts.immediate) {
|
|
16671
16675
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([column], item => {
|
|
@@ -19974,7 +19978,7 @@ function getSeq($xetable, cellValue, row, $rowIndex, column, $columnIndex) {
|
|
|
19974
19978
|
return cellValue;
|
|
19975
19979
|
}
|
|
19976
19980
|
function defaultFilterExportColumn(column) {
|
|
19977
|
-
return column.
|
|
19981
|
+
return column.field || ['seq', 'checkbox', 'radio'].indexOf(column.type) > -1;
|
|
19978
19982
|
}
|
|
19979
19983
|
function toTableBorder(border) {
|
|
19980
19984
|
if (border === true) {
|
|
@@ -20182,7 +20186,7 @@ function getHeaderTitle($xetable, opts, column) {
|
|
|
20182
20186
|
column,
|
|
20183
20187
|
options: opts,
|
|
20184
20188
|
$table: $xetable
|
|
20185
|
-
}) : (opts.original ? column.
|
|
20189
|
+
}) : (opts.original ? column.field : column.getTitle()) || '';
|
|
20186
20190
|
}
|
|
20187
20191
|
function getFooterCellValue($xetable, opts, row, column) {
|
|
20188
20192
|
const {
|
|
@@ -20776,7 +20780,7 @@ function parseXML(columns, content) {
|
|
|
20776
20780
|
function checkImportData(columns, fields) {
|
|
20777
20781
|
const tableFields = [];
|
|
20778
20782
|
columns.forEach(column => {
|
|
20779
|
-
const field = column.
|
|
20783
|
+
const field = column.field;
|
|
20780
20784
|
if (field) {
|
|
20781
20785
|
tableFields.push(field);
|
|
20782
20786
|
}
|
|
@@ -21168,13 +21172,13 @@ function handleExportAndPrint($xetable, options, isPrint) {
|
|
|
21168
21172
|
} else {
|
|
21169
21173
|
const colid = item.id || item.colId;
|
|
21170
21174
|
const type = item.type;
|
|
21171
|
-
const field = item.
|
|
21175
|
+
const field = item.field;
|
|
21172
21176
|
if (colid) {
|
|
21173
21177
|
return column.id === colid;
|
|
21174
21178
|
} else if (field && type) {
|
|
21175
|
-
return column.
|
|
21179
|
+
return column.field === field && column.type === type;
|
|
21176
21180
|
} else if (field) {
|
|
21177
|
-
return column.
|
|
21181
|
+
return column.field === field;
|
|
21178
21182
|
} else if (type) {
|
|
21179
21183
|
return column.type === type;
|
|
21180
21184
|
}
|
|
@@ -21311,18 +21315,31 @@ const convertToRows = originColumns => {
|
|
|
21311
21315
|
mode,
|
|
21312
21316
|
columns,
|
|
21313
21317
|
original,
|
|
21314
|
-
beforeExportMethod
|
|
21318
|
+
beforeExportMethod,
|
|
21319
|
+
excludeFields,
|
|
21320
|
+
includeFields
|
|
21315
21321
|
} = opts;
|
|
21316
21322
|
let groups = [];
|
|
21317
21323
|
const customCols = columns && columns.length ? columns : null;
|
|
21318
21324
|
// 如果设置源数据,则默认导出设置了字段的列
|
|
21319
21325
|
let columnFilterMethod = opts.columnFilterMethod;
|
|
21320
21326
|
if (!customCols && !columnFilterMethod) {
|
|
21321
|
-
columnFilterMethod =
|
|
21322
|
-
column
|
|
21323
|
-
}) => column.property : ({
|
|
21327
|
+
columnFilterMethod = ({
|
|
21324
21328
|
column
|
|
21325
|
-
}) =>
|
|
21329
|
+
}) => {
|
|
21330
|
+
if (excludeFields) {
|
|
21331
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().includes(excludeFields, column.field)) {
|
|
21332
|
+
return false;
|
|
21333
|
+
}
|
|
21334
|
+
}
|
|
21335
|
+
if (includeFields) {
|
|
21336
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().includes(includeFields, column.field)) {
|
|
21337
|
+
return true;
|
|
21338
|
+
}
|
|
21339
|
+
return false;
|
|
21340
|
+
}
|
|
21341
|
+
return original ? column.field : defaultFilterExportColumn(column);
|
|
21342
|
+
};
|
|
21326
21343
|
}
|
|
21327
21344
|
if (customCols) {
|
|
21328
21345
|
opts._isCustomColumn = true;
|
|
@@ -21336,11 +21353,11 @@ const convertToRows = originColumns => {
|
|
|
21336
21353
|
} else {
|
|
21337
21354
|
const colid = item.id || item.colId;
|
|
21338
21355
|
const type = item.type;
|
|
21339
|
-
const field = item.
|
|
21356
|
+
const field = item.field;
|
|
21340
21357
|
if (colid) {
|
|
21341
21358
|
targetColumn = this.getColumnById(colid);
|
|
21342
21359
|
} else if (field && type) {
|
|
21343
|
-
targetColumn = tableFullColumn.find(column => column.
|
|
21360
|
+
targetColumn = tableFullColumn.find(column => column.field === field && column.type === type);
|
|
21344
21361
|
} else if (field) {
|
|
21345
21362
|
targetColumn = this.getColumnByField(field);
|
|
21346
21363
|
} else if (type) {
|
|
@@ -27517,7 +27534,8 @@ render_renderer.mixin({
|
|
|
27517
27534
|
row,
|
|
27518
27535
|
column
|
|
27519
27536
|
} = params;
|
|
27520
|
-
const
|
|
27537
|
+
const inputConfig = render_getConfig().input || {};
|
|
27538
|
+
const digits = props.digits || inputConfig.digits || 2;
|
|
27521
27539
|
let cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, column.field);
|
|
27522
27540
|
if (cellValue) {
|
|
27523
27541
|
switch (props.type) {
|
|
@@ -27555,14 +27573,19 @@ render_renderer.mixin({
|
|
|
27555
27573
|
} = props;
|
|
27556
27574
|
let cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, column.field);
|
|
27557
27575
|
if (cellValue) {
|
|
27576
|
+
const numberInputConfig = render_getConfig().numberInput || {};
|
|
27558
27577
|
if (type === 'float') {
|
|
27559
|
-
const digits = props.digits ||
|
|
27578
|
+
const digits = props.digits || numberInputConfig.digits || 1;
|
|
27560
27579
|
cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toFixed(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().floor(cellValue, digits), digits);
|
|
27561
27580
|
} else if (type === 'amount') {
|
|
27562
|
-
const digits = props.digits ||
|
|
27581
|
+
const digits = props.digits || numberInputConfig.digits || 2;
|
|
27563
27582
|
cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().commafy(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellValue), {
|
|
27564
27583
|
digits
|
|
27565
27584
|
});
|
|
27585
|
+
const showCurrency = props.showCurrency;
|
|
27586
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(showCurrency) ? showCurrency : numberInputConfig.showCurrency) {
|
|
27587
|
+
cellValue = `${props.currencySymbol || numberInputConfig.currencySymbol || render_getI18n('vxe.numberInput.currencySymbol') || ''}${cellValue}`;
|
|
27588
|
+
}
|
|
27566
27589
|
}
|
|
27567
27590
|
}
|
|
27568
27591
|
return getCellLabelVNs(h, renderOpts, params, cellValue);
|
|
@@ -27582,11 +27605,12 @@ render_renderer.mixin({
|
|
|
27582
27605
|
// 兼容老模式
|
|
27583
27606
|
const cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(row) ? row[_columnIndex] : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, column.field);
|
|
27584
27607
|
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(cellValue)) {
|
|
27608
|
+
const numberInputConfig = render_getConfig().numberInput || {};
|
|
27585
27609
|
if (type === 'float') {
|
|
27586
|
-
const digits = props.digits ||
|
|
27610
|
+
const digits = props.digits || numberInputConfig.digits || 1;
|
|
27587
27611
|
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toFixed(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().floor(cellValue, digits), digits);
|
|
27588
27612
|
} else if (type === 'amount') {
|
|
27589
|
-
const digits = props.digits ||
|
|
27613
|
+
const digits = props.digits || numberInputConfig.digits || 2;
|
|
27590
27614
|
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().commafy(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellValue), {
|
|
27591
27615
|
digits
|
|
27592
27616
|
});
|
|
@@ -27596,7 +27620,15 @@ render_renderer.mixin({
|
|
|
27596
27620
|
},
|
|
27597
27621
|
renderTableDefault: defaultEditRender,
|
|
27598
27622
|
renderTableFilter: defaultFilterRender,
|
|
27599
|
-
tableFilterDefaultMethod: handleInputFilterMethod
|
|
27623
|
+
tableFilterDefaultMethod: handleInputFilterMethod,
|
|
27624
|
+
tableExportMethod(params) {
|
|
27625
|
+
const {
|
|
27626
|
+
row,
|
|
27627
|
+
column
|
|
27628
|
+
} = params;
|
|
27629
|
+
const cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, column.field);
|
|
27630
|
+
return cellValue;
|
|
27631
|
+
}
|
|
27600
27632
|
},
|
|
27601
27633
|
VxeDatePicker: {
|
|
27602
27634
|
tableAutoFocus: 'input',
|
|
@@ -28221,6 +28253,9 @@ const Toolbar = VxeToolbar;
|
|
|
28221
28253
|
}
|
|
28222
28254
|
}
|
|
28223
28255
|
},
|
|
28256
|
+
numberInput: {
|
|
28257
|
+
currencySymbol: '¥'
|
|
28258
|
+
},
|
|
28224
28259
|
imagePreview: {
|
|
28225
28260
|
popupTitle: '预览',
|
|
28226
28261
|
operBtn: {
|