vxe-table 4.23.19 → 4.24.0-beta.1
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 +2 -0
- package/dist/all.esm.js +631 -343
- package/dist/all.esm.min.js +3 -3
- package/dist/style.css +85 -13
- package/dist/style.mini.css +1 -1
- package/es/components.d.ts +1 -3
- package/es/components.js +1 -2
- package/es/style.css +85 -13
- package/es/style.mini.css +1 -1
- package/es/table/module/custom/panel.js +2 -2
- package/es/table/module/edit/hook.js +95 -5
- package/es/table/src/body.d.ts +2 -2
- package/es/table/src/body.js +26 -49
- package/es/table/src/table.js +256 -35
- package/es/table/style.css +82 -13
- package/es/table/style.mini.css +1 -1
- package/es/ui/abandon.d.ts +82 -0
- package/es/ui/abandon.js +90 -0
- package/es/ui/index.d.ts +1 -82
- package/es/ui/index.js +6 -91
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +82 -13
- package/es/vxe-table/style.mini.css +1 -1
- package/lib/components.d.ts +1 -3
- package/lib/components.js +1 -2
- package/lib/index.umd.js +630 -340
- package/lib/index.umd.min.js +3 -3
- package/lib/style.css +85 -13
- package/lib/style.mini.css +1 -1
- package/lib/table/module/custom/panel.js +2 -2
- package/lib/table/module/edit/hook.js +95 -5
- package/lib/table/src/body.d.ts +2 -2
- package/lib/table/src/body.js +26 -49
- package/lib/table/src/table.js +256 -35
- package/lib/table/style/style.css +82 -13
- package/lib/table/style/style.mini.css +1 -1
- package/lib/ui/abandon.d.ts +82 -0
- package/lib/ui/abandon.js +110 -0
- package/lib/ui/index.d.ts +1 -82
- package/lib/ui/index.js +7 -91
- package/lib/ui/src/log.js +1 -1
- package/lib/vxe-table/style/style.css +82 -13
- package/lib/vxe-table/style/style.mini.css +1 -1
- package/package.json +2 -2
- package/packages/components.ts +2 -5
- package/packages/table/module/custom/panel.ts +2 -2
- package/packages/table/module/edit/hook.ts +95 -5
- package/packages/table/src/body.ts +28 -50
- package/packages/table/src/table.ts +292 -34
- package/packages/ui/abandon.ts +136 -0
- package/packages/ui/index.ts +12 -122
- package/styles/components/table.scss +141 -87
- package/styles/theme/base.scss +3 -0
- /package/dist/{iconfont.1794474448348.ttf → iconfont.1794559626301.ttf} +0 -0
- /package/dist/{iconfont.1794474448348.woff → iconfont.1794559626301.woff} +0 -0
- /package/dist/{iconfont.1794474448348.woff2 → iconfont.1794559626301.woff2} +0 -0
- /package/es/{iconfont.1794474448348.ttf → iconfont.1794559626301.ttf} +0 -0
- /package/es/{iconfont.1794474448348.woff → iconfont.1794559626301.woff} +0 -0
- /package/es/{iconfont.1794474448348.woff2 → iconfont.1794559626301.woff2} +0 -0
- /package/lib/{iconfont.1794474448348.ttf → iconfont.1794559626301.ttf} +0 -0
- /package/lib/{iconfont.1794474448348.woff → iconfont.1794559626301.woff} +0 -0
- /package/lib/{iconfont.1794474448348.woff2 → iconfont.1794559626301.woff2} +0 -0
|
@@ -725,6 +725,16 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
725
725
|
return Object.assign({}, getConfig().table.treeConfig, props.treeConfig) as VxeTablePropTypes.TreeOpts
|
|
726
726
|
})
|
|
727
727
|
|
|
728
|
+
const computeShowTreeLine = computed(() => {
|
|
729
|
+
const treeOpts = computeTreeOpts.value
|
|
730
|
+
return getDefaultConfig(treeOpts.showLine, treeOpts.line)
|
|
731
|
+
})
|
|
732
|
+
|
|
733
|
+
const computeShowTreeRootLine = computed(() => {
|
|
734
|
+
const treeOpts = computeTreeOpts.value
|
|
735
|
+
return treeOpts.showRootLine
|
|
736
|
+
})
|
|
737
|
+
|
|
728
738
|
const computeEmptyOpts = computed(() => {
|
|
729
739
|
return Object.assign({}, getConfig().table.emptyRender, props.emptyRender) as VxeTablePropTypes.EmptyOpts
|
|
730
740
|
})
|
|
@@ -763,8 +773,11 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
763
773
|
})
|
|
764
774
|
|
|
765
775
|
const computeTableStyle = computed(() => {
|
|
776
|
+
const { treeConfig } = props
|
|
766
777
|
const barWidth = computeScrollYWidth.value
|
|
767
778
|
const barHeight = computeScrollXHeight.value
|
|
779
|
+
const treeOpts = computeTreeOpts.value
|
|
780
|
+
const { indent, lineWidth, lineColor } = treeOpts
|
|
768
781
|
const stys: VxeComponentStyleType = {}
|
|
769
782
|
if (barWidth || barHeight) {
|
|
770
783
|
stys['--vxe-ui-table-view-scrollbar-width'] = toCssUnit(barWidth || barHeight)
|
|
@@ -772,6 +785,15 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
772
785
|
stys['--vxe-ui-table-view-scrollbar-height'] = toCssUnit(barHeight || barWidth)
|
|
773
786
|
stys['--vxe-ui-scrollbar-x-height'] = toCssUnit(barHeight || barWidth)
|
|
774
787
|
}
|
|
788
|
+
if (treeConfig) {
|
|
789
|
+
stys['--vxe-ui-table-tree-node-indent'] = toCssUnit(indent)
|
|
790
|
+
}
|
|
791
|
+
if (lineWidth) {
|
|
792
|
+
stys['--vxe-ui-table-tree-node-line-width'] = toCssUnit(lineWidth)
|
|
793
|
+
}
|
|
794
|
+
if (lineColor) {
|
|
795
|
+
stys['--vxe-ui-table-tree-node-line-color'] = toCssUnit(lineColor)
|
|
796
|
+
}
|
|
775
797
|
return stys
|
|
776
798
|
})
|
|
777
799
|
|
|
@@ -1037,6 +1059,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
1037
1059
|
computePrintOpts,
|
|
1038
1060
|
computeExpandOpts,
|
|
1039
1061
|
computeTreeOpts,
|
|
1062
|
+
computeShowTreeLine,
|
|
1040
1063
|
computeEmptyOpts,
|
|
1041
1064
|
computeLoadingOpts,
|
|
1042
1065
|
computeCellOffsetWidth,
|
|
@@ -2379,9 +2402,9 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
2379
2402
|
if (!el || !el.clientWidth) {
|
|
2380
2403
|
return
|
|
2381
2404
|
}
|
|
2382
|
-
const treeOpts = computeTreeOpts.value
|
|
2383
2405
|
const defaultRowHeight = computeDefaultRowHeight.value
|
|
2384
|
-
|
|
2406
|
+
const showTreeLine = computeShowTreeLine.value
|
|
2407
|
+
if (!isAllOverflow && (scrollYLoad || scrollXLoad || (treeConfig && showTreeLine))) {
|
|
2385
2408
|
const { handleGetRowId } = createHandleGetRowId($xeTable)
|
|
2386
2409
|
// 一次扫描建立 rowid -> 单元格列表,避免逐行全表 querySelectorAll
|
|
2387
2410
|
const rowWrapperMaps: Record<string, HTMLElement[]> = {}
|
|
@@ -2448,36 +2471,208 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
2448
2471
|
}
|
|
2449
2472
|
}
|
|
2450
2473
|
|
|
2474
|
+
/**
|
|
2475
|
+
* 分配树节点的连接线
|
|
2476
|
+
* 类名(cut-full / cut-top / cut-bottom)
|
|
2477
|
+
*/
|
|
2478
|
+
function getTreeNodeLines(isExpandable: boolean, depth: number, linesMask: number, isFirstRow: boolean, isLastRow: boolean, showRootLine: boolean) {
|
|
2479
|
+
const lines: VxeTableDefines.RowCacheTreeLineData[] = []
|
|
2480
|
+
|
|
2481
|
+
for (let col = 1; col <= depth; col++) {
|
|
2482
|
+
const leftVal = `var(--vxe-ui-table-tree-node-btn-width) + var(--vxe-ui-table-tree-node-indent) * ${(col - 1)}`
|
|
2483
|
+
const through = (linesMask & (1 << (col - 1))) !== 0
|
|
2484
|
+
|
|
2485
|
+
if (col === 1 && !showRootLine) {
|
|
2486
|
+
continue
|
|
2487
|
+
}
|
|
2488
|
+
|
|
2489
|
+
if (col < depth) {
|
|
2490
|
+
// 普通列(贯穿线)
|
|
2491
|
+
if (through) {
|
|
2492
|
+
let top = '0'
|
|
2493
|
+
let height = '100%'
|
|
2494
|
+
if (isFirstRow) {
|
|
2495
|
+
top = '50%'
|
|
2496
|
+
height = '50%'
|
|
2497
|
+
} else if (isLastRow) {
|
|
2498
|
+
top = '0'
|
|
2499
|
+
height = '50%'
|
|
2500
|
+
}
|
|
2501
|
+
|
|
2502
|
+
lines.push({
|
|
2503
|
+
type: 'v',
|
|
2504
|
+
style: {
|
|
2505
|
+
left: `calc(${leftVal})`,
|
|
2506
|
+
top,
|
|
2507
|
+
height
|
|
2508
|
+
}
|
|
2509
|
+
})
|
|
2510
|
+
}
|
|
2511
|
+
} else {
|
|
2512
|
+
// 肘部列
|
|
2513
|
+
let vTop = '0'
|
|
2514
|
+
let vHeight = through ? '100%' : '50%'
|
|
2515
|
+
|
|
2516
|
+
if (isFirstRow && isLastRow) {
|
|
2517
|
+
vTop = '50%'
|
|
2518
|
+
vHeight = '0px'
|
|
2519
|
+
} else if (isFirstRow) {
|
|
2520
|
+
vTop = '50%'
|
|
2521
|
+
vHeight = '50%'
|
|
2522
|
+
} else if (isLastRow) {
|
|
2523
|
+
vTop = '0'
|
|
2524
|
+
vHeight = '50%'
|
|
2525
|
+
}
|
|
2526
|
+
|
|
2527
|
+
if (isExpandable && vHeight !== '0px') {
|
|
2528
|
+
// 元素切割:根据头和尾的情况分配不同的类名
|
|
2529
|
+
let cutType = 'v cut'
|
|
2530
|
+
if (vTop === '0' && vHeight === '50%') {
|
|
2531
|
+
cutType = 'v cut-top'
|
|
2532
|
+
} else if (vTop === '50%' && vHeight === '50%') {
|
|
2533
|
+
cutType = 'v cut-bottom'
|
|
2534
|
+
} else if (vHeight === '100%') {
|
|
2535
|
+
cutType = 'v cut-full'
|
|
2536
|
+
}
|
|
2537
|
+
|
|
2538
|
+
lines.push({
|
|
2539
|
+
type: cutType,
|
|
2540
|
+
style: {
|
|
2541
|
+
left: `calc(${leftVal})`,
|
|
2542
|
+
top: vTop,
|
|
2543
|
+
height: vHeight
|
|
2544
|
+
}
|
|
2545
|
+
})
|
|
2546
|
+
} else {
|
|
2547
|
+
// 正常竖线
|
|
2548
|
+
if (vHeight !== '0px') {
|
|
2549
|
+
lines.push({
|
|
2550
|
+
type: 'v',
|
|
2551
|
+
style: {
|
|
2552
|
+
left: `calc(${leftVal})`,
|
|
2553
|
+
top: vTop,
|
|
2554
|
+
height: vHeight
|
|
2555
|
+
}
|
|
2556
|
+
})
|
|
2557
|
+
}
|
|
2558
|
+
}
|
|
2559
|
+
|
|
2560
|
+
// 横线处理:如果可展开,横线从图标右侧开始画;否则正常画
|
|
2561
|
+
if (isExpandable) {
|
|
2562
|
+
lines.push({
|
|
2563
|
+
type: 'h',
|
|
2564
|
+
style: {
|
|
2565
|
+
left: `calc(${leftVal} + var(--vxe-ui-table-tree-node-btn-width) / 2 + 1px)`,
|
|
2566
|
+
top: '50%',
|
|
2567
|
+
width: 'calc(var(--vxe-ui-table-tree-node-indent) - var(--vxe-ui-table-tree-node-btn-width) - 0.25em)'
|
|
2568
|
+
}
|
|
2569
|
+
})
|
|
2570
|
+
} else {
|
|
2571
|
+
lines.push({
|
|
2572
|
+
type: 'h',
|
|
2573
|
+
style: {
|
|
2574
|
+
left: `calc(${leftVal})`,
|
|
2575
|
+
top: '50%',
|
|
2576
|
+
width: 'calc(var(--vxe-ui-table-tree-node-indent) - var(--vxe-ui-table-tree-node-btn-width))'
|
|
2577
|
+
}
|
|
2578
|
+
})
|
|
2579
|
+
}
|
|
2580
|
+
}
|
|
2581
|
+
}
|
|
2582
|
+
return lines
|
|
2583
|
+
}
|
|
2584
|
+
|
|
2451
2585
|
const updateAfterTreeIndex = () => {
|
|
2452
2586
|
const { fullDataRowIdData, fullAllDataRowIdData, afterFullData, afterTreeFullData } = internalData
|
|
2453
2587
|
const treeOpts = computeTreeOpts.value
|
|
2454
|
-
const { transform, mapChildrenField } = treeOpts
|
|
2588
|
+
const { lazy, transform, showRootLine, mapChildrenField } = treeOpts
|
|
2455
2589
|
const childrenField = treeOpts.children || treeOpts.childrenField
|
|
2590
|
+
const hasChildField = treeOpts.hasChild || treeOpts.hasChildField
|
|
2591
|
+
const showTreeLine = computeShowTreeLine.value
|
|
2456
2592
|
const fullMaps: Record<string, any> = {}
|
|
2457
|
-
|
|
2593
|
+
const treeFullSize = afterTreeFullData.length
|
|
2594
|
+
const rowNum = 0
|
|
2458
2595
|
const { handleGetRowId } = createHandleGetRowId($xeTable)
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2596
|
+
|
|
2597
|
+
function handleTreeDFS(row: any, index: number, items: any[], parentRow: any, depth: number, isFirstRow: boolean, isLastRow: boolean, isLastChild: boolean, stackMask: number, seq: string) {
|
|
2598
|
+
const rowid = handleGetRowId(row)
|
|
2599
|
+
let rowRest = fullAllDataRowIdData[rowid]
|
|
2600
|
+
const rowChilds = row[transform ? mapChildrenField : childrenField]
|
|
2601
|
+
|
|
2602
|
+
if (rowRest) {
|
|
2603
|
+
rowRest.seq = seq
|
|
2604
|
+
rowRest._seq = rowNum
|
|
2605
|
+
rowRest.items = items
|
|
2606
|
+
rowRest.treeIndex = index
|
|
2607
|
+
rowRest._index = rowNum
|
|
2608
|
+
rowRest._tIndex = rowNum
|
|
2609
|
+
} else {
|
|
2610
|
+
rowRest = {
|
|
2611
|
+
row,
|
|
2612
|
+
rowid,
|
|
2613
|
+
_seq: rowNum,
|
|
2614
|
+
seq,
|
|
2615
|
+
index,
|
|
2616
|
+
$index: -1,
|
|
2617
|
+
_index: rowNum,
|
|
2618
|
+
treeIndex: index,
|
|
2619
|
+
_tIndex: rowNum,
|
|
2620
|
+
items,
|
|
2621
|
+
parent: parentRow,
|
|
2622
|
+
level: 0,
|
|
2623
|
+
linesMask: 0,
|
|
2624
|
+
height: 0,
|
|
2625
|
+
resizeHeight: 0,
|
|
2626
|
+
oTop: 0,
|
|
2627
|
+
expandHeight: 0
|
|
2475
2628
|
}
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
}
|
|
2479
|
-
|
|
2480
|
-
|
|
2629
|
+
fullAllDataRowIdData[rowid] = rowRest
|
|
2630
|
+
fullDataRowIdData[rowid] = rowRest
|
|
2631
|
+
}
|
|
2632
|
+
|
|
2633
|
+
// 计算当前节点的线条标记
|
|
2634
|
+
let linesMask = (stackMask >> 1)
|
|
2635
|
+
if (!isLastChild) {
|
|
2636
|
+
linesMask |= (1 << (depth - 1))
|
|
2637
|
+
}
|
|
2638
|
+
|
|
2639
|
+
rowRest.seq = seq
|
|
2640
|
+
rowRest._seq = rowNum
|
|
2641
|
+
|
|
2642
|
+
rowRest.level = depth - 1
|
|
2643
|
+
rowRest.linesMask = linesMask
|
|
2644
|
+
|
|
2645
|
+
const hasChild = rowChilds && rowChilds.length
|
|
2646
|
+
let hasLazyChilds = false
|
|
2647
|
+
let isLazyLoaded = false
|
|
2648
|
+
if (lazy) {
|
|
2649
|
+
const rest = fullAllDataRowIdData[rowid]
|
|
2650
|
+
hasLazyChilds = row[hasChildField]
|
|
2651
|
+
isLazyLoaded = !!rest.treeLoaded
|
|
2652
|
+
}
|
|
2653
|
+
const isExpandable = (lazy ? (isLazyLoaded ? hasChild : hasChild || hasLazyChilds) : hasChild)
|
|
2654
|
+
|
|
2655
|
+
rowRest.treeLines = showTreeLine && treeFullSize > 1 ? getTreeNodeLines(isExpandable, depth, linesMask, isFirstRow, isLastRow, showRootLine) : []
|
|
2656
|
+
|
|
2657
|
+
// 计算传给子节点的状态
|
|
2658
|
+
let nextStackMask = stackMask
|
|
2659
|
+
if (!isLastChild) {
|
|
2660
|
+
nextStackMask |= (1 << depth)
|
|
2661
|
+
}
|
|
2662
|
+
|
|
2663
|
+
fullMaps[rowid] = row
|
|
2664
|
+
|
|
2665
|
+
// 递归子节点
|
|
2666
|
+
for (let i = 0; i < rowChilds.length; i++) {
|
|
2667
|
+
handleTreeDFS(rowChilds[i], i, rowChilds, row, depth + 1, false, false, i === rowChilds.length - 1, nextStackMask, `${seq}.${i + 1}`)
|
|
2668
|
+
}
|
|
2669
|
+
}
|
|
2670
|
+
|
|
2671
|
+
// 根节点 depth 从 1 开始
|
|
2672
|
+
for (let i = 0; i < treeFullSize; i++) {
|
|
2673
|
+
handleTreeDFS(afterTreeFullData[i], i, afterTreeFullData, null, 1, !i, i === treeFullSize - 1, i === treeFullSize - 1, 0, '' + i)
|
|
2674
|
+
}
|
|
2675
|
+
|
|
2481
2676
|
if (transform) {
|
|
2482
2677
|
afterFullData.forEach((row, index) => {
|
|
2483
2678
|
const rowid = handleGetRowId(row)
|
|
@@ -2504,7 +2699,25 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
2504
2699
|
rowRest._seq = rowNum
|
|
2505
2700
|
rowRest._index = index
|
|
2506
2701
|
} else {
|
|
2507
|
-
const rest = {
|
|
2702
|
+
const rest = {
|
|
2703
|
+
row,
|
|
2704
|
+
rowid,
|
|
2705
|
+
_seq: rowNum,
|
|
2706
|
+
seq,
|
|
2707
|
+
index: -1,
|
|
2708
|
+
$index: -1,
|
|
2709
|
+
_index: index,
|
|
2710
|
+
treeIndex: -1,
|
|
2711
|
+
_tIndex: -1,
|
|
2712
|
+
items: [],
|
|
2713
|
+
parent: null,
|
|
2714
|
+
level: 0,
|
|
2715
|
+
linesMask: 0,
|
|
2716
|
+
height: 0,
|
|
2717
|
+
resizeHeight: 0,
|
|
2718
|
+
oTop: 0,
|
|
2719
|
+
expandHeight: 0
|
|
2720
|
+
}
|
|
2508
2721
|
fullAllDataRowIdData[rowid] = rest
|
|
2509
2722
|
fullDataRowIdData[rowid] = rest
|
|
2510
2723
|
}
|
|
@@ -5587,7 +5800,25 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
5587
5800
|
(childRow, index, items, path, parentItem, nodes) => {
|
|
5588
5801
|
const rowid = getRowid($xeTable, childRow)
|
|
5589
5802
|
const parentRow = parentItem || parentRest.row
|
|
5590
|
-
const rest = {
|
|
5803
|
+
const rest = {
|
|
5804
|
+
row: childRow,
|
|
5805
|
+
rowid,
|
|
5806
|
+
_seq: -1,
|
|
5807
|
+
seq: -1,
|
|
5808
|
+
index,
|
|
5809
|
+
_index: -1,
|
|
5810
|
+
$index: -1,
|
|
5811
|
+
treeIndex: -1,
|
|
5812
|
+
_tIndex: -1,
|
|
5813
|
+
items,
|
|
5814
|
+
parent: parentRow,
|
|
5815
|
+
level: parentLevel + nodes.length,
|
|
5816
|
+
linesMask: 0,
|
|
5817
|
+
height: 0,
|
|
5818
|
+
resizeHeight: 0,
|
|
5819
|
+
oTop: 0,
|
|
5820
|
+
expandHeight: 0
|
|
5821
|
+
}
|
|
5591
5822
|
fullDataRowIdData[rowid] = rest
|
|
5592
5823
|
fullAllDataRowIdData[rowid] = rest
|
|
5593
5824
|
},
|
|
@@ -10260,9 +10491,25 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
10260
10491
|
errLog('vxe.error.repeatKey', [currKeyField, rowid])
|
|
10261
10492
|
}
|
|
10262
10493
|
if (!rowRest) {
|
|
10263
|
-
rowRest = {
|
|
10264
|
-
|
|
10265
|
-
|
|
10494
|
+
rowRest = {
|
|
10495
|
+
row,
|
|
10496
|
+
rowid,
|
|
10497
|
+
_seq: -1,
|
|
10498
|
+
seq,
|
|
10499
|
+
index: -1,
|
|
10500
|
+
_index: -1,
|
|
10501
|
+
$index: -1,
|
|
10502
|
+
treeIndex: index,
|
|
10503
|
+
_tIndex: -1,
|
|
10504
|
+
items,
|
|
10505
|
+
parent: parentRow,
|
|
10506
|
+
level,
|
|
10507
|
+
linesMask: 0,
|
|
10508
|
+
height: 0,
|
|
10509
|
+
resizeHeight: 0,
|
|
10510
|
+
oTop: 0,
|
|
10511
|
+
expandHeight: 0
|
|
10512
|
+
}
|
|
10266
10513
|
}
|
|
10267
10514
|
if (isReset || isReLoaded) {
|
|
10268
10515
|
rowRest.treeLoaded = false
|
|
@@ -12070,8 +12317,8 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
12070
12317
|
$xeTable.handleHeaderCellDragMousedownEvent(evnt, params)
|
|
12071
12318
|
}
|
|
12072
12319
|
}
|
|
12073
|
-
if (!triggerDrag && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.
|
|
12074
|
-
$xeTable.
|
|
12320
|
+
if (!triggerDrag && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleHeadCellAreaMouseDnEvent) {
|
|
12321
|
+
$xeTable.handleHeadCellAreaMouseDnEvent(evnt, Object.assign({ cell, triggerSort, triggerFilter }, params))
|
|
12075
12322
|
}
|
|
12076
12323
|
$xeTable.focus()
|
|
12077
12324
|
if ($xeTable.closeMenu) {
|
|
@@ -14847,7 +15094,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
14847
15094
|
const validTipConfig = computeValidTipConfig.value
|
|
14848
15095
|
const validOpts = computeValidOpts.value
|
|
14849
15096
|
const checkboxOpts = computeCheckboxOpts.value
|
|
14850
|
-
const
|
|
15097
|
+
const showTreeLine = computeShowTreeLine.value
|
|
14851
15098
|
const rowOpts = computeRowOpts.value
|
|
14852
15099
|
const columnOpts = computeColumnOpts.value
|
|
14853
15100
|
const vSize = computeSize.value
|
|
@@ -14909,7 +15156,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
14909
15156
|
'not--footer': !showFooter,
|
|
14910
15157
|
'is--group': isGroup,
|
|
14911
15158
|
'is-row-group': isRowGroupStatus,
|
|
14912
|
-
'is--tree-line': treeConfig &&
|
|
15159
|
+
'is--tree-line': treeConfig && showTreeLine,
|
|
14913
15160
|
'is--fixed-left': leftList.length,
|
|
14914
15161
|
'is--fixed-right': rightList.length,
|
|
14915
15162
|
'is--animat': !!props.animat,
|
|
@@ -15500,6 +15747,17 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
15500
15747
|
})
|
|
15501
15748
|
})
|
|
15502
15749
|
|
|
15750
|
+
const lineFlag = ref(0)
|
|
15751
|
+
watch(computeShowTreeLine, () => {
|
|
15752
|
+
lineFlag.value++
|
|
15753
|
+
})
|
|
15754
|
+
watch(computeShowTreeRootLine, () => {
|
|
15755
|
+
lineFlag.value++
|
|
15756
|
+
})
|
|
15757
|
+
watch(lineFlag, () => {
|
|
15758
|
+
updateAfterDataIndex()
|
|
15759
|
+
})
|
|
15760
|
+
|
|
15503
15761
|
watch(reScrollFlag, () => {
|
|
15504
15762
|
updateScrollbar().then(() => {
|
|
15505
15763
|
updateScrollbar()
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { VxeUI } from '@vxe-ui/core'
|
|
2
|
+
import { getFuncText } from './src/utils'
|
|
3
|
+
|
|
4
|
+
import type { VxeUploadDefines, VxePrintDefines, VxeGlobalConfig } from 'vxe-pc-ui'
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* 已废弃,兼容老版本
|
|
8
|
+
* @deprecated
|
|
9
|
+
*/
|
|
10
|
+
export const setup = (options?: VxeGlobalConfig) => {
|
|
11
|
+
return VxeUI.setConfig(options)
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 已废弃,兼容老版本
|
|
15
|
+
* @deprecated
|
|
16
|
+
*/
|
|
17
|
+
VxeUI.setup = setup
|
|
18
|
+
/**
|
|
19
|
+
* 已废弃,兼容老版本
|
|
20
|
+
* @deprecated
|
|
21
|
+
*/
|
|
22
|
+
export const config = (options?: VxeGlobalConfig) => {
|
|
23
|
+
return VxeUI.setConfig(options)
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* 已废弃,兼容老版本
|
|
27
|
+
* @deprecated
|
|
28
|
+
*/
|
|
29
|
+
VxeUI.config = config
|
|
30
|
+
/**
|
|
31
|
+
* 已废弃,兼容老版本
|
|
32
|
+
* @deprecated
|
|
33
|
+
*/
|
|
34
|
+
export const t = (key: string, args?: any) => {
|
|
35
|
+
return VxeUI.getI18n(key, args)
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* 已废弃,兼容老版本
|
|
39
|
+
* @deprecated
|
|
40
|
+
*/
|
|
41
|
+
VxeUI.t = t
|
|
42
|
+
/**
|
|
43
|
+
* 已废弃,兼容老版本
|
|
44
|
+
* @deprecated
|
|
45
|
+
*/
|
|
46
|
+
export const _t = (content: string | number | boolean | null | undefined, args?: any) => {
|
|
47
|
+
return getFuncText(content, args)
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* 已废弃,兼容老版本
|
|
51
|
+
* @deprecated
|
|
52
|
+
*/
|
|
53
|
+
VxeUI._t = _t
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* 已废弃,兼容老版本
|
|
57
|
+
* @deprecated
|
|
58
|
+
*/
|
|
59
|
+
export const VXETable = VxeUI
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* 已废弃,兼容老版本
|
|
63
|
+
* @deprecated
|
|
64
|
+
*/
|
|
65
|
+
export const saveFile: VxeUploadDefines.SaveFileFunction = (options) => {
|
|
66
|
+
return VxeUI.saveFile(options)
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* 已废弃,兼容老版本
|
|
70
|
+
* @deprecated
|
|
71
|
+
*/
|
|
72
|
+
export const readFile: VxeUploadDefines.ReadFileFunction = (options) => {
|
|
73
|
+
return VxeUI.readFile(options)
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* 已废弃,兼容老版本
|
|
77
|
+
* @deprecated
|
|
78
|
+
*/
|
|
79
|
+
export const print: VxePrintDefines.PrintFunction = (options) => {
|
|
80
|
+
return VxeUI.print(options)
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* 已废弃,兼容老版本
|
|
84
|
+
* @deprecated
|
|
85
|
+
*/
|
|
86
|
+
export const modal = {
|
|
87
|
+
/**
|
|
88
|
+
* 已废弃,兼容老版本
|
|
89
|
+
* @deprecated
|
|
90
|
+
*/
|
|
91
|
+
get(id: any) {
|
|
92
|
+
return VxeUI.modal.get(id)
|
|
93
|
+
},
|
|
94
|
+
/**
|
|
95
|
+
* 已废弃,兼容老版本
|
|
96
|
+
* @deprecated
|
|
97
|
+
*/
|
|
98
|
+
close(id: any) {
|
|
99
|
+
return VxeUI.modal.close(id)
|
|
100
|
+
},
|
|
101
|
+
/**
|
|
102
|
+
* 已废弃,兼容老版本
|
|
103
|
+
* @deprecated
|
|
104
|
+
*/
|
|
105
|
+
open(options: any) {
|
|
106
|
+
return VxeUI.modal.open(options)
|
|
107
|
+
},
|
|
108
|
+
/**
|
|
109
|
+
* 已废弃,兼容老版本
|
|
110
|
+
* @deprecated
|
|
111
|
+
*/
|
|
112
|
+
alert(content: any, title: any, options: any) {
|
|
113
|
+
return VxeUI.modal.alert(content, title, options)
|
|
114
|
+
},
|
|
115
|
+
/**
|
|
116
|
+
* 已废弃,兼容老版本
|
|
117
|
+
* @deprecated
|
|
118
|
+
*/
|
|
119
|
+
confirm(content: any, title: any, options: any) {
|
|
120
|
+
return VxeUI.modal.confirm(content, title, options)
|
|
121
|
+
},
|
|
122
|
+
/**
|
|
123
|
+
* 已废弃,兼容老版本
|
|
124
|
+
* @deprecated
|
|
125
|
+
*/
|
|
126
|
+
message(content: any, options: any) {
|
|
127
|
+
return VxeUI.modal.message(content, options)
|
|
128
|
+
},
|
|
129
|
+
/**
|
|
130
|
+
* 已废弃,兼容老版本
|
|
131
|
+
* @deprecated
|
|
132
|
+
*/
|
|
133
|
+
notification(content: any, title: any, options: any) {
|
|
134
|
+
return VxeUI.modal.notification(content, title, options)
|
|
135
|
+
}
|
|
136
|
+
}
|