vxe-table 3.19.25 → 3.19.26
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 +85 -103
- package/es/toolbar/style.css +10 -1
- 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 +10 -1
- 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 +121 -147
- 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 +121 -147
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/toolbar/style/style.css +10 -1
- 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 +10 -1
- package/lib/vxe-toolbar/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/toolbar/src/toolbar.ts +91 -121
- package/styles/components/toolbar.scss +10 -1
- /package/es/{iconfont.1764811551687.ttf → iconfont.1764834392345.ttf} +0 -0
- /package/es/{iconfont.1764811551687.woff → iconfont.1764834392345.woff} +0 -0
- /package/es/{iconfont.1764811551687.woff2 → iconfont.1764834392345.woff2} +0 -0
- /package/lib/{iconfont.1764811551687.ttf → iconfont.1764834392345.ttf} +0 -0
- /package/lib/{iconfont.1764811551687.woff → iconfont.1764834392345.woff} +0 -0
- /package/lib/{iconfont.1764811551687.woff2 → iconfont.1764834392345.woff2} +0 -0
|
@@ -475,69 +475,54 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
475
475
|
const buttonsSlot = slots.buttons
|
|
476
476
|
const buttonPrefixSlot = slots.buttonPrefix || slots['button-prefix']
|
|
477
477
|
const buttonSuffixSlot = slots.buttonSuffix || slots['button-suffix']
|
|
478
|
-
const
|
|
479
|
-
if (
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
if (buttonRender && compConf && compConf.renderToolbarButton) {
|
|
495
|
-
const toolbarButtonClassName = compConf.toolbarButtonClassName
|
|
496
|
-
const params = { $grid: $xeGrid, $gantt: $xeGantt, $table: $table!, button: item }
|
|
478
|
+
const btnVNs: VxeComponentSlotType[] = []
|
|
479
|
+
if (buttons) {
|
|
480
|
+
buttons.forEach((item) => {
|
|
481
|
+
const { dropdowns, buttonRender } = item
|
|
482
|
+
if (item.visible !== false) {
|
|
483
|
+
const compConf = buttonRender ? renderer.get(buttonRender.name) : null
|
|
484
|
+
if (buttonRender && compConf && compConf.renderToolbarButton) {
|
|
485
|
+
const toolbarButtonClassName = compConf.toolbarButtonClassName
|
|
486
|
+
const params = { $grid: $xeGrid, $gantt: $xeGantt, $table: $table!, button: item }
|
|
487
|
+
btnVNs.push(
|
|
488
|
+
h('span', {
|
|
489
|
+
class: ['vxe-button--item', toolbarButtonClassName ? (XEUtils.isFunction(toolbarButtonClassName) ? toolbarButtonClassName(params) : toolbarButtonClassName) : '']
|
|
490
|
+
}, getSlotVNs(compConf.renderToolbarButton(h, buttonRender, params)))
|
|
491
|
+
)
|
|
492
|
+
} else {
|
|
493
|
+
if (VxeUIButtonComponent) {
|
|
497
494
|
btnVNs.push(
|
|
498
|
-
h(
|
|
499
|
-
|
|
500
|
-
|
|
495
|
+
h(VxeUIButtonComponent, {
|
|
496
|
+
props: Object.assign({}, item, {
|
|
497
|
+
content: item.content || item.name,
|
|
498
|
+
options: undefined
|
|
499
|
+
}),
|
|
500
|
+
on: {
|
|
501
|
+
click: (eventParams: VxeButtonDefines.ClickEventParams) => $xeToolbar.btnEvent(eventParams, item)
|
|
502
|
+
},
|
|
503
|
+
scopedSlots: dropdowns && dropdowns.length
|
|
504
|
+
? {
|
|
505
|
+
dropdowns: () => $xeToolbar.renderDropdowns(h, item, true)
|
|
506
|
+
}
|
|
507
|
+
: {}
|
|
508
|
+
})
|
|
501
509
|
)
|
|
502
|
-
} else {
|
|
503
|
-
if (VxeUIButtonComponent) {
|
|
504
|
-
btnVNs.push(
|
|
505
|
-
h(VxeUIButtonComponent, {
|
|
506
|
-
props: Object.assign({}, item, {
|
|
507
|
-
content: item.content || item.name,
|
|
508
|
-
options: undefined
|
|
509
|
-
}),
|
|
510
|
-
on: {
|
|
511
|
-
click: (eventParams: VxeButtonDefines.ClickEventParams) => $xeToolbar.btnEvent(eventParams, item)
|
|
512
|
-
},
|
|
513
|
-
scopedSlots: dropdowns && dropdowns.length
|
|
514
|
-
? {
|
|
515
|
-
dropdowns: () => $xeToolbar.renderDropdowns(h, item, true)
|
|
516
|
-
}
|
|
517
|
-
: {}
|
|
518
|
-
})
|
|
519
|
-
)
|
|
520
|
-
}
|
|
521
510
|
}
|
|
522
511
|
}
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
}, getSlotVNs(buttonSuffixSlot.call($xeToolbar, { buttons: buttons || [], $grid: $xeGrid, $gantt: $xeGantt, $table: $table })))
|
|
538
|
-
)
|
|
539
|
-
}
|
|
540
|
-
return lbVNs
|
|
512
|
+
}
|
|
513
|
+
})
|
|
514
|
+
}
|
|
515
|
+
return [
|
|
516
|
+
h('div', {
|
|
517
|
+
class: 'vxe-button--prefix-wrapper'
|
|
518
|
+
}, buttonPrefixSlot ? getSlotVNs(buttonPrefixSlot.call($xeToolbar, { buttons: buttons || [], $grid: $xeGrid, $gantt: $xeGantt, $table: $table })) : []),
|
|
519
|
+
h('div', {
|
|
520
|
+
class: 'vxe-button--item-wrapper'
|
|
521
|
+
}, buttonsSlot ? getSlotVNs(buttonsSlot.call($xeToolbar, { buttons: buttons || [], $grid: $xeGrid, $gantt: $xeGantt, $table: $table })) : btnVNs),
|
|
522
|
+
h('div', {
|
|
523
|
+
class: 'vxe-button--suffix-wrapper'
|
|
524
|
+
}, buttonSuffixSlot ? getSlotVNs(buttonSuffixSlot.call($xeToolbar, { buttons: buttons || [], $grid: $xeGrid, $gantt: $xeGantt, $table: $table })) : [])
|
|
525
|
+
]
|
|
541
526
|
},
|
|
542
527
|
/**
|
|
543
528
|
* 渲染右侧工具
|
|
@@ -559,72 +544,57 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
559
544
|
const toolsSlot = slots.tools
|
|
560
545
|
const toolPrefixSlot = slots.toolPrefix || slots['tool-prefix']
|
|
561
546
|
const toolSuffixSlot = slots.toolSuffix || slots['tool-suffix']
|
|
562
|
-
const
|
|
563
|
-
if (
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
if (
|
|
580
|
-
const toolbarToolClassName = compConf.toolbarToolClassName
|
|
581
|
-
const params = { $grid: $xeGrid, $gantt: $xeGantt, $table: $table!, tool: item }
|
|
547
|
+
const btnVNs: VxeComponentSlotType[] = []
|
|
548
|
+
if (tools) {
|
|
549
|
+
tools.forEach((item, tIndex) => {
|
|
550
|
+
const { dropdowns, toolRender } = item
|
|
551
|
+
if (item.visible !== false) {
|
|
552
|
+
const rdName = toolRender ? toolRender.name : null
|
|
553
|
+
const compConf = toolRender ? renderer.get(rdName) : null
|
|
554
|
+
if (toolRender && compConf && compConf.renderToolbarTool) {
|
|
555
|
+
const toolbarToolClassName = compConf.toolbarToolClassName
|
|
556
|
+
const params = { $grid: $xeGrid, $gantt: $xeGantt, $table: $table!, tool: item }
|
|
557
|
+
btnVNs.push(
|
|
558
|
+
h('span', {
|
|
559
|
+
key: rdName as string,
|
|
560
|
+
class: ['vxe-tool--item', toolbarToolClassName ? (XEUtils.isFunction(toolbarToolClassName) ? toolbarToolClassName(params) : toolbarToolClassName) : '']
|
|
561
|
+
}, getSlotVNs(compConf.renderToolbarTool(h, toolRender, params)))
|
|
562
|
+
)
|
|
563
|
+
} else {
|
|
564
|
+
if (VxeUIButtonComponent) {
|
|
582
565
|
btnVNs.push(
|
|
583
|
-
h(
|
|
584
|
-
key:
|
|
585
|
-
|
|
586
|
-
|
|
566
|
+
h(VxeUIButtonComponent, {
|
|
567
|
+
key: tIndex,
|
|
568
|
+
props: Object.assign({}, item, {
|
|
569
|
+
content: item.content || item.name,
|
|
570
|
+
options: undefined
|
|
571
|
+
}),
|
|
572
|
+
on: {
|
|
573
|
+
click: (eventParams: VxeButtonDefines.ClickEventParams) => $xeToolbar.tolEvent(eventParams, item)
|
|
574
|
+
},
|
|
575
|
+
scopedSlots: dropdowns && dropdowns.length
|
|
576
|
+
? {
|
|
577
|
+
dropdowns: () => $xeToolbar.renderDropdowns(h, item, false)
|
|
578
|
+
}
|
|
579
|
+
: {}
|
|
580
|
+
})
|
|
587
581
|
)
|
|
588
|
-
} else {
|
|
589
|
-
if (VxeUIButtonComponent) {
|
|
590
|
-
btnVNs.push(
|
|
591
|
-
h(VxeUIButtonComponent, {
|
|
592
|
-
key: tIndex,
|
|
593
|
-
props: Object.assign({}, item, {
|
|
594
|
-
content: item.content || item.name,
|
|
595
|
-
options: undefined
|
|
596
|
-
}),
|
|
597
|
-
on: {
|
|
598
|
-
click: (eventParams: VxeButtonDefines.ClickEventParams) => $xeToolbar.tolEvent(eventParams, item)
|
|
599
|
-
},
|
|
600
|
-
scopedSlots: dropdowns && dropdowns.length
|
|
601
|
-
? {
|
|
602
|
-
dropdowns: () => $xeToolbar.renderDropdowns(h, item, false)
|
|
603
|
-
}
|
|
604
|
-
: {}
|
|
605
|
-
})
|
|
606
|
-
)
|
|
607
|
-
}
|
|
608
582
|
}
|
|
609
583
|
}
|
|
610
|
-
}
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
}, getSlotVNs(toolSuffixSlot.call($xeToolbar, { tools: tools || [], $grid: $xeGrid, $gantt: $xeGantt, $table: $table })))
|
|
625
|
-
)
|
|
626
|
-
}
|
|
627
|
-
return rtVNs
|
|
584
|
+
}
|
|
585
|
+
})
|
|
586
|
+
}
|
|
587
|
+
return [
|
|
588
|
+
h('div', {
|
|
589
|
+
class: 'vxe-tool--prefix-wrapper'
|
|
590
|
+
}, toolPrefixSlot ? getSlotVNs(toolPrefixSlot.call($xeToolbar, { tools: tools || [], $grid: $xeGrid, $gantt: $xeGantt, $table: $table })) : []),
|
|
591
|
+
h('div', {
|
|
592
|
+
class: 'vxe-tool--item-wrapper'
|
|
593
|
+
}, toolsSlot ? getSlotVNs(toolsSlot.call($xeToolbar, { tools: tools || [], $grid: $xeGrid, $gantt: $xeGantt, $table: $table })) : btnVNs),
|
|
594
|
+
h('div', {
|
|
595
|
+
class: 'vxe-tool--suffix-wrapper'
|
|
596
|
+
}, toolSuffixSlot ? getSlotVNs(toolSuffixSlot.call($xeToolbar, { tools: tools || [], $grid: $xeGrid, $gantt: $xeGantt, $table: $table })) : [])
|
|
597
|
+
]
|
|
628
598
|
},
|
|
629
599
|
renderToolImport (h: CreateElement) {
|
|
630
600
|
// 使用已安装的组件,如果未安装则不渲染
|
|
@@ -81,6 +81,16 @@
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
.vxe-button--item-wrapper,
|
|
84
|
+
.vxe-tool--item-wrapper {
|
|
85
|
+
flex-grow: 1;
|
|
86
|
+
}
|
|
87
|
+
.vxe-button--prefix-wrapper,
|
|
88
|
+
.vxe-button--suffix-wrapper,
|
|
89
|
+
.vxe-tool--prefix-wrapper,
|
|
90
|
+
.vxe-tool--suffix-wrapper {
|
|
91
|
+
flex-shrink: 0;
|
|
92
|
+
}
|
|
93
|
+
.vxe-button--item-wrapper,
|
|
84
94
|
.vxe-tool--item-wrapper,
|
|
85
95
|
.vxe-button--prefix-wrapper,
|
|
86
96
|
.vxe-button--suffix-wrapper,
|
|
@@ -88,7 +98,6 @@
|
|
|
88
98
|
.vxe-tool--suffix-wrapper {
|
|
89
99
|
display: flex;
|
|
90
100
|
align-items: center;
|
|
91
|
-
flex-shrink: 0;
|
|
92
101
|
flex-wrap: wrap;
|
|
93
102
|
}
|
|
94
103
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|