vxe-table 3.20.11 → 3.20.13
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.esm.js +1 -2
- package/es/style.css +1 -1
- package/es/table/src/body.js +1 -0
- package/es/table/src/footer.js +1 -0
- package/es/table/src/header.js +6 -2
- package/es/table/src/methods.js +30 -7
- package/es/table/style.css +48 -18
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +48 -18
- package/lib/index.common.js +1 -2
- package/lib/index.umd.js +1631 -211
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/src/body.js +4 -2
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/footer.js +4 -2
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +13 -8
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/methods.js +8 -8
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/style/style.css +48 -18
- 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/v-x-e-table/index.js +1 -2
- package/lib/v-x-e-table/index.min.js +1 -1
- package/lib/vxe-colgroup/index.js +1 -2
- package/lib/vxe-colgroup/index.min.js +1 -1
- package/lib/vxe-column/index.js +1 -2
- package/lib/vxe-column/index.min.js +1 -1
- package/lib/vxe-grid/index.js +1 -2
- package/lib/vxe-grid/index.min.js +1 -1
- package/lib/vxe-table/index.js +1 -2
- package/lib/vxe-table/index.min.js +1 -1
- package/lib/vxe-table/style/style.css +48 -18
- package/lib/vxe-toolbar/index.js +1 -2
- package/lib/vxe-toolbar/index.min.js +1 -1
- package/lib/vxe-ui/index.js +1 -2
- package/lib/vxe-ui/index.min.js +1 -1
- package/lib/vxe-v-x-e-table/index.js +1 -2
- package/lib/vxe-v-x-e-table/index.min.js +1 -1
- package/package.json +3 -2
- package/packages/table/src/body.ts +7 -6
- package/packages/table/src/footer.ts +5 -4
- package/packages/table/src/header.ts +15 -10
- package/packages/table/src/methods.ts +31 -8
- /package/es/{iconfont.1775652058165.ttf → iconfont.1776926445391.ttf} +0 -0
- /package/es/{iconfont.1775652058165.woff → iconfont.1776926445391.woff} +0 -0
- /package/es/{iconfont.1775652058165.woff2 → iconfont.1776926445391.woff2} +0 -0
- /package/lib/{iconfont.1775652058165.ttf → iconfont.1776926445391.ttf} +0 -0
- /package/lib/{iconfont.1775652058165.woff → iconfont.1776926445391.woff} +0 -0
- /package/lib/{iconfont.1775652058165.woff2 → iconfont.1776926445391.woff2} +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PropType, CreateElement } from 'vue'
|
|
2
2
|
import XEUtils from 'xe-utils'
|
|
3
3
|
import { VxeUI } from '../../ui'
|
|
4
|
+
import { defineVxeComponent } from '../../ui/src/comp'
|
|
4
5
|
import { isEnableConf, getClass } from '../../ui/src/utils'
|
|
5
6
|
import { getRowid, createHandleGetRowId, getCellRestHeight } from './util'
|
|
6
7
|
import { updateCellTitle } from '../../ui/src/dom'
|
|
@@ -710,7 +711,7 @@ function renderRows (h: CreateElement, _vm: any, fixedType: 'left' | 'right' | '
|
|
|
710
711
|
return rows
|
|
711
712
|
}
|
|
712
713
|
|
|
713
|
-
export default {
|
|
714
|
+
export default /* define-vxe-component start */ defineVxeComponent({
|
|
714
715
|
name: 'VxeTableBody',
|
|
715
716
|
props: {
|
|
716
717
|
tableData: Array as PropType<any[]>,
|
|
@@ -718,10 +719,10 @@ export default {
|
|
|
718
719
|
fixedColumn: Array as PropType<VxeTableDefines.ColumnInfo[]>,
|
|
719
720
|
fixedType: {
|
|
720
721
|
type: String as PropType<'right' | 'left' | ''>,
|
|
721
|
-
default: ''
|
|
722
|
+
default: '' as 'right' | 'left' | ''
|
|
722
723
|
}
|
|
723
724
|
},
|
|
724
|
-
mounted (
|
|
725
|
+
mounted () {
|
|
725
726
|
const _vm = this
|
|
726
727
|
const props = _vm
|
|
727
728
|
const $xeTable = _vm.$parent as VxeTableConstructor & VxeTablePrivateMethods
|
|
@@ -739,7 +740,7 @@ export default {
|
|
|
739
740
|
elemStore[`${prefix}ySpace`] = _vm.$refs.refBodyYSpace
|
|
740
741
|
elemStore[`${prefix}emptyBlock`] = _vm.$refs.refBodyEmptyBlock
|
|
741
742
|
},
|
|
742
|
-
destroyed (
|
|
743
|
+
destroyed () {
|
|
743
744
|
const props = this
|
|
744
745
|
const $xeTable = this.$parent as VxeTableConstructor & VxeTablePrivateMethods
|
|
745
746
|
const tableInternalData = $xeTable as unknown as TableInternalData
|
|
@@ -756,7 +757,7 @@ export default {
|
|
|
756
757
|
elemStore[`${prefix}ySpace`] = null
|
|
757
758
|
elemStore[`${prefix}emptyBlock`] = null
|
|
758
759
|
},
|
|
759
|
-
render (
|
|
760
|
+
render (h: CreateElement) {
|
|
760
761
|
const props = this
|
|
761
762
|
const $xeTable = this.$parent as VxeTableConstructor & VxeTablePrivateMethods
|
|
762
763
|
const tableProps = $xeTable
|
|
@@ -969,4 +970,4 @@ export default {
|
|
|
969
970
|
])
|
|
970
971
|
])
|
|
971
972
|
}
|
|
972
|
-
}
|
|
973
|
+
}) /* define-vxe-component end */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PropType, CreateElement } from 'vue'
|
|
2
2
|
import XEUtils from 'xe-utils'
|
|
3
3
|
import { VxeUI } from '../../ui'
|
|
4
|
+
import { defineVxeComponent } from '../../ui/src/comp'
|
|
4
5
|
import { getClass } from '../../ui/src/utils'
|
|
5
6
|
import { updateCellTitle } from '../../ui/src/dom'
|
|
6
7
|
import { getCalcHeight } from './util'
|
|
@@ -222,7 +223,7 @@ function renderHeads (h: CreateElement, _vm: any, isOptimizeMode: boolean, rende
|
|
|
222
223
|
})
|
|
223
224
|
}
|
|
224
225
|
|
|
225
|
-
export default {
|
|
226
|
+
export default /* define-vxe-component start */ defineVxeComponent({
|
|
226
227
|
name: 'VxeTableFooter',
|
|
227
228
|
props: {
|
|
228
229
|
footerTableData: {
|
|
@@ -243,7 +244,7 @@ export default {
|
|
|
243
244
|
}
|
|
244
245
|
},
|
|
245
246
|
mounted () {
|
|
246
|
-
const _vm = this
|
|
247
|
+
const _vm = this
|
|
247
248
|
const props = _vm
|
|
248
249
|
const $xeTable = _vm.$parent as VxeTableConstructor & VxeTablePrivateMethods
|
|
249
250
|
const tableInternalData = $xeTable as unknown as TableInternalData
|
|
@@ -259,7 +260,7 @@ export default {
|
|
|
259
260
|
elemStore[`${prefix}xSpace`] = _vm.$refs.refFooterXSpace
|
|
260
261
|
},
|
|
261
262
|
destroyed () {
|
|
262
|
-
const _vm = this
|
|
263
|
+
const _vm = this
|
|
263
264
|
const props = _vm
|
|
264
265
|
const $xeTable = _vm.$parent as VxeTableConstructor & VxeTablePrivateMethods
|
|
265
266
|
const tableInternalData = $xeTable as unknown as TableInternalData
|
|
@@ -385,4 +386,4 @@ export default {
|
|
|
385
386
|
])
|
|
386
387
|
])
|
|
387
388
|
}
|
|
388
|
-
}
|
|
389
|
+
}) /* define-vxe-component end */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PropType, CreateElement } from 'vue'
|
|
2
2
|
import XEUtils from 'xe-utils'
|
|
3
3
|
import { VxeUI } from '../../ui'
|
|
4
|
+
import { defineVxeComponent } from '../../ui/src/comp'
|
|
4
5
|
import { isEnableConf, getClass } from '../../ui/src/utils'
|
|
5
6
|
import { getCalcHeight, convertHeaderColumnToRows, convertHeaderToGridRows } from './util'
|
|
6
7
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
@@ -362,7 +363,7 @@ function renderHeads (h: CreateElement, _vm: any, isGroup: boolean, isOptimizeMo
|
|
|
362
363
|
return rowVNs
|
|
363
364
|
}
|
|
364
365
|
|
|
365
|
-
export default {
|
|
366
|
+
export default /* define-vxe-component start */ defineVxeComponent({
|
|
366
367
|
name: 'VxeTableHeader',
|
|
367
368
|
props: {
|
|
368
369
|
tableData: Array as PropType<any[]>,
|
|
@@ -375,8 +376,10 @@ export default {
|
|
|
375
376
|
}
|
|
376
377
|
},
|
|
377
378
|
data () {
|
|
379
|
+
const headerColumn: VxeTableDefines.ColumnInfo[][] = []
|
|
380
|
+
|
|
378
381
|
return {
|
|
379
|
-
headerColumn
|
|
382
|
+
headerColumn
|
|
380
383
|
}
|
|
381
384
|
},
|
|
382
385
|
watch: {
|
|
@@ -391,7 +394,7 @@ export default {
|
|
|
391
394
|
_vm.uploadColumn()
|
|
392
395
|
},
|
|
393
396
|
mounted () {
|
|
394
|
-
const _vm = this
|
|
397
|
+
const _vm = this
|
|
395
398
|
const props = _vm
|
|
396
399
|
const $xeTable = _vm.$parent as VxeTableConstructor & VxeTablePrivateMethods
|
|
397
400
|
const internalData = $xeTable as unknown as TableInternalData
|
|
@@ -408,7 +411,7 @@ export default {
|
|
|
408
411
|
elemStore[`${prefix}repair`] = _vm.$refs.refHeaderBorderRepair
|
|
409
412
|
},
|
|
410
413
|
destroyed () {
|
|
411
|
-
const _vm = this
|
|
414
|
+
const _vm = this
|
|
412
415
|
const props = _vm
|
|
413
416
|
const $xeTable = _vm.$parent as VxeTableConstructor & VxeTablePrivateMethods
|
|
414
417
|
const internalData = $xeTable as unknown as TableInternalData
|
|
@@ -425,7 +428,7 @@ export default {
|
|
|
425
428
|
elemStore[`${prefix}repair`] = null
|
|
426
429
|
},
|
|
427
430
|
render (h: CreateElement) {
|
|
428
|
-
const _vm = this
|
|
431
|
+
const _vm = this
|
|
429
432
|
const props = _vm
|
|
430
433
|
const $xeTable = _vm.$parent as VxeTableConstructor & VxeTablePrivateMethods
|
|
431
434
|
const tableProps = $xeTable
|
|
@@ -434,7 +437,7 @@ export default {
|
|
|
434
437
|
|
|
435
438
|
const { xID } = $xeTable
|
|
436
439
|
const { fixedType, fixedColumn, tableColumn } = props
|
|
437
|
-
const { headerColumn } = _vm
|
|
440
|
+
const { headerColumn } = _vm as any
|
|
438
441
|
|
|
439
442
|
const { mouseConfig } = tableProps
|
|
440
443
|
const { isGroup, isColLoading, overflowX, scrollXLoad, dragCol } = tableReactData
|
|
@@ -577,7 +580,7 @@ export default {
|
|
|
577
580
|
},
|
|
578
581
|
methods: {
|
|
579
582
|
uploadColumn () {
|
|
580
|
-
const _vm = this
|
|
583
|
+
const _vm = this
|
|
581
584
|
const $xeTable = _vm.$parent as VxeTableConstructor & VxeTablePrivateMethods
|
|
582
585
|
const tableProps = $xeTable
|
|
583
586
|
const tableReactData = $xeTable as unknown as TableReactData
|
|
@@ -595,8 +598,10 @@ export default {
|
|
|
595
598
|
visibleColgroups = convertHeaderToGridRows(spanColumns)
|
|
596
599
|
spanColumns = visibleColgroups
|
|
597
600
|
}
|
|
598
|
-
_vm.headerColumn = spanColumns
|
|
599
|
-
$xeTable
|
|
601
|
+
(_vm as any).headerColumn = spanColumns
|
|
602
|
+
$xeTable.$nextTick(() => {
|
|
603
|
+
$xeTable.dispatchEvent('columns-change', { visibleColgroups, collectColumn, visibleColumn }, null)
|
|
604
|
+
})
|
|
600
605
|
}
|
|
601
606
|
}
|
|
602
|
-
}
|
|
607
|
+
}) /* define-vxe-component end */
|
|
@@ -1394,7 +1394,7 @@ function handleDefaultRadioChecked ($xeTable: VxeTableConstructor & VxeTablePriv
|
|
|
1394
1394
|
const { checkRowKey: rowid, reserve } = radioOpts
|
|
1395
1395
|
if (rowid) {
|
|
1396
1396
|
if (fullDataRowIdData[rowid]) {
|
|
1397
|
-
handleCheckedRadioRow(fullDataRowIdData[rowid].row, true)
|
|
1397
|
+
handleCheckedRadioRow($xeTable, fullDataRowIdData[rowid].row, true)
|
|
1398
1398
|
}
|
|
1399
1399
|
if (reserve) {
|
|
1400
1400
|
const rowkey = getRowkey($xeTable)
|
|
@@ -1454,7 +1454,7 @@ function handleCheckboxReserveRow ($xeTable: VxeTableConstructor & VxeTablePriva
|
|
|
1454
1454
|
}
|
|
1455
1455
|
}
|
|
1456
1456
|
|
|
1457
|
-
function handleCheckedRadioRow ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, row: any, isForce
|
|
1457
|
+
function handleCheckedRadioRow ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, row: any, isForce: boolean) {
|
|
1458
1458
|
const reactData = $xeTable as unknown as TableReactData
|
|
1459
1459
|
|
|
1460
1460
|
const radioOpts = $xeTable.computeRadioOpts
|
|
@@ -2556,10 +2556,13 @@ const calcCellHeight = ($xeTable: VxeTableConstructor) => {
|
|
|
2556
2556
|
const { treeConfig } = props
|
|
2557
2557
|
const { tableData, isAllOverflow, scrollYLoad, scrollXLoad } = reactData
|
|
2558
2558
|
const { fullAllDataRowIdData } = internalData
|
|
2559
|
+
const el = $xeTable.$refs.refElem as HTMLDivElement
|
|
2560
|
+
if (!el || !el.clientWidth) {
|
|
2561
|
+
return
|
|
2562
|
+
}
|
|
2559
2563
|
const treeOpts = $xeTable.computeTreeOpts
|
|
2560
2564
|
const defaultRowHeight = $xeTable.computeDefaultRowHeight
|
|
2561
|
-
|
|
2562
|
-
if (el && !isAllOverflow && (scrollYLoad || scrollXLoad || (treeConfig && treeOpts.showLine))) {
|
|
2565
|
+
if (!isAllOverflow && (scrollYLoad || scrollXLoad || (treeConfig && treeOpts.showLine))) {
|
|
2563
2566
|
const { handleGetRowId } = createHandleGetRowId($xeTable)
|
|
2564
2567
|
el.setAttribute('data-calc-row', 'Y')
|
|
2565
2568
|
tableData.forEach(row => {
|
|
@@ -3047,6 +3050,10 @@ function calcScrollbar ($xeTable: VxeTableConstructor & VxeTablePrivateMethods)
|
|
|
3047
3050
|
const { scrollXWidth, scrollYHeight } = reactData
|
|
3048
3051
|
const { elemStore } = internalData
|
|
3049
3052
|
const scrollbarOpts = $xeTable.computeScrollbarOpts
|
|
3053
|
+
const el = $xeTable.$refs.refElem as HTMLDivElement
|
|
3054
|
+
if (!el || !el.clientWidth) {
|
|
3055
|
+
return
|
|
3056
|
+
}
|
|
3050
3057
|
const bodyWrapperElem = getRefElem(elemStore['main-body-wrapper'])
|
|
3051
3058
|
const headerTableElem = getRefElem(elemStore['main-header-table'])
|
|
3052
3059
|
const footerTableElem = getRefElem(elemStore['main-footer-table'])
|
|
@@ -4203,6 +4210,10 @@ function updateColumnOffsetLeft ($xeTable: VxeTableConstructor & VxeTablePrivate
|
|
|
4203
4210
|
const internalData = $xeTable as unknown as TableInternalData
|
|
4204
4211
|
|
|
4205
4212
|
const { visibleColumn, fullColumnIdData } = internalData
|
|
4213
|
+
const el = $xeTable.$refs.refElem as HTMLDivElement
|
|
4214
|
+
if (!el || !el.clientWidth) {
|
|
4215
|
+
return
|
|
4216
|
+
}
|
|
4206
4217
|
let offsetLeft = 0
|
|
4207
4218
|
for (let cIndex = 0, rLen = visibleColumn.length; cIndex < rLen; cIndex++) {
|
|
4208
4219
|
const column = visibleColumn[cIndex]
|
|
@@ -4221,6 +4232,10 @@ function updateRowOffsetTop ($xeTable: VxeTableConstructor & VxeTablePrivateMeth
|
|
|
4221
4232
|
|
|
4222
4233
|
const { expandColumn } = reactData
|
|
4223
4234
|
const { afterFullData, fullAllDataRowIdData, rowExpandedMaps } = internalData
|
|
4235
|
+
const el = $xeTable.$refs.refElem as HTMLDivElement
|
|
4236
|
+
if (!el || !el.clientWidth) {
|
|
4237
|
+
return
|
|
4238
|
+
}
|
|
4224
4239
|
const expandOpts = $xeTable.computeExpandOpts
|
|
4225
4240
|
const rowOpts = $xeTable.computeRowOpts
|
|
4226
4241
|
const cellOpts = $xeTable.computeCellOpts
|
|
@@ -4248,6 +4263,10 @@ function updateRowExpandStyle ($xeTable: VxeTableConstructor & VxeTablePrivateMe
|
|
|
4248
4263
|
const internalData = $xeTable as unknown as TableInternalData
|
|
4249
4264
|
|
|
4250
4265
|
const { expandColumn, scrollYLoad, scrollYTop, isScrollYBig } = reactData
|
|
4266
|
+
const el = $xeTable.$refs.refElem as HTMLDivElement
|
|
4267
|
+
if (!el || !el.clientWidth) {
|
|
4268
|
+
return
|
|
4269
|
+
}
|
|
4251
4270
|
const expandOpts = $xeTable.computeExpandOpts
|
|
4252
4271
|
const rowOpts = $xeTable.computeRowOpts
|
|
4253
4272
|
const cellOpts = $xeTable.computeCellOpts
|
|
@@ -4315,6 +4334,10 @@ function updateTreeLineStyle ($xeTable: VxeTableConstructor & VxeTablePrivateMet
|
|
|
4315
4334
|
}
|
|
4316
4335
|
const { tableData } = reactData
|
|
4317
4336
|
const { fullAllDataRowIdData, treeExpandedMaps } = internalData
|
|
4337
|
+
const el = $xeTable.$refs.refElem as HTMLDivElement
|
|
4338
|
+
if (!el || !el.clientWidth) {
|
|
4339
|
+
return
|
|
4340
|
+
}
|
|
4318
4341
|
const cellOpts = $xeTable.computeCellOpts
|
|
4319
4342
|
const rowOpts = $xeTable.computeRowOpts
|
|
4320
4343
|
const defaultRowHeight = $xeTable.computeDefaultRowHeight
|
|
@@ -8643,14 +8666,14 @@ const tableMethods: any = {
|
|
|
8643
8666
|
let newValue = row
|
|
8644
8667
|
let isChange = oldValue !== newValue
|
|
8645
8668
|
if (strict) {
|
|
8646
|
-
handleCheckedRadioRow($xeTable, newValue)
|
|
8669
|
+
handleCheckedRadioRow($xeTable, newValue, false)
|
|
8647
8670
|
} else {
|
|
8648
8671
|
if (oldValue === newValue) {
|
|
8649
8672
|
newValue = null
|
|
8650
8673
|
}
|
|
8651
8674
|
isChange = oldValue !== newValue
|
|
8652
8675
|
if (isChange && newValue) {
|
|
8653
|
-
handleCheckedRadioRow($xeTable, newValue)
|
|
8676
|
+
handleCheckedRadioRow($xeTable, newValue, false)
|
|
8654
8677
|
} else {
|
|
8655
8678
|
newValue = null
|
|
8656
8679
|
$xeTable.clearRadioRow()
|
|
@@ -11437,12 +11460,12 @@ const tableMethods: any = {
|
|
|
11437
11460
|
const reactData = $xeTable as unknown as TableReactData
|
|
11438
11461
|
const internalData = $xeTable as unknown as TableInternalData
|
|
11439
11462
|
|
|
11440
|
-
const {
|
|
11463
|
+
const { tableFullTreeData } = internalData
|
|
11441
11464
|
const treeOpts = $xeTable.computeTreeOpts
|
|
11442
11465
|
const { transform, lazy } = treeOpts
|
|
11443
11466
|
const childrenField = treeOpts.children || treeOpts.childrenField
|
|
11444
11467
|
const expandeds: any[] = []
|
|
11445
|
-
XEUtils.eachTree(
|
|
11468
|
+
XEUtils.eachTree(tableFullTreeData, (row) => {
|
|
11446
11469
|
const rowChildren = row[childrenField]
|
|
11447
11470
|
if (lazy || (rowChildren && rowChildren.length)) {
|
|
11448
11471
|
expandeds.push(row)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|