@tmagic/form 1.2.0-beta.7 → 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.
Files changed (39) hide show
  1. package/dist/tmagic-form.mjs +18 -3
  2. package/dist/tmagic-form.mjs.map +1 -1
  3. package/dist/tmagic-form.umd.js +18 -3
  4. package/dist/tmagic-form.umd.js.map +1 -1
  5. package/package.json +4 -4
  6. package/src/Form.vue +9 -1
  7. package/src/FormDialog.vue +2 -0
  8. package/src/containers/Container.vue +7 -4
  9. package/src/utils/form.ts +4 -0
  10. package/types/Form.vue.d.ts +1 -3
  11. package/types/FormDialog.vue.d.ts +7 -9
  12. package/types/containers/Col.vue.d.ts +1 -3
  13. package/types/containers/Container.vue.d.ts +1 -3
  14. package/types/containers/Fieldset.vue.d.ts +1 -3
  15. package/types/containers/GroupList.vue.d.ts +1 -3
  16. package/types/containers/GroupListItem.vue.d.ts +1 -3
  17. package/types/containers/Row.vue.d.ts +1 -3
  18. package/types/containers/Step.vue.d.ts +1 -3
  19. package/types/containers/Tabs.vue.d.ts +1 -3
  20. package/types/fields/Cascader.vue.d.ts +1 -3
  21. package/types/fields/Checkbox.vue.d.ts +1 -3
  22. package/types/fields/CheckboxGroup.vue.d.ts +1 -3
  23. package/types/fields/ColorPicker.vue.d.ts +1 -3
  24. package/types/fields/Date.vue.d.ts +1 -3
  25. package/types/fields/DateTime.vue.d.ts +1 -3
  26. package/types/fields/Daterange.vue.d.ts +1 -3
  27. package/types/fields/Display.vue.d.ts +1 -3
  28. package/types/fields/DynamicField.vue.d.ts +1 -3
  29. package/types/fields/Hidden.vue.d.ts +1 -3
  30. package/types/fields/Link.vue.d.ts +1 -3
  31. package/types/fields/Number.vue.d.ts +1 -3
  32. package/types/fields/RadioGroup.vue.d.ts +1 -3
  33. package/types/fields/Select.vue.d.ts +1 -3
  34. package/types/fields/SelectOptionGroups.vue.d.ts +1 -3
  35. package/types/fields/SelectOptions.vue.d.ts +1 -3
  36. package/types/fields/Switch.vue.d.ts +1 -3
  37. package/types/fields/Text.vue.d.ts +1 -3
  38. package/types/fields/Textarea.vue.d.ts +1 -3
  39. package/types/fields/Time.vue.d.ts +1 -3
@@ -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
- if (props.config.display === "expand") {
233
+ const value = display(mForm, props.config.display, props);
234
+ if (value === "expand") {
231
235
  return expand.value;
232
236
  }
233
- return display(mForm, props.config.display, props);
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],
@@ -2501,6 +2514,7 @@
2501
2514
  labelWidth: null,
2502
2515
  fullscreen: { type: Boolean },
2503
2516
  title: null,
2517
+ zIndex: null,
2504
2518
  size: null,
2505
2519
  confirmText: { default: "\u786E\u5B9A" }
2506
2520
  },
@@ -2570,6 +2584,7 @@
2570
2584
  "append-to-body": "",
2571
2585
  title: __props.title,
2572
2586
  width: __props.width,
2587
+ zIndex: __props.zIndex,
2573
2588
  fullscreen: __props.fullscreen,
2574
2589
  "close-on-click-modal": false,
2575
2590
  onClose: closeHandler
@@ -2663,7 +2678,7 @@
2663
2678
  ], 4)) : vue.createCommentVNode("", true)
2664
2679
  ]),
2665
2680
  _: 3
2666
- }, 8, ["modelValue", "title", "width", "fullscreen"]);
2681
+ }, 8, ["modelValue", "title", "width", "zIndex", "fullscreen"]);
2667
2682
  };
2668
2683
  }
2669
2684
  });