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.
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 +85 -103
  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 +121 -147
  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 +121 -147
  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 +91 -121
  30. package/styles/components/toolbar.scss +10 -1
  31. /package/es/{iconfont.1764811551687.ttf → iconfont.1764834392345.ttf} +0 -0
  32. /package/es/{iconfont.1764811551687.woff → iconfont.1764834392345.woff} +0 -0
  33. /package/es/{iconfont.1764811551687.woff2 → iconfont.1764834392345.woff2} +0 -0
  34. /package/lib/{iconfont.1764811551687.ttf → iconfont.1764834392345.ttf} +0 -0
  35. /package/lib/{iconfont.1764811551687.woff → iconfont.1764834392345.woff} +0 -0
  36. /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 lbVNs: VxeComponentSlotType[] = []
479
- if (buttonPrefixSlot) {
480
- lbVNs.push(
481
- h('span', {
482
- key: 'tbp',
483
- class: 'vxe-button--prefix-wrapper'
484
- }, getSlotVNs(buttonPrefixSlot.call($xeToolbar, { buttons: buttons || [], $grid: $xeGrid, $gantt: $xeGantt, $table: $table })))
485
- )
486
- }
487
- if (buttons || buttonsSlot) {
488
- const btnVNs: VxeComponentSlotType[] = []
489
- if (buttons) {
490
- buttons.forEach((item) => {
491
- const { dropdowns, buttonRender } = item
492
- if (item.visible !== false) {
493
- const compConf = buttonRender ? renderer.get(buttonRender.name) : null
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('span', {
499
- class: ['vxe-button--item', toolbarButtonClassName ? (XEUtils.isFunction(toolbarButtonClassName) ? toolbarButtonClassName(params) : toolbarButtonClassName) : '']
500
- }, getSlotVNs(compConf.renderToolbarButton(h, buttonRender, params)))
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
- lbVNs.push(
526
- h('span', {
527
- key: 'tti',
528
- class: 'vxe-button--item-wrapper'
529
- }, buttonsSlot ? getSlotVNs(buttonsSlot.call($xeToolbar, { buttons: buttons || [], $grid: $xeGrid, $gantt: $xeGantt, $table: $table })) : btnVNs)
530
- )
531
- }
532
- if (buttonSuffixSlot) {
533
- lbVNs.push(
534
- h('span', {
535
- key: 'tbs',
536
- class: 'vxe-button--suffix-wrapper'
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 rtVNs: VxeComponentSlotType[] = []
563
- if (toolPrefixSlot) {
564
- rtVNs.push(
565
- h('span', {
566
- key: 'ttp',
567
- class: 'vxe-tool--prefix-wrapper'
568
- }, getSlotVNs(toolPrefixSlot.call($xeToolbar, { tools: tools || [], $grid: $xeGrid, $gantt: $xeGantt, $table: $table })))
569
- )
570
- }
571
- if (tools || toolsSlot) {
572
- const btnVNs: VxeComponentSlotType[] = []
573
- if (tools) {
574
- tools.forEach((item, tIndex) => {
575
- const { dropdowns, toolRender } = item
576
- if (item.visible !== false) {
577
- const rdName = toolRender ? toolRender.name : null
578
- const compConf = toolRender ? renderer.get(rdName) : null
579
- if (toolRender && compConf && compConf.renderToolbarTool) {
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('span', {
584
- key: rdName as string,
585
- class: ['vxe-tool--item', toolbarToolClassName ? (XEUtils.isFunction(toolbarToolClassName) ? toolbarToolClassName(params) : toolbarToolClassName) : '']
586
- }, getSlotVNs(compConf.renderToolbarTool(h, toolRender, params)))
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
- rtVNs.push(
613
- h('span', {
614
- key: 'tti',
615
- class: 'vxe-tool--item-wrapper'
616
- }, toolsSlot ? getSlotVNs(toolsSlot.call($xeToolbar, { tools: tools || [], $grid: $xeGrid, $gantt: $xeGantt, $table: $table })) : btnVNs)
617
- )
618
- }
619
- if (toolSuffixSlot) {
620
- rtVNs.push(
621
- h('span', {
622
- key: 'tts',
623
- class: 'vxe-tool--suffix-wrapper'
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
  }