@tmagic/form 1.4.17 → 1.4.18
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/style.css +2 -2
- package/dist/tmagic-form.js +6 -6
- package/dist/tmagic-form.umd.cjs +6 -6
- package/package.json +4 -3
- package/src/containers/Container.vue +5 -5
- package/src/theme/form.scss +2 -2
package/dist/style.css
CHANGED
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
.m-form .el-tabs {
|
|
47
47
|
margin-bottom: 10px;
|
|
48
48
|
}
|
|
49
|
-
.m-form .el-form-item.hidden > .el-form-item__label {
|
|
49
|
+
.m-form .el-form-item.tmagic-form-hidden > .el-form-item__label {
|
|
50
50
|
display: none;
|
|
51
51
|
}
|
|
52
|
-
.m-form .t-form__item.hidden > .t-form__label {
|
|
52
|
+
.m-form .t-form__item.tmagic-form-hidden > .t-form__label {
|
|
53
53
|
display: none;
|
|
54
54
|
}
|
|
55
55
|
|
package/dist/tmagic-form.js
CHANGED
|
@@ -165,7 +165,7 @@ const initValue = async (mForm, { initValues, config }) => {
|
|
|
165
165
|
return valuesTmp || {};
|
|
166
166
|
};
|
|
167
167
|
|
|
168
|
-
const _hoisted_1$d = ["id", "data-
|
|
168
|
+
const _hoisted_1$d = ["data-tmagic-id", "data-tmagic-form-item-prop"];
|
|
169
169
|
const _hoisted_2$8 = ["innerHTML", "title"];
|
|
170
170
|
const _hoisted_3$5 = ["innerHTML"];
|
|
171
171
|
const _hoisted_4$4 = ["innerHTML"];
|
|
@@ -319,8 +319,8 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
319
319
|
const _component_Container = resolveComponent("Container", true);
|
|
320
320
|
return _ctx.config ? (openBlock(), createElementBlock("div", {
|
|
321
321
|
key: 0,
|
|
322
|
-
id: _ctx.config.id,
|
|
323
|
-
"data-
|
|
322
|
+
"data-tmagic-id": _ctx.config.id,
|
|
323
|
+
"data-tmagic-form-item-prop": itemProp.value,
|
|
324
324
|
style: normalizeStyle(_ctx.config.tip ? "display: flex;align-items: baseline;" : ""),
|
|
325
325
|
class: normalizeClass(`m-form-container m-container-${type.value || ""} ${_ctx.config.className || ""}`)
|
|
326
326
|
}, [
|
|
@@ -349,7 +349,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
349
349
|
}, null, 40, ["size", "model", "last-values", "is-compare", "config", "disabled", "name", "prop", "step-active", "expand-more", "label-width"])) : type.value && display$1.value && !showDiff.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
350
350
|
createVNode(unref(TMagicFormItem), {
|
|
351
351
|
style: normalizeStyle(_ctx.config.tip ? "flex: 1" : ""),
|
|
352
|
-
class: normalizeClass({ hidden: `${itemLabelWidth.value}` === "0" || !text.value }),
|
|
352
|
+
class: normalizeClass({ "tmagic-form-hidden": `${itemLabelWidth.value}` === "0" || !text.value }),
|
|
353
353
|
prop: itemProp.value,
|
|
354
354
|
"label-width": itemLabelWidth.value,
|
|
355
355
|
rules: rule.value
|
|
@@ -422,7 +422,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
422
422
|
], 64)) : type.value && display$1.value && showDiff.value ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
|
|
423
423
|
createVNode(unref(TMagicFormItem), {
|
|
424
424
|
style: normalizeStyle([_ctx.config.tip ? "flex: 1" : "", { "background": "#f7dadd" }]),
|
|
425
|
-
class: normalizeClass({ hidden: `${itemLabelWidth.value}` === "0" || !text.value }),
|
|
425
|
+
class: normalizeClass({ "tmagic-form-hidden": `${itemLabelWidth.value}` === "0" || !text.value }),
|
|
426
426
|
prop: itemProp.value,
|
|
427
427
|
"label-width": itemLabelWidth.value,
|
|
428
428
|
rules: rule.value
|
|
@@ -490,7 +490,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
490
490
|
})) : createCommentVNode("", true),
|
|
491
491
|
createVNode(unref(TMagicFormItem), {
|
|
492
492
|
style: normalizeStyle([_ctx.config.tip ? "flex: 1" : "", { "background": "#def7da" }]),
|
|
493
|
-
class: normalizeClass({ hidden: `${itemLabelWidth.value}` === "0" || !text.value }),
|
|
493
|
+
class: normalizeClass({ "tmagic-form-hidden": `${itemLabelWidth.value}` === "0" || !text.value }),
|
|
494
494
|
prop: itemProp.value,
|
|
495
495
|
"label-width": itemLabelWidth.value,
|
|
496
496
|
rules: rule.value
|
package/dist/tmagic-form.umd.cjs
CHANGED
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
return valuesTmp || {};
|
|
165
165
|
};
|
|
166
166
|
|
|
167
|
-
const _hoisted_1$d = ["id", "data-
|
|
167
|
+
const _hoisted_1$d = ["data-tmagic-id", "data-tmagic-form-item-prop"];
|
|
168
168
|
const _hoisted_2$8 = ["innerHTML", "title"];
|
|
169
169
|
const _hoisted_3$5 = ["innerHTML"];
|
|
170
170
|
const _hoisted_4$4 = ["innerHTML"];
|
|
@@ -318,8 +318,8 @@
|
|
|
318
318
|
const _component_Container = vue.resolveComponent("Container", true);
|
|
319
319
|
return _ctx.config ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
320
320
|
key: 0,
|
|
321
|
-
id: _ctx.config.id,
|
|
322
|
-
"data-
|
|
321
|
+
"data-tmagic-id": _ctx.config.id,
|
|
322
|
+
"data-tmagic-form-item-prop": itemProp.value,
|
|
323
323
|
style: vue.normalizeStyle(_ctx.config.tip ? "display: flex;align-items: baseline;" : ""),
|
|
324
324
|
class: vue.normalizeClass(`m-form-container m-container-${type.value || ""} ${_ctx.config.className || ""}`)
|
|
325
325
|
}, [
|
|
@@ -348,7 +348,7 @@
|
|
|
348
348
|
}, null, 40, ["size", "model", "last-values", "is-compare", "config", "disabled", "name", "prop", "step-active", "expand-more", "label-width"])) : type.value && display$1.value && !showDiff.value ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
|
|
349
349
|
vue.createVNode(vue.unref(design.TMagicFormItem), {
|
|
350
350
|
style: vue.normalizeStyle(_ctx.config.tip ? "flex: 1" : ""),
|
|
351
|
-
class: vue.normalizeClass({ hidden: `${itemLabelWidth.value}` === "0" || !text.value }),
|
|
351
|
+
class: vue.normalizeClass({ "tmagic-form-hidden": `${itemLabelWidth.value}` === "0" || !text.value }),
|
|
352
352
|
prop: itemProp.value,
|
|
353
353
|
"label-width": itemLabelWidth.value,
|
|
354
354
|
rules: rule.value
|
|
@@ -421,7 +421,7 @@
|
|
|
421
421
|
], 64)) : type.value && display$1.value && showDiff.value ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 3 }, [
|
|
422
422
|
vue.createVNode(vue.unref(design.TMagicFormItem), {
|
|
423
423
|
style: vue.normalizeStyle([_ctx.config.tip ? "flex: 1" : "", { "background": "#f7dadd" }]),
|
|
424
|
-
class: vue.normalizeClass({ hidden: `${itemLabelWidth.value}` === "0" || !text.value }),
|
|
424
|
+
class: vue.normalizeClass({ "tmagic-form-hidden": `${itemLabelWidth.value}` === "0" || !text.value }),
|
|
425
425
|
prop: itemProp.value,
|
|
426
426
|
"label-width": itemLabelWidth.value,
|
|
427
427
|
rules: rule.value
|
|
@@ -489,7 +489,7 @@
|
|
|
489
489
|
})) : vue.createCommentVNode("", true),
|
|
490
490
|
vue.createVNode(vue.unref(design.TMagicFormItem), {
|
|
491
491
|
style: vue.normalizeStyle([_ctx.config.tip ? "flex: 1" : "", { "background": "#def7da" }]),
|
|
492
|
-
class: vue.normalizeClass({ hidden: `${itemLabelWidth.value}` === "0" || !text.value }),
|
|
492
|
+
class: vue.normalizeClass({ "tmagic-form-hidden": `${itemLabelWidth.value}` === "0" || !text.value }),
|
|
493
493
|
prop: itemProp.value,
|
|
494
494
|
"label-width": itemLabelWidth.value,
|
|
495
495
|
rules: rule.value
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.4.
|
|
2
|
+
"version": "1.4.18",
|
|
3
3
|
"name": "@tmagic/form",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": [
|
|
6
|
+
"dist/style.css",
|
|
6
7
|
"src/theme/*"
|
|
7
8
|
],
|
|
8
9
|
"main": "dist/tmagic-form.umd.cjs",
|
|
@@ -54,8 +55,8 @@
|
|
|
54
55
|
"peerDependencies": {
|
|
55
56
|
"vue": "^3.4.35",
|
|
56
57
|
"typescript": "*",
|
|
57
|
-
"@tmagic/design": "1.4.
|
|
58
|
-
"@tmagic/utils": "1.4.
|
|
58
|
+
"@tmagic/design": "1.4.18",
|
|
59
|
+
"@tmagic/utils": "1.4.18"
|
|
59
60
|
},
|
|
60
61
|
"peerDependenciesMeta": {
|
|
61
62
|
"typescript": {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
v-if="config"
|
|
4
|
-
:id="config.id"
|
|
5
|
-
:data-
|
|
4
|
+
:data-tmagic-id="config.id"
|
|
5
|
+
:data-tmagic-form-item-prop="itemProp"
|
|
6
6
|
:style="config.tip ? 'display: flex;align-items: baseline;' : ''"
|
|
7
7
|
:class="`m-form-container m-container-${type || ''} ${config.className || ''}`"
|
|
8
8
|
>
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
<template v-else-if="type && display && !showDiff">
|
|
38
38
|
<TMagicFormItem
|
|
39
39
|
:style="config.tip ? 'flex: 1' : ''"
|
|
40
|
-
:class="{ hidden: `${itemLabelWidth}` === '0' || !text }"
|
|
40
|
+
:class="{ 'tmagic-form-hidden': `${itemLabelWidth}` === '0' || !text }"
|
|
41
41
|
:prop="itemProp"
|
|
42
42
|
:label-width="itemLabelWidth"
|
|
43
43
|
:rules="rule"
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
<!-- 上次内容 -->
|
|
94
94
|
<TMagicFormItem
|
|
95
95
|
:style="config.tip ? 'flex: 1' : ''"
|
|
96
|
-
:class="{ hidden: `${itemLabelWidth}` === '0' || !text }"
|
|
96
|
+
:class="{ 'tmagic-form-hidden': `${itemLabelWidth}` === '0' || !text }"
|
|
97
97
|
:prop="itemProp"
|
|
98
98
|
:label-width="itemLabelWidth"
|
|
99
99
|
:rules="rule"
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
<!-- 当前内容 -->
|
|
143
143
|
<TMagicFormItem
|
|
144
144
|
:style="config.tip ? 'flex: 1' : ''"
|
|
145
|
-
:class="{ hidden: `${itemLabelWidth}` === '0' || !text }"
|
|
145
|
+
:class="{ 'tmagic-form-hidden': `${itemLabelWidth}` === '0' || !text }"
|
|
146
146
|
:prop="itemProp"
|
|
147
147
|
:label-width="itemLabelWidth"
|
|
148
148
|
:rules="rule"
|
package/src/theme/form.scss
CHANGED
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
margin-bottom: 10px;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
.el-form-item.hidden {
|
|
32
|
+
.el-form-item.tmagic-form-hidden {
|
|
33
33
|
> .el-form-item__label {
|
|
34
34
|
display: none;
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
.t-form__item.hidden {
|
|
38
|
+
.t-form__item.tmagic-form-hidden {
|
|
39
39
|
> .t-form__label {
|
|
40
40
|
display: none;
|
|
41
41
|
}
|