@tmagic/element-plus-adapter 1.7.0-beta.3 → 1.7.0-beta.4
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-element-plus-adapter.js +21 -501
- package/dist/tmagic-element-plus-adapter.umd.cjs +20 -500
- package/package.json +2 -2
- package/src/Table.vue +3 -0
- package/src/index.ts +2 -2
- package/src/FormItem.vue +0 -27
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.7.0-beta.
|
|
2
|
+
"version": "1.7.0-beta.4",
|
|
3
3
|
"name": "@tmagic/element-plus-adapter",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/tmagic-element-plus-adapter.umd.cjs",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"element-plus": ">=2.9.0",
|
|
39
39
|
"typescript": "^5.9.3",
|
|
40
|
-
"@tmagic/design": "1.7.0-beta.
|
|
40
|
+
"@tmagic/design": "1.7.0-beta.4"
|
|
41
41
|
},
|
|
42
42
|
"peerDependenciesMeta": {
|
|
43
43
|
"typescript": {
|
package/src/Table.vue
CHANGED
|
@@ -22,6 +22,9 @@
|
|
|
22
22
|
>
|
|
23
23
|
<template v-for="(item, columnIndex) in columns" :key="columnIndex">
|
|
24
24
|
<ElTableColumn v-bind="item.props || {}">
|
|
25
|
+
<template #header="scope" v-if="item.title">
|
|
26
|
+
<component :is="item.title(scope)"></component>
|
|
27
|
+
</template>
|
|
25
28
|
<template #default="scope" v-if="item.cell">
|
|
26
29
|
<component :is="item.cell(scope)"></component>
|
|
27
30
|
</template>
|
package/src/index.ts
CHANGED
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
ElDropdownItem,
|
|
19
19
|
ElDropdownMenu,
|
|
20
20
|
ElForm,
|
|
21
|
+
ElFormItem,
|
|
21
22
|
ElIcon,
|
|
22
23
|
ElInput,
|
|
23
24
|
ElInputNumber,
|
|
@@ -90,7 +91,6 @@ import type {
|
|
|
90
91
|
UploadProps,
|
|
91
92
|
} from '@tmagic/design';
|
|
92
93
|
|
|
93
|
-
import FormItem from './FormItem.vue';
|
|
94
94
|
import Table from './Table.vue';
|
|
95
95
|
|
|
96
96
|
const adapter: DesignPluginOptions = {
|
|
@@ -200,7 +200,7 @@ const adapter: DesignPluginOptions = {
|
|
|
200
200
|
},
|
|
201
201
|
|
|
202
202
|
formItem: {
|
|
203
|
-
component:
|
|
203
|
+
component: ElFormItem as any,
|
|
204
204
|
props: (props: FormItemProps) => props,
|
|
205
205
|
},
|
|
206
206
|
|
package/src/FormItem.vue
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<ElFormItem v-bind="itemProps">
|
|
3
|
-
<template #label>
|
|
4
|
-
<slot name="label"></slot>
|
|
5
|
-
</template>
|
|
6
|
-
<slot></slot>
|
|
7
|
-
<div v-if="extra" v-html="extra" class="m-form-tip"></div>
|
|
8
|
-
</ElFormItem>
|
|
9
|
-
</template>
|
|
10
|
-
|
|
11
|
-
<script setup lang="ts">
|
|
12
|
-
import { computed } from 'vue';
|
|
13
|
-
import { ElFormItem } from 'element-plus';
|
|
14
|
-
|
|
15
|
-
import { FormItemProps } from '@tmagic/design';
|
|
16
|
-
|
|
17
|
-
defineOptions({
|
|
18
|
-
name: 'TElAdapterFormItem',
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
const props = defineProps<FormItemProps>();
|
|
22
|
-
|
|
23
|
-
const itemProps = computed(() => {
|
|
24
|
-
const { extra, ...rest } = props;
|
|
25
|
-
return rest;
|
|
26
|
-
});
|
|
27
|
-
</script>
|