vxe-table 4.17.25 → 4.17.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 +73 -91
- 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 +117 -143
- 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 +117 -143
- 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 +87 -117
- package/styles/components/toolbar.scss +10 -1
- /package/es/{iconfont.1764811572357.ttf → iconfont.1764834414498.ttf} +0 -0
- /package/es/{iconfont.1764811572357.woff → iconfont.1764834414498.woff} +0 -0
- /package/es/{iconfont.1764811572357.woff2 → iconfont.1764834414498.woff2} +0 -0
- /package/lib/{iconfont.1764811572357.ttf → iconfont.1764834414498.ttf} +0 -0
- /package/lib/{iconfont.1764811572357.woff → iconfont.1764834414498.woff} +0 -0
- /package/lib/{iconfont.1764811572357.woff2 → iconfont.1764834414498.woff2} +0 -0
|
@@ -401,68 +401,53 @@ export default defineVxeComponent({
|
|
|
401
401
|
const buttonsSlot = slots.buttons
|
|
402
402
|
const buttonPrefixSlot = slots.buttonPrefix || slots['button-prefix']
|
|
403
403
|
const buttonSuffixSlot = slots.buttonSuffix || slots['button-suffix']
|
|
404
|
-
const
|
|
405
|
-
if (
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
if (
|
|
421
|
-
const toolbarButtonClassName = compConf.toolbarButtonClassName
|
|
422
|
-
const params = { $grid: $xeGrid, $gantt: $xeGantt, $table: $table!, button: item }
|
|
404
|
+
const btnVNs: VxeComponentSlotType[] = []
|
|
405
|
+
if (buttons) {
|
|
406
|
+
buttons.forEach((item, index) => {
|
|
407
|
+
const { dropdowns, buttonRender } = item
|
|
408
|
+
if (item.visible !== false) {
|
|
409
|
+
const compConf = buttonRender ? renderer.get(buttonRender.name) : null
|
|
410
|
+
if (buttonRender && compConf && compConf.renderToolbarButton) {
|
|
411
|
+
const toolbarButtonClassName = compConf.toolbarButtonClassName
|
|
412
|
+
const params = { $grid: $xeGrid, $gantt: $xeGantt, $table: $table!, button: item }
|
|
413
|
+
btnVNs.push(
|
|
414
|
+
h('span', {
|
|
415
|
+
key: `br${item.code || index}`,
|
|
416
|
+
class: ['vxe-button--item', toolbarButtonClassName ? (XEUtils.isFunction(toolbarButtonClassName) ? toolbarButtonClassName(params) : toolbarButtonClassName) : '']
|
|
417
|
+
}, getSlotVNs(compConf.renderToolbarButton(buttonRender, params)))
|
|
418
|
+
)
|
|
419
|
+
} else {
|
|
420
|
+
if (VxeUIButtonComponent) {
|
|
423
421
|
btnVNs.push(
|
|
424
|
-
h(
|
|
425
|
-
key: `
|
|
426
|
-
|
|
427
|
-
|
|
422
|
+
h(VxeUIButtonComponent, {
|
|
423
|
+
key: `bd${item.code || index}`,
|
|
424
|
+
...Object.assign({}, item, {
|
|
425
|
+
content: item.content || item.name,
|
|
426
|
+
options: undefined
|
|
427
|
+
}),
|
|
428
|
+
onClick: (eventParams) => btnEvent(eventParams, item)
|
|
429
|
+
}, dropdowns && dropdowns.length
|
|
430
|
+
? {
|
|
431
|
+
dropdowns: () => renderDropdowns(item, true)
|
|
432
|
+
}
|
|
433
|
+
: {})
|
|
428
434
|
)
|
|
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
|
-
}
|
|
446
435
|
}
|
|
447
436
|
}
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
}, getSlotVNs(buttonSuffixSlot({ buttons: buttons || [], $grid: $xeGrid, $gantt: $xeGantt, $table: $table })))
|
|
463
|
-
)
|
|
464
|
-
}
|
|
465
|
-
return lbVNs
|
|
437
|
+
}
|
|
438
|
+
})
|
|
439
|
+
}
|
|
440
|
+
return [
|
|
441
|
+
h('div', {
|
|
442
|
+
class: 'vxe-button--prefix-wrapper'
|
|
443
|
+
}, buttonPrefixSlot ? getSlotVNs(buttonPrefixSlot({ buttons: buttons || [], $grid: $xeGrid, $gantt: $xeGantt, $table: $table })) : []),
|
|
444
|
+
h('div', {
|
|
445
|
+
class: 'vxe-button--item-wrapper'
|
|
446
|
+
}, buttonsSlot ? getSlotVNs(buttonsSlot({ buttons: buttons || [], $grid: $xeGrid, $gantt: $xeGantt, $table: $table })) : btnVNs),
|
|
447
|
+
h('div', {
|
|
448
|
+
class: 'vxe-button--suffix-wrapper'
|
|
449
|
+
}, buttonSuffixSlot ? getSlotVNs(buttonSuffixSlot({ buttons: buttons || [], $grid: $xeGrid, $gantt: $xeGantt, $table: $table })) : [])
|
|
450
|
+
]
|
|
466
451
|
}
|
|
467
452
|
|
|
468
453
|
/**
|
|
@@ -475,69 +460,54 @@ export default defineVxeComponent({
|
|
|
475
460
|
const toolsSlot = slots.tools
|
|
476
461
|
const toolPrefixSlot = slots.toolPrefix || slots['tool-prefix']
|
|
477
462
|
const toolSuffixSlot = slots.toolSuffix || slots['tool-suffix']
|
|
478
|
-
const
|
|
479
|
-
if (
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
if (
|
|
496
|
-
const toolbarToolClassName = compConf.toolbarToolClassName
|
|
497
|
-
const params = { $grid: $xeGrid, $gantt: $xeGantt, $table: $table!, tool: item }
|
|
463
|
+
const btnVNs: VxeComponentSlotType[] = []
|
|
464
|
+
if (tools) {
|
|
465
|
+
tools.forEach((item, tIndex) => {
|
|
466
|
+
const { dropdowns, toolRender } = item
|
|
467
|
+
if (item.visible !== false) {
|
|
468
|
+
const rdName = toolRender ? toolRender.name : null
|
|
469
|
+
const compConf = toolRender ? renderer.get(rdName) : null
|
|
470
|
+
if (toolRender && compConf && compConf.renderToolbarTool) {
|
|
471
|
+
const toolbarToolClassName = compConf.toolbarToolClassName
|
|
472
|
+
const params = { $grid: $xeGrid, $gantt: $xeGantt, $table: $table!, tool: item }
|
|
473
|
+
btnVNs.push(
|
|
474
|
+
h('span', {
|
|
475
|
+
key: rdName as string,
|
|
476
|
+
class: ['vxe-tool--item', toolbarToolClassName ? (XEUtils.isFunction(toolbarToolClassName) ? toolbarToolClassName(params) : toolbarToolClassName) : '']
|
|
477
|
+
}, getSlotVNs(compConf.renderToolbarTool(toolRender, params)))
|
|
478
|
+
)
|
|
479
|
+
} else {
|
|
480
|
+
if (VxeUIButtonComponent) {
|
|
498
481
|
btnVNs.push(
|
|
499
|
-
h(
|
|
500
|
-
key:
|
|
501
|
-
|
|
502
|
-
|
|
482
|
+
h(VxeUIButtonComponent, {
|
|
483
|
+
key: tIndex,
|
|
484
|
+
...Object.assign({}, item, {
|
|
485
|
+
content: item.content || item.name,
|
|
486
|
+
options: undefined
|
|
487
|
+
}),
|
|
488
|
+
onClick: (eventParams) => tolEvent(eventParams, item)
|
|
489
|
+
}, dropdowns && dropdowns.length
|
|
490
|
+
? {
|
|
491
|
+
dropdowns: () => renderDropdowns(item, false)
|
|
492
|
+
}
|
|
493
|
+
: {})
|
|
503
494
|
)
|
|
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
|
-
}
|
|
521
495
|
}
|
|
522
496
|
}
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
}, getSlotVNs(toolSuffixSlot({ tools: tools || [], $grid: $xeGrid, $gantt: $xeGantt, $table: $table })))
|
|
538
|
-
)
|
|
539
|
-
}
|
|
540
|
-
return rtVNs
|
|
497
|
+
}
|
|
498
|
+
})
|
|
499
|
+
}
|
|
500
|
+
return [
|
|
501
|
+
h('div', {
|
|
502
|
+
class: 'vxe-tool--prefix-wrapper'
|
|
503
|
+
}, toolPrefixSlot ? getSlotVNs(toolPrefixSlot({ tools: tools || [], $grid: $xeGrid, $gantt: $xeGantt, $table: $table })) : []),
|
|
504
|
+
h('div', {
|
|
505
|
+
class: 'vxe-tool--item-wrapper'
|
|
506
|
+
}, toolsSlot ? getSlotVNs(toolsSlot({ tools: tools || [], $grid: $xeGrid, $gantt: $xeGantt, $table: $table })) : btnVNs),
|
|
507
|
+
h('div', {
|
|
508
|
+
class: 'vxe-tool--suffix-wrapper'
|
|
509
|
+
}, toolSuffixSlot ? getSlotVNs(toolSuffixSlot({ tools: tools || [], $grid: $xeGrid, $gantt: $xeGantt, $table: $table })) : [])
|
|
510
|
+
]
|
|
541
511
|
}
|
|
542
512
|
|
|
543
513
|
const renderToolImport = () => {
|
|
@@ -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
|