vxe-table 4.7.64 → 4.7.66
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/grid/src/grid.js +21 -11
- package/es/locale/lang/en-US.js +17 -8
- package/es/locale/lang/es-ES.js +17 -8
- package/es/locale/lang/hu-HU.js +624 -0
- package/es/locale/lang/ja-JP.js +17 -8
- package/es/locale/lang/ko-KR.js +634 -0
- package/es/locale/lang/pt-BR.js +17 -8
- package/es/locale/lang/ru-RU.js +634 -0
- package/es/locale/lang/vi-VN.js +634 -0
- package/es/locale/lang/zh-CN.js +17 -8
- package/es/locale/lang/zh-TC.js +75 -66
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/panel.js +12 -11
- package/es/table/module/edit/hook.js +11 -10
- package/es/table/module/export/hook.js +10 -6
- package/es/table/render/index.js +95 -84
- package/es/table/src/table.js +22 -2
- package/es/table/style.css +8 -4
- package/es/table/style.min.css +1 -1
- package/es/toolbar/src/toolbar.js +7 -7
- package/es/ui/index.js +6 -4
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +8 -4
- package/es/vxe-table/style.min.css +1 -1
- package/lib/grid/src/grid.js +25 -14
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +227 -150
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/en-US.js +17 -8
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +17 -8
- package/lib/locale/lang/es-ES.js +17 -8
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +17 -8
- package/lib/locale/lang/hu-HU.js +630 -0
- package/lib/locale/lang/hu-HU.min.js +1 -0
- package/lib/locale/lang/ja-JP.js +17 -8
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +17 -8
- package/lib/locale/lang/ko-KR.js +640 -0
- package/lib/locale/lang/ko-KR.min.js +1 -0
- package/lib/locale/lang/pt-BR.js +17 -8
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +17 -8
- package/lib/locale/lang/ru-RU.js +640 -0
- package/lib/locale/lang/ru-RU.min.js +1 -0
- package/lib/locale/lang/vi-VN.js +640 -0
- package/lib/locale/lang/vi-VN.min.js +1 -0
- package/lib/locale/lang/zh-CN.js +17 -8
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +17 -8
- package/lib/locale/lang/zh-HK.min.js +1 -1
- package/lib/locale/lang/zh-HK.umd.js +75 -66
- package/lib/locale/lang/zh-MO.min.js +1 -1
- package/lib/locale/lang/zh-MO.umd.js +75 -66
- package/lib/locale/lang/zh-TC.js +75 -66
- package/lib/locale/lang/zh-TC.min.js +1 -1
- package/lib/locale/lang/zh-TC.umd.js +75 -66
- package/lib/locale/lang/zh-TW.min.js +1 -1
- package/lib/locale/lang/zh-TW.umd.js +75 -66
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/panel.js +18 -11
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/hook.js +11 -13
- package/lib/table/module/edit/hook.min.js +1 -1
- package/lib/table/module/export/hook.js +12 -6
- package/lib/table/module/export/hook.min.js +1 -1
- package/lib/table/render/index.js +98 -84
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/table.js +22 -2
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +8 -4
- package/lib/table/style/style.min.css +1 -1
- package/lib/toolbar/src/toolbar.js +17 -7
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/ui/index.js +10 -8
- 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 +8 -4
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +22 -11
- package/packages/locale/lang/en-US.ts +17 -8
- package/packages/locale/lang/es-ES.ts +17 -8
- package/packages/locale/lang/hu-HU.ts +626 -0
- package/packages/locale/lang/ja-JP.ts +17 -8
- package/packages/locale/lang/ko-KR.ts +636 -0
- package/packages/locale/lang/pt-BR.ts +17 -8
- package/packages/locale/lang/ru-RU.ts +636 -0
- package/packages/locale/lang/vi-VN.ts +636 -0
- package/packages/locale/lang/zh-CN.ts +17 -8
- package/packages/locale/lang/zh-TC.ts +75 -66
- package/packages/table/module/custom/panel.ts +13 -12
- package/packages/table/module/edit/hook.ts +11 -10
- package/packages/table/module/export/hook.ts +10 -6
- package/packages/table/render/index.ts +95 -84
- package/packages/table/src/table.ts +25 -3
- package/packages/toolbar/src/toolbar.ts +8 -8
- package/packages/ui/index.ts +4 -3
- package/styles/components/table.scss +6 -3
- /package/es/{iconfont.1723218795604.ttf → iconfont.1724145396059.ttf} +0 -0
- /package/es/{iconfont.1723218795604.woff → iconfont.1724145396059.woff} +0 -0
- /package/es/{iconfont.1723218795604.woff2 → iconfont.1724145396059.woff2} +0 -0
- /package/lib/{iconfont.1723218795604.ttf → iconfont.1724145396059.ttf} +0 -0
- /package/lib/{iconfont.1723218795604.woff → iconfont.1724145396059.woff} +0 -0
- /package/lib/{iconfont.1723218795604.woff2 → iconfont.1724145396059.woff2} +0 -0
|
@@ -436,14 +436,14 @@ function oldFilterRender (renderOpts: any, params: any) {
|
|
|
436
436
|
|
|
437
437
|
function handleFilterMethod ({ option, row, column }: any) {
|
|
438
438
|
const { data } = option
|
|
439
|
-
const cellValue = XEUtils.get(row, column.
|
|
439
|
+
const cellValue = XEUtils.get(row, column.field)
|
|
440
440
|
/* eslint-disable eqeqeq */
|
|
441
441
|
return cellValue == data
|
|
442
442
|
}
|
|
443
443
|
|
|
444
444
|
function handleInputFilterMethod ({ option, row, column }: any) {
|
|
445
445
|
const { data } = option
|
|
446
|
-
const cellValue = XEUtils.get(row, column.
|
|
446
|
+
const cellValue = XEUtils.get(row, column.field)
|
|
447
447
|
/* eslint-disable eqeqeq */
|
|
448
448
|
return XEUtils.toValueString(cellValue).indexOf(data) > -1
|
|
449
449
|
}
|
|
@@ -501,7 +501,7 @@ function oldSelectEditRender (renderOpts: any, params: any) {
|
|
|
501
501
|
|
|
502
502
|
function getSelectCellValue (renderOpts: any, { row, column }: any) {
|
|
503
503
|
const { options, optionGroups, optionProps = {}, optionGroupProps = {} } = renderOpts
|
|
504
|
-
const cellValue = XEUtils.get(row, column.
|
|
504
|
+
const cellValue = XEUtils.get(row, column.field)
|
|
505
505
|
let selectItem: any
|
|
506
506
|
const labelProp = optionProps.label || 'label'
|
|
507
507
|
const valueProp = optionProps.value || 'value'
|
|
@@ -536,7 +536,7 @@ function handleExportSelectMethod (params: any) {
|
|
|
536
536
|
|
|
537
537
|
function getTreeSelectCellValue (renderOpts: any, { row, column }: any) {
|
|
538
538
|
const { options, optionProps = {} } = renderOpts
|
|
539
|
-
const cellValue = XEUtils.get(row, column.
|
|
539
|
+
const cellValue = XEUtils.get(row, column.field)
|
|
540
540
|
const labelProp = optionProps.label || 'label'
|
|
541
541
|
const valueProp = optionProps.value || 'value'
|
|
542
542
|
const childrenProp = optionProps.children || 'children'
|
|
@@ -564,23 +564,23 @@ function handleExportTreeSelectMethod (params: any) {
|
|
|
564
564
|
*/
|
|
565
565
|
renderer.mixin({
|
|
566
566
|
input: {
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
567
|
+
tableAutoFocus: 'input',
|
|
568
|
+
renderTableEdit: nativeEditRender,
|
|
569
|
+
renderTableDefault: nativeEditRender,
|
|
570
|
+
renderTableFilter: nativeFilterRender,
|
|
571
|
+
tableFilterDefaultMethod: handleInputFilterMethod
|
|
572
572
|
},
|
|
573
573
|
textarea: {
|
|
574
|
-
|
|
575
|
-
|
|
574
|
+
tableAutoFocus: 'textarea',
|
|
575
|
+
renderTableEdit: nativeEditRender
|
|
576
576
|
},
|
|
577
577
|
select: {
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
578
|
+
renderTableEdit: nativeSelectEditRender,
|
|
579
|
+
renderTableDefault: nativeSelectEditRender,
|
|
580
|
+
renderTableCell (renderOpts, params) {
|
|
581
581
|
return getCellLabelVNs(renderOpts, params, getSelectCellValue(renderOpts, params))
|
|
582
582
|
},
|
|
583
|
-
|
|
583
|
+
renderTableFilter (renderOpts, params) {
|
|
584
584
|
const { column } = params
|
|
585
585
|
return column.filters.map((option, oIndex) => {
|
|
586
586
|
return h('select', {
|
|
@@ -592,17 +592,17 @@ renderer.mixin({
|
|
|
592
592
|
renderOpts.optionGroups ? renderNativeOptgroups(renderOpts, params, renderNativeOptions) : renderNativeOptions(renderOpts.options, renderOpts, params))
|
|
593
593
|
})
|
|
594
594
|
},
|
|
595
|
-
|
|
596
|
-
|
|
595
|
+
tableFilterDefaultMethod: handleFilterMethod,
|
|
596
|
+
tableExportMethod: handleExportSelectMethod
|
|
597
597
|
},
|
|
598
598
|
VxeInput: {
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
599
|
+
tableAutoFocus: 'input',
|
|
600
|
+
renderTableEdit: defaultEditRender,
|
|
601
|
+
renderTableCell (renderOpts, params) {
|
|
602
602
|
const { props = {} } = renderOpts
|
|
603
603
|
const { row, column } = params
|
|
604
604
|
const digits = props.digits || getConfig().input?.digits || 2
|
|
605
|
-
let cellValue = XEUtils.get(row, column.
|
|
605
|
+
let cellValue = XEUtils.get(row, column.field)
|
|
606
606
|
if (cellValue) {
|
|
607
607
|
switch (props.type) {
|
|
608
608
|
case 'date':
|
|
@@ -619,18 +619,18 @@ renderer.mixin({
|
|
|
619
619
|
}
|
|
620
620
|
return getCellLabelVNs(renderOpts, params, cellValue)
|
|
621
621
|
},
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
622
|
+
renderTableDefault: defaultEditRender,
|
|
623
|
+
renderTableFilter: defaultFilterRender,
|
|
624
|
+
tableFilterDefaultMethod: handleInputFilterMethod
|
|
625
625
|
},
|
|
626
626
|
VxeNumberInput: {
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
627
|
+
tableAutoFocus: 'input',
|
|
628
|
+
renderTableEdit: defaultEditRender,
|
|
629
|
+
renderTableCell (renderOpts, params) {
|
|
630
630
|
const { props = {} } = renderOpts
|
|
631
631
|
const { row, column } = params
|
|
632
632
|
const digits = props.digits || getConfig().numberInput?.digits || 2
|
|
633
|
-
let cellValue = XEUtils.get(row, column.
|
|
633
|
+
let cellValue = XEUtils.get(row, column.field)
|
|
634
634
|
if (cellValue) {
|
|
635
635
|
switch (props.type) {
|
|
636
636
|
case 'float':
|
|
@@ -640,17 +640,17 @@ renderer.mixin({
|
|
|
640
640
|
}
|
|
641
641
|
return getCellLabelVNs(renderOpts, params, cellValue)
|
|
642
642
|
},
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
643
|
+
renderTableDefault: defaultEditRender,
|
|
644
|
+
renderTableFilter: defaultFilterRender,
|
|
645
|
+
tableFilterDefaultMethod: handleInputFilterMethod
|
|
646
646
|
},
|
|
647
647
|
VxeDatePicker: {
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
648
|
+
tableAutoFocus: 'input',
|
|
649
|
+
renderTableEdit: defaultEditRender,
|
|
650
|
+
renderTableCell (renderOpts, params) {
|
|
651
651
|
const { props = {} } = renderOpts
|
|
652
652
|
const { row, column } = params
|
|
653
|
-
let cellValue = XEUtils.get(row, column.
|
|
653
|
+
let cellValue = XEUtils.get(row, column.field)
|
|
654
654
|
if (cellValue) {
|
|
655
655
|
switch (props.type) {
|
|
656
656
|
case 'date':
|
|
@@ -664,18 +664,18 @@ renderer.mixin({
|
|
|
664
664
|
}
|
|
665
665
|
return getCellLabelVNs(renderOpts, params, cellValue)
|
|
666
666
|
},
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
667
|
+
renderTableDefault: defaultEditRender,
|
|
668
|
+
renderTableFilter: defaultFilterRender,
|
|
669
|
+
tableFilterDefaultMethod: handleFilterMethod
|
|
670
670
|
},
|
|
671
671
|
VxeTextarea: {
|
|
672
|
-
|
|
672
|
+
tableAutoFocus: 'VxeTextarea'
|
|
673
673
|
},
|
|
674
674
|
VxeButton: {
|
|
675
|
-
|
|
675
|
+
renderTableDefault: buttonCellRender
|
|
676
676
|
},
|
|
677
677
|
VxeButtonGroup: {
|
|
678
|
-
|
|
678
|
+
renderTableDefault (renderOpts, params) {
|
|
679
679
|
const { options } = renderOpts
|
|
680
680
|
return [
|
|
681
681
|
h(getDefaultComponent(renderOpts), {
|
|
@@ -687,13 +687,13 @@ renderer.mixin({
|
|
|
687
687
|
}
|
|
688
688
|
},
|
|
689
689
|
VxeSelect: {
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
690
|
+
tableAutoFocus: 'input',
|
|
691
|
+
renderTableEdit: defaultSelectEditRender,
|
|
692
|
+
renderTableDefault: defaultSelectEditRender,
|
|
693
|
+
renderTableCell (renderOpts, params) {
|
|
694
694
|
return getCellLabelVNs(renderOpts, params, getSelectCellValue(renderOpts, params))
|
|
695
695
|
},
|
|
696
|
-
|
|
696
|
+
renderTableFilter (renderOpts, params) {
|
|
697
697
|
const { column } = params
|
|
698
698
|
const { options, optionProps, optionGroups, optionGroupProps } = renderOpts
|
|
699
699
|
return column.filters.map((option, oIndex) => {
|
|
@@ -705,35 +705,46 @@ renderer.mixin({
|
|
|
705
705
|
})
|
|
706
706
|
})
|
|
707
707
|
},
|
|
708
|
-
|
|
709
|
-
|
|
708
|
+
tableFilterDefaultMethod: handleFilterMethod,
|
|
709
|
+
tableExportMethod: handleExportSelectMethod
|
|
710
710
|
},
|
|
711
711
|
VxeTreeSelect: {
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
712
|
+
tableAutoFocus: 'input',
|
|
713
|
+
renderTableEdit: defaultTreeSelectEditRender,
|
|
714
|
+
renderTableCell (renderOpts, params) {
|
|
715
715
|
return getCellLabelVNs(renderOpts, params, getTreeSelectCellValue(renderOpts, params))
|
|
716
716
|
},
|
|
717
|
-
|
|
717
|
+
tableExportMethod: handleExportTreeSelectMethod
|
|
718
|
+
},
|
|
719
|
+
VxeIconPicker: {
|
|
720
|
+
tableAutoFocus: 'input',
|
|
721
|
+
renderTableEdit: defaultEditRender,
|
|
722
|
+
renderTableCell (renderOpts, params) {
|
|
723
|
+
const { row, column } = params
|
|
724
|
+
const cellValue = XEUtils.get(row, column.field)
|
|
725
|
+
return h('i', {
|
|
726
|
+
class: cellValue
|
|
727
|
+
})
|
|
728
|
+
}
|
|
718
729
|
},
|
|
719
730
|
VxeRadioGroup: {
|
|
720
|
-
|
|
731
|
+
renderTableDefault: radioAndCheckboxEditRender
|
|
721
732
|
},
|
|
722
733
|
VxeCheckboxGroup: {
|
|
723
|
-
|
|
734
|
+
renderTableDefault: radioAndCheckboxEditRender
|
|
724
735
|
},
|
|
725
736
|
VxeSwitch: {
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
737
|
+
tableAutoFocus: 'button',
|
|
738
|
+
renderTableEdit: defaultEditRender,
|
|
739
|
+
renderTableDefault: defaultEditRender
|
|
729
740
|
},
|
|
730
741
|
VxeUpload: {
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
742
|
+
renderTableEdit: defaultEditRender,
|
|
743
|
+
renderTableCell: defaultEditRender,
|
|
744
|
+
renderTableDefault: defaultEditRender
|
|
734
745
|
},
|
|
735
746
|
VxeImage: {
|
|
736
|
-
|
|
747
|
+
renderTableDefault (renderOpts, params) {
|
|
737
748
|
const { row, column } = params
|
|
738
749
|
const { props } = renderOpts
|
|
739
750
|
const cellValue = getCellValue(row, column)
|
|
@@ -747,7 +758,7 @@ renderer.mixin({
|
|
|
747
758
|
}
|
|
748
759
|
},
|
|
749
760
|
VxeImageGroup: {
|
|
750
|
-
|
|
761
|
+
renderTableDefault (renderOpts, params) {
|
|
751
762
|
const { row, column } = params
|
|
752
763
|
const { props } = renderOpts
|
|
753
764
|
const cellValue = getCellValue(row, column)
|
|
@@ -763,13 +774,13 @@ renderer.mixin({
|
|
|
763
774
|
|
|
764
775
|
// 以下已废弃
|
|
765
776
|
$input: {
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
777
|
+
tableAutoFocus: '.vxe-input--inner',
|
|
778
|
+
renderTableEdit: oldEditRender,
|
|
779
|
+
renderTableCell (renderOpts, params) {
|
|
769
780
|
const { props = {} } = renderOpts
|
|
770
781
|
const { row, column } = params
|
|
771
782
|
const digits = props.digits || getConfig().input?.digits || 2
|
|
772
|
-
let cellValue = XEUtils.get(row, column.
|
|
783
|
+
let cellValue = XEUtils.get(row, column.field)
|
|
773
784
|
if (cellValue) {
|
|
774
785
|
switch (props.type) {
|
|
775
786
|
case 'date':
|
|
@@ -785,27 +796,27 @@ renderer.mixin({
|
|
|
785
796
|
}
|
|
786
797
|
return getCellLabelVNs(renderOpts, params, cellValue)
|
|
787
798
|
},
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
799
|
+
renderTableDefault: oldEditRender,
|
|
800
|
+
renderTableFilter: oldFilterRender,
|
|
801
|
+
tableFilterDefaultMethod: handleInputFilterMethod
|
|
791
802
|
},
|
|
792
803
|
$textarea: {
|
|
793
|
-
|
|
804
|
+
tableAutoFocus: '.vxe-textarea--inner'
|
|
794
805
|
},
|
|
795
806
|
$button: {
|
|
796
|
-
|
|
807
|
+
renderTableDefault: oldButtonEditRender
|
|
797
808
|
},
|
|
798
809
|
$buttons: {
|
|
799
|
-
|
|
810
|
+
renderTableDefault: oldButtonsEditRender
|
|
800
811
|
},
|
|
801
812
|
$select: {
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
813
|
+
tableAutoFocus: '.vxe-input--inner',
|
|
814
|
+
renderTableEdit: oldSelectEditRender,
|
|
815
|
+
renderTableDefault: oldSelectEditRender,
|
|
816
|
+
renderTableCell (renderOpts, params) {
|
|
806
817
|
return getCellLabelVNs(renderOpts, params, getSelectCellValue(renderOpts, params))
|
|
807
818
|
},
|
|
808
|
-
|
|
819
|
+
renderTableFilter (renderOpts, params) {
|
|
809
820
|
const { column } = params
|
|
810
821
|
const { options, optionProps, optionGroups, optionGroupProps } = renderOpts
|
|
811
822
|
return column.filters.map((option, oIndex) => {
|
|
@@ -817,19 +828,19 @@ renderer.mixin({
|
|
|
817
828
|
})
|
|
818
829
|
})
|
|
819
830
|
},
|
|
820
|
-
|
|
821
|
-
|
|
831
|
+
tableFilterDefaultMethod: handleFilterMethod,
|
|
832
|
+
tableExportMethod: handleExportSelectMethod
|
|
822
833
|
},
|
|
823
834
|
$radio: {
|
|
824
|
-
|
|
835
|
+
tableAutoFocus: '.vxe-radio--input'
|
|
825
836
|
},
|
|
826
837
|
$checkbox: {
|
|
827
|
-
|
|
838
|
+
tableAutoFocus: '.vxe-checkbox--input'
|
|
828
839
|
},
|
|
829
840
|
$switch: {
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
841
|
+
tableAutoFocus: '.vxe-switch--button',
|
|
842
|
+
renderTableEdit: oldEditRender,
|
|
843
|
+
renderTableDefault: oldEditRender
|
|
833
844
|
}
|
|
834
845
|
// 以上已废弃
|
|
835
846
|
})
|
|
@@ -18,7 +18,7 @@ import TableImportPanelComponent from '../module/export/import-panel'
|
|
|
18
18
|
import TableExportPanelComponent from '../module/export/export-panel'
|
|
19
19
|
import TableMenuPanelComponent from '../module/menu/panel'
|
|
20
20
|
|
|
21
|
-
import type { VxeLoadingComponent, VxeTooltipInstance, VxeTooltipComponent } from 'vxe-pc-ui'
|
|
21
|
+
import type { VxeLoadingComponent, VxeTooltipInstance, VxeTooltipComponent, VxeTabsConstructor, VxeTabsPrivateMethods } from 'vxe-pc-ui'
|
|
22
22
|
import type { VxeGridConstructor, VxeGridPrivateMethods, VxeTableConstructor, TableReactData, TableInternalData, VxeTablePropTypes, VxeToolbarConstructor, TablePrivateMethods, VxeTablePrivateRef, VxeTablePrivateComputed, VxeTablePrivateMethods, TableMethods, VxeTableMethods, VxeTableDefines, VxeTableProps, VxeColumnPropTypes } from '../../../types'
|
|
23
23
|
|
|
24
24
|
const { getConfig, getI18n, renderer, formats, createEvent, globalResize, interceptor, hooks, globalEvents, GLOBAL_EVENT_KEYS, useFns } = VxeUI
|
|
@@ -40,6 +40,8 @@ export default defineComponent({
|
|
|
40
40
|
const VxeUILoadingComponent = VxeUI.getComponent<VxeLoadingComponent>('VxeLoading')
|
|
41
41
|
const VxeUITooltipComponent = VxeUI.getComponent<VxeTooltipComponent>('VxeTooltip')
|
|
42
42
|
|
|
43
|
+
const $xeTabs = inject<(VxeTabsConstructor & VxeTabsPrivateMethods) | null>('$xeTabs', null)
|
|
44
|
+
|
|
43
45
|
const { computeSize } = useFns.useSize(props)
|
|
44
46
|
|
|
45
47
|
const reactData = reactive<TableReactData>({
|
|
@@ -3273,6 +3275,11 @@ export default defineComponent({
|
|
|
3273
3275
|
const fullColumnFieldData = internalData.fullColumnFieldData
|
|
3274
3276
|
return field && fullColumnFieldData[field] ? fullColumnFieldData[field].column : null
|
|
3275
3277
|
},
|
|
3278
|
+
getParentColumn (fieldOrColumn) {
|
|
3279
|
+
const fullColumnIdData = internalData.fullColumnIdData
|
|
3280
|
+
const column = handleFieldOrColumn($xeTable, fieldOrColumn)
|
|
3281
|
+
return column && column.parentId && fullColumnIdData[column.parentId] ? fullColumnIdData[column.parentId].column : null
|
|
3282
|
+
},
|
|
3276
3283
|
/**
|
|
3277
3284
|
* 获取当前表格的列
|
|
3278
3285
|
* 收集到的全量列、全量表头列、处理条件之后的全量表头列、当前渲染中的表头列
|
|
@@ -3551,10 +3558,14 @@ export default defineComponent({
|
|
|
3551
3558
|
* 计算单元格列宽,动态分配可用剩余空间
|
|
3552
3559
|
* 支持 width=? width=?px width=?% min-width=? min-width=?px min-width=?%
|
|
3553
3560
|
*/
|
|
3554
|
-
recalculate (
|
|
3561
|
+
recalculate (reFull?: boolean) {
|
|
3562
|
+
const el = refElem.value
|
|
3563
|
+
if (!el || !el.clientWidth) {
|
|
3564
|
+
return nextTick()
|
|
3565
|
+
}
|
|
3555
3566
|
calcCellWidth()
|
|
3556
3567
|
autoCellWidth()
|
|
3557
|
-
if (
|
|
3568
|
+
if (reFull === true) {
|
|
3558
3569
|
// 初始化时需要在列计算之后再执行优化运算,达到最优显示效果
|
|
3559
3570
|
return computeScrollLoad().then(() => {
|
|
3560
3571
|
autoCellWidth()
|
|
@@ -5251,6 +5262,10 @@ export default defineComponent({
|
|
|
5251
5262
|
if ($xeTable.closeMenu) {
|
|
5252
5263
|
$xeTable.closeMenu()
|
|
5253
5264
|
}
|
|
5265
|
+
const el = refElem.value
|
|
5266
|
+
if (!el || !el.clientWidth) {
|
|
5267
|
+
return nextTick()
|
|
5268
|
+
}
|
|
5254
5269
|
tableMethods.updateCellAreas()
|
|
5255
5270
|
tableMethods.recalculate(true)
|
|
5256
5271
|
}
|
|
@@ -6686,6 +6701,12 @@ export default defineComponent({
|
|
|
6686
6701
|
})
|
|
6687
6702
|
})
|
|
6688
6703
|
|
|
6704
|
+
if ($xeTabs) {
|
|
6705
|
+
watch(() => $xeTabs ? $xeTabs.reactData.resizeFlag : null, () => {
|
|
6706
|
+
handleGlobalResizeEvent()
|
|
6707
|
+
})
|
|
6708
|
+
}
|
|
6709
|
+
|
|
6689
6710
|
hooks.forEach((options) => {
|
|
6690
6711
|
const { setupTable } = options
|
|
6691
6712
|
if (setupTable) {
|
|
@@ -6971,6 +6992,7 @@ export default defineComponent({
|
|
|
6971
6992
|
'is--virtual-x': scrollXLoad,
|
|
6972
6993
|
'is--virtual-y': scrollYLoad
|
|
6973
6994
|
}],
|
|
6995
|
+
spellcheck: false,
|
|
6974
6996
|
onKeydown: keydownEvent
|
|
6975
6997
|
}, [
|
|
6976
6998
|
/**
|
|
@@ -4,7 +4,7 @@ import { VxeUI } from '../../ui'
|
|
|
4
4
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
5
5
|
import { warnLog, errLog } from '../../ui/src/log'
|
|
6
6
|
|
|
7
|
-
import type { VxeButtonComponent } from 'vxe-pc-ui'
|
|
7
|
+
import type { VxeButtonComponent, VxeButtonEvents } from 'vxe-pc-ui'
|
|
8
8
|
import type { VxeGridConstructor, GridPrivateMethods, ToolbarMethods, VxeToolbarConstructor, VxeToolbarEmits, VxeToolbarPropTypes, VxeTableConstructor, ToolbarPrivateRef, VxeTableMethods, VxeTablePrivateMethods, ToolbarReactData } from '../../../types'
|
|
9
9
|
|
|
10
10
|
const { getConfig, getIcon, getI18n, renderer, commands, createEvent, useFns } = VxeUI
|
|
@@ -146,7 +146,7 @@ export default defineComponent({
|
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
-
const refreshEvent = (
|
|
149
|
+
const refreshEvent: VxeButtonEvents.Click = ({ $event }) => {
|
|
150
150
|
const { isRefresh } = reactData
|
|
151
151
|
const refreshOpts = computeRefreshOpts.value
|
|
152
152
|
if (!isRefresh) {
|
|
@@ -162,16 +162,16 @@ export default defineComponent({
|
|
|
162
162
|
}
|
|
163
163
|
} else if ($xeGrid) {
|
|
164
164
|
reactData.isRefresh = true
|
|
165
|
-
$xeGrid.triggerToolbarCommitEvent({ code: refreshOpts.code || 'reload' },
|
|
165
|
+
$xeGrid.triggerToolbarCommitEvent({ code: refreshOpts.code || 'reload' }, $event).catch((e) => e).then(() => {
|
|
166
166
|
reactData.isRefresh = false
|
|
167
167
|
})
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
-
const zoomEvent = (
|
|
172
|
+
const zoomEvent: VxeButtonEvents.Click = ({ $event }) => {
|
|
173
173
|
if ($xeGrid) {
|
|
174
|
-
$xeGrid.triggerZoomEvent(
|
|
174
|
+
$xeGrid.triggerZoomEvent($event)
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
|
|
@@ -270,7 +270,7 @@ export default defineComponent({
|
|
|
270
270
|
round: child.round,
|
|
271
271
|
status: child.status,
|
|
272
272
|
content: child.name,
|
|
273
|
-
onClick: (
|
|
273
|
+
onClick: ({ $event }) => isBtn ? btnEvent($event, child) : tolEvent($event, child)
|
|
274
274
|
})
|
|
275
275
|
: createCommentVNode()
|
|
276
276
|
})
|
|
@@ -319,7 +319,7 @@ export default defineComponent({
|
|
|
319
319
|
destroyOnClose: item.destroyOnClose,
|
|
320
320
|
placement: item.placement,
|
|
321
321
|
transfer: item.transfer,
|
|
322
|
-
onClick: (
|
|
322
|
+
onClick: ({ $event }) => btnEvent($event, item)
|
|
323
323
|
}, dropdowns && dropdowns.length
|
|
324
324
|
? {
|
|
325
325
|
dropdowns: () => renderDropdowns(item, true)
|
|
@@ -377,7 +377,7 @@ export default defineComponent({
|
|
|
377
377
|
destroyOnClose: item.destroyOnClose,
|
|
378
378
|
placement: item.placement,
|
|
379
379
|
transfer: item.transfer,
|
|
380
|
-
onClick: (
|
|
380
|
+
onClick: ({ $event }) => tolEvent($event, item)
|
|
381
381
|
}, dropdowns && dropdowns.length
|
|
382
382
|
? {
|
|
383
383
|
dropdowns: () => renderDropdowns(item, false)
|
package/packages/ui/index.ts
CHANGED
|
@@ -280,6 +280,7 @@ export const use = VxeUI.use
|
|
|
280
280
|
export const setup = (options?: VxeGlobalConfig) => {
|
|
281
281
|
return VxeUI.setConfig(options)
|
|
282
282
|
}
|
|
283
|
+
VxeUI.setup = setup
|
|
283
284
|
/**
|
|
284
285
|
* 已废弃
|
|
285
286
|
* @deprecated
|
|
@@ -287,6 +288,7 @@ export const setup = (options?: VxeGlobalConfig) => {
|
|
|
287
288
|
export const config = (options?: VxeGlobalConfig) => {
|
|
288
289
|
return VxeUI.setConfig(options)
|
|
289
290
|
}
|
|
291
|
+
VxeUI.config = config
|
|
290
292
|
/**
|
|
291
293
|
* 已废弃
|
|
292
294
|
* @deprecated
|
|
@@ -294,6 +296,7 @@ export const config = (options?: VxeGlobalConfig) => {
|
|
|
294
296
|
export const t = (key: string, args?: any) => {
|
|
295
297
|
return VxeUI.getI18n(key, args)
|
|
296
298
|
}
|
|
299
|
+
VxeUI.t = t
|
|
297
300
|
/**
|
|
298
301
|
* 已废弃
|
|
299
302
|
* @deprecated
|
|
@@ -301,6 +304,7 @@ export const t = (key: string, args?: any) => {
|
|
|
301
304
|
export const _t = (content: string | number | boolean | null | undefined, args?: any) => {
|
|
302
305
|
return getFuncText(content, args)
|
|
303
306
|
}
|
|
307
|
+
VxeUI._t = _t
|
|
304
308
|
|
|
305
309
|
/**
|
|
306
310
|
* 已废弃,兼容老版本
|
|
@@ -308,9 +312,6 @@ export const _t = (content: string | number | boolean | null | undefined, args?:
|
|
|
308
312
|
*/
|
|
309
313
|
export const VXETable = VxeUI
|
|
310
314
|
|
|
311
|
-
VXETable.setup = config
|
|
312
|
-
VXETable.config = config
|
|
313
|
-
|
|
314
315
|
/**
|
|
315
316
|
* 已废弃,兼容老版本
|
|
316
317
|
* @deprecated
|
|
@@ -94,7 +94,8 @@
|
|
|
94
94
|
& > .vxe-select,
|
|
95
95
|
& > .vxe-tree-select,
|
|
96
96
|
& > .vxe-date-picker,
|
|
97
|
-
& > .vxe-number-input
|
|
97
|
+
& > .vxe-number-input,
|
|
98
|
+
& > .vxe-ico-picker {
|
|
98
99
|
width: 100%;
|
|
99
100
|
}
|
|
100
101
|
& > .vxe-input > .vxe-input--inner,
|
|
@@ -111,7 +112,8 @@
|
|
|
111
112
|
.vxe-select,
|
|
112
113
|
.vxe-tree-select,
|
|
113
114
|
.vxe-date-picker,
|
|
114
|
-
.vxe-number-input
|
|
115
|
+
.vxe-number-input,
|
|
116
|
+
.vxe-ico-picker {
|
|
115
117
|
width: 100%;
|
|
116
118
|
}
|
|
117
119
|
.vxe-input > .vxe-input--inner,
|
|
@@ -1277,7 +1279,8 @@
|
|
|
1277
1279
|
.vxe-default-select {
|
|
1278
1280
|
border-color: var(--vxe-ui-table-validate-error-color);
|
|
1279
1281
|
}
|
|
1280
|
-
.vxe-input
|
|
1282
|
+
.vxe-input,
|
|
1283
|
+
.vxe-ico-picker {
|
|
1281
1284
|
border-color: var(--vxe-ui-table-validate-error-color);
|
|
1282
1285
|
}
|
|
1283
1286
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|