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.
- package/es/components.js +7 -3
- package/es/locale/lang/en-US.js +7 -1
- package/es/locale/lang/es-ES.js +7 -1
- package/es/locale/lang/ja-JP.js +7 -1
- package/es/locale/lang/pt-BR.js +7 -1
- package/es/locale/lang/zh-CN.js +9 -3
- package/es/locale/lang/zh-TC.js +9 -3
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/filter/panel.js +2 -2
- package/es/table/render/index.js +40 -2
- package/es/table/style.css +2 -1
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +2 -2
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +2 -1
- package/es/vxe-table/style.min.css +1 -1
- package/lib/components.js +7 -3
- package/lib/components.min.js +1 -1
- package/lib/index.umd.js +82 -15
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/en-US.js +7 -1
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +7 -1
- package/lib/locale/lang/es-ES.js +7 -1
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +7 -1
- package/lib/locale/lang/ja-JP.js +7 -1
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +7 -1
- package/lib/locale/lang/pt-BR.js +7 -1
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +7 -1
- package/lib/locale/lang/zh-CN.js +9 -3
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +9 -3
- package/lib/locale/lang/zh-HK.min.js +1 -1
- package/lib/locale/lang/zh-HK.umd.js +9 -3
- package/lib/locale/lang/zh-MO.min.js +1 -1
- package/lib/locale/lang/zh-MO.umd.js +9 -3
- package/lib/locale/lang/zh-TC.js +9 -3
- package/lib/locale/lang/zh-TC.min.js +1 -1
- package/lib/locale/lang/zh-TC.umd.js +9 -3
- package/lib/locale/lang/zh-TW.min.js +1 -1
- package/lib/locale/lang/zh-TW.umd.js +9 -3
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/filter/panel.js +2 -4
- package/lib/table/module/filter/panel.min.js +1 -1
- package/lib/table/render/index.js +58 -2
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/style/style.css +2 -1
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +2 -2
- 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-table/style/style.css +2 -1
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/components.ts +7 -3
- package/packages/locale/lang/en-US.ts +7 -1
- package/packages/locale/lang/es-ES.ts +7 -1
- package/packages/locale/lang/ja-JP.ts +7 -1
- package/packages/locale/lang/pt-BR.ts +7 -1
- package/packages/locale/lang/zh-CN.ts +9 -3
- package/packages/locale/lang/zh-TC.ts +9 -3
- package/packages/table/module/filter/panel.ts +2 -2
- package/packages/table/render/index.ts +47 -2
- package/styles/components/table-module/export.scss +1 -1
- package/styles/components/table.scss +1 -0
- /package/es/{iconfont.1720498452939.ttf → iconfont.1720698597734.ttf} +0 -0
- /package/es/{iconfont.1720498452939.woff → iconfont.1720698597734.woff} +0 -0
- /package/es/{iconfont.1720498452939.woff2 → iconfont.1720698597734.woff2} +0 -0
- /package/lib/{iconfont.1720498452939.ttf → iconfont.1720698597734.ttf} +0 -0
- /package/lib/{iconfont.1720498452939.woff → iconfont.1720698597734.woff} +0 -0
- /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 {
|
|
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(
|
|
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
|
},
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|