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.
Files changed (36) hide show
  1. package/es/index.css +1 -1
  2. package/es/index.min.css +1 -1
  3. package/es/style.css +1 -1
  4. package/es/style.min.css +1 -1
  5. package/es/toolbar/src/toolbar.js +73 -91
  6. package/es/toolbar/style.css +10 -1
  7. package/es/toolbar/style.min.css +1 -1
  8. package/es/ui/index.js +1 -1
  9. package/es/ui/src/log.js +1 -1
  10. package/es/vxe-toolbar/style.css +10 -1
  11. package/es/vxe-toolbar/style.min.css +1 -1
  12. package/lib/index.css +1 -1
  13. package/lib/index.min.css +1 -1
  14. package/lib/index.umd.js +117 -143
  15. package/lib/index.umd.min.js +1 -1
  16. package/lib/style.css +1 -1
  17. package/lib/style.min.css +1 -1
  18. package/lib/toolbar/src/toolbar.js +117 -143
  19. package/lib/toolbar/src/toolbar.min.js +1 -1
  20. package/lib/toolbar/style/style.css +10 -1
  21. package/lib/toolbar/style/style.min.css +1 -1
  22. package/lib/ui/index.js +1 -1
  23. package/lib/ui/index.min.js +1 -1
  24. package/lib/ui/src/log.js +1 -1
  25. package/lib/ui/src/log.min.js +1 -1
  26. package/lib/vxe-toolbar/style/style.css +10 -1
  27. package/lib/vxe-toolbar/style/style.min.css +1 -1
  28. package/package.json +1 -1
  29. package/packages/toolbar/src/toolbar.ts +87 -117
  30. package/styles/components/toolbar.scss +10 -1
  31. /package/es/{iconfont.1764811572357.ttf → iconfont.1764834414498.ttf} +0 -0
  32. /package/es/{iconfont.1764811572357.woff → iconfont.1764834414498.woff} +0 -0
  33. /package/es/{iconfont.1764811572357.woff2 → iconfont.1764834414498.woff2} +0 -0
  34. /package/lib/{iconfont.1764811572357.ttf → iconfont.1764834414498.ttf} +0 -0
  35. /package/lib/{iconfont.1764811572357.woff → iconfont.1764834414498.woff} +0 -0
  36. /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 lbVNs: VxeComponentSlotType[] = []
405
- if (buttonPrefixSlot) {
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 }
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('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)))
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
- 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
- )
456
- }
457
- if (buttonSuffixSlot) {
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
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 rtVNs: VxeComponentSlotType[] = []
479
- if (toolPrefixSlot) {
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 }
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('span', {
500
- key: rdName as string,
501
- class: ['vxe-tool--item', toolbarToolClassName ? (XEUtils.isFunction(toolbarToolClassName) ? toolbarToolClassName(params) : toolbarToolClassName) : '']
502
- }, getSlotVNs(compConf.renderToolbarTool(toolRender, params)))
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
- 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
- )
531
- }
532
- if (toolSuffixSlot) {
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
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
  }