@tmagic/form 1.2.10 → 1.2.12
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-form.js +17 -33
- package/dist/tmagic-form.js.map +1 -1
- package/dist/tmagic-form.umd.cjs +17 -33
- package/dist/tmagic-form.umd.cjs.map +1 -1
- package/package.json +3 -3
- package/src/containers/Container.vue +1 -1
- package/src/containers/GroupListItem.vue +3 -5
- package/src/containers/Panel.vue +7 -7
- package/src/containers/Table.vue +2 -5
- package/types/containers/Panel.vue.d.ts +5 -4
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.2.
|
|
2
|
+
"version": "1.2.12",
|
|
3
3
|
"name": "@tmagic/form",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": [
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@element-plus/icons-vue": "^2.0.9",
|
|
39
|
-
"@tmagic/design": "1.2.
|
|
40
|
-
"@tmagic/utils": "1.2.
|
|
39
|
+
"@tmagic/design": "1.2.12",
|
|
40
|
+
"@tmagic/utils": "1.2.12",
|
|
41
41
|
"lodash-es": "^4.17.21",
|
|
42
42
|
"sortablejs": "^1.14.0",
|
|
43
43
|
"vue": "^3.2.37"
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
@addDiffCount="onAddDiffCount"
|
|
77
77
|
></component>
|
|
78
78
|
|
|
79
|
-
<div v-if="extra" v-html="extra" class="m-form-tip"></div>
|
|
79
|
+
<div v-if="extra && type !== 'table'" v-html="extra" class="m-form-tip"></div>
|
|
80
80
|
</TMagicFormItem>
|
|
81
81
|
|
|
82
82
|
<TMagicTooltip v-if="config.tip" placement="left">
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="m-fields-group-list-item">
|
|
3
3
|
<div>
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
<TMagicButton text :disabled="disabled" @click="expandHandler">{{ title }}</TMagicButton>
|
|
4
|
+
<TMagicButton text :disabled="disabled" :icon="expand ? CaretBottom : CaretRight" @click="expandHandler">{{
|
|
5
|
+
title
|
|
6
|
+
}}</TMagicButton>
|
|
9
7
|
|
|
10
8
|
<TMagicButton
|
|
11
9
|
v-show="showDelete(parseInt(String(index)))"
|
package/src/containers/Panel.vue
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
:body-style="{ display: expand ? 'block' : 'none' }"
|
|
6
6
|
>
|
|
7
7
|
<template #header>
|
|
8
|
-
<div
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
</
|
|
8
|
+
<div style="width: 100%; display: flex; align-items: center">
|
|
9
|
+
<TMagicButton style="padding: 0" text :icon="expand ? CaretBottom : CaretRight" @click="expand = !expand">
|
|
10
|
+
</TMagicButton>
|
|
11
|
+
<span v-if="config && config.extra" v-html="config.extra" class="m-form-tip"></span>
|
|
12
|
+
<slot name="header">{{ filter(config.title) }}</slot>
|
|
13
13
|
</div>
|
|
14
14
|
</template>
|
|
15
15
|
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
import { computed, inject, ref } from 'vue';
|
|
62
62
|
import { CaretBottom, CaretRight } from '@element-plus/icons-vue';
|
|
63
63
|
|
|
64
|
-
import {
|
|
64
|
+
import { TMagicButton, TMagicCard } from '@tmagic/design';
|
|
65
65
|
|
|
66
66
|
import { FormState, PanelConfig } from '../schema';
|
|
67
67
|
import { filterFunction } from '../utils/form';
|
|
@@ -73,7 +73,7 @@ const props = defineProps<{
|
|
|
73
73
|
lastValues?: any;
|
|
74
74
|
isCompare?: boolean;
|
|
75
75
|
config: PanelConfig;
|
|
76
|
-
name
|
|
76
|
+
name?: string;
|
|
77
77
|
labelWidth?: string;
|
|
78
78
|
prop?: string;
|
|
79
79
|
size?: string;
|
package/src/containers/Table.vue
CHANGED
|
@@ -272,11 +272,8 @@ const foreUpdate = () => {
|
|
|
272
272
|
};
|
|
273
273
|
|
|
274
274
|
const swapArray = (index1: number, index2: number) => {
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
1,
|
|
278
|
-
props.model[modelName.value][index1],
|
|
279
|
-
);
|
|
275
|
+
props.model[modelName.value].splice(index1, 0, props.model[modelName.value].splice(index2, 1)[0]);
|
|
276
|
+
|
|
280
277
|
if (props.sortKey) {
|
|
281
278
|
for (let i = props.model[modelName.value].length - 1, v = 0; i >= 0; i--, v++) {
|
|
282
279
|
props.model[modelName.value][v][props.sortKey] = i;
|
|
@@ -8,7 +8,7 @@ declare const _default: {
|
|
|
8
8
|
lastValues?: any;
|
|
9
9
|
isCompare?: boolean | undefined;
|
|
10
10
|
config: PanelConfig;
|
|
11
|
-
name
|
|
11
|
+
name?: string | undefined;
|
|
12
12
|
labelWidth?: string | undefined;
|
|
13
13
|
prop?: string | undefined;
|
|
14
14
|
size?: string | undefined;
|
|
@@ -35,7 +35,7 @@ declare const _default: {
|
|
|
35
35
|
lastValues?: any;
|
|
36
36
|
isCompare?: boolean | undefined;
|
|
37
37
|
config: PanelConfig;
|
|
38
|
-
name
|
|
38
|
+
name?: string | undefined;
|
|
39
39
|
labelWidth?: string | undefined;
|
|
40
40
|
prop?: string | undefined;
|
|
41
41
|
size?: string | undefined;
|
|
@@ -68,7 +68,7 @@ declare const _default: {
|
|
|
68
68
|
lastValues?: any;
|
|
69
69
|
isCompare?: boolean | undefined;
|
|
70
70
|
config: PanelConfig;
|
|
71
|
-
name
|
|
71
|
+
name?: string | undefined;
|
|
72
72
|
labelWidth?: string | undefined;
|
|
73
73
|
prop?: string | undefined;
|
|
74
74
|
size?: string | undefined;
|
|
@@ -85,7 +85,7 @@ declare const _default: {
|
|
|
85
85
|
lastValues?: any;
|
|
86
86
|
isCompare?: boolean | undefined;
|
|
87
87
|
config: PanelConfig;
|
|
88
|
-
name
|
|
88
|
+
name?: string | undefined;
|
|
89
89
|
labelWidth?: string | undefined;
|
|
90
90
|
prop?: string | undefined;
|
|
91
91
|
size?: string | undefined;
|
|
@@ -95,6 +95,7 @@ declare const _default: {
|
|
|
95
95
|
onAddDiffCount?: ((...args: any[]) => any) | undefined;
|
|
96
96
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "addDiffCount")[], "change" | "addDiffCount", {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
97
97
|
$slots: {
|
|
98
|
+
header: (_: {}) => any;
|
|
98
99
|
default: (_: {}) => any;
|
|
99
100
|
};
|
|
100
101
|
});
|