@tmagic/table 1.2.0-beta.9 → 1.2.1

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/src/Table.vue CHANGED
@@ -9,7 +9,7 @@
9
9
  :max-height="bodyHeight"
10
10
  :default-expand-all="defaultExpandAll"
11
11
  :border="hasBorder"
12
- :row-key="rowkeyName || 'c_id'"
12
+ :row-key="rowkeyName || 'id'"
13
13
  :tree-props="{ children: 'children' }"
14
14
  :empty-text="emptyText || '暂无数据'"
15
15
  :span-method="objectSpanMethod"
@@ -17,6 +17,8 @@
17
17
  @select="selectHandler"
18
18
  @select-all="selectAllHandler"
19
19
  @selection-change="selectionChangeHandler"
20
+ @cell-click="cellClickHandler"
21
+ @expand-change="expandChange"
20
22
  >
21
23
  <template v-for="(item, columnIndex) in columns">
22
24
  <template v-if="item.type === 'expand'">
@@ -40,7 +42,7 @@
40
42
  :rowkey-name="rowkeyName"
41
43
  :edit-state="editState"
42
44
  :key="columnIndex"
43
- @afterAction="$emit('afterAction')"
45
+ @after-action="$emit('after-action')"
44
46
  ></ActionsColumn>
45
47
  </template>
46
48
 
@@ -55,7 +57,7 @@
55
57
  </TMagicTable>
56
58
  </template>
57
59
 
58
- <script lang="ts" setup>
60
+ <script lang="ts" setup name="MTable">
59
61
  import { computed, ref } from 'vue';
60
62
  import { cloneDeep } from 'lodash-es';
61
63
 
@@ -94,7 +96,15 @@ const props = withDefaults(
94
96
  },
95
97
  );
96
98
 
97
- const emit = defineEmits(['sort-change', 'afterAction', 'select', 'select-all', 'selection-change']);
99
+ const emit = defineEmits([
100
+ 'sort-change',
101
+ 'after-action',
102
+ 'select',
103
+ 'select-all',
104
+ 'selection-change',
105
+ 'expand-change',
106
+ 'cell-click',
107
+ ]);
98
108
 
99
109
  const tMagicTable = ref<InstanceType<typeof TMagicTable>>();
100
110
 
@@ -141,6 +151,14 @@ const selectionChangeHandler = (selection: any) => {
141
151
  emit('selection-change', selection);
142
152
  };
143
153
 
154
+ const cellClickHandler = (...args: any[]) => {
155
+ emit('cell-click', ...args);
156
+ };
157
+
158
+ const expandChange = (...args: any[]) => {
159
+ emit('expand-change', ...args);
160
+ };
161
+
144
162
  const toggleRowSelection = (row: any, selected: boolean) => {
145
163
  tMagicTable.value?.toggleRowSelection(row, selected);
146
164
  };
@@ -57,7 +57,7 @@
57
57
  </TMagicTableColumn>
58
58
  </template>
59
59
 
60
- <script lang="ts" setup>
60
+ <script lang="ts" setup name="MTableColumn">
61
61
  import { TMagicButton, TMagicForm, TMagicTableColumn, TMagicTag } from '@tmagic/design';
62
62
 
63
63
  import { ColumnConfig } from './schema';
package/src/index.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * Tencent is pleased to support the open source community by making TMagicEditor available.
3
3
  *
4
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
4
+ * Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved.
5
5
  *
6
6
  * Licensed under the Apache License, Version 2.0 (the "License");
7
7
  * you may not use this file except in compliance with the License.
package/src/schema.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * Tencent is pleased to support the open source community by making TMagicEditor available.
3
3
  *
4
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
4
+ * Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved.
5
5
  *
6
6
  * Licensed under the Apache License, Version 2.0 (the "License");
7
7
  * you may not use this file except in compliance with the License.
@@ -55,4 +55,10 @@ export type ColumnConfig = {
55
55
  sortable?: boolean | 'custom';
56
56
  action?: 'tip' | 'actionLink' | 'img' | 'link' | 'tag';
57
57
  handler?: (row: any) => void;
58
+ /** 当type为expand时有效,展开为html */
59
+ expandContent?: (row: any, prop?: string) => string;
60
+ /** 当type为expand时有效,展开为vue组件 */
61
+ component?: any;
62
+ /** 当type为expand时有效,展开的vue组件props */
63
+ props?: any;
58
64
  };
package/src/utils.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * Tencent is pleased to support the open source community by making TMagicEditor available.
3
3
  *
4
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
4
+ * Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved.
5
5
  *
6
6
  * Licensed under the Apache License, Version 2.0 (the "License");
7
7
  * you may not use this file except in compliance with the License.
@@ -1,93 +1,15 @@
1
1
  import { ColumnConfig } from './schema';
2
- declare const _default: {
3
- new (...args: any[]): {
4
- $: import("vue").ComponentInternalInstance;
5
- $data: {};
6
- $props: Partial<{
7
- columns: any[];
8
- config: ColumnConfig;
9
- rowkeyName: string;
10
- editState: any;
11
- }> & Omit<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
12
- columns: any[];
13
- config: ColumnConfig;
14
- rowkeyName?: string | undefined;
15
- editState?: any;
16
- }>, {
17
- columns: () => never[];
18
- config: () => {};
19
- rowkeyName: string;
20
- editState: () => never[];
21
- }>>> & {
22
- onAfterAction?: ((...args: any[]) => any) | undefined;
23
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "columns" | "config" | "rowkeyName" | "editState">;
24
- $attrs: {
25
- [x: string]: unknown;
26
- };
27
- $refs: {
28
- [x: string]: unknown;
29
- };
30
- $slots: Readonly<{
31
- [name: string]: import("vue").Slot | undefined;
32
- }>;
33
- $root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
34
- $parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
35
- $emit: (event: "afterAction", ...args: any[]) => void;
36
- $el: any;
37
- $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
38
- columns: any[];
39
- config: ColumnConfig;
40
- rowkeyName?: string | undefined;
41
- editState?: any;
42
- }>, {
43
- columns: () => never[];
44
- config: () => {};
45
- rowkeyName: string;
46
- editState: () => never[];
47
- }>>> & {
48
- onAfterAction?: ((...args: any[]) => any) | undefined;
49
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "afterAction"[], string, {
50
- columns: any[];
51
- config: ColumnConfig;
52
- rowkeyName: string;
53
- editState: any;
54
- }> & {
55
- beforeCreate?: ((() => void) | (() => void)[]) | undefined;
56
- created?: ((() => void) | (() => void)[]) | undefined;
57
- beforeMount?: ((() => void) | (() => void)[]) | undefined;
58
- mounted?: ((() => void) | (() => void)[]) | undefined;
59
- beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
60
- updated?: ((() => void) | (() => void)[]) | undefined;
61
- activated?: ((() => void) | (() => void)[]) | undefined;
62
- deactivated?: ((() => void) | (() => void)[]) | undefined;
63
- beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
64
- beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
65
- destroyed?: ((() => void) | (() => void)[]) | undefined;
66
- unmounted?: ((() => void) | (() => void)[]) | undefined;
67
- renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
68
- renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
69
- errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void)[]) | undefined;
70
- };
71
- $forceUpdate: () => void;
72
- $nextTick: typeof import("vue").nextTick;
73
- $watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
74
- } & Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
75
- columns: any[];
76
- config: ColumnConfig;
77
- rowkeyName?: string | undefined;
78
- editState?: any;
79
- }>, {
80
- columns: () => never[];
81
- config: () => {};
82
- rowkeyName: string;
83
- editState: () => never[];
84
- }>>> & {
85
- onAfterAction?: ((...args: any[]) => any) | undefined;
86
- } & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties;
87
- __isFragment?: undefined;
88
- __isTeleport?: undefined;
89
- __isSuspense?: undefined;
90
- } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
2
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
3
+ columns: any[];
4
+ config: ColumnConfig;
5
+ rowkeyName?: string | undefined;
6
+ editState?: any;
7
+ }>, {
8
+ columns: () => never[];
9
+ config: () => {};
10
+ rowkeyName: string;
11
+ editState: () => never[];
12
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "after-action"[], "after-action", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
91
13
  columns: any[];
92
14
  config: ColumnConfig;
93
15
  rowkeyName?: string | undefined;
@@ -98,13 +20,13 @@ declare const _default: {
98
20
  rowkeyName: string;
99
21
  editState: () => never[];
100
22
  }>>> & {
101
- onAfterAction?: ((...args: any[]) => any) | undefined;
102
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "afterAction"[], "afterAction", {
23
+ "onAfter-action"?: ((...args: any[]) => any) | undefined;
24
+ }, {
103
25
  columns: any[];
104
26
  config: ColumnConfig;
105
27
  rowkeyName: string;
106
28
  editState: any;
107
- }> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
29
+ }>;
108
30
  export default _default;
109
31
  declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
110
32
  declare type __VLS_TypePropsToRuntimeProps<T> = {
@@ -1,69 +1,15 @@
1
1
  import { ColumnConfig } from './schema';
2
- declare const _default: {
3
- new (...args: any[]): {
4
- $: import("vue").ComponentInternalInstance;
5
- $data: {};
6
- $props: Partial<{
7
- config: ColumnConfig;
8
- }> & Omit<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
9
- config: ColumnConfig;
10
- }>, {
11
- config: () => {};
12
- }>>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "config">;
13
- $attrs: {
14
- [x: string]: unknown;
15
- };
16
- $refs: {
17
- [x: string]: unknown;
18
- };
19
- $slots: Readonly<{
20
- [name: string]: import("vue").Slot | undefined;
21
- }>;
22
- $root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
23
- $parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
24
- $emit: (event: string, ...args: any[]) => void;
25
- $el: any;
26
- $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
27
- config: ColumnConfig;
28
- }>, {
29
- config: () => {};
30
- }>>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {
31
- config: ColumnConfig;
32
- }> & {
33
- beforeCreate?: ((() => void) | (() => void)[]) | undefined;
34
- created?: ((() => void) | (() => void)[]) | undefined;
35
- beforeMount?: ((() => void) | (() => void)[]) | undefined;
36
- mounted?: ((() => void) | (() => void)[]) | undefined;
37
- beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
38
- updated?: ((() => void) | (() => void)[]) | undefined;
39
- activated?: ((() => void) | (() => void)[]) | undefined;
40
- deactivated?: ((() => void) | (() => void)[]) | undefined;
41
- beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
42
- beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
43
- destroyed?: ((() => void) | (() => void)[]) | undefined;
44
- unmounted?: ((() => void) | (() => void)[]) | undefined;
45
- renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
46
- renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
47
- errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void)[]) | undefined;
48
- };
49
- $forceUpdate: () => void;
50
- $nextTick: typeof import("vue").nextTick;
51
- $watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
52
- } & Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
53
- config: ColumnConfig;
54
- }>, {
55
- config: () => {};
56
- }>>> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties;
57
- __isFragment?: undefined;
58
- __isTeleport?: undefined;
59
- __isSuspense?: undefined;
60
- } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
2
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
61
3
  config: ColumnConfig;
62
4
  }>, {
63
5
  config: () => {};
64
- }>>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {
6
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
65
7
  config: ColumnConfig;
66
- }> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
8
+ }>, {
9
+ config: () => {};
10
+ }>>>, {
11
+ config: ColumnConfig;
12
+ }>;
67
13
  export default _default;
68
14
  declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
69
15
  declare type __VLS_TypePropsToRuntimeProps<T> = {
@@ -1,69 +1,15 @@
1
1
  import { ColumnConfig } from './schema';
2
- declare const _default: {
3
- new (...args: any[]): {
4
- $: import("vue").ComponentInternalInstance;
5
- $data: {};
6
- $props: Partial<{
7
- config: ColumnConfig;
8
- }> & Omit<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
9
- config: ColumnConfig;
10
- }>, {
11
- config: () => {};
12
- }>>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "config">;
13
- $attrs: {
14
- [x: string]: unknown;
15
- };
16
- $refs: {
17
- [x: string]: unknown;
18
- };
19
- $slots: Readonly<{
20
- [name: string]: import("vue").Slot | undefined;
21
- }>;
22
- $root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
23
- $parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
24
- $emit: (event: string, ...args: any[]) => void;
25
- $el: any;
26
- $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
27
- config: ColumnConfig;
28
- }>, {
29
- config: () => {};
30
- }>>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {
31
- config: ColumnConfig;
32
- }> & {
33
- beforeCreate?: ((() => void) | (() => void)[]) | undefined;
34
- created?: ((() => void) | (() => void)[]) | undefined;
35
- beforeMount?: ((() => void) | (() => void)[]) | undefined;
36
- mounted?: ((() => void) | (() => void)[]) | undefined;
37
- beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
38
- updated?: ((() => void) | (() => void)[]) | undefined;
39
- activated?: ((() => void) | (() => void)[]) | undefined;
40
- deactivated?: ((() => void) | (() => void)[]) | undefined;
41
- beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
42
- beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
43
- destroyed?: ((() => void) | (() => void)[]) | undefined;
44
- unmounted?: ((() => void) | (() => void)[]) | undefined;
45
- renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
46
- renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
47
- errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void)[]) | undefined;
48
- };
49
- $forceUpdate: () => void;
50
- $nextTick: typeof import("vue").nextTick;
51
- $watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
52
- } & Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
53
- config: ColumnConfig;
54
- }>, {
55
- config: () => {};
56
- }>>> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties;
57
- __isFragment?: undefined;
58
- __isTeleport?: undefined;
59
- __isSuspense?: undefined;
60
- } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
2
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
61
3
  config: ColumnConfig;
62
4
  }>, {
63
5
  config: () => {};
64
- }>>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {
6
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
65
7
  config: ColumnConfig;
66
- }> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
8
+ }>, {
9
+ config: () => {};
10
+ }>>>, {
11
+ config: ColumnConfig;
12
+ }>;
67
13
  export default _default;
68
14
  declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
69
15
  declare type __VLS_TypePropsToRuntimeProps<T> = {
@@ -1,168 +1,36 @@
1
- declare const _default: {
2
- new (...args: any[]): {
3
- $: import("vue").ComponentInternalInstance;
4
- $data: {};
5
- $props: Partial<{
6
- columns: any[];
7
- loading: boolean;
8
- showHeader: boolean;
9
- defaultExpandAll: boolean;
10
- border: boolean;
11
- }> & Omit<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
12
- data: any[];
13
- columns?: any[] | undefined;
14
- /** 合并行或列的计算方法 */
15
- spanMethod?: ((data: {
16
- row: any;
17
- column: any;
18
- rowIndex: number;
19
- columnIndex: number;
20
- }) => [number, number]) | undefined;
21
- loading?: boolean | undefined;
22
- /** Table 的最大高度。合法的值为数字或者单位为 px 的高度 */
23
- bodyHeight?: string | number | undefined;
24
- /** 是否显示表头 */
25
- showHeader?: boolean | undefined;
26
- /** 空数据时显示的文本内容 */
27
- emptyText?: string | undefined;
28
- /** 是否默认展开所有行,当 Table 包含展开行存在或者为树形表格时有效 */
29
- defaultExpandAll?: boolean | undefined;
30
- rowkeyName?: string | undefined;
31
- /** 是否带有纵向边框 */
32
- border?: boolean | undefined;
33
- }>, {
34
- columns: () => never[];
35
- loading: boolean;
36
- showHeader: boolean;
37
- defaultExpandAll: boolean;
38
- border: boolean;
39
- }>>> & {
40
- onAfterAction?: ((...args: any[]) => any) | undefined;
41
- onSelect?: ((...args: any[]) => any) | undefined;
42
- "onSort-change"?: ((...args: any[]) => any) | undefined;
43
- "onSelect-all"?: ((...args: any[]) => any) | undefined;
44
- "onSelection-change"?: ((...args: any[]) => any) | undefined;
45
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "columns" | "loading" | "showHeader" | "defaultExpandAll" | "border">;
46
- $attrs: {
47
- [x: string]: unknown;
48
- };
49
- $refs: {
50
- [x: string]: unknown;
51
- };
52
- $slots: Readonly<{
53
- [name: string]: import("vue").Slot | undefined;
54
- }>;
55
- $root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
56
- $parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
57
- $emit: (event: "afterAction" | "sort-change" | "select" | "select-all" | "selection-change", ...args: any[]) => void;
58
- $el: any;
59
- $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
60
- data: any[];
61
- columns?: any[] | undefined;
62
- /** 合并行或列的计算方法 */
63
- spanMethod?: ((data: {
64
- row: any;
65
- column: any;
66
- rowIndex: number;
67
- columnIndex: number;
68
- }) => [number, number]) | undefined;
69
- loading?: boolean | undefined;
70
- /** Table 的最大高度。合法的值为数字或者单位为 px 的高度 */
71
- bodyHeight?: string | number | undefined;
72
- /** 是否显示表头 */
73
- showHeader?: boolean | undefined;
74
- /** 空数据时显示的文本内容 */
75
- emptyText?: string | undefined;
76
- /** 是否默认展开所有行,当 Table 包含展开行存在或者为树形表格时有效 */
77
- defaultExpandAll?: boolean | undefined;
78
- rowkeyName?: string | undefined;
79
- /** 是否带有纵向边框 */
80
- border?: boolean | undefined;
81
- }>, {
82
- columns: () => never[];
83
- loading: boolean;
84
- showHeader: boolean;
85
- defaultExpandAll: boolean;
86
- border: boolean;
87
- }>>> & {
88
- onAfterAction?: ((...args: any[]) => any) | undefined;
89
- onSelect?: ((...args: any[]) => any) | undefined;
90
- "onSort-change"?: ((...args: any[]) => any) | undefined;
91
- "onSelect-all"?: ((...args: any[]) => any) | undefined;
92
- "onSelection-change"?: ((...args: any[]) => any) | undefined;
93
- }, {
94
- toggleRowSelection: (row: any, selected: boolean) => void;
95
- toggleRowExpansion: (row: any, expanded: boolean) => void;
96
- clearSelection: () => void;
97
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("afterAction" | "sort-change" | "select" | "select-all" | "selection-change")[], string, {
98
- columns: any[];
99
- loading: boolean;
100
- showHeader: boolean;
101
- defaultExpandAll: boolean;
102
- border: boolean;
103
- }> & {
104
- beforeCreate?: ((() => void) | (() => void)[]) | undefined;
105
- created?: ((() => void) | (() => void)[]) | undefined;
106
- beforeMount?: ((() => void) | (() => void)[]) | undefined;
107
- mounted?: ((() => void) | (() => void)[]) | undefined;
108
- beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
109
- updated?: ((() => void) | (() => void)[]) | undefined;
110
- activated?: ((() => void) | (() => void)[]) | undefined;
111
- deactivated?: ((() => void) | (() => void)[]) | undefined;
112
- beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
113
- beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
114
- destroyed?: ((() => void) | (() => void)[]) | undefined;
115
- unmounted?: ((() => void) | (() => void)[]) | undefined;
116
- renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
117
- renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
118
- errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void)[]) | undefined;
119
- };
120
- $forceUpdate: () => void;
121
- $nextTick: typeof import("vue").nextTick;
122
- $watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
123
- } & Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
124
- data: any[];
125
- columns?: any[] | undefined;
126
- /** 合并行或列的计算方法 */
127
- spanMethod?: ((data: {
128
- row: any;
129
- column: any;
130
- rowIndex: number;
131
- columnIndex: number;
132
- }) => [number, number]) | undefined;
133
- loading?: boolean | undefined;
134
- /** Table 的最大高度。合法的值为数字或者单位为 px 的高度 */
135
- bodyHeight?: string | number | undefined;
136
- /** 是否显示表头 */
137
- showHeader?: boolean | undefined;
138
- /** 空数据时显示的文本内容 */
139
- emptyText?: string | undefined;
140
- /** 是否默认展开所有行,当 Table 包含展开行存在或者为树形表格时有效 */
141
- defaultExpandAll?: boolean | undefined;
142
- rowkeyName?: string | undefined;
143
- /** 是否带有纵向边框 */
144
- border?: boolean | undefined;
145
- }>, {
146
- columns: () => never[];
147
- loading: boolean;
148
- showHeader: boolean;
149
- defaultExpandAll: boolean;
150
- border: boolean;
151
- }>>> & {
152
- onAfterAction?: ((...args: any[]) => any) | undefined;
153
- onSelect?: ((...args: any[]) => any) | undefined;
154
- "onSort-change"?: ((...args: any[]) => any) | undefined;
155
- "onSelect-all"?: ((...args: any[]) => any) | undefined;
156
- "onSelection-change"?: ((...args: any[]) => any) | undefined;
157
- } & import("vue").ShallowUnwrapRef<{
158
- toggleRowSelection: (row: any, selected: boolean) => void;
159
- toggleRowExpansion: (row: any, expanded: boolean) => void;
160
- clearSelection: () => void;
161
- }> & {} & import("vue").ComponentCustomProperties;
162
- __isFragment?: undefined;
163
- __isTeleport?: undefined;
164
- __isSuspense?: undefined;
165
- } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
1
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
2
+ data: any[];
3
+ columns?: any[] | undefined;
4
+ /** 合并行或列的计算方法 */
5
+ spanMethod?: ((data: {
6
+ row: any;
7
+ column: any;
8
+ rowIndex: number;
9
+ columnIndex: number;
10
+ }) => [number, number]) | undefined;
11
+ loading?: boolean | undefined;
12
+ /** Table 的最大高度。合法的值为数字或者单位为 px 的高度 */
13
+ bodyHeight?: string | number | undefined;
14
+ /** 是否显示表头 */
15
+ showHeader?: boolean | undefined;
16
+ /** 空数据时显示的文本内容 */
17
+ emptyText?: string | undefined;
18
+ /** 是否默认展开所有行,当 Table 包含展开行存在或者为树形表格时有效 */
19
+ defaultExpandAll?: boolean | undefined;
20
+ rowkeyName?: string | undefined;
21
+ /** 是否带有纵向边框 */
22
+ border?: boolean | undefined;
23
+ }>, {
24
+ columns: () => never[];
25
+ loading: boolean;
26
+ showHeader: boolean;
27
+ defaultExpandAll: boolean;
28
+ border: boolean;
29
+ }>, {
30
+ toggleRowSelection: (row: any, selected: boolean) => void;
31
+ toggleRowExpansion: (row: any, expanded: boolean) => void;
32
+ clearSelection: () => void;
33
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("after-action" | "sort-change" | "select" | "select-all" | "selection-change" | "expand-change" | "cell-click")[], "after-action" | "select" | "sort-change" | "select-all" | "selection-change" | "expand-change" | "cell-click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
166
34
  data: any[];
167
35
  columns?: any[] | undefined;
168
36
  /** 合并行或列的计算方法 */
@@ -191,22 +59,20 @@ declare const _default: {
191
59
  defaultExpandAll: boolean;
192
60
  border: boolean;
193
61
  }>>> & {
194
- onAfterAction?: ((...args: any[]) => any) | undefined;
62
+ "onAfter-action"?: ((...args: any[]) => any) | undefined;
195
63
  onSelect?: ((...args: any[]) => any) | undefined;
196
64
  "onSort-change"?: ((...args: any[]) => any) | undefined;
197
65
  "onSelect-all"?: ((...args: any[]) => any) | undefined;
198
66
  "onSelection-change"?: ((...args: any[]) => any) | undefined;
67
+ "onExpand-change"?: ((...args: any[]) => any) | undefined;
68
+ "onCell-click"?: ((...args: any[]) => any) | undefined;
199
69
  }, {
200
- toggleRowSelection: (row: any, selected: boolean) => void;
201
- toggleRowExpansion: (row: any, expanded: boolean) => void;
202
- clearSelection: () => void;
203
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("afterAction" | "sort-change" | "select" | "select-all" | "selection-change")[], "select" | "afterAction" | "sort-change" | "select-all" | "selection-change", {
204
70
  columns: any[];
205
71
  loading: boolean;
206
72
  showHeader: boolean;
207
73
  defaultExpandAll: boolean;
208
74
  border: boolean;
209
- }> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
75
+ }>;
210
76
  export default _default;
211
77
  declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
212
78
  declare type __VLS_TypePropsToRuntimeProps<T> = {