vxe-table 4.17.24 → 4.17.25
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/toolbar/src/toolbar.js +91 -67
- package/es/toolbar/style.css +11 -4
- package/es/toolbar/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-toolbar/style.css +11 -4
- package/es/vxe-toolbar/style.min.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +123 -99
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/toolbar/src/toolbar.js +123 -99
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/toolbar/style/style.css +11 -4
- package/lib/toolbar/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-toolbar/style/style.css +11 -4
- package/lib/vxe-toolbar/style/style.min.css +1 -1
- package/package.json +2 -3
- package/packages/table/src/table.ts +1 -1
- package/packages/toolbar/src/toolbar.ts +115 -79
- package/styles/components/toolbar.scss +11 -4
- /package/es/{iconfont.1764729060815.ttf → iconfont.1764811572357.ttf} +0 -0
- /package/es/{iconfont.1764729060815.woff → iconfont.1764811572357.woff} +0 -0
- /package/es/{iconfont.1764729060815.woff2 → iconfont.1764811572357.woff2} +0 -0
- /package/lib/{iconfont.1764729060815.ttf → iconfont.1764811572357.ttf} +0 -0
- /package/lib/{iconfont.1764729060815.woff → iconfont.1764811572357.woff} +0 -0
- /package/lib/{iconfont.1764729060815.woff2 → iconfont.1764811572357.woff2} +0 -0
|
@@ -398,51 +398,71 @@ export default defineVxeComponent({
|
|
|
398
398
|
const { buttons } = props
|
|
399
399
|
const { connectTable } = internalData
|
|
400
400
|
const $table = connectTable
|
|
401
|
+
const buttonsSlot = slots.buttons
|
|
401
402
|
const buttonPrefixSlot = slots.buttonPrefix || slots['button-prefix']
|
|
402
403
|
const buttonSuffixSlot = slots.buttonSuffix || slots['button-suffix']
|
|
403
|
-
const
|
|
404
|
+
const lbVNs: VxeComponentSlotType[] = []
|
|
404
405
|
if (buttonPrefixSlot) {
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
if (VxeUIButtonComponent) {
|
|
406
|
+
lbVNs.push(
|
|
407
|
+
h('span', {
|
|
408
|
+
key: 'tbp',
|
|
409
|
+
class: 'vxe-button--prefix-wrapper'
|
|
410
|
+
}, getSlotVNs(buttonPrefixSlot({ buttons: buttons || [], $grid: $xeGrid, $gantt: $xeGantt, $table: $table })))
|
|
411
|
+
)
|
|
412
|
+
}
|
|
413
|
+
if (buttons || buttonsSlot) {
|
|
414
|
+
const btnVNs: VxeComponentSlotType[] = []
|
|
415
|
+
if (buttons) {
|
|
416
|
+
buttons.forEach((item, index) => {
|
|
417
|
+
const { dropdowns, buttonRender } = item
|
|
418
|
+
if (item.visible !== false) {
|
|
419
|
+
const compConf = buttonRender ? renderer.get(buttonRender.name) : null
|
|
420
|
+
if (buttonRender && compConf && compConf.renderToolbarButton) {
|
|
421
|
+
const toolbarButtonClassName = compConf.toolbarButtonClassName
|
|
422
|
+
const params = { $grid: $xeGrid, $gantt: $xeGantt, $table: $table!, button: item }
|
|
423
423
|
btnVNs.push(
|
|
424
|
-
h(
|
|
425
|
-
key: `
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
options: undefined
|
|
429
|
-
}),
|
|
430
|
-
onClick: (eventParams) => btnEvent(eventParams, item)
|
|
431
|
-
}, dropdowns && dropdowns.length
|
|
432
|
-
? {
|
|
433
|
-
dropdowns: () => renderDropdowns(item, true)
|
|
434
|
-
}
|
|
435
|
-
: {})
|
|
424
|
+
h('span', {
|
|
425
|
+
key: `br${item.code || index}`,
|
|
426
|
+
class: ['vxe-button--item', toolbarButtonClassName ? (XEUtils.isFunction(toolbarButtonClassName) ? toolbarButtonClassName(params) : toolbarButtonClassName) : '']
|
|
427
|
+
}, getSlotVNs(compConf.renderToolbarButton(buttonRender, params)))
|
|
436
428
|
)
|
|
429
|
+
} else {
|
|
430
|
+
if (VxeUIButtonComponent) {
|
|
431
|
+
btnVNs.push(
|
|
432
|
+
h(VxeUIButtonComponent, {
|
|
433
|
+
key: `bd${item.code || index}`,
|
|
434
|
+
...Object.assign({}, item, {
|
|
435
|
+
content: item.content || item.name,
|
|
436
|
+
options: undefined
|
|
437
|
+
}),
|
|
438
|
+
onClick: (eventParams) => btnEvent(eventParams, item)
|
|
439
|
+
}, dropdowns && dropdowns.length
|
|
440
|
+
? {
|
|
441
|
+
dropdowns: () => renderDropdowns(item, true)
|
|
442
|
+
}
|
|
443
|
+
: {})
|
|
444
|
+
)
|
|
445
|
+
}
|
|
437
446
|
}
|
|
438
447
|
}
|
|
439
|
-
}
|
|
440
|
-
}
|
|
448
|
+
})
|
|
449
|
+
}
|
|
450
|
+
lbVNs.push(
|
|
451
|
+
h('span', {
|
|
452
|
+
key: 'tti',
|
|
453
|
+
class: 'vxe-button--item-wrapper'
|
|
454
|
+
}, buttonsSlot ? getSlotVNs(buttonsSlot({ buttons: buttons || [], $grid: $xeGrid, $gantt: $xeGantt, $table: $table })) : btnVNs)
|
|
455
|
+
)
|
|
441
456
|
}
|
|
442
457
|
if (buttonSuffixSlot) {
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
458
|
+
lbVNs.push(
|
|
459
|
+
h('span', {
|
|
460
|
+
key: 'tbs',
|
|
461
|
+
class: 'vxe-button--suffix-wrapper'
|
|
462
|
+
}, getSlotVNs(buttonSuffixSlot({ buttons: buttons || [], $grid: $xeGrid, $gantt: $xeGantt, $table: $table })))
|
|
463
|
+
)
|
|
464
|
+
}
|
|
465
|
+
return lbVNs
|
|
446
466
|
}
|
|
447
467
|
|
|
448
468
|
/**
|
|
@@ -452,52 +472,72 @@ export default defineVxeComponent({
|
|
|
452
472
|
const { tools } = props
|
|
453
473
|
const { connectTable } = internalData
|
|
454
474
|
const $table = connectTable
|
|
475
|
+
const toolsSlot = slots.tools
|
|
455
476
|
const toolPrefixSlot = slots.toolPrefix || slots['tool-prefix']
|
|
456
477
|
const toolSuffixSlot = slots.toolSuffix || slots['tool-suffix']
|
|
457
|
-
const
|
|
478
|
+
const rtVNs: VxeComponentSlotType[] = []
|
|
458
479
|
if (toolPrefixSlot) {
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
if (VxeUIButtonComponent) {
|
|
480
|
+
rtVNs.push(
|
|
481
|
+
h('span', {
|
|
482
|
+
key: 'ttp',
|
|
483
|
+
class: 'vxe-tool--prefix-wrapper'
|
|
484
|
+
}, getSlotVNs(toolPrefixSlot({ tools: tools || [], $grid: $xeGrid, $gantt: $xeGantt, $table: $table })))
|
|
485
|
+
)
|
|
486
|
+
}
|
|
487
|
+
if (tools || toolsSlot) {
|
|
488
|
+
const btnVNs: VxeComponentSlotType[] = []
|
|
489
|
+
if (tools) {
|
|
490
|
+
tools.forEach((item, tIndex) => {
|
|
491
|
+
const { dropdowns, toolRender } = item
|
|
492
|
+
if (item.visible !== false) {
|
|
493
|
+
const rdName = toolRender ? toolRender.name : null
|
|
494
|
+
const compConf = toolRender ? renderer.get(rdName) : null
|
|
495
|
+
if (toolRender && compConf && compConf.renderToolbarTool) {
|
|
496
|
+
const toolbarToolClassName = compConf.toolbarToolClassName
|
|
497
|
+
const params = { $grid: $xeGrid, $gantt: $xeGantt, $table: $table!, tool: item }
|
|
478
498
|
btnVNs.push(
|
|
479
|
-
h(
|
|
480
|
-
key:
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
options: undefined
|
|
484
|
-
}),
|
|
485
|
-
onClick: (eventParams) => tolEvent(eventParams, item)
|
|
486
|
-
}, dropdowns && dropdowns.length
|
|
487
|
-
? {
|
|
488
|
-
dropdowns: () => renderDropdowns(item, false)
|
|
489
|
-
}
|
|
490
|
-
: {})
|
|
499
|
+
h('span', {
|
|
500
|
+
key: rdName as string,
|
|
501
|
+
class: ['vxe-tool--item', toolbarToolClassName ? (XEUtils.isFunction(toolbarToolClassName) ? toolbarToolClassName(params) : toolbarToolClassName) : '']
|
|
502
|
+
}, getSlotVNs(compConf.renderToolbarTool(toolRender, params)))
|
|
491
503
|
)
|
|
504
|
+
} else {
|
|
505
|
+
if (VxeUIButtonComponent) {
|
|
506
|
+
btnVNs.push(
|
|
507
|
+
h(VxeUIButtonComponent, {
|
|
508
|
+
key: tIndex,
|
|
509
|
+
...Object.assign({}, item, {
|
|
510
|
+
content: item.content || item.name,
|
|
511
|
+
options: undefined
|
|
512
|
+
}),
|
|
513
|
+
onClick: (eventParams) => tolEvent(eventParams, item)
|
|
514
|
+
}, dropdowns && dropdowns.length
|
|
515
|
+
? {
|
|
516
|
+
dropdowns: () => renderDropdowns(item, false)
|
|
517
|
+
}
|
|
518
|
+
: {})
|
|
519
|
+
)
|
|
520
|
+
}
|
|
492
521
|
}
|
|
493
522
|
}
|
|
494
|
-
}
|
|
495
|
-
}
|
|
523
|
+
})
|
|
524
|
+
}
|
|
525
|
+
rtVNs.push(
|
|
526
|
+
h('span', {
|
|
527
|
+
key: 'tti',
|
|
528
|
+
class: 'vxe-tool--item-wrapper'
|
|
529
|
+
}, toolsSlot ? getSlotVNs(toolsSlot({ tools: tools || [], $grid: $xeGrid, $gantt: $xeGantt, $table: $table })) : btnVNs)
|
|
530
|
+
)
|
|
496
531
|
}
|
|
497
532
|
if (toolSuffixSlot) {
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
533
|
+
rtVNs.push(
|
|
534
|
+
h('span', {
|
|
535
|
+
key: 'tts',
|
|
536
|
+
class: 'vxe-tool--suffix-wrapper'
|
|
537
|
+
}, getSlotVNs(toolSuffixSlot({ tools: tools || [], $grid: $xeGrid, $gantt: $xeGantt, $table: $table })))
|
|
538
|
+
)
|
|
539
|
+
}
|
|
540
|
+
return rtVNs
|
|
501
541
|
}
|
|
502
542
|
|
|
503
543
|
const renderToolImport = () => {
|
|
@@ -597,11 +637,7 @@ export default defineVxeComponent({
|
|
|
597
637
|
|
|
598
638
|
const renderVN = () => {
|
|
599
639
|
const { perfect, loading, refresh, zoom, custom, className } = props
|
|
600
|
-
const { connectTable } = internalData
|
|
601
640
|
const vSize = computeSize.value
|
|
602
|
-
const toolsSlot = slots.tools
|
|
603
|
-
const buttonsSlot = slots.buttons
|
|
604
|
-
const $table = connectTable
|
|
605
641
|
|
|
606
642
|
return h('div', {
|
|
607
643
|
ref: refElem,
|
|
@@ -613,10 +649,10 @@ export default defineVxeComponent({
|
|
|
613
649
|
}, [
|
|
614
650
|
h('div', {
|
|
615
651
|
class: 'vxe-buttons--wrapper'
|
|
616
|
-
},
|
|
652
|
+
}, renderLeftBtns()),
|
|
617
653
|
h('div', {
|
|
618
654
|
class: 'vxe-tools--wrapper'
|
|
619
|
-
},
|
|
655
|
+
}, renderRightTools()),
|
|
620
656
|
h('div', {
|
|
621
657
|
class: 'vxe-tools--operate'
|
|
622
658
|
}, [
|
|
@@ -68,10 +68,6 @@
|
|
|
68
68
|
display: flex;
|
|
69
69
|
align-items: center;
|
|
70
70
|
}
|
|
71
|
-
.vxe-buttons--wrapper,
|
|
72
|
-
.vxe-tools--wrapper {
|
|
73
|
-
flex-wrap: wrap;
|
|
74
|
-
}
|
|
75
71
|
.vxe-tools--operate {
|
|
76
72
|
flex-shrink: 0;
|
|
77
73
|
}
|
|
@@ -84,6 +80,17 @@
|
|
|
84
80
|
}
|
|
85
81
|
}
|
|
86
82
|
}
|
|
83
|
+
.vxe-button--item-wrapper,
|
|
84
|
+
.vxe-tool--item-wrapper,
|
|
85
|
+
.vxe-button--prefix-wrapper,
|
|
86
|
+
.vxe-button--suffix-wrapper,
|
|
87
|
+
.vxe-tool--prefix-wrapper,
|
|
88
|
+
.vxe-tool--suffix-wrapper {
|
|
89
|
+
display: flex;
|
|
90
|
+
align-items: center;
|
|
91
|
+
flex-shrink: 0;
|
|
92
|
+
flex-wrap: wrap;
|
|
93
|
+
}
|
|
87
94
|
}
|
|
88
95
|
|
|
89
96
|
.vxe-toolbar {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|