tabula-vue 1.0.0 → 1.0.2
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/component.mjs +4 -0
- package/es/components/dialog/index.d.ts +30 -30
- package/es/components/dialog/src/index.vue.d.ts +2 -2
- package/es/components/dialog-form/index.d.ts +2 -2
- package/es/components/dialog-form/src/index.vue.d.ts +2 -2
- package/es/components/display-item/index.d.ts +25 -25
- package/es/components/display-item/src/index.vue.d.ts +7 -7
- package/es/components/drawer-form/index.d.ts +50 -50
- package/es/components/drawer-form/src/index.vue.d.ts +10 -10
- package/es/components/form/index.d.ts +99 -99
- package/es/components/form/src/form-content.vue.d.ts +12 -12
- package/es/components/form/src/index.vue.d.ts +11 -11
- package/es/components/form-item/index.d.ts +80 -80
- package/es/components/form-item/src/index.vue.d.ts +9 -9
- package/es/components/index.d.ts +2 -0
- package/es/components/index.mjs +6 -0
- package/es/components/input-tag/index.d.ts +6 -6
- package/es/components/input-tag/src/index.vue.d.ts +6 -6
- package/es/components/layout/index.d.ts +30 -30
- package/es/components/layout/src/index.vue.d.ts +10 -10
- package/es/components/page/index.d.ts +9087 -4864
- package/es/components/page/src/index.vue.d.ts +1903 -513
- package/es/components/page/src/index.vue2.mjs +43 -12
- package/es/components/popover/index.d.ts +49 -49
- package/es/components/popover/src/index.vue.d.ts +3 -3
- package/es/components/render/index.d.ts +14 -14
- package/es/components/render/src/index.vue.d.ts +1 -1
- package/es/components/search/index.d.ts +298 -298
- package/es/components/search/src/index.vue.d.ts +84 -84
- package/es/components/sidebar/index.d.ts +31 -31
- package/es/components/sidebar/src/index.vue.d.ts +5 -5
- package/es/components/table/index.d.ts +165 -180
- package/es/components/table/index.mjs +3 -0
- package/es/components/table/src/index.vue.d.ts +12 -21
- package/es/components/table/src/index.vue2.mjs +11 -34
- package/es/components/table/src/table-action-bar-content.vue.d.ts +78 -0
- package/es/components/table/src/table-action-bar-content.vue.mjs +6 -0
- package/es/components/table/src/table-action-bar-content.vue2.mjs +395 -0
- package/es/components/table/src/table-action-bar.vue.d.ts +4 -4
- package/es/components/table/src/table-action-bar.vue2.mjs +30 -353
- package/es/components/table/src/table-column-drag-sort.vue.d.ts +1 -1
- package/es/components/table/src/table-column-index.vue.d.ts +1 -1
- package/es/components/table/src/table-column.vue.d.ts +22 -29
- package/es/components/table/src/table-column.vue2.mjs +4 -57
- package/es/components/table/src/table-title-bar.vue.d.ts +2 -2
- package/es/components/table/src/type.d.ts +0 -11
- package/es/components/table/src/use-columns.d.ts +26 -0
- package/es/components/table/src/use-columns.mjs +40 -0
- package/es/components/table-lite/index.d.ts +1783 -0
- package/es/components/table-lite/index.mjs +6 -0
- package/es/components/table-lite/src/index.vue.d.ts +672 -0
- package/es/components/table-lite/src/index.vue.mjs +6 -0
- package/es/components/table-lite/src/index.vue2.mjs +681 -0
- package/es/components/table-lite/src/type.d.ts +91 -0
- package/es/components/table-lite/src/type.mjs +1 -0
- package/es/components/table-lite/style/css.d.ts +16 -0
- package/es/components/table-lite/style/css.mjs +16 -0
- package/es/components/table-lite/style/index.d.ts +16 -0
- package/es/components/table-lite/style/index.mjs +16 -0
- package/es/components/table-v2/index.d.ts +174 -0
- package/es/components/table-v2/index.mjs +7 -0
- package/es/components/table-v2/src/column-converter.d.ts +27 -0
- package/es/components/table-v2/src/column-converter.mjs +42 -0
- package/es/components/table-v2/src/index.vue.d.ts +157 -0
- package/es/components/table-v2/src/index.vue.mjs +6 -0
- package/es/components/table-v2/src/index.vue2.mjs +491 -0
- package/es/components/table-v2/src/special-columns.d.ts +61 -0
- package/es/components/table-v2/src/special-columns.mjs +76 -0
- package/es/components/table-v2/src/table-v2-cell.d.ts +104 -0
- package/es/components/table-v2/src/table-v2-cell.mjs +139 -0
- package/es/components/table-v2/src/table-v2-header-cell.vue.d.ts +61 -0
- package/es/components/table-v2/src/table-v2-header-cell.vue.mjs +6 -0
- package/es/components/table-v2/src/table-v2-header-cell.vue2.mjs +92 -0
- package/es/components/table-v2/src/type.d.ts +95 -0
- package/es/components/table-v2/src/type.mjs +1 -0
- package/es/components/table-v2/src/use-table-v2-columns.d.ts +43 -0
- package/es/components/table-v2/src/use-table-v2-columns.mjs +47 -0
- package/es/components/table-v2/style/css.d.ts +17 -0
- package/es/components/table-v2/style/css.mjs +17 -0
- package/es/components/table-v2/style/index.d.ts +17 -0
- package/es/components/table-v2/style/index.mjs +17 -0
- package/es/index.mjs +6 -0
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/index.css +1 -1
- package/index.js +1850 -279
- package/index.min.js +9 -6
- package/index.min.mjs +9 -6
- package/index.mjs +1813 -248
- package/lib/component.js +42 -38
- package/lib/components/dialog/index.d.ts +30 -30
- package/lib/components/dialog/src/index.vue.d.ts +2 -2
- package/lib/components/dialog-form/index.d.ts +2 -2
- package/lib/components/dialog-form/src/index.vue.d.ts +2 -2
- package/lib/components/display-item/index.d.ts +25 -25
- package/lib/components/display-item/src/index.vue.d.ts +7 -7
- package/lib/components/drawer-form/index.d.ts +50 -50
- package/lib/components/drawer-form/src/index.vue.d.ts +10 -10
- package/lib/components/form/index.d.ts +99 -99
- package/lib/components/form/src/form-content.vue.d.ts +12 -12
- package/lib/components/form/src/index.vue.d.ts +11 -11
- package/lib/components/form-item/index.d.ts +80 -80
- package/lib/components/form-item/src/index.vue.d.ts +9 -9
- package/lib/components/index.d.ts +2 -0
- package/lib/components/index.js +51 -39
- package/lib/components/input-tag/index.d.ts +6 -6
- package/lib/components/input-tag/src/index.vue.d.ts +6 -6
- package/lib/components/layout/index.d.ts +30 -30
- package/lib/components/layout/src/index.vue.d.ts +10 -10
- package/lib/components/page/index.d.ts +9087 -4864
- package/lib/components/page/src/index.vue.d.ts +1903 -513
- package/lib/components/page/src/index.vue2.js +46 -15
- package/lib/components/popover/index.d.ts +49 -49
- package/lib/components/popover/src/index.vue.d.ts +3 -3
- package/lib/components/render/index.d.ts +14 -14
- package/lib/components/render/src/index.vue.d.ts +1 -1
- package/lib/components/search/index.d.ts +298 -298
- package/lib/components/search/src/index.vue.d.ts +84 -84
- package/lib/components/sidebar/index.d.ts +31 -31
- package/lib/components/sidebar/src/index.vue.d.ts +5 -5
- package/lib/components/table/index.d.ts +165 -180
- package/lib/components/table/index.js +6 -0
- package/lib/components/table/src/index.vue.d.ts +12 -21
- package/lib/components/table/src/index.vue2.js +10 -33
- package/lib/components/table/src/table-action-bar-content.vue.d.ts +78 -0
- package/lib/components/table/src/table-action-bar-content.vue.js +10 -0
- package/lib/components/table/src/table-action-bar-content.vue2.js +399 -0
- package/lib/components/table/src/table-action-bar.vue.d.ts +4 -4
- package/lib/components/table/src/table-action-bar.vue2.js +28 -351
- package/lib/components/table/src/table-column-drag-sort.vue.d.ts +1 -1
- package/lib/components/table/src/table-column-index.vue.d.ts +1 -1
- package/lib/components/table/src/table-column.vue.d.ts +22 -29
- package/lib/components/table/src/table-column.vue2.js +2 -55
- package/lib/components/table/src/table-title-bar.vue.d.ts +2 -2
- package/lib/components/table/src/type.d.ts +0 -11
- package/lib/components/table/src/use-columns.d.ts +26 -0
- package/lib/components/table/src/use-columns.js +42 -0
- package/lib/components/table-lite/index.d.ts +1783 -0
- package/lib/components/table-lite/index.js +8 -0
- package/lib/components/table-lite/src/index.vue.d.ts +672 -0
- package/lib/components/table-lite/src/index.vue.js +10 -0
- package/lib/components/table-lite/src/index.vue2.js +685 -0
- package/lib/components/table-lite/src/type.d.ts +91 -0
- package/lib/components/table-lite/src/type.js +2 -0
- package/lib/components/table-lite/style/css.d.ts +16 -0
- package/lib/components/table-lite/style/css.js +19 -0
- package/lib/components/table-lite/style/index.d.ts +16 -0
- package/lib/components/table-lite/style/index.js +19 -0
- package/lib/components/table-v2/index.d.ts +174 -0
- package/lib/components/table-v2/index.js +10 -0
- package/lib/components/table-v2/src/column-converter.d.ts +27 -0
- package/lib/components/table-v2/src/column-converter.js +44 -0
- package/lib/components/table-v2/src/index.vue.d.ts +157 -0
- package/lib/components/table-v2/src/index.vue.js +10 -0
- package/lib/components/table-v2/src/index.vue2.js +495 -0
- package/lib/components/table-v2/src/special-columns.d.ts +61 -0
- package/lib/components/table-v2/src/special-columns.js +80 -0
- package/lib/components/table-v2/src/table-v2-cell.d.ts +104 -0
- package/lib/components/table-v2/src/table-v2-cell.js +143 -0
- package/lib/components/table-v2/src/table-v2-header-cell.vue.d.ts +61 -0
- package/lib/components/table-v2/src/table-v2-header-cell.vue.js +10 -0
- package/lib/components/table-v2/src/table-v2-header-cell.vue2.js +96 -0
- package/lib/components/table-v2/src/type.d.ts +95 -0
- package/lib/components/table-v2/src/type.js +2 -0
- package/lib/components/table-v2/src/use-table-v2-columns.d.ts +43 -0
- package/lib/components/table-v2/src/use-table-v2-columns.js +51 -0
- package/lib/components/table-v2/style/css.d.ts +17 -0
- package/lib/components/table-v2/style/css.js +20 -0
- package/lib/components/table-v2/style/index.d.ts +17 -0
- package/lib/components/table-v2/style/index.js +20 -0
- package/lib/index.js +51 -39
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/locale/en.js +1 -1
- package/locale/en.min.js +1 -1
- package/locale/en.min.mjs +1 -1
- package/locale/en.mjs +1 -1
- package/locale/ja.js +1 -1
- package/locale/ja.min.js +1 -1
- package/locale/ja.min.mjs +1 -1
- package/locale/ja.mjs +1 -1
- package/locale/ko.js +1 -1
- package/locale/ko.min.js +1 -1
- package/locale/ko.min.mjs +1 -1
- package/locale/ko.mjs +1 -1
- package/locale/zh-cn.js +1 -1
- package/locale/zh-cn.min.js +1 -1
- package/locale/zh-cn.min.mjs +1 -1
- package/locale/zh-cn.mjs +1 -1
- package/locale/zh-hk.js +1 -1
- package/locale/zh-hk.min.js +1 -1
- package/locale/zh-hk.min.mjs +1 -1
- package/locale/zh-hk.mjs +1 -1
- package/locale/zh-tw.js +1 -1
- package/locale/zh-tw.min.js +1 -1
- package/locale/zh-tw.min.mjs +1 -1
- package/locale/zh-tw.mjs +1 -1
- package/package.json +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/plus-table-lite.css +1 -0
- package/theme-chalk/plus-table-v2.css +1 -0
- package/theme-chalk/src/index.scss +2 -0
- package/theme-chalk/src/table-lite.scss +53 -0
- package/theme-chalk/src/table-v2.scss +71 -0
|
@@ -43,7 +43,6 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
43
43
|
editable: boolean;
|
|
44
44
|
adaptive: boolean;
|
|
45
45
|
emptyValue: undefined;
|
|
46
|
-
plainTextCell: boolean;
|
|
47
46
|
}>, {
|
|
48
47
|
formRefs: ShallowRef<Record<string | number, TableFormRefRow[]>>;
|
|
49
48
|
tableInstance: ShallowRef< CreateComponentPublicInstance<Readonly< ExtractPropTypes<{
|
|
@@ -157,9 +156,6 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
157
156
|
ns: {
|
|
158
157
|
namespace: ComputedRef<string>;
|
|
159
158
|
b: (blockSuffix?: string | undefined) => string;
|
|
160
|
-
/**
|
|
161
|
-
* 表单的ref
|
|
162
|
-
*/
|
|
163
159
|
e: (element?: string | undefined) => string;
|
|
164
160
|
m: (modifier?: string | undefined) => string;
|
|
165
161
|
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
@@ -491,9 +487,6 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
491
487
|
ns: {
|
|
492
488
|
namespace: ComputedRef<string>;
|
|
493
489
|
b: (blockSuffix?: string | undefined) => string;
|
|
494
|
-
/**
|
|
495
|
-
* 表单的ref
|
|
496
|
-
*/
|
|
497
490
|
e: (element?: string | undefined) => string;
|
|
498
491
|
m: (modifier?: string | undefined) => string;
|
|
499
492
|
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
@@ -647,18 +640,17 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
647
640
|
editable: boolean;
|
|
648
641
|
adaptive: boolean;
|
|
649
642
|
emptyValue: undefined;
|
|
650
|
-
plainTextCell: boolean;
|
|
651
643
|
}>>> & {
|
|
652
|
-
onRefresh?: (() => any) | undefined;
|
|
653
|
-
onPaginationChange?: ((pageInfo: PageInfo) => any) | undefined;
|
|
654
644
|
onClickAction?: ((data: ButtonsCallBackParams) => any) | undefined;
|
|
655
645
|
onClickActionConfirmCancel?: ((data: ButtonsCallBackParams) => any) | undefined;
|
|
656
|
-
onDragSortEnd?: ((newIndex: number, oldIndex: number) => any) | undefined;
|
|
657
646
|
onFormChange?: ((data: FormChangeCallBackParams) => any) | undefined;
|
|
658
|
-
onEdited?: (() => any) | undefined;
|
|
659
647
|
"onCell-click"?: ((row: RecordType, column: PlusColumn, cell: HTMLTableCellElement, event: Event) => any) | undefined;
|
|
660
648
|
"onCell-dblclick"?: ((row: RecordType, column: PlusColumn, cell: HTMLTableCellElement, event: Event) => any) | undefined;
|
|
649
|
+
onDragSortEnd?: ((newIndex: number, oldIndex: number) => any) | undefined;
|
|
650
|
+
onRefresh?: (() => any) | undefined;
|
|
661
651
|
onFilterTableHeader?: ((columns: PlusColumn[], eventType: FilterTableHeaderEventType) => any) | undefined;
|
|
652
|
+
onPaginationChange?: ((pageInfo: PageInfo) => any) | undefined;
|
|
653
|
+
onEdited?: (() => any) | undefined;
|
|
662
654
|
onRadioChange?: ((row: RecordType, index: number, value: boolean) => any) | undefined;
|
|
663
655
|
}, {
|
|
664
656
|
columns: PlusColumn[];
|
|
@@ -671,11 +663,11 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
671
663
|
}) => CSSProperties>;
|
|
672
664
|
rowKey: string | ((row: any[]) => string);
|
|
673
665
|
emptyValue: string | number;
|
|
674
|
-
tableData: RecordType[];
|
|
675
|
-
defaultSize: "" | "default" | "small" | "large";
|
|
676
|
-
pagination: false | Partial<PlusPaginationProps>;
|
|
677
666
|
actionBar: false | Partial< ActionBarProps>;
|
|
678
|
-
|
|
667
|
+
editable: boolean | "click" | "dblclick";
|
|
668
|
+
indexTableColumnProps: Partial< TableColumnCtx<RecordType>>;
|
|
669
|
+
indexContentStyle: Partial< CSSProperties> | ((row: RecordType, index: number) => Partial< CSSProperties>);
|
|
670
|
+
dragSortableTableColumnProps: Partial< TableColumnCtx<RecordType>>;
|
|
679
671
|
titleBar: boolean | Partial<Partial<{
|
|
680
672
|
title?: string | undefined;
|
|
681
673
|
refresh?: boolean | undefined;
|
|
@@ -686,14 +678,16 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
686
678
|
color?: string | undefined;
|
|
687
679
|
} | undefined;
|
|
688
680
|
}>>;
|
|
681
|
+
defaultSize: "" | "default" | "small" | "large";
|
|
682
|
+
tableData: RecordType[];
|
|
683
|
+
pagination: false | Partial<PlusPaginationProps>;
|
|
684
|
+
hasIndexColumn: boolean;
|
|
689
685
|
isSelection: boolean | "radio";
|
|
690
686
|
isRadio: boolean;
|
|
691
687
|
hasExpand: boolean;
|
|
692
688
|
specialColumnsOrder: TableSpecialColumnType[];
|
|
693
689
|
loadingStatus: boolean;
|
|
694
690
|
dragSortable: false | Partial< Options>;
|
|
695
|
-
dragSortableTableColumnProps: Partial< TableColumnCtx<RecordType>>;
|
|
696
|
-
indexTableColumnProps: Partial< TableColumnCtx<RecordType>>;
|
|
697
691
|
selectionTableColumnProps: Partial< TableColumnCtx<RecordType>>;
|
|
698
692
|
radioTableColumnProps: Partial< TableColumnCtx<RecordType>>;
|
|
699
693
|
radioProps: Partial<PlusRadioProps & {
|
|
@@ -702,13 +696,10 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
702
696
|
} & RecordType>;
|
|
703
697
|
defaultSelectedRadioRow: RecordType | ComputedRef<RecordType>;
|
|
704
698
|
expandTableColumnProps: Partial< TableColumnCtx<RecordType>>;
|
|
705
|
-
indexContentStyle: Partial< CSSProperties> | ((row: RecordType, index: number) => Partial< CSSProperties>);
|
|
706
|
-
editable: boolean | "click" | "dblclick";
|
|
707
699
|
adaptive: boolean | {
|
|
708
700
|
offsetBottom?: number | undefined;
|
|
709
701
|
timeout?: number | undefined;
|
|
710
702
|
};
|
|
711
|
-
plainTextCell: boolean;
|
|
712
703
|
}, {}>, Partial<Record<NonNullable<string | number>, (_: {
|
|
713
704
|
column: any;
|
|
714
705
|
prop: string;
|
|
@@ -4,12 +4,13 @@ import { PlusRadio } from '../../radio/index.mjs';
|
|
|
4
4
|
import '../../../constants/index.mjs';
|
|
5
5
|
import { ElTable, ElTableColumn, vLoading } from 'element-plus';
|
|
6
6
|
import '../../utils/index.mjs';
|
|
7
|
-
import {
|
|
7
|
+
import { debounce, isEqual } from 'lodash-es';
|
|
8
8
|
import PlusTableActionBar from './table-action-bar.vue.mjs';
|
|
9
9
|
import PlusTableColumn from './table-column.vue.mjs';
|
|
10
10
|
import PlusTableTableColumnIndex from './table-column-index.vue.mjs';
|
|
11
11
|
import PlusTableColumnDragSort from './table-column-drag-sort.vue.mjs';
|
|
12
12
|
import PlusTableTitleBar from './table-title-bar.vue.mjs';
|
|
13
|
+
import { useTableColumns } from './use-columns.mjs';
|
|
13
14
|
import { DefaultPageInfo } from '../../../constants/page.mjs';
|
|
14
15
|
import { TableFormRefInjectionKey, TableFormFieldRefInjectionKey } from '../../../constants/form.mjs';
|
|
15
16
|
import { isSVGElement, isPlainObject } from '../../utils/is.mjs';
|
|
@@ -56,8 +57,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
56
57
|
editable: { type: [Boolean, String], default: false },
|
|
57
58
|
adaptive: { type: [Boolean, Object], default: false },
|
|
58
59
|
filterTableHeaderOverflowLabelLength: {},
|
|
59
|
-
emptyValue: { default: void 0 }
|
|
60
|
-
plainTextCell: { type: Boolean, default: false }
|
|
60
|
+
emptyValue: { default: void 0 }
|
|
61
61
|
},
|
|
62
62
|
emits: ["paginationChange", "clickAction", "clickActionConfirmCancel", "dragSortEnd", "formChange", "refresh", "edited", "cell-click", "cell-dblclick", "filterTableHeader", "radioChange"],
|
|
63
63
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -65,9 +65,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
65
65
|
const props = __props;
|
|
66
66
|
const emit = __emit;
|
|
67
67
|
const radioRow = ref();
|
|
68
|
-
const subColumns = shallowRef([]);
|
|
69
|
-
const columnsIsChange = ref(false);
|
|
70
|
-
const filterColumns = shallowRef([]);
|
|
71
68
|
const tableInstance = shallowRef(null);
|
|
72
69
|
const tableWrapperInstance = ref(null);
|
|
73
70
|
const paginationInstance = ref(null);
|
|
@@ -110,25 +107,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
110
107
|
provide(TableFormRefInjectionKey, formRefs);
|
|
111
108
|
const formFieldRefs = shallowRef({});
|
|
112
109
|
provide(TableFormFieldRefInjectionKey, formFieldRefs);
|
|
113
|
-
|
|
114
|
-
() => props.columns
|
|
115
|
-
|
|
116
|
-
if (oldVal && isEqual(val, oldVal)) return;
|
|
117
|
-
const filterOriginColumns = val.filter((item) => unref(item.hideInTable) !== true);
|
|
118
|
-
filterColumns.value = filterOriginColumns.map((item) => {
|
|
119
|
-
var _a2;
|
|
120
|
-
return {
|
|
121
|
-
...item,
|
|
122
|
-
headerIsChecked: (_a2 = item.headerIsChecked) != null ? _a2 : true
|
|
123
|
-
};
|
|
124
|
-
});
|
|
125
|
-
subColumns.value = filterOriginColumns.filter((item) => unref(item.headerIsChecked) !== false);
|
|
126
|
-
columnsIsChange.value = !columnsIsChange.value;
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
immediate: true
|
|
130
|
-
}
|
|
131
|
-
);
|
|
110
|
+
const { subColumns, filterColumns, columnsIsChange, setFilterColumns } = useTableColumns({
|
|
111
|
+
columns: () => props.columns
|
|
112
|
+
});
|
|
132
113
|
watch(
|
|
133
114
|
() => props.defaultSelectedRadioRow,
|
|
134
115
|
(val) => {
|
|
@@ -148,11 +129,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
148
129
|
emit("clickActionConfirmCancel", callbackParams);
|
|
149
130
|
};
|
|
150
131
|
const handleFilterTableConfirm = (_columns, eventType) => {
|
|
151
|
-
|
|
132
|
+
setFilterColumns(_columns);
|
|
152
133
|
emit("filterTableHeader", _columns, eventType);
|
|
153
|
-
subColumns.value = _columns.filter(
|
|
154
|
-
(item) => unref(item.hideInTable) !== true && item.headerIsChecked !== false
|
|
155
|
-
);
|
|
156
134
|
};
|
|
157
135
|
const handleClickDensity = (size2) => {
|
|
158
136
|
state.size = size2;
|
|
@@ -268,9 +246,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
268
246
|
_ctx.titleBar ? (openBlock(), createBlock(PlusTableTitleBar, {
|
|
269
247
|
key: 0,
|
|
270
248
|
"origin-columns": _ctx.columns,
|
|
271
|
-
columns: filterColumns
|
|
249
|
+
columns: unref(filterColumns),
|
|
272
250
|
"default-size": unref(size),
|
|
273
|
-
"columns-is-change": columnsIsChange
|
|
251
|
+
"columns-is-change": unref(columnsIsChange),
|
|
274
252
|
"title-bar": _ctx.titleBar,
|
|
275
253
|
onClickDensity: handleClickDensity,
|
|
276
254
|
onFilterTableHeader: handleFilterTableConfirm,
|
|
@@ -422,12 +400,11 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
422
400
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
423
401
|
createCommentVNode("\u914D\u7F6E\u6E32\u67D3\u680F "),
|
|
424
402
|
createVNode(PlusTableColumn, {
|
|
425
|
-
columns: subColumns
|
|
403
|
+
columns: unref(subColumns),
|
|
426
404
|
editable: _ctx.editable,
|
|
427
405
|
"sub-page-info": unref(subPageInfo),
|
|
428
406
|
"table-data-length": tableDataLength.value,
|
|
429
407
|
"empty-value": _ctx.emptyValue,
|
|
430
|
-
"plain-text-cell": _ctx.plainTextCell,
|
|
431
408
|
onFormChange: handleFormChange
|
|
432
409
|
}, createSlots({
|
|
433
410
|
_: 2
|
|
@@ -441,7 +418,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
441
418
|
])
|
|
442
419
|
};
|
|
443
420
|
})
|
|
444
|
-
]), 1032, ["columns", "editable", "sub-page-info", "table-data-length", "empty-value"
|
|
421
|
+
]), 1032, ["columns", "editable", "sub-page-info", "table-data-length", "empty-value"])
|
|
445
422
|
]),
|
|
446
423
|
createCommentVNode(" \u64CD\u4F5C\u680F "),
|
|
447
424
|
_ctx.actionBar ? (openBlock(), createBlock(
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
import { ButtonsCallBackParams, ActionBarButtonsRow, ActionBarProps } from './type';
|
|
3
|
+
import { RecordType } from 'tabula-vue/es/types';
|
|
4
|
+
|
|
5
|
+
export interface PlusTableActionBarContentProps extends Omit<ActionBarProps, 'label' | 'fixed' | 'width' | 'actionBarTableColumnProps'> {
|
|
6
|
+
/**
|
|
7
|
+
* 当前行的数据
|
|
8
|
+
*/
|
|
9
|
+
row: RecordType;
|
|
10
|
+
/**
|
|
11
|
+
* 当前行的索引
|
|
12
|
+
*/
|
|
13
|
+
index: number;
|
|
14
|
+
/**
|
|
15
|
+
* 单元格的其他参数(如 el-table 的 column、store 等),会透传到回调参数
|
|
16
|
+
*/
|
|
17
|
+
rest?: RecordType;
|
|
18
|
+
}
|
|
19
|
+
export interface PlusTableActionBarContentEmits {
|
|
20
|
+
(e: 'clickAction', data: ButtonsCallBackParams): void;
|
|
21
|
+
(e: 'clickActionConfirmCancel', data: ButtonsCallBackParams): void;
|
|
22
|
+
}
|
|
23
|
+
declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PlusTableActionBarContentProps>, {
|
|
24
|
+
type: string;
|
|
25
|
+
buttons: () => never[];
|
|
26
|
+
showNumber: number;
|
|
27
|
+
showLimitIncludeMore: boolean;
|
|
28
|
+
confirmType: string;
|
|
29
|
+
moreType: string;
|
|
30
|
+
rest: () => {};
|
|
31
|
+
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
32
|
+
clickAction: (data: ButtonsCallBackParams) => void;
|
|
33
|
+
clickActionConfirmCancel: (data: ButtonsCallBackParams) => void;
|
|
34
|
+
}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PlusTableActionBarContentProps>, {
|
|
35
|
+
type: string;
|
|
36
|
+
buttons: () => never[];
|
|
37
|
+
showNumber: number;
|
|
38
|
+
showLimitIncludeMore: boolean;
|
|
39
|
+
confirmType: string;
|
|
40
|
+
moreType: string;
|
|
41
|
+
rest: () => {};
|
|
42
|
+
}>>> & {
|
|
43
|
+
onClickAction?: ((data: ButtonsCallBackParams) => any) | undefined;
|
|
44
|
+
onClickActionConfirmCancel?: ((data: ButtonsCallBackParams) => any) | undefined;
|
|
45
|
+
}, {
|
|
46
|
+
type: "link" | "icon" | "button";
|
|
47
|
+
rest: RecordType;
|
|
48
|
+
showNumber: number | ((row: RecordType, index: number) => number);
|
|
49
|
+
showLimitIncludeMore: boolean;
|
|
50
|
+
buttons: ActionBarButtonsRow[];
|
|
51
|
+
confirmType: "messageBox" | "popconfirm";
|
|
52
|
+
moreType: "text" | "icon";
|
|
53
|
+
}, {}>, {
|
|
54
|
+
"action-bar-more-icon"?(_: {}): any;
|
|
55
|
+
}>;
|
|
56
|
+
export default _default;
|
|
57
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
58
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
59
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
60
|
+
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
61
|
+
} : {
|
|
62
|
+
type: PropType<T[K]>;
|
|
63
|
+
required: true;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
type __VLS_WithDefaults<P, D> = {
|
|
67
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
68
|
+
default: D[K];
|
|
69
|
+
}> : P[K];
|
|
70
|
+
};
|
|
71
|
+
type __VLS_Prettify<T> = {
|
|
72
|
+
[K in keyof T]: T[K];
|
|
73
|
+
} & {};
|
|
74
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
75
|
+
new (): {
|
|
76
|
+
$slots: S;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import _sfc_main from './table-action-bar-content.vue2.mjs';
|
|
2
|
+
import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.mjs';
|
|
3
|
+
|
|
4
|
+
var PlusTableActionBarContent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "table-action-bar-content.vue"]]);
|
|
5
|
+
|
|
6
|
+
export { PlusTableActionBarContent as default };
|