@tmagic/element-plus-adapter 1.7.7 → 1.7.8-beta.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/LICENSE +235 -164
- package/dist/es/Table.js +5 -0
- package/dist/es/Table.vue_vue_type_script_setup_true_lang.js +122 -0
- package/dist/es/index.js +191 -0
- package/dist/tmagic-element-plus-adapter.umd.cjs +310 -321
- package/package.json +5 -4
- package/types/index.d.ts +4 -3
- package/dist/tmagic-element-plus-adapter.js +0 -316
|
@@ -1,321 +1,310 @@
|
|
|
1
|
-
(function
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
popconfirm: {
|
|
312
|
-
component: elementPlus.ElPopconfirm,
|
|
313
|
-
props: (props) => props
|
|
314
|
-
}
|
|
315
|
-
},
|
|
316
|
-
loading: elementPlus.ElLoading.directive
|
|
317
|
-
};
|
|
318
|
-
|
|
319
|
-
return adapter;
|
|
320
|
-
|
|
321
|
-
}));
|
|
1
|
+
(function(global, factory) {
|
|
2
|
+
typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory(require("element-plus"), require("vue")) : typeof define === "function" && define.amd ? define(["element-plus", "vue"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, global.TMagicElementPlusAdapter = factory(global.ElementPlus, global.Vue));
|
|
3
|
+
})(this, function(element_plus, vue) {
|
|
4
|
+
//#endregion
|
|
5
|
+
//#region packages/element-plus-adapter/src/Table.vue
|
|
6
|
+
var Table_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
7
|
+
name: "TElAdapterTable",
|
|
8
|
+
__name: "Table",
|
|
9
|
+
props: {
|
|
10
|
+
columns: {},
|
|
11
|
+
data: {},
|
|
12
|
+
border: { type: Boolean },
|
|
13
|
+
maxHeight: {},
|
|
14
|
+
defaultExpandAll: { type: Boolean },
|
|
15
|
+
showHeader: { type: Boolean },
|
|
16
|
+
rowKey: {},
|
|
17
|
+
treeProps: {},
|
|
18
|
+
emptyText: {},
|
|
19
|
+
tooltipEffect: {},
|
|
20
|
+
tooltipOptions: {},
|
|
21
|
+
showOverflowTooltip: { type: Boolean },
|
|
22
|
+
spanMethod: { type: Function }
|
|
23
|
+
},
|
|
24
|
+
emits: [
|
|
25
|
+
"sort-change",
|
|
26
|
+
"select",
|
|
27
|
+
"select-all",
|
|
28
|
+
"selection-change",
|
|
29
|
+
"expand-change",
|
|
30
|
+
"cell-click"
|
|
31
|
+
],
|
|
32
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
33
|
+
const emit = __emit;
|
|
34
|
+
const tableRef = (0, vue.useTemplateRef)("table");
|
|
35
|
+
const sortChange = (data) => {
|
|
36
|
+
emit("sort-change", data);
|
|
37
|
+
};
|
|
38
|
+
const selectHandler = (...args) => {
|
|
39
|
+
emit("select", ...args);
|
|
40
|
+
};
|
|
41
|
+
const selectAllHandler = (...args) => {
|
|
42
|
+
emit("select-all", ...args);
|
|
43
|
+
};
|
|
44
|
+
const selectionChangeHandler = (...args) => {
|
|
45
|
+
emit("selection-change", ...args);
|
|
46
|
+
};
|
|
47
|
+
const cellClickHandler = (...args) => {
|
|
48
|
+
emit("cell-click", ...args);
|
|
49
|
+
};
|
|
50
|
+
const expandChange = (...args) => {
|
|
51
|
+
emit("expand-change", ...args);
|
|
52
|
+
};
|
|
53
|
+
const toggleRowSelection = (row, selected) => {
|
|
54
|
+
tableRef.value?.toggleRowSelection(row, selected);
|
|
55
|
+
};
|
|
56
|
+
const toggleRowExpansion = (row, expanded) => {
|
|
57
|
+
tableRef.value?.toggleRowExpansion(row, expanded);
|
|
58
|
+
};
|
|
59
|
+
const clearSelection = () => {
|
|
60
|
+
tableRef.value?.clearSelection();
|
|
61
|
+
};
|
|
62
|
+
__expose({
|
|
63
|
+
getEl: () => tableRef.value?.$el,
|
|
64
|
+
getTableRef: () => tableRef.value,
|
|
65
|
+
clearSelection,
|
|
66
|
+
toggleRowSelection,
|
|
67
|
+
toggleRowExpansion
|
|
68
|
+
});
|
|
69
|
+
return (_ctx, _cache) => {
|
|
70
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(element_plus.ElTable), {
|
|
71
|
+
ref: "table",
|
|
72
|
+
data: __props.data,
|
|
73
|
+
border: __props.border,
|
|
74
|
+
"max-height": __props.maxHeight,
|
|
75
|
+
"default-expand-all": __props.defaultExpandAll,
|
|
76
|
+
"show-header": __props.showHeader,
|
|
77
|
+
"row-key": __props.rowKey,
|
|
78
|
+
"tree-props": __props.treeProps,
|
|
79
|
+
"empty-text": __props.emptyText,
|
|
80
|
+
"show-overflow-tooltip": __props.showOverflowTooltip,
|
|
81
|
+
"tooltip-effect": __props.tooltipEffect,
|
|
82
|
+
"tooltip-options": __props.tooltipOptions,
|
|
83
|
+
"span-method": __props.spanMethod,
|
|
84
|
+
onSortChange: sortChange,
|
|
85
|
+
onSelect: selectHandler,
|
|
86
|
+
onSelectAll: selectAllHandler,
|
|
87
|
+
onSelectionChange: selectionChangeHandler,
|
|
88
|
+
onCellClick: cellClickHandler,
|
|
89
|
+
onExpandChange: expandChange
|
|
90
|
+
}, {
|
|
91
|
+
default: (0, vue.withCtx)(() => [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(__props.columns, (item, columnIndex) => {
|
|
92
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(element_plus.ElTableColumn), (0, vue.mergeProps)({
|
|
93
|
+
key: columnIndex,
|
|
94
|
+
ref_for: true
|
|
95
|
+
}, item.props || {}), (0, vue.createSlots)({ _: 2 }, [item.title ? {
|
|
96
|
+
name: "header",
|
|
97
|
+
fn: (0, vue.withCtx)((scope) => [((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(item.title(scope))))]),
|
|
98
|
+
key: "0"
|
|
99
|
+
} : void 0, item.cell ? {
|
|
100
|
+
name: "default",
|
|
101
|
+
fn: (0, vue.withCtx)((scope) => [((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(item.cell(scope))))]),
|
|
102
|
+
key: "1"
|
|
103
|
+
} : void 0]), 1040);
|
|
104
|
+
}), 128))]),
|
|
105
|
+
_: 1
|
|
106
|
+
}, 8, [
|
|
107
|
+
"data",
|
|
108
|
+
"border",
|
|
109
|
+
"max-height",
|
|
110
|
+
"default-expand-all",
|
|
111
|
+
"show-header",
|
|
112
|
+
"row-key",
|
|
113
|
+
"tree-props",
|
|
114
|
+
"empty-text",
|
|
115
|
+
"show-overflow-tooltip",
|
|
116
|
+
"tooltip-effect",
|
|
117
|
+
"tooltip-options",
|
|
118
|
+
"span-method"
|
|
119
|
+
]);
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
//#endregion
|
|
124
|
+
return {
|
|
125
|
+
adapterType: "element-plus",
|
|
126
|
+
useZIndex: element_plus.useZIndex,
|
|
127
|
+
message: element_plus.ElMessage,
|
|
128
|
+
messageBox: element_plus.ElMessageBox,
|
|
129
|
+
components: {
|
|
130
|
+
autocomplete: {
|
|
131
|
+
component: element_plus.ElAutocomplete,
|
|
132
|
+
props: (props) => props
|
|
133
|
+
},
|
|
134
|
+
badge: {
|
|
135
|
+
component: element_plus.ElBadge,
|
|
136
|
+
props: (props) => props
|
|
137
|
+
},
|
|
138
|
+
button: {
|
|
139
|
+
component: element_plus.ElButton,
|
|
140
|
+
props: (props) => {
|
|
141
|
+
return {
|
|
142
|
+
...props,
|
|
143
|
+
type: props.type === "default" ? "" : props.type
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
card: {
|
|
148
|
+
component: element_plus.ElCard,
|
|
149
|
+
props: (props) => props
|
|
150
|
+
},
|
|
151
|
+
cascader: {
|
|
152
|
+
component: element_plus.ElCascader,
|
|
153
|
+
props: (props) => props
|
|
154
|
+
},
|
|
155
|
+
checkbox: {
|
|
156
|
+
component: element_plus.ElCheckbox,
|
|
157
|
+
props: (props) => props
|
|
158
|
+
},
|
|
159
|
+
checkboxGroup: {
|
|
160
|
+
component: element_plus.ElCheckboxGroup,
|
|
161
|
+
props: (props) => props
|
|
162
|
+
},
|
|
163
|
+
col: {
|
|
164
|
+
component: element_plus.ElCol,
|
|
165
|
+
props: (props) => props
|
|
166
|
+
},
|
|
167
|
+
collapse: {
|
|
168
|
+
component: element_plus.ElCollapse,
|
|
169
|
+
props: (props) => props
|
|
170
|
+
},
|
|
171
|
+
collapseItem: {
|
|
172
|
+
component: element_plus.ElCollapseItem,
|
|
173
|
+
props: (props) => props
|
|
174
|
+
},
|
|
175
|
+
colorPicker: {
|
|
176
|
+
component: element_plus.ElColorPicker,
|
|
177
|
+
props: (props) => props
|
|
178
|
+
},
|
|
179
|
+
datePicker: {
|
|
180
|
+
component: element_plus.ElDatePicker,
|
|
181
|
+
props: (props) => props
|
|
182
|
+
},
|
|
183
|
+
dialog: {
|
|
184
|
+
component: element_plus.ElDialog,
|
|
185
|
+
props: (props) => props
|
|
186
|
+
},
|
|
187
|
+
divider: {
|
|
188
|
+
component: element_plus.ElDivider,
|
|
189
|
+
props: (props) => props
|
|
190
|
+
},
|
|
191
|
+
drawer: {
|
|
192
|
+
component: element_plus.ElDrawer,
|
|
193
|
+
props: (props) => props
|
|
194
|
+
},
|
|
195
|
+
dropdown: {
|
|
196
|
+
component: element_plus.ElDropdown,
|
|
197
|
+
props: (props) => props
|
|
198
|
+
},
|
|
199
|
+
dropdownItem: {
|
|
200
|
+
component: element_plus.ElDropdownItem,
|
|
201
|
+
props: (props) => props
|
|
202
|
+
},
|
|
203
|
+
dropdownMenu: {
|
|
204
|
+
component: element_plus.ElDropdownMenu,
|
|
205
|
+
props: () => ({})
|
|
206
|
+
},
|
|
207
|
+
form: {
|
|
208
|
+
component: element_plus.ElForm,
|
|
209
|
+
props: (props) => props
|
|
210
|
+
},
|
|
211
|
+
formItem: {
|
|
212
|
+
component: element_plus.ElFormItem,
|
|
213
|
+
props: (props) => props
|
|
214
|
+
},
|
|
215
|
+
icon: {
|
|
216
|
+
component: element_plus.ElIcon,
|
|
217
|
+
props: (props) => props
|
|
218
|
+
},
|
|
219
|
+
input: {
|
|
220
|
+
component: element_plus.ElInput,
|
|
221
|
+
props: (props) => props
|
|
222
|
+
},
|
|
223
|
+
inputNumber: {
|
|
224
|
+
component: element_plus.ElInputNumber,
|
|
225
|
+
props: (props) => props
|
|
226
|
+
},
|
|
227
|
+
option: {
|
|
228
|
+
component: element_plus.ElOption,
|
|
229
|
+
props: (props) => props
|
|
230
|
+
},
|
|
231
|
+
optionGroup: {
|
|
232
|
+
component: element_plus.ElOptionGroup,
|
|
233
|
+
props: (props) => props
|
|
234
|
+
},
|
|
235
|
+
pagination: {
|
|
236
|
+
component: element_plus.ElPagination,
|
|
237
|
+
props: (props) => props
|
|
238
|
+
},
|
|
239
|
+
radio: {
|
|
240
|
+
component: element_plus.ElRadio,
|
|
241
|
+
props: (props) => props
|
|
242
|
+
},
|
|
243
|
+
radioButton: {
|
|
244
|
+
component: element_plus.ElRadioButton,
|
|
245
|
+
props: (props) => props
|
|
246
|
+
},
|
|
247
|
+
radioGroup: {
|
|
248
|
+
component: element_plus.ElRadioGroup,
|
|
249
|
+
props: (props) => props
|
|
250
|
+
},
|
|
251
|
+
row: {
|
|
252
|
+
component: element_plus.ElRow,
|
|
253
|
+
props: () => ({})
|
|
254
|
+
},
|
|
255
|
+
scrollbar: {
|
|
256
|
+
component: element_plus.ElScrollbar,
|
|
257
|
+
props: () => ({})
|
|
258
|
+
},
|
|
259
|
+
select: {
|
|
260
|
+
component: element_plus.ElSelect,
|
|
261
|
+
props: (props) => props
|
|
262
|
+
},
|
|
263
|
+
step: {
|
|
264
|
+
component: element_plus.ElStep,
|
|
265
|
+
props: (props) => props
|
|
266
|
+
},
|
|
267
|
+
steps: {
|
|
268
|
+
component: element_plus.ElSteps,
|
|
269
|
+
props: (props) => props
|
|
270
|
+
},
|
|
271
|
+
switch: {
|
|
272
|
+
component: element_plus.ElSwitch,
|
|
273
|
+
props: (props) => props
|
|
274
|
+
},
|
|
275
|
+
table: {
|
|
276
|
+
component: Table_default,
|
|
277
|
+
props: (props) => props
|
|
278
|
+
},
|
|
279
|
+
tabPane: {
|
|
280
|
+
component: element_plus.ElTabPane,
|
|
281
|
+
props: (props) => props
|
|
282
|
+
},
|
|
283
|
+
tabs: {
|
|
284
|
+
component: element_plus.ElTabs,
|
|
285
|
+
props: (props) => props
|
|
286
|
+
},
|
|
287
|
+
tag: {
|
|
288
|
+
component: element_plus.ElTag,
|
|
289
|
+
props: (props) => props
|
|
290
|
+
},
|
|
291
|
+
timePicker: {
|
|
292
|
+
component: element_plus.ElTimePicker,
|
|
293
|
+
props: (props) => props
|
|
294
|
+
},
|
|
295
|
+
tooltip: {
|
|
296
|
+
component: element_plus.ElTooltip,
|
|
297
|
+
props: (props) => props
|
|
298
|
+
},
|
|
299
|
+
upload: {
|
|
300
|
+
component: element_plus.ElUpload,
|
|
301
|
+
props: (props) => props
|
|
302
|
+
},
|
|
303
|
+
popconfirm: {
|
|
304
|
+
component: element_plus.ElPopconfirm,
|
|
305
|
+
props: (props) => props
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
loading: element_plus.ElLoading.directive
|
|
309
|
+
};
|
|
310
|
+
});
|