@tmagic/table 1.2.0-beta.2 → 1.2.0-beta.3
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/dist/tmagic-table.mjs +280 -385
- package/dist/tmagic-table.mjs.map +1 -1
- package/dist/tmagic-table.umd.js +282 -387
- package/dist/tmagic-table.umd.js.map +1 -1
- package/package.json +5 -6
- package/src/ActionsColumn.vue +29 -46
- package/src/ExpandColumn.vue +18 -21
- package/src/PopoverColumn.vue +23 -24
- package/src/Table.vue +102 -138
- package/src/TextColumn.vue +34 -35
- package/src/index.ts +1 -5
- package/src/schema.ts +11 -11
- package/src/utils.ts +2 -0
- package/types/ActionsColumn.vue.d.ts +61 -84
- package/types/ExpandColumn.vue.d.ts +80 -15
- package/types/PopoverColumn.vue.d.ts +80 -17
- package/types/Table.vue.d.ts +205 -110
- package/types/TextColumn.vue.d.ts +91 -26
- package/types/schema.d.ts +11 -11
package/src/Table.vue
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<TMagicTable
|
|
3
3
|
tooltip-effect="dark"
|
|
4
4
|
class="m-table"
|
|
5
|
-
ref="
|
|
5
|
+
ref="tMagicTable"
|
|
6
6
|
v-loading="loading"
|
|
7
7
|
:data="tableData"
|
|
8
8
|
:show-header="showHeader"
|
|
@@ -20,187 +20,151 @@
|
|
|
20
20
|
>
|
|
21
21
|
<template v-for="(item, columnIndex) in columns">
|
|
22
22
|
<template v-if="item.type === 'expand'">
|
|
23
|
-
<
|
|
23
|
+
<ExpandColumn :config="item" :key="columnIndex"></ExpandColumn>
|
|
24
24
|
</template>
|
|
25
25
|
|
|
26
26
|
<template v-else-if="item.selection">
|
|
27
|
-
<
|
|
27
|
+
<TMagicTableColumn
|
|
28
|
+
type="selection"
|
|
29
|
+
:key="columnIndex"
|
|
30
|
+
width="40"
|
|
31
|
+
:selectable="item.selectable"
|
|
32
|
+
></TMagicTableColumn>
|
|
28
33
|
</template>
|
|
29
34
|
|
|
30
35
|
<template v-else-if="item.actions">
|
|
31
|
-
<
|
|
36
|
+
<ActionsColumn
|
|
32
37
|
:columns="columns"
|
|
33
38
|
:config="item"
|
|
34
39
|
:rowkey-name="rowkeyName"
|
|
35
40
|
:edit-state="editState"
|
|
36
41
|
:key="columnIndex"
|
|
37
42
|
@afterAction="$emit('afterAction')"
|
|
38
|
-
></
|
|
43
|
+
></ActionsColumn>
|
|
39
44
|
</template>
|
|
40
45
|
|
|
41
46
|
<template v-else-if="item.type === 'popover'">
|
|
42
|
-
<
|
|
47
|
+
<PopoverColumn :key="columnIndex" :config="item"></PopoverColumn>
|
|
43
48
|
</template>
|
|
44
49
|
|
|
45
50
|
<template v-else>
|
|
46
|
-
<
|
|
51
|
+
<TextColumn :key="columnIndex" :config="item" :edit-state="editState"></TextColumn>
|
|
47
52
|
</template>
|
|
48
53
|
</template>
|
|
49
|
-
</
|
|
54
|
+
</TMagicTable>
|
|
50
55
|
</template>
|
|
51
56
|
|
|
52
|
-
<script lang="ts">
|
|
53
|
-
import {
|
|
54
|
-
import { ElTable } from 'element-plus';
|
|
57
|
+
<script lang="ts" setup>
|
|
58
|
+
import { computed, ref } from 'vue';
|
|
55
59
|
import { cloneDeep } from 'lodash-es';
|
|
56
60
|
|
|
61
|
+
import { TMagicTable, TMagicTableColumn } from '@tmagic/design';
|
|
62
|
+
|
|
57
63
|
import ActionsColumn from './ActionsColumn.vue';
|
|
58
64
|
import ExpandColumn from './ExpandColumn.vue';
|
|
59
65
|
import PopoverColumn from './PopoverColumn.vue';
|
|
60
66
|
import TextColumn from './TextColumn.vue';
|
|
61
67
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
const props = withDefaults(
|
|
69
|
+
defineProps<{
|
|
70
|
+
data: any[];
|
|
71
|
+
columns?: any[];
|
|
72
|
+
/** 合并行或列的计算方法 */
|
|
73
|
+
spanMethod?: (data: { row: any; column: any; rowIndex: number; columnIndex: number }) => [number, number];
|
|
74
|
+
loading?: boolean;
|
|
75
|
+
/** Table 的最大高度。合法的值为数字或者单位为 px 的高度 */
|
|
76
|
+
bodyHeight?: string | number;
|
|
77
|
+
/** 是否显示表头 */
|
|
78
|
+
showHeader?: boolean;
|
|
79
|
+
/** 空数据时显示的文本内容 */
|
|
80
|
+
emptyText?: string;
|
|
81
|
+
/** 是否默认展开所有行,当 Table 包含展开行存在或者为树形表格时有效 */
|
|
82
|
+
defaultExpandAll?: boolean;
|
|
83
|
+
rowkeyName?: string;
|
|
84
|
+
/** 是否带有纵向边框 */
|
|
85
|
+
border?: boolean;
|
|
86
|
+
}>(),
|
|
87
|
+
{
|
|
88
|
+
columns: () => [],
|
|
89
|
+
loading: false,
|
|
90
|
+
showHeader: true,
|
|
91
|
+
defaultExpandAll: false,
|
|
92
|
+
border: false,
|
|
93
|
+
},
|
|
94
|
+
);
|
|
72
95
|
|
|
73
|
-
|
|
74
|
-
type: Array as PropType<any[]>,
|
|
75
|
-
require: true,
|
|
76
|
-
default: () => [],
|
|
77
|
-
},
|
|
96
|
+
const emit = defineEmits(['sort-change', 'afterAction', 'select', 'select-all', 'selection-change']);
|
|
78
97
|
|
|
79
|
-
|
|
80
|
-
spanMethod: {
|
|
81
|
-
type: Function as PropType<
|
|
82
|
-
(data: { row: any; column: any; rowIndex: number; columnIndex: number }) => [number, number]
|
|
83
|
-
>,
|
|
84
|
-
},
|
|
98
|
+
const tMagicTable = ref<InstanceType<typeof TMagicTable>>();
|
|
85
99
|
|
|
86
|
-
|
|
87
|
-
type: Boolean,
|
|
88
|
-
default: false,
|
|
89
|
-
},
|
|
100
|
+
const editState = ref([]);
|
|
90
101
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
102
|
+
const selectionColumn = computed(() => {
|
|
103
|
+
const column = props.columns.filter((item) => item.selection);
|
|
104
|
+
return column.length ? column[0] : null;
|
|
105
|
+
});
|
|
95
106
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
},
|
|
107
|
+
const tableData = computed(() => {
|
|
108
|
+
if (selectionColumn.value) {
|
|
109
|
+
return props.data || [];
|
|
110
|
+
}
|
|
101
111
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
type: String,
|
|
105
|
-
},
|
|
112
|
+
return cloneDeep(props.data) || [];
|
|
113
|
+
});
|
|
106
114
|
|
|
107
|
-
|
|
108
|
-
defaultExpandAll: {
|
|
109
|
-
type: Boolean,
|
|
110
|
-
default: false,
|
|
111
|
-
},
|
|
115
|
+
const hasBorder = computed(() => (typeof props.border !== 'undefined' ? props.border : true));
|
|
112
116
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
117
|
+
const sortChange = (data: any) => {
|
|
118
|
+
emit('sort-change', data);
|
|
119
|
+
};
|
|
116
120
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
},
|
|
121
|
+
const selectHandler = (selection: any, row: any) => {
|
|
122
|
+
const column = selectionColumn.value;
|
|
123
|
+
if (!column) {
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
123
126
|
|
|
124
|
-
|
|
127
|
+
if (column.selection === 'single') {
|
|
128
|
+
// this.clearSelection()
|
|
129
|
+
// this.toggleRowSelection(row, true)
|
|
130
|
+
}
|
|
131
|
+
emit('select', selection, row);
|
|
132
|
+
};
|
|
125
133
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
return {
|
|
130
|
-
editState: [],
|
|
131
|
-
};
|
|
132
|
-
},
|
|
134
|
+
const selectAllHandler = (selection: any) => {
|
|
135
|
+
emit('select-all', selection);
|
|
136
|
+
};
|
|
133
137
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
return this.data || [];
|
|
138
|
-
}
|
|
138
|
+
const selectionChangeHandler = (selection: any) => {
|
|
139
|
+
emit('selection-change', selection);
|
|
140
|
+
};
|
|
139
141
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
+
const toggleRowSelection = (row: any, selected: boolean) => {
|
|
143
|
+
tMagicTable.value?.toggleRowSelection(row, selected);
|
|
144
|
+
};
|
|
142
145
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
},
|
|
146
|
+
const toggleRowExpansion = (row: any, expanded: boolean) => {
|
|
147
|
+
tMagicTable.value?.toggleRowExpansion(row, expanded);
|
|
148
|
+
};
|
|
147
149
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
},
|
|
150
|
+
const clearSelection = () => {
|
|
151
|
+
tMagicTable.value?.clearSelection();
|
|
152
|
+
};
|
|
152
153
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}
|
|
168
|
-
this.$emit('select', selection, row);
|
|
169
|
-
},
|
|
170
|
-
|
|
171
|
-
selectAllHandler(selection: any) {
|
|
172
|
-
this.$emit('select-all', selection);
|
|
173
|
-
},
|
|
174
|
-
|
|
175
|
-
selectionChangeHandler(selection: any) {
|
|
176
|
-
this.$emit('selection-change', selection);
|
|
177
|
-
},
|
|
178
|
-
|
|
179
|
-
toggleRowSelection(row: any, selected: boolean) {
|
|
180
|
-
const table = this.$refs.table as InstanceType<typeof ElTable>;
|
|
181
|
-
table.toggleRowSelection.bind(table)(row, selected);
|
|
182
|
-
},
|
|
183
|
-
|
|
184
|
-
toggleRowExpansion(row: any, expanded: boolean) {
|
|
185
|
-
const table = this.$refs.table as InstanceType<typeof ElTable>;
|
|
186
|
-
table.toggleRowExpansion.bind(table)(row, expanded);
|
|
187
|
-
},
|
|
188
|
-
|
|
189
|
-
clearSelection() {
|
|
190
|
-
const table = this.$refs.table as InstanceType<typeof ElTable>;
|
|
191
|
-
table.clearSelection.bind(table)();
|
|
192
|
-
},
|
|
193
|
-
|
|
194
|
-
objectSpanMethod(data: any) {
|
|
195
|
-
if (typeof this.spanMethod === 'function') {
|
|
196
|
-
return this.spanMethod(data);
|
|
197
|
-
}
|
|
198
|
-
return () => ({
|
|
199
|
-
rowspan: 0,
|
|
200
|
-
colspan: 0,
|
|
201
|
-
});
|
|
202
|
-
},
|
|
203
|
-
},
|
|
154
|
+
const objectSpanMethod = (data: any) => {
|
|
155
|
+
if (typeof props.spanMethod === 'function') {
|
|
156
|
+
return props.spanMethod(data);
|
|
157
|
+
}
|
|
158
|
+
return () => ({
|
|
159
|
+
rowspan: 0,
|
|
160
|
+
colspan: 0,
|
|
161
|
+
});
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
defineExpose({
|
|
165
|
+
toggleRowSelection,
|
|
166
|
+
toggleRowExpansion,
|
|
167
|
+
clearSelection,
|
|
204
168
|
});
|
|
205
169
|
</script>
|
|
206
170
|
|
package/src/TextColumn.vue
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<TMagicTableColumn
|
|
3
3
|
show-overflow-tooltip
|
|
4
4
|
:label="config.label"
|
|
5
5
|
:width="config.width"
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
:prop="config.prop"
|
|
9
9
|
>
|
|
10
10
|
<template v-slot="scope">
|
|
11
|
-
<
|
|
11
|
+
<TMagicForm v-if="config.type && editState[scope.$index]" label-width="0" :model="editState[scope.$index]">
|
|
12
12
|
<m-form-container
|
|
13
13
|
:prop="config.prop"
|
|
14
14
|
:rules="config.rules"
|
|
@@ -16,62 +16,61 @@
|
|
|
16
16
|
:name="config.prop"
|
|
17
17
|
:model="editState[scope.$index]"
|
|
18
18
|
></m-form-container>
|
|
19
|
-
</
|
|
19
|
+
</TMagicForm>
|
|
20
20
|
|
|
21
|
-
<
|
|
21
|
+
<TMagicButton
|
|
22
|
+
v-else-if="config.action === 'actionLink' && config.prop"
|
|
23
|
+
text
|
|
24
|
+
type="primary"
|
|
25
|
+
@click="config.handler?.(scope.row)"
|
|
26
|
+
>
|
|
22
27
|
{{ formatter(config, scope.row) }}
|
|
23
|
-
</
|
|
28
|
+
</TMagicButton>
|
|
24
29
|
|
|
25
|
-
<a v-else-if="config.action === 'img'" target="_blank" :href="scope.row[config.prop]"
|
|
30
|
+
<a v-else-if="config.action === 'img' && config.prop" target="_blank" :href="scope.row[config.prop]"
|
|
26
31
|
><img :src="scope.row[config.prop]" height="50"
|
|
27
32
|
/></a>
|
|
28
33
|
|
|
29
|
-
<a
|
|
30
|
-
|
|
31
|
-
|
|
34
|
+
<a
|
|
35
|
+
v-else-if="config.action === 'link' && config.prop"
|
|
36
|
+
target="_blank"
|
|
37
|
+
:href="scope.row[config.prop]"
|
|
38
|
+
class="keep-all"
|
|
39
|
+
>{{ scope.row[config.prop] }}</a
|
|
40
|
+
>
|
|
32
41
|
|
|
33
42
|
<el-tooltip v-else-if="config.action === 'tip'" placement="left">
|
|
34
43
|
<template #content>
|
|
35
44
|
<div>{{ formatter(config, scope.row) }}</div>
|
|
36
45
|
</template>
|
|
37
|
-
<
|
|
46
|
+
<TMagicButton text type="primary">扩展配置</TMagicButton>
|
|
38
47
|
</el-tooltip>
|
|
39
48
|
|
|
40
|
-
<
|
|
41
|
-
v-else-if="config.action === 'tag'"
|
|
49
|
+
<TMagicTag
|
|
50
|
+
v-else-if="config.action === 'tag' && config.prop"
|
|
42
51
|
:type="typeof config.type === 'function' ? config.type(scope.row[config.prop], scope.row) : config.type"
|
|
43
52
|
close-transition
|
|
44
|
-
>{{ formatter(config, scope.row) }}</
|
|
53
|
+
>{{ formatter(config, scope.row) }}</TMagicTag
|
|
45
54
|
>
|
|
46
55
|
<div v-else v-html="formatter(config, scope.row)"></div>
|
|
47
56
|
</template>
|
|
48
|
-
</
|
|
57
|
+
</TMagicTableColumn>
|
|
49
58
|
</template>
|
|
50
59
|
|
|
51
|
-
<script lang="ts">
|
|
52
|
-
import {
|
|
60
|
+
<script lang="ts" setup>
|
|
61
|
+
import { TMagicButton, TMagicForm, TMagicTableColumn, TMagicTag } from '@tmagic/design';
|
|
53
62
|
|
|
54
63
|
import { ColumnConfig } from './schema';
|
|
55
64
|
import { formatter } from './utils';
|
|
56
65
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
config:
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
editState: {
|
|
66
|
-
type: Object,
|
|
67
|
-
default: () => {},
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
setup() {
|
|
72
|
-
return {
|
|
73
|
-
formatter,
|
|
74
|
-
};
|
|
66
|
+
withDefaults(
|
|
67
|
+
defineProps<{
|
|
68
|
+
config: ColumnConfig;
|
|
69
|
+
editState?: any;
|
|
70
|
+
}>(),
|
|
71
|
+
{
|
|
72
|
+
config: () => ({}),
|
|
73
|
+
editState: () => ({}),
|
|
75
74
|
},
|
|
76
|
-
|
|
75
|
+
);
|
|
77
76
|
</script>
|
package/src/index.ts
CHANGED
|
@@ -22,12 +22,8 @@ import Table from './Table.vue';
|
|
|
22
22
|
|
|
23
23
|
export { default as MagicTable } from './Table.vue';
|
|
24
24
|
|
|
25
|
-
const components = [Table];
|
|
26
|
-
|
|
27
25
|
export default {
|
|
28
26
|
install(app: App) {
|
|
29
|
-
|
|
30
|
-
app.component(component.name, component);
|
|
31
|
-
});
|
|
27
|
+
app.component('m-table', Table);
|
|
32
28
|
},
|
|
33
29
|
};
|
package/src/schema.ts
CHANGED
|
@@ -35,23 +35,23 @@ export type ColumnConfig = {
|
|
|
35
35
|
values?: FormValue;
|
|
36
36
|
selection?: boolean | 'single';
|
|
37
37
|
selectable?: (row: any, index: number) => boolean;
|
|
38
|
-
label
|
|
38
|
+
label?: string;
|
|
39
39
|
fixed?: 'left' | 'right' | boolean;
|
|
40
40
|
width?: number | string;
|
|
41
41
|
actions?: ColumnActionConfig[];
|
|
42
|
-
type
|
|
43
|
-
text
|
|
44
|
-
prop
|
|
45
|
-
showHeader
|
|
42
|
+
type?: 'popover' | 'expand' | string | ((value: any, row: any) => string);
|
|
43
|
+
text?: string;
|
|
44
|
+
prop?: string;
|
|
45
|
+
showHeader?: boolean;
|
|
46
46
|
table?: ColumnConfig[];
|
|
47
47
|
formatter?: 'datetime' | ((item: any, row: Record<string, any>) => any);
|
|
48
|
-
popover
|
|
49
|
-
placement:
|
|
50
|
-
width:
|
|
51
|
-
trigger:
|
|
52
|
-
tableEmbed:
|
|
48
|
+
popover?: {
|
|
49
|
+
placement: string;
|
|
50
|
+
width: string;
|
|
51
|
+
trigger: string;
|
|
52
|
+
tableEmbed: string;
|
|
53
53
|
};
|
|
54
54
|
sortable?: boolean | 'custom';
|
|
55
55
|
action?: 'tip' | 'actionLink' | 'img' | 'link' | 'tag';
|
|
56
|
-
handler
|
|
56
|
+
handler?: (row: any) => void;
|
|
57
57
|
};
|
package/src/utils.ts
CHANGED
|
@@ -21,6 +21,8 @@ import { datetimeFormatter } from '@tmagic/utils';
|
|
|
21
21
|
import { ColumnConfig } from './schema';
|
|
22
22
|
|
|
23
23
|
export const formatter = (item: ColumnConfig, row: any) => {
|
|
24
|
+
if (!item.prop) return '';
|
|
25
|
+
|
|
24
26
|
if (item.formatter) {
|
|
25
27
|
if (item.formatter === 'datetime') {
|
|
26
28
|
// eslint-disable-next-line no-param-reassign
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
2
1
|
import { ColumnConfig } from './schema';
|
|
3
2
|
declare const _default: {
|
|
4
3
|
new (...args: any[]): {
|
|
@@ -8,27 +7,18 @@ declare const _default: {
|
|
|
8
7
|
columns: any[];
|
|
9
8
|
config: ColumnConfig;
|
|
10
9
|
rowkeyName: string;
|
|
11
|
-
editState:
|
|
12
|
-
}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
|
13
|
-
columns:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
rowkeyName: {
|
|
24
|
-
type: StringConstructor;
|
|
25
|
-
default: string;
|
|
26
|
-
};
|
|
27
|
-
editState: {
|
|
28
|
-
type: ObjectConstructor;
|
|
29
|
-
default: () => void;
|
|
30
|
-
};
|
|
31
|
-
}>> & {
|
|
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
|
+
}>>> & {
|
|
32
22
|
onAfterAction?: ((...args: any[]) => any) | undefined;
|
|
33
23
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "columns" | "config" | "rowkeyName" | "editState">;
|
|
34
24
|
$attrs: {
|
|
@@ -44,32 +34,23 @@ declare const _default: {
|
|
|
44
34
|
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
45
35
|
$emit: (event: "afterAction", ...args: any[]) => void;
|
|
46
36
|
$el: any;
|
|
47
|
-
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
48
|
-
columns:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
rowkeyName: {
|
|
59
|
-
type: StringConstructor;
|
|
60
|
-
default: string;
|
|
61
|
-
};
|
|
62
|
-
editState: {
|
|
63
|
-
type: ObjectConstructor;
|
|
64
|
-
default: () => void;
|
|
65
|
-
};
|
|
66
|
-
}>> & {
|
|
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
|
+
}>>> & {
|
|
67
48
|
onAfterAction?: ((...args: any[]) => any) | undefined;
|
|
68
49
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "afterAction"[], string, {
|
|
69
50
|
columns: any[];
|
|
70
51
|
config: ColumnConfig;
|
|
71
52
|
rowkeyName: string;
|
|
72
|
-
editState:
|
|
53
|
+
editState: any;
|
|
73
54
|
}> & {
|
|
74
55
|
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
75
56
|
created?: ((() => void) | (() => void)[]) | undefined;
|
|
@@ -90,58 +71,54 @@ declare const _default: {
|
|
|
90
71
|
$forceUpdate: () => void;
|
|
91
72
|
$nextTick: typeof import("vue").nextTick;
|
|
92
73
|
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
93
|
-
} & Readonly<import("vue").ExtractPropTypes<{
|
|
94
|
-
columns:
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
rowkeyName: {
|
|
105
|
-
type: StringConstructor;
|
|
106
|
-
default: string;
|
|
107
|
-
};
|
|
108
|
-
editState: {
|
|
109
|
-
type: ObjectConstructor;
|
|
110
|
-
default: () => void;
|
|
111
|
-
};
|
|
112
|
-
}>> & {
|
|
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
|
+
}>>> & {
|
|
113
85
|
onAfterAction?: ((...args: any[]) => any) | undefined;
|
|
114
86
|
} & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties;
|
|
115
87
|
__isFragment?: undefined;
|
|
116
88
|
__isTeleport?: undefined;
|
|
117
89
|
__isSuspense?: undefined;
|
|
118
|
-
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
119
|
-
columns:
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
rowkeyName: {
|
|
130
|
-
type: StringConstructor;
|
|
131
|
-
default: string;
|
|
132
|
-
};
|
|
133
|
-
editState: {
|
|
134
|
-
type: ObjectConstructor;
|
|
135
|
-
default: () => void;
|
|
136
|
-
};
|
|
137
|
-
}>> & {
|
|
90
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
91
|
+
columns: any[];
|
|
92
|
+
config: ColumnConfig;
|
|
93
|
+
rowkeyName?: string | undefined;
|
|
94
|
+
editState?: any;
|
|
95
|
+
}>, {
|
|
96
|
+
columns: () => never[];
|
|
97
|
+
config: () => {};
|
|
98
|
+
rowkeyName: string;
|
|
99
|
+
editState: () => never[];
|
|
100
|
+
}>>> & {
|
|
138
101
|
onAfterAction?: ((...args: any[]) => any) | undefined;
|
|
139
102
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "afterAction"[], "afterAction", {
|
|
140
103
|
columns: any[];
|
|
141
104
|
config: ColumnConfig;
|
|
142
105
|
rowkeyName: string;
|
|
143
|
-
editState:
|
|
106
|
+
editState: any;
|
|
144
107
|
}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
145
108
|
$slots: {};
|
|
146
109
|
});
|
|
147
110
|
export default _default;
|
|
111
|
+
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
112
|
+
declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
113
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
114
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
115
|
+
} : {
|
|
116
|
+
type: import('vue').PropType<T[K]>;
|
|
117
|
+
required: true;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
declare type __VLS_WithDefaults<P, D> = {
|
|
121
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? P[K] & {
|
|
122
|
+
default: D[K];
|
|
123
|
+
} : P[K];
|
|
124
|
+
};
|