@tmagic/element-plus-adapter 1.8.0-manmanyu.9 → 1.8.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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ElTable, ElTableColumn } from "element-plus";
|
|
2
2
|
import { Fragment, createBlock, createElementBlock, createSlots, defineComponent, mergeProps, openBlock, renderList, resolveDynamicComponent, unref, useTemplateRef, withCtx } from "vue";
|
|
3
3
|
//#region packages/element-plus-adapter/src/Table.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var Table_vue_vue_type_script_setup_true_lang_default =
|
|
4
|
+
var Table_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
5
5
|
name: "TElAdapterTable",
|
|
6
6
|
__name: "Table",
|
|
7
7
|
props: {
|
package/dist/es/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Table_default from "./Table.js";
|
|
2
|
-
import { ElAutocomplete, ElBadge, ElButton, ElCard, ElCascader, ElCheckbox, ElCheckboxGroup, ElCol, ElCollapse, ElCollapseItem, ElColorPicker, ElDatePicker, ElDialog, ElDivider, ElDrawer, ElDropdown, ElDropdownItem, ElDropdownMenu, ElForm, ElFormItem, ElIcon, ElInput, ElInputNumber, ElLoading, ElMessage, ElMessageBox, ElOption, ElOptionGroup, ElPagination, ElPopconfirm, ElRadio, ElRadioButton, ElRadioGroup, ElRow, ElScrollbar, ElSelect, ElStep, ElSteps, ElSwitch, ElTabPane, ElTabs, ElTag, ElTimePicker, ElTooltip, ElUpload, useZIndex } from "element-plus";
|
|
2
|
+
import { ElAlert, ElAutocomplete, ElBadge, ElButton, ElCard, ElCascader, ElCheckbox, ElCheckboxGroup, ElCol, ElCollapse, ElCollapseItem, ElColorPicker, ElDatePicker, ElDialog, ElDivider, ElDrawer, ElDropdown, ElDropdownItem, ElDropdownMenu, ElForm, ElFormItem, ElIcon, ElInput, ElInputNumber, ElLoading, ElMessage, ElMessageBox, ElOption, ElOptionGroup, ElPagination, ElPopconfirm, ElRadio, ElRadioButton, ElRadioGroup, ElRow, ElScrollbar, ElSelect, ElStep, ElSteps, ElSwitch, ElTabPane, ElTabs, ElTag, ElTimePicker, ElTooltip, ElUpload, useZIndex } from "element-plus";
|
|
3
3
|
//#region packages/element-plus-adapter/src/index.ts
|
|
4
4
|
var adapter = {
|
|
5
5
|
adapterType: "element-plus",
|
|
@@ -11,6 +11,10 @@ var adapter = {
|
|
|
11
11
|
component: ElAutocomplete,
|
|
12
12
|
props: (props) => props
|
|
13
13
|
},
|
|
14
|
+
alert: {
|
|
15
|
+
component: ElAlert,
|
|
16
|
+
props: (props) => props
|
|
17
|
+
},
|
|
14
18
|
badge: {
|
|
15
19
|
component: ElBadge,
|
|
16
20
|
props: (props) => props
|
|
@@ -169,7 +173,19 @@ var adapter = {
|
|
|
169
173
|
},
|
|
170
174
|
tag: {
|
|
171
175
|
component: ElTag,
|
|
172
|
-
props: (props) =>
|
|
176
|
+
props: (props) => {
|
|
177
|
+
if (props.type && ![
|
|
178
|
+
"primary",
|
|
179
|
+
"success",
|
|
180
|
+
"info",
|
|
181
|
+
"warning",
|
|
182
|
+
"danger"
|
|
183
|
+
].includes(props.type)) return {
|
|
184
|
+
...props,
|
|
185
|
+
type: "primary"
|
|
186
|
+
};
|
|
187
|
+
return props;
|
|
188
|
+
}
|
|
173
189
|
},
|
|
174
190
|
timePicker: {
|
|
175
191
|
component: ElTimePicker,
|
|
@@ -131,6 +131,10 @@
|
|
|
131
131
|
component: element_plus.ElAutocomplete,
|
|
132
132
|
props: (props) => props
|
|
133
133
|
},
|
|
134
|
+
alert: {
|
|
135
|
+
component: element_plus.ElAlert,
|
|
136
|
+
props: (props) => props
|
|
137
|
+
},
|
|
134
138
|
badge: {
|
|
135
139
|
component: element_plus.ElBadge,
|
|
136
140
|
props: (props) => props
|
|
@@ -289,7 +293,19 @@
|
|
|
289
293
|
},
|
|
290
294
|
tag: {
|
|
291
295
|
component: element_plus.ElTag,
|
|
292
|
-
props: (props) =>
|
|
296
|
+
props: (props) => {
|
|
297
|
+
if (props.type && ![
|
|
298
|
+
"primary",
|
|
299
|
+
"success",
|
|
300
|
+
"info",
|
|
301
|
+
"warning",
|
|
302
|
+
"danger"
|
|
303
|
+
].includes(props.type)) return {
|
|
304
|
+
...props,
|
|
305
|
+
type: "primary"
|
|
306
|
+
};
|
|
307
|
+
return props;
|
|
308
|
+
}
|
|
293
309
|
},
|
|
294
310
|
timePicker: {
|
|
295
311
|
component: element_plus.ElTimePicker,
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.8.
|
|
2
|
+
"version": "1.8.1",
|
|
3
3
|
"name": "@tmagic/element-plus-adapter",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
],
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"element-plus": ">=2.9.0",
|
|
40
|
-
"vue": "^3.5.
|
|
40
|
+
"vue": "^3.5.43",
|
|
41
41
|
"typescript": "^6.0.3",
|
|
42
|
-
"@tmagic/design": "1.8.
|
|
42
|
+
"@tmagic/design": "1.8.1"
|
|
43
43
|
},
|
|
44
44
|
"peerDependenciesMeta": {
|
|
45
45
|
"typescript": {
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
ElAlert,
|
|
2
3
|
ElAutocomplete,
|
|
3
4
|
ElBadge,
|
|
4
5
|
ElButton,
|
|
@@ -48,6 +49,7 @@ import {
|
|
|
48
49
|
} from 'element-plus';
|
|
49
50
|
|
|
50
51
|
import type {
|
|
52
|
+
AlertProps,
|
|
51
53
|
AutocompleteProps,
|
|
52
54
|
BadgeProps,
|
|
53
55
|
ButtonProps,
|
|
@@ -104,6 +106,11 @@ const adapter: DesignPluginOptions = {
|
|
|
104
106
|
props: (props: AutocompleteProps) => props,
|
|
105
107
|
},
|
|
106
108
|
|
|
109
|
+
alert: {
|
|
110
|
+
component: ElAlert as any,
|
|
111
|
+
props: (props: AlertProps) => props,
|
|
112
|
+
},
|
|
113
|
+
|
|
107
114
|
badge: {
|
|
108
115
|
component: ElBadge as any,
|
|
109
116
|
props: (props: BadgeProps) => props,
|
|
@@ -296,7 +303,13 @@ const adapter: DesignPluginOptions = {
|
|
|
296
303
|
|
|
297
304
|
tag: {
|
|
298
305
|
component: ElTag as any,
|
|
299
|
-
props: (props: TagProps) =>
|
|
306
|
+
props: (props: TagProps) => {
|
|
307
|
+
const VALID_TAG_TYPES = ['primary', 'success', 'info', 'warning', 'danger'];
|
|
308
|
+
if (props.type && !VALID_TAG_TYPES.includes(props.type)) {
|
|
309
|
+
return { ...props, type: 'primary' };
|
|
310
|
+
}
|
|
311
|
+
return props;
|
|
312
|
+
},
|
|
300
313
|
},
|
|
301
314
|
|
|
302
315
|
timePicker: {
|