vxe-table 4.7.46 → 4.7.48

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 (77) hide show
  1. package/es/components.js +7 -3
  2. package/es/locale/lang/en-US.js +7 -1
  3. package/es/locale/lang/es-ES.js +7 -1
  4. package/es/locale/lang/ja-JP.js +7 -1
  5. package/es/locale/lang/pt-BR.js +7 -1
  6. package/es/locale/lang/zh-CN.js +9 -3
  7. package/es/locale/lang/zh-TC.js +9 -3
  8. package/es/style.css +1 -1
  9. package/es/style.min.css +1 -1
  10. package/es/table/module/filter/panel.js +2 -2
  11. package/es/table/render/index.js +40 -2
  12. package/es/table/style.css +2 -1
  13. package/es/table/style.min.css +1 -1
  14. package/es/ui/index.js +2 -2
  15. package/es/ui/src/log.js +1 -1
  16. package/es/vxe-table/style.css +2 -1
  17. package/es/vxe-table/style.min.css +1 -1
  18. package/lib/components.js +7 -3
  19. package/lib/components.min.js +1 -1
  20. package/lib/index.umd.js +82 -15
  21. package/lib/index.umd.min.js +1 -1
  22. package/lib/locale/lang/en-US.js +7 -1
  23. package/lib/locale/lang/en-US.min.js +1 -1
  24. package/lib/locale/lang/en-US.umd.js +7 -1
  25. package/lib/locale/lang/es-ES.js +7 -1
  26. package/lib/locale/lang/es-ES.min.js +1 -1
  27. package/lib/locale/lang/es-ES.umd.js +7 -1
  28. package/lib/locale/lang/ja-JP.js +7 -1
  29. package/lib/locale/lang/ja-JP.min.js +1 -1
  30. package/lib/locale/lang/ja-JP.umd.js +7 -1
  31. package/lib/locale/lang/pt-BR.js +7 -1
  32. package/lib/locale/lang/pt-BR.min.js +1 -1
  33. package/lib/locale/lang/pt-BR.umd.js +7 -1
  34. package/lib/locale/lang/zh-CN.js +9 -3
  35. package/lib/locale/lang/zh-CN.min.js +1 -1
  36. package/lib/locale/lang/zh-CN.umd.js +9 -3
  37. package/lib/locale/lang/zh-HK.min.js +1 -1
  38. package/lib/locale/lang/zh-HK.umd.js +9 -3
  39. package/lib/locale/lang/zh-MO.min.js +1 -1
  40. package/lib/locale/lang/zh-MO.umd.js +9 -3
  41. package/lib/locale/lang/zh-TC.js +9 -3
  42. package/lib/locale/lang/zh-TC.min.js +1 -1
  43. package/lib/locale/lang/zh-TC.umd.js +9 -3
  44. package/lib/locale/lang/zh-TW.min.js +1 -1
  45. package/lib/locale/lang/zh-TW.umd.js +9 -3
  46. package/lib/style.css +1 -1
  47. package/lib/style.min.css +1 -1
  48. package/lib/table/module/filter/panel.js +2 -4
  49. package/lib/table/module/filter/panel.min.js +1 -1
  50. package/lib/table/render/index.js +58 -2
  51. package/lib/table/render/index.min.js +1 -1
  52. package/lib/table/style/style.css +2 -1
  53. package/lib/table/style/style.min.css +1 -1
  54. package/lib/ui/index.js +2 -2
  55. package/lib/ui/index.min.js +1 -1
  56. package/lib/ui/src/log.js +1 -1
  57. package/lib/ui/src/log.min.js +1 -1
  58. package/lib/vxe-table/style/style.css +2 -1
  59. package/lib/vxe-table/style/style.min.css +1 -1
  60. package/package.json +2 -2
  61. package/packages/components.ts +7 -3
  62. package/packages/locale/lang/en-US.ts +7 -1
  63. package/packages/locale/lang/es-ES.ts +7 -1
  64. package/packages/locale/lang/ja-JP.ts +7 -1
  65. package/packages/locale/lang/pt-BR.ts +7 -1
  66. package/packages/locale/lang/zh-CN.ts +9 -3
  67. package/packages/locale/lang/zh-TC.ts +9 -3
  68. package/packages/table/module/filter/panel.ts +2 -2
  69. package/packages/table/render/index.ts +47 -2
  70. package/styles/components/table-module/export.scss +1 -1
  71. package/styles/components/table.scss +1 -0
  72. /package/es/{iconfont.1720498452939.ttf → iconfont.1720698597734.ttf} +0 -0
  73. /package/es/{iconfont.1720498452939.woff → iconfont.1720698597734.woff} +0 -0
  74. /package/es/{iconfont.1720498452939.woff2 → iconfont.1720698597734.woff2} +0 -0
  75. /package/lib/{iconfont.1720498452939.ttf → iconfont.1720698597734.ttf} +0 -0
  76. /package/lib/{iconfont.1720498452939.woff → iconfont.1720698597734.woff} +0 -0
  77. /package/lib/{iconfont.1720498452939.woff2 → iconfont.1720698597734.woff2} +0 -0
@@ -464,6 +464,18 @@ function defaultSelectEditRender (renderOpts: any, params: any) {
464
464
  ]
465
465
  }
466
466
 
467
+ function defaultTreeSelectEditRender (renderOpts: any, params: any) {
468
+ const { row, column } = params
469
+ const { options, optionProps } = renderOpts
470
+ const cellValue = getCellValue(row, column)
471
+ return [
472
+ h(getDefaultComponent(renderOpts), {
473
+ ...getCellEditProps(renderOpts, params, cellValue, { options, optionProps }),
474
+ ...getEditOns(renderOpts, params)
475
+ })
476
+ ]
477
+ }
478
+
467
479
  /**
468
480
  * 已废弃
469
481
  * @deprecated
@@ -481,13 +493,13 @@ function oldSelectEditRender (renderOpts: any, params: any) {
481
493
  }
482
494
 
483
495
  function getSelectCellValue (renderOpts: any, { row, column }: any) {
484
- const { props = {}, options, optionGroups, optionProps = {}, optionGroupProps = {} } = renderOpts
496
+ const { options, optionGroups, optionProps = {}, optionGroupProps = {} } = renderOpts
485
497
  const cellValue = XEUtils.get(row, column.property)
486
498
  let selectItem: any
487
499
  const labelProp = optionProps.label || 'label'
488
500
  const valueProp = optionProps.value || 'value'
489
501
  if (!isEmptyValue(cellValue)) {
490
- return XEUtils.map(props.multiple ? cellValue : [cellValue],
502
+ return XEUtils.map(XEUtils.isArray(cellValue) ? cellValue : [cellValue],
491
503
  optionGroups
492
504
  ? (value) => {
493
505
  const groupOptions = optionGroupProps.options || 'options'
@@ -515,6 +527,31 @@ function handleExportSelectMethod (params: any) {
515
527
  return options.original ? getCellValue(row, column) : getSelectCellValue(column.editRender || column.cellRender, params)
516
528
  }
517
529
 
530
+ function getTreeSelectCellValue (renderOpts: any, { row, column }: any) {
531
+ const { options, optionProps = {} } = renderOpts
532
+ const cellValue = XEUtils.get(row, column.property)
533
+ const labelProp = optionProps.label || 'label'
534
+ const valueProp = optionProps.value || 'value'
535
+ const childrenProp = optionProps.children || 'children'
536
+ if (!isEmptyValue(cellValue)) {
537
+ const keyMaps: Record<string, any> = {}
538
+ XEUtils.eachTree(options, item => {
539
+ keyMaps[XEUtils.get(item, valueProp)] = item
540
+ }, { children: childrenProp })
541
+ return XEUtils.map(XEUtils.isArray(cellValue) ? cellValue : [cellValue], (value) => {
542
+ const item = keyMaps[value]
543
+ return item ? XEUtils.get(item, labelProp) : item
544
+ }
545
+ ).join(', ')
546
+ }
547
+ return ''
548
+ }
549
+
550
+ function handleExportTreeSelectMethod (params: any) {
551
+ const { row, column, options } = params
552
+ return options.original ? getCellValue(row, column) : getTreeSelectCellValue(column.editRender || column.cellRender, params)
553
+ }
554
+
518
555
  /**
519
556
  * 表格 - 渲染器
520
557
  */
@@ -664,6 +701,14 @@ renderer.mixin({
664
701
  defaultFilterMethod: handleFilterMethod,
665
702
  exportMethod: handleExportSelectMethod
666
703
  },
704
+ VxeTreeSelect: {
705
+ autofocus: '.vxe-input--inner',
706
+ renderEdit: defaultTreeSelectEditRender,
707
+ renderCell (renderOpts, params) {
708
+ return getCellLabelVNs(renderOpts, params, getTreeSelectCellValue(renderOpts, params))
709
+ },
710
+ exportMethod: handleExportTreeSelectMethod
711
+ },
667
712
  VxeRadioGroup: {
668
713
  renderDefault: radioAndCheckboxEditRender
669
714
  },
@@ -90,10 +90,10 @@
90
90
  cursor: pointer;
91
91
  }
92
92
  &:hover {
93
+ color: var(--vxe-ui-font-primary-color);
93
94
  & > i {
94
95
  display: block;
95
96
  }
96
- color: var(--vxe-ui-font-primary-color);
97
97
  }
98
98
  }
99
99
  .vxe-import-select--file {
@@ -92,6 +92,7 @@
92
92
  & > .vxe-input,
93
93
  & > .vxe-textarea,
94
94
  & > .vxe-select,
95
+ & > .vxe-tree-select,
95
96
  & > .vxe-date-picker,
96
97
  & > .vxe-number-input {
97
98
  width: 100%;