vxe-table 3.13.0-beta.10 → 3.13.0-beta.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/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/edit/mixin.js +8 -1
- package/es/table/render/index.js +0 -10
- package/es/table/src/body.js +2 -4
- package/es/table/src/cell.js +0 -3
- package/es/table/src/footer.js +2 -4
- package/es/table/src/header.js +4 -6
- package/es/table/src/methods.js +19 -44
- package/es/table/src/table.js +3 -13
- package/es/table/style.css +1 -1
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +1 -1
- 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 +39 -94
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/edit/mixin.js +10 -1
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/render/index.js +0 -10
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/body.js +1 -4
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +0 -3
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/footer.js +1 -4
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +3 -6
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/methods.js +19 -47
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +3 -17
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +1 -1
- package/lib/table/style/style.min.css +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/lib/vxe-table/style/style.css +1 -1
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/table/module/edit/mixin.ts +8 -1
- package/packages/table/render/index.ts +0 -10
- package/packages/table/src/body.ts +2 -5
- package/packages/table/src/cell.ts +1 -4
- package/packages/table/src/footer.ts +2 -5
- package/packages/table/src/header.ts +4 -7
- package/packages/table/src/methods.ts +21 -53
- package/packages/table/src/table.ts +3 -14
- package/styles/components/table.scss +1 -1
- package/es/locale/lang/id-ID.js +0 -695
- package/lib/locale/lang/id-ID.js +0 -701
- package/lib/locale/lang/id-ID.min.js +0 -1
- package/packages/locale/lang/id-ID.ts +0 -695
- /package/es/{iconfont.1739790201341.ttf → iconfont.1739506361723.ttf} +0 -0
- /package/es/{iconfont.1739790201341.woff → iconfont.1739506361723.woff} +0 -0
- /package/es/{iconfont.1739790201341.woff2 → iconfont.1739506361723.woff2} +0 -0
- /package/lib/{iconfont.1739790201341.ttf → iconfont.1739506361723.ttf} +0 -0
- /package/lib/{iconfont.1739790201341.woff → iconfont.1739506361723.woff} +0 -0
- /package/lib/{iconfont.1739790201341.woff2 → iconfont.1739506361723.woff2} +0 -0
|
@@ -309,7 +309,7 @@ export default {
|
|
|
309
309
|
const { fixedType, fixedColumn, tableColumn } = props
|
|
310
310
|
const { spanMethod, footerSpanMethod, showFooterOverflow: allColumnFooterOverflow } = tableProps
|
|
311
311
|
const { visibleColumn, fullColumnIdData } = tableInternalData
|
|
312
|
-
const { isGroup,
|
|
312
|
+
const { isGroup, scrollXLoad, scrollYLoad, dragCol } = tableReactData
|
|
313
313
|
|
|
314
314
|
let renderColumnList = tableColumn as VxeTableDefines.ColumnInfo[]
|
|
315
315
|
let isOptimizeMode = false
|
|
@@ -322,11 +322,8 @@ export default {
|
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
324
|
|
|
325
|
-
if (fixedType || !overflowX) {
|
|
326
|
-
renderColumnList = visibleColumn
|
|
327
|
-
}
|
|
328
|
-
|
|
329
325
|
if (fixedType) {
|
|
326
|
+
renderColumnList = visibleColumn
|
|
330
327
|
if (isOptimizeMode) {
|
|
331
328
|
renderColumnList = fixedColumn || []
|
|
332
329
|
}
|
|
@@ -116,8 +116,8 @@ const renderRows = (h: CreateElement, _vm: any, isGroup: boolean, isOptimizeMode
|
|
|
116
116
|
'is--sortable': column.sortable,
|
|
117
117
|
'col--filter': !!filters,
|
|
118
118
|
'is--filter-active': hasFilter,
|
|
119
|
-
'is--drag-active':
|
|
120
|
-
'is--drag-disabled':
|
|
119
|
+
'is--drag-active': !column.fixed && !isDisabledDrag && (isCrossDrag || isPeerDrag || !column.parentId),
|
|
120
|
+
'is--drag-disabled': isDisabledDrag,
|
|
121
121
|
'col--current': currentColumn === column
|
|
122
122
|
}, getClass(headerClassName, cellParams), getClass(headerCellClassName, cellParams)],
|
|
123
123
|
attrs: thAttrs,
|
|
@@ -272,7 +272,7 @@ export default {
|
|
|
272
272
|
const { headerColumn } = this
|
|
273
273
|
|
|
274
274
|
const { mouseConfig, showHeaderOverflow: allColumnHeaderOverflow, spanMethod, footerSpanMethod } = tableProps
|
|
275
|
-
const { isGroup,
|
|
275
|
+
const { isGroup, scrollXLoad, scrollYLoad, dragCol } = tableReactData
|
|
276
276
|
const { visibleColumn, fullColumnIdData } = tableInternalData
|
|
277
277
|
|
|
278
278
|
const mouseOpts = $xeTable.computeMouseOpts
|
|
@@ -292,11 +292,8 @@ export default {
|
|
|
292
292
|
}
|
|
293
293
|
}
|
|
294
294
|
|
|
295
|
-
if (fixedType || !overflowX) {
|
|
296
|
-
renderColumnList = visibleColumn
|
|
297
|
-
}
|
|
298
|
-
|
|
299
295
|
if (fixedType) {
|
|
296
|
+
renderColumnList = visibleColumn
|
|
300
297
|
// 如果是使用优化模式
|
|
301
298
|
if (isOptimizeMode) {
|
|
302
299
|
renderColumnList = fixedColumn || []
|
|
@@ -190,7 +190,6 @@ function cacheColumnMap ($xeTable: VxeTableConstructor) {
|
|
|
190
190
|
const fullColumnIdData: Record<string, VxeTableDefines.ColumnCacheItem> = internalData.fullColumnIdData = {}
|
|
191
191
|
const fullColumnFieldData: Record<string, VxeTableDefines.ColumnCacheItem> = internalData.fullColumnFieldData = {}
|
|
192
192
|
const mouseOpts = $xeTable.computeMouseOpts
|
|
193
|
-
const expandOpts = $xeTable.computeExpandOpts
|
|
194
193
|
const columnOpts = $xeTable.computeColumnOpts
|
|
195
194
|
const columnDragOpts = $xeTable.computeColumnDragOpts
|
|
196
195
|
const { isCrossDrag, isSelfToChildDrag } = columnDragOpts
|
|
@@ -278,8 +277,10 @@ function cacheColumnMap ($xeTable: VxeTableConstructor) {
|
|
|
278
277
|
tableFullColumn.forEach(handleFunc)
|
|
279
278
|
}
|
|
280
279
|
|
|
281
|
-
if (
|
|
282
|
-
|
|
280
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
281
|
+
if (expandColumn && mouseOpts.area) {
|
|
282
|
+
errLog('vxe.error.errConflicts', ['mouse-config.area', 'column.type=expand'])
|
|
283
|
+
}
|
|
283
284
|
}
|
|
284
285
|
|
|
285
286
|
if (process.env.VUE_APP_VXE_ENV === 'developmeznt') {
|
|
@@ -1711,7 +1712,6 @@ function handleColumn ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, c
|
|
|
1711
1712
|
const reactData = $xeTable as unknown as TableReactData
|
|
1712
1713
|
const internalData = $xeTable as unknown as TableInternalData
|
|
1713
1714
|
|
|
1714
|
-
const expandOpts = $xeTable.computeExpandOpts
|
|
1715
1715
|
internalData.collectColumn = collectColumn
|
|
1716
1716
|
const tableFullColumn = getColumnList(collectColumn)
|
|
1717
1717
|
internalData.tableFullColumn = tableFullColumn
|
|
@@ -1721,7 +1721,6 @@ function handleColumn ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, c
|
|
|
1721
1721
|
return Promise.resolve(
|
|
1722
1722
|
restoreCustomStorage($xeTable)
|
|
1723
1723
|
).then(() => {
|
|
1724
|
-
const { scrollXLoad, scrollYLoad, expandColumn } = reactData
|
|
1725
1724
|
cacheColumnMap($xeTable)
|
|
1726
1725
|
parseColumns($xeTable, true).then(() => {
|
|
1727
1726
|
if (reactData.scrollXLoad) {
|
|
@@ -1731,11 +1730,11 @@ function handleColumn ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, c
|
|
|
1731
1730
|
$xeTable.clearMergeCells()
|
|
1732
1731
|
$xeTable.clearMergeFooterItems()
|
|
1733
1732
|
$xeTable.handleTableData(true)
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1733
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
1734
|
+
if ((reactData.scrollXLoad || reactData.scrollYLoad) && reactData.expandColumn) {
|
|
1735
|
+
warnLog('vxe.error.scrollErrProp', ['column.type=expand'])
|
|
1736
|
+
}
|
|
1737
1737
|
}
|
|
1738
|
-
|
|
1739
1738
|
return $xeTable.$nextTick().then(() => {
|
|
1740
1739
|
if ($xeToolbar) {
|
|
1741
1740
|
$xeToolbar.syncUpdate({
|
|
@@ -2021,17 +2020,6 @@ function updateRowExpandStyle ($xeTable: VxeTableConstructor & VxeTablePrivateMe
|
|
|
2021
2020
|
}
|
|
2022
2021
|
}
|
|
2023
2022
|
|
|
2024
|
-
function handleRowExpandScroll ($xeTable: VxeTableConstructor & VxeTablePrivateMethods) {
|
|
2025
|
-
const internalData = $xeTable as unknown as TableInternalData
|
|
2026
|
-
|
|
2027
|
-
const { elemStore } = internalData
|
|
2028
|
-
const rowExpandEl = $xeTable.$refs.refRowExpandElem as HTMLDivElement
|
|
2029
|
-
const bodyScrollElem = getRefElem(elemStore['main-body-scroll'])
|
|
2030
|
-
if (rowExpandEl && bodyScrollElem) {
|
|
2031
|
-
rowExpandEl.scrollTop = bodyScrollElem.scrollTop
|
|
2032
|
-
}
|
|
2033
|
-
}
|
|
2034
|
-
|
|
2035
2023
|
const Methods = {
|
|
2036
2024
|
callSlot (slotFunc: any, params: any, h: any, vNodes: any) {
|
|
2037
2025
|
if (slotFunc) {
|
|
@@ -5619,7 +5607,7 @@ const Methods = {
|
|
|
5619
5607
|
vLen++
|
|
5620
5608
|
})
|
|
5621
5609
|
|
|
5622
|
-
const isSelected =
|
|
5610
|
+
const isSelected = vLen > 0 ? sLen >= vLen : sLen >= rootList.length
|
|
5623
5611
|
const halfSelect = !isSelected && (sLen >= 1 || hLen >= 1)
|
|
5624
5612
|
|
|
5625
5613
|
reactData.isAllSelected = isSelected
|
|
@@ -7424,10 +7412,7 @@ const Methods = {
|
|
|
7424
7412
|
delete rExpandLazyLoadedMaps[rowid]
|
|
7425
7413
|
}
|
|
7426
7414
|
reactData.rowExpandLazyLoadedMaps = rExpandLazyLoadedMaps
|
|
7427
|
-
$xeTable.$nextTick()
|
|
7428
|
-
.then(() => $xeTable.recalculate())
|
|
7429
|
-
.then(() => $xeTable.updateCellAreas())
|
|
7430
|
-
.then(() => resolve())
|
|
7415
|
+
$xeTable.$nextTick().then(() => $xeTable.recalculate()).then(() => resolve())
|
|
7431
7416
|
})
|
|
7432
7417
|
} else {
|
|
7433
7418
|
resolve()
|
|
@@ -7442,14 +7427,12 @@ const Methods = {
|
|
|
7442
7427
|
* @param {Boolean} expanded 是否展开
|
|
7443
7428
|
*/
|
|
7444
7429
|
setRowExpand (rows: any, expanded: any) {
|
|
7445
|
-
const
|
|
7446
|
-
|
|
7447
|
-
const { rowExpandedMaps, fullAllDataRowIdData, rowExpandLazyLoadedMaps, expandOpts, expandColumn } = this
|
|
7430
|
+
const { rowExpandedMaps, fullAllDataRowIdData, rowExpandLazyLoadedMaps, expandOpts, expandColumn: column } = this
|
|
7448
7431
|
let rExpandedMaps = { ...rowExpandedMaps }
|
|
7449
7432
|
const { reserve, lazy, accordion, toggleMethod } = expandOpts
|
|
7450
7433
|
const lazyRests: any[] = []
|
|
7451
|
-
const columnIndex =
|
|
7452
|
-
const $columnIndex =
|
|
7434
|
+
const columnIndex = this.getColumnIndex(column)
|
|
7435
|
+
const $columnIndex = this.getVMColumnIndex(column)
|
|
7453
7436
|
if (rows) {
|
|
7454
7437
|
if (!XEUtils.isArray(rows)) {
|
|
7455
7438
|
rows = [rows]
|
|
@@ -7459,7 +7442,7 @@ const Methods = {
|
|
|
7459
7442
|
rExpandedMaps = {}
|
|
7460
7443
|
rows = rows.slice(rows.length - 1, rows.length)
|
|
7461
7444
|
}
|
|
7462
|
-
const validRows
|
|
7445
|
+
const validRows = toggleMethod ? rows.filter((row: any) => toggleMethod({ expanded, column, columnIndex, $columnIndex, row, rowIndex: this.getRowIndex(row), $rowIndex: this.getVMRowIndex(row) })) : rows
|
|
7463
7446
|
if (expanded) {
|
|
7464
7447
|
validRows.forEach((row: any) => {
|
|
7465
7448
|
const rowid = getRowid(this, row)
|
|
@@ -7474,7 +7457,7 @@ const Methods = {
|
|
|
7474
7457
|
}
|
|
7475
7458
|
})
|
|
7476
7459
|
} else {
|
|
7477
|
-
validRows.forEach((item) => {
|
|
7460
|
+
validRows.forEach((item: any) => {
|
|
7478
7461
|
const rowid = getRowid(this, item)
|
|
7479
7462
|
if (rExpandedMaps[rowid]) {
|
|
7480
7463
|
delete rExpandedMaps[rowid]
|
|
@@ -7482,19 +7465,11 @@ const Methods = {
|
|
|
7482
7465
|
})
|
|
7483
7466
|
}
|
|
7484
7467
|
if (reserve) {
|
|
7485
|
-
validRows.forEach((row) => this.handleRowExpandReserve(row, expanded))
|
|
7468
|
+
validRows.forEach((row: any) => this.handleRowExpandReserve(row, expanded))
|
|
7486
7469
|
}
|
|
7487
7470
|
}
|
|
7488
7471
|
this.rowExpandedMaps = rExpandedMaps
|
|
7489
|
-
return Promise.all(lazyRests)
|
|
7490
|
-
.then(() => $xeTable.recalculate())
|
|
7491
|
-
.then(() => {
|
|
7492
|
-
if (expandColumn) {
|
|
7493
|
-
updateRowExpandStyle($xeTable)
|
|
7494
|
-
handleRowExpandScroll($xeTable)
|
|
7495
|
-
}
|
|
7496
|
-
return $xeTable.updateCellAreas()
|
|
7497
|
-
})
|
|
7472
|
+
return Promise.all(lazyRests).then(this.recalculate)
|
|
7498
7473
|
},
|
|
7499
7474
|
/**
|
|
7500
7475
|
* 判断行是否为展开状态
|
|
@@ -7516,8 +7491,6 @@ const Methods = {
|
|
|
7516
7491
|
* 手动清空展开行状态,数据会恢复成未展开的状态
|
|
7517
7492
|
*/
|
|
7518
7493
|
clearRowExpand () {
|
|
7519
|
-
const $xeTable = this
|
|
7520
|
-
|
|
7521
7494
|
const { expandOpts, tableFullData } = this
|
|
7522
7495
|
const { reserve } = expandOpts
|
|
7523
7496
|
const expList = this.getRowExpandRecords()
|
|
@@ -7529,7 +7502,7 @@ const Methods = {
|
|
|
7529
7502
|
if (expList.length) {
|
|
7530
7503
|
this.recalculate()
|
|
7531
7504
|
}
|
|
7532
|
-
})
|
|
7505
|
+
})
|
|
7533
7506
|
},
|
|
7534
7507
|
clearRowExpandReserve () {
|
|
7535
7508
|
this.rowExpandedReserveRowMap = {}
|
|
@@ -8837,15 +8810,10 @@ const Methods = {
|
|
|
8837
8810
|
}
|
|
8838
8811
|
},
|
|
8839
8812
|
updateCellAreas () {
|
|
8840
|
-
|
|
8841
|
-
|
|
8842
|
-
|
|
8843
|
-
const { mouseConfig } = props
|
|
8844
|
-
const mouseOpts = $xeTable.computeMouseOpts
|
|
8845
|
-
if (mouseConfig && mouseOpts.area && $xeTable.handleRecalculateCellAreaEvent) {
|
|
8846
|
-
return $xeTable.handleRecalculateCellAreaEvent()
|
|
8813
|
+
if (this.mouseConfig && this.mouseOpts.area && this.handleRecalculateCellAreas) {
|
|
8814
|
+
return this.handleRecalculateCellAreas()
|
|
8847
8815
|
}
|
|
8848
|
-
return
|
|
8816
|
+
return this.$nextTick()
|
|
8849
8817
|
},
|
|
8850
8818
|
dispatchEvent (type: ValueOf<VxeTableEmits>, params: Record<string, any>, evnt: Event | null) {
|
|
8851
8819
|
const $xeTable = this
|
|
@@ -1180,16 +1180,11 @@ export default {
|
|
|
1180
1180
|
} as any,
|
|
1181
1181
|
watch: {
|
|
1182
1182
|
data (value: any) {
|
|
1183
|
-
const $xeTable = this
|
|
1184
|
-
const reactData = $xeTable
|
|
1185
|
-
|
|
1186
1183
|
const { initStatus } = this
|
|
1187
1184
|
if (value && value.length >= 50000) {
|
|
1188
1185
|
warnLog('vxe.error.errLargeData', ['loadData(data), reloadData(data)'])
|
|
1189
1186
|
}
|
|
1190
1187
|
this.loadTableData(value || [], true).then(() => {
|
|
1191
|
-
const { scrollXLoad, scrollYLoad, expandColumn } = reactData
|
|
1192
|
-
const expandOpts = $xeTable.computeExpandOpts
|
|
1193
1188
|
this.inited = true
|
|
1194
1189
|
this.initStatus = true
|
|
1195
1190
|
if (!initStatus) {
|
|
@@ -1199,9 +1194,9 @@ export default {
|
|
|
1199
1194
|
// if (checkboxColumn && this.tableFullData.length > 300 && !this.checkboxOpts.checkField) {
|
|
1200
1195
|
// warnLog('vxe.error.checkProp', ['checkbox-config.checkField'])
|
|
1201
1196
|
// }
|
|
1202
|
-
if ((scrollXLoad || scrollYLoad) &&
|
|
1203
|
-
|
|
1204
|
-
}
|
|
1197
|
+
// if ((this.scrollXLoad || this.scrollYLoad) && this.expandColumn) {
|
|
1198
|
+
// warnLog('vxe.error.scrollErrProp', ['column.type=expand'])
|
|
1199
|
+
// }
|
|
1205
1200
|
this.recalculate()
|
|
1206
1201
|
})
|
|
1207
1202
|
},
|
|
@@ -1227,12 +1222,6 @@ export default {
|
|
|
1227
1222
|
showFooter () {
|
|
1228
1223
|
this.reScrollFlag++
|
|
1229
1224
|
},
|
|
1230
|
-
overflowX () {
|
|
1231
|
-
this.reScrollFlag++
|
|
1232
|
-
},
|
|
1233
|
-
overflowY () {
|
|
1234
|
-
this.reScrollFlag++
|
|
1235
|
-
},
|
|
1236
1225
|
reScrollFlag () {
|
|
1237
1226
|
const $xeTable = this
|
|
1238
1227
|
|