@tmagic/form 1.2.0-beta.8 → 1.2.0-beta.9
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.mjs +15 -2
- package/dist/tmagic-form.mjs.map +1 -1
- package/dist/tmagic-form.umd.js +15 -2
- package/dist/tmagic-form.umd.js.map +1 -1
- package/package.json +3 -3
- package/src/Form.vue +9 -1
- package/src/containers/Container.vue +7 -4
- package/src/utils/form.ts +4 -0
package/dist/tmagic-form.umd.js
CHANGED
|
@@ -115,6 +115,9 @@
|
|
|
115
115
|
});
|
|
116
116
|
};
|
|
117
117
|
const display = function(mForm, config, props) {
|
|
118
|
+
if (config === "expand") {
|
|
119
|
+
return config;
|
|
120
|
+
}
|
|
118
121
|
if (typeof config === "function") {
|
|
119
122
|
return filterFunction(mForm, config, props);
|
|
120
123
|
}
|
|
@@ -227,10 +230,11 @@
|
|
|
227
230
|
return type2?.replace(/([A-Z])/g, "-$1").toLowerCase() || (items.value ? "" : "text");
|
|
228
231
|
});
|
|
229
232
|
const display$1 = vue.computed(() => {
|
|
230
|
-
|
|
233
|
+
const value = display(mForm, props.config.display, props);
|
|
234
|
+
if (value === "expand") {
|
|
231
235
|
return expand.value;
|
|
232
236
|
}
|
|
233
|
-
return
|
|
237
|
+
return value;
|
|
234
238
|
});
|
|
235
239
|
const itemLabelWidth = vue.computed(() => props.config.labelWidth || props.labelWidth);
|
|
236
240
|
vue.watchEffect(() => {
|
|
@@ -398,6 +402,8 @@
|
|
|
398
402
|
], 64)) : vue.createCommentVNode("", true),
|
|
399
403
|
__props.config.expand && vue.unref(type) !== "fieldset" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$4, [
|
|
400
404
|
vue.createVNode(vue.unref(design.TMagicButton), {
|
|
405
|
+
type: "primary",
|
|
406
|
+
size: "small",
|
|
401
407
|
text: "",
|
|
402
408
|
onClick: expandHandler
|
|
403
409
|
}, {
|
|
@@ -2410,6 +2416,13 @@
|
|
|
2410
2416
|
}
|
|
2411
2417
|
}
|
|
2412
2418
|
});
|
|
2419
|
+
vue.watchEffect(() => {
|
|
2420
|
+
formState.initValues = props.initValues;
|
|
2421
|
+
formState.config = props.config;
|
|
2422
|
+
formState.keyProp = props.keyProp;
|
|
2423
|
+
formState.popperClass = props.popperClass;
|
|
2424
|
+
formState.parentValues = props.parentValues;
|
|
2425
|
+
});
|
|
2413
2426
|
vue.provide("mForm", formState);
|
|
2414
2427
|
vue.watch(
|
|
2415
2428
|
[() => props.config, () => props.initValues],
|