@tmagic/form 1.0.0-beta.14 → 1.0.0-beta.15
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/coverage/clover.xml +40 -40
- package/coverage/coverage-final.json +37 -37
- package/coverage/lcov-report/index.html +1 -1
- package/coverage/lcov-report/src/Form.vue.html +1 -1
- package/coverage/lcov-report/src/FormDialog.vue.html +1 -1
- package/coverage/lcov-report/src/containers/Col.vue.html +1 -1
- package/coverage/lcov-report/src/containers/Container.vue.html +4 -4
- package/coverage/lcov-report/src/containers/Fieldset.vue.html +1 -1
- package/coverage/lcov-report/src/containers/GroupList.vue.html +1 -1
- package/coverage/lcov-report/src/containers/GroupListItem.vue.html +5 -5
- package/coverage/lcov-report/src/containers/Panel.vue.html +1 -1
- package/coverage/lcov-report/src/containers/Row.vue.html +2 -2
- package/coverage/lcov-report/src/containers/Step.vue.html +1 -1
- package/coverage/lcov-report/src/containers/Table.vue.html +5 -5
- package/coverage/lcov-report/src/containers/Tabs.vue.html +1 -1
- package/coverage/lcov-report/src/containers/index.html +1 -1
- package/coverage/lcov-report/src/fields/Cascader.vue.html +1 -1
- package/coverage/lcov-report/src/fields/Checkbox.vue.html +1 -1
- package/coverage/lcov-report/src/fields/CheckboxGroup.vue.html +1 -1
- package/coverage/lcov-report/src/fields/ColorPicker.vue.html +1 -1
- package/coverage/lcov-report/src/fields/Date.vue.html +1 -1
- package/coverage/lcov-report/src/fields/DateTime.vue.html +1 -1
- package/coverage/lcov-report/src/fields/Daterange.vue.html +1 -1
- package/coverage/lcov-report/src/fields/Display.vue.html +1 -1
- package/coverage/lcov-report/src/fields/DynamicField.vue.html +1 -1
- package/coverage/lcov-report/src/fields/Hidden.vue.html +1 -1
- package/coverage/lcov-report/src/fields/Link.vue.html +2 -2
- package/coverage/lcov-report/src/fields/Number.vue.html +1 -1
- package/coverage/lcov-report/src/fields/RadioGroup.vue.html +1 -1
- package/coverage/lcov-report/src/fields/Select.vue.html +1 -1
- package/coverage/lcov-report/src/fields/Switch.vue.html +1 -1
- package/coverage/lcov-report/src/fields/Text.vue.html +1 -1
- package/coverage/lcov-report/src/fields/Textarea.vue.html +1 -1
- package/coverage/lcov-report/src/fields/Time.vue.html +1 -1
- package/coverage/lcov-report/src/fields/index.html +1 -1
- package/coverage/lcov-report/src/index.html +1 -1
- package/coverage/lcov-report/src/index.ts.html +1 -1
- package/coverage/lcov-report/src/theme/index.html +1 -1
- package/coverage/lcov-report/src/theme/index.scss.html +1 -1
- package/coverage/lcov-report/src/utils/config.ts.html +1 -1
- package/coverage/lcov-report/src/utils/createForm.ts.html +1 -1
- package/coverage/lcov-report/src/utils/fieldProps.ts.html +1 -1
- package/coverage/lcov-report/src/utils/form.ts.html +1 -1
- package/coverage/lcov-report/src/utils/index.html +1 -1
- package/coverage/lcov-report/src/utils/useAddField.ts.html +1 -1
- package/coverage/lcov.info +5 -5
- package/dist/tmagic-form.es.js +12 -12
- package/dist/tmagic-form.es.js.map +1 -1
- package/dist/tmagic-form.umd.js +12 -12
- package/dist/tmagic-form.umd.js.map +1 -1
- package/dist/types/src/Form.vue.d.ts +8 -0
- package/dist/types/src/FormDialog.vue.d.ts +16 -0
- package/dist/types/src/containers/Table.vue.d.ts +2601 -0
- package/dist/types/src/fields/Link.vue.d.ts +32 -0
- package/package.json +10 -6
- package/src/containers/Container.vue +2 -2
- package/src/containers/GroupListItem.vue +4 -4
- package/src/containers/Row.vue +1 -1
- package/src/containers/Table.vue +4 -4
- package/src/fields/Link.vue +1 -1
|
@@ -338,6 +338,10 @@ declare const _default: DefineComponent<{
|
|
|
338
338
|
(name: string, state: boolean | undefined): string;
|
|
339
339
|
(name: string): string;
|
|
340
340
|
};
|
|
341
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
342
|
+
cssVarName: (name: string) => string;
|
|
343
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
344
|
+
cssVarBlockName: (name: string) => string;
|
|
341
345
|
};
|
|
342
346
|
formClasses: ComputedRef<(string | {
|
|
343
347
|
[x: string]: string | boolean | undefined;
|
|
@@ -440,6 +444,10 @@ declare const _default: DefineComponent<{
|
|
|
440
444
|
(name: string, state: boolean | undefined): string;
|
|
441
445
|
(name: string): string;
|
|
442
446
|
};
|
|
447
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
448
|
+
cssVarName: (name: string) => string;
|
|
449
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
450
|
+
cssVarBlockName: (name: string) => string;
|
|
443
451
|
};
|
|
444
452
|
formClasses: ComputedRef<(string | {
|
|
445
453
|
[x: string]: string | boolean | undefined;
|
|
@@ -649,6 +657,10 @@ declare const _default: DefineComponent<{
|
|
|
649
657
|
(name: string, state: boolean | undefined): string;
|
|
650
658
|
(name: string): string;
|
|
651
659
|
};
|
|
660
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
661
|
+
cssVarName: (name: string) => string;
|
|
662
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
663
|
+
cssVarBlockName: (name: string) => string;
|
|
652
664
|
};
|
|
653
665
|
formClasses: ComputedRef<(string | {
|
|
654
666
|
[x: string]: string | boolean | undefined;
|
|
@@ -751,6 +763,10 @@ declare const _default: DefineComponent<{
|
|
|
751
763
|
(name: string, state: boolean | undefined): string;
|
|
752
764
|
(name: string): string;
|
|
753
765
|
};
|
|
766
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
767
|
+
cssVarName: (name: string) => string;
|
|
768
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
769
|
+
cssVarBlockName: (name: string) => string;
|
|
754
770
|
};
|
|
755
771
|
formClasses: ComputedRef<(string | {
|
|
756
772
|
[x: string]: string | boolean | undefined;
|
|
@@ -1073,6 +1089,10 @@ declare const _default: DefineComponent<{
|
|
|
1073
1089
|
(name: string, state: boolean | undefined): string;
|
|
1074
1090
|
(name: string): string;
|
|
1075
1091
|
};
|
|
1092
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
1093
|
+
cssVarName: (name: string) => string;
|
|
1094
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
1095
|
+
cssVarBlockName: (name: string) => string;
|
|
1076
1096
|
};
|
|
1077
1097
|
formClasses: ComputedRef<(string | {
|
|
1078
1098
|
[x: string]: string | boolean | undefined;
|
|
@@ -1175,6 +1195,10 @@ declare const _default: DefineComponent<{
|
|
|
1175
1195
|
(name: string, state: boolean | undefined): string;
|
|
1176
1196
|
(name: string): string;
|
|
1177
1197
|
};
|
|
1198
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
1199
|
+
cssVarName: (name: string) => string;
|
|
1200
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
1201
|
+
cssVarBlockName: (name: string) => string;
|
|
1178
1202
|
};
|
|
1179
1203
|
formClasses: ComputedRef<(string | {
|
|
1180
1204
|
[x: string]: string | boolean | undefined;
|
|
@@ -1384,6 +1408,10 @@ declare const _default: DefineComponent<{
|
|
|
1384
1408
|
(name: string, state: boolean | undefined): string;
|
|
1385
1409
|
(name: string): string;
|
|
1386
1410
|
};
|
|
1411
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
1412
|
+
cssVarName: (name: string) => string;
|
|
1413
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
1414
|
+
cssVarBlockName: (name: string) => string;
|
|
1387
1415
|
};
|
|
1388
1416
|
formClasses: ComputedRef<(string | {
|
|
1389
1417
|
[x: string]: string | boolean | undefined;
|
|
@@ -1486,6 +1514,10 @@ declare const _default: DefineComponent<{
|
|
|
1486
1514
|
(name: string, state: boolean | undefined): string;
|
|
1487
1515
|
(name: string): string;
|
|
1488
1516
|
};
|
|
1517
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
1518
|
+
cssVarName: (name: string) => string;
|
|
1519
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
1520
|
+
cssVarBlockName: (name: string) => string;
|
|
1489
1521
|
};
|
|
1490
1522
|
formClasses: ComputedRef<(string | {
|
|
1491
1523
|
[x: string]: string | boolean | undefined;
|
package/package.json
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.0.0-beta.
|
|
2
|
+
"version": "1.0.0-beta.15",
|
|
3
3
|
"name": "@tmagic/form",
|
|
4
|
-
"sideEffects":
|
|
4
|
+
"sideEffects": [
|
|
5
|
+
"dist/*",
|
|
6
|
+
"src/theme/*"
|
|
7
|
+
],
|
|
5
8
|
"main": "dist/tmagic-form.umd.js",
|
|
6
9
|
"module": "dist/tmagic-form.es.js",
|
|
7
10
|
"style": "dist/style.css",
|
|
@@ -14,7 +17,8 @@
|
|
|
14
17
|
"./dist/style.css": {
|
|
15
18
|
"import": "./dist/style.css",
|
|
16
19
|
"require": "./dist/style.css"
|
|
17
|
-
}
|
|
20
|
+
},
|
|
21
|
+
"./*": "./*"
|
|
18
22
|
},
|
|
19
23
|
"license": "Apache-2.0",
|
|
20
24
|
"scripts": {
|
|
@@ -31,8 +35,8 @@
|
|
|
31
35
|
},
|
|
32
36
|
"dependencies": {
|
|
33
37
|
"@element-plus/icons": "0.0.11",
|
|
34
|
-
"@tmagic/utils": "^1.0.0-beta.
|
|
35
|
-
"element-plus": "^2.
|
|
38
|
+
"@tmagic/utils": "^1.0.0-beta.15",
|
|
39
|
+
"element-plus": "^2.2.0",
|
|
36
40
|
"lodash-es": "^4.17.21",
|
|
37
41
|
"moment": "^2.29.2",
|
|
38
42
|
"sortablejs": "^1.14.0",
|
|
@@ -58,5 +62,5 @@
|
|
|
58
62
|
"vite-plugin-dts": "^0.9.6",
|
|
59
63
|
"vue-tsc": "^0.0.24"
|
|
60
64
|
},
|
|
61
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "340e4e3018c8699d6cf49001e0c367996ecea857"
|
|
62
66
|
}
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
<div v-if="extra" v-html="extra" class="m-form-tip"></div>
|
|
71
71
|
</el-form-item>
|
|
72
72
|
|
|
73
|
-
<el-tooltip v-if="config.tip" placement="
|
|
73
|
+
<el-tooltip v-if="config.tip" placement="left">
|
|
74
74
|
<el-icon style="line-height: 40px; margin-left: 5px"><warning-filled /></el-icon>
|
|
75
75
|
<template #content>
|
|
76
76
|
<div v-html="config.tip"></div>
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
</template>
|
|
97
97
|
|
|
98
98
|
<div style="text-align: center" v-if="config.expand && type !== 'fieldset'">
|
|
99
|
-
<el-button
|
|
99
|
+
<el-button text @click="expandHandler">{{ expand ? '收起配置' : '展开更多配置' }}</el-button>
|
|
100
100
|
</div>
|
|
101
101
|
</div>
|
|
102
102
|
</template>
|
|
@@ -5,21 +5,21 @@
|
|
|
5
5
|
><caret-bottom v-if="expand" /><caret-right v-else
|
|
6
6
|
/></el-icon>
|
|
7
7
|
|
|
8
|
-
<el-button
|
|
8
|
+
<el-button text @click="expandHandler">{{ title }}</el-button>
|
|
9
9
|
|
|
10
10
|
<el-button
|
|
11
11
|
v-show="showDelete(parseInt(String(index)))"
|
|
12
|
-
|
|
12
|
+
text
|
|
13
13
|
:icon="Delete"
|
|
14
14
|
style="color: #f56c6c"
|
|
15
15
|
@click="removeHandler"
|
|
16
16
|
></el-button>
|
|
17
17
|
|
|
18
18
|
<template v-if="movable()">
|
|
19
|
-
<el-button v-show="index !== 0"
|
|
19
|
+
<el-button v-show="index !== 0" text size="small" @click="changeOrder(-1)"
|
|
20
20
|
>上移<el-icon><CaretRight /></el-icon
|
|
21
21
|
></el-button>
|
|
22
|
-
<el-button v-show="index !== length - 1"
|
|
22
|
+
<el-button v-show="index !== length - 1" text size="small" @click="changeOrder(1)"
|
|
23
23
|
>下移<el-icon><CaretBottom /></el-icon
|
|
24
24
|
></el-button>
|
|
25
25
|
</template>
|
package/src/containers/Row.vue
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<Col
|
|
4
4
|
v-for="(col, index) in config.items"
|
|
5
5
|
:key="col[mForm?.keyProp || '__key'] ?? index"
|
|
6
|
-
:span="
|
|
6
|
+
:span="col.span || config.span || 24 / config.items.length"
|
|
7
7
|
:config="col"
|
|
8
8
|
:labelWidth="config.labelWidth || labelWidth"
|
|
9
9
|
:expandMore="expandMore"
|
package/src/containers/Table.vue
CHANGED
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
<template v-slot="scope">
|
|
26
26
|
<el-button
|
|
27
27
|
v-show="showDelete(scope.$index + 1 + pagecontext * pagesize - 1)"
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
type="danger"
|
|
29
|
+
text
|
|
30
30
|
:icon="Delete"
|
|
31
31
|
@click="removeHandler(scope.$index + 1 + pagecontext * pagesize - 1)"
|
|
32
32
|
></el-button>
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
plain
|
|
45
45
|
size="small"
|
|
46
46
|
:icon="ArrowUp"
|
|
47
|
-
|
|
47
|
+
text
|
|
48
48
|
@click="upHandler(scope.$index + 1 + pagecontext * pagesize - 1)"
|
|
49
49
|
@dblclick="topHandler(scope.$index + 1 + pagecontext * pagesize - 1)"
|
|
50
50
|
></el-button>
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
plain
|
|
59
59
|
size="small"
|
|
60
60
|
:icon="ArrowDown"
|
|
61
|
-
|
|
61
|
+
text
|
|
62
62
|
@click="downHandler(scope.$index + 1 + pagecontext * pagesize - 1)"
|
|
63
63
|
@dblclick="bottomHandler(scope.$index + 1 + pagecontext * pagesize - 1)"
|
|
64
64
|
></el-button>
|
package/src/fields/Link.vue
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<a v-if="config.href && !disabled" target="_blank" :href="href" :style="config.css || {}">{{ displayText }}</a>
|
|
3
3
|
<span v-else-if="config.href && disabled" :style="config.disabledCss || {}">{{ displayText }}</span>
|
|
4
4
|
<div v-else class="m-fields-link">
|
|
5
|
-
<el-button
|
|
5
|
+
<el-button text @click="editHandler">点击编辑</el-button>
|
|
6
6
|
<m-form-dialog
|
|
7
7
|
ref="editor"
|
|
8
8
|
:title="config.formTitle || '编辑扩展配置'"
|