@tmagic/form 1.2.15 → 1.3.0-alpha.1

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 (47) hide show
  1. package/dist/style.css +3 -0
  2. package/dist/tmagic-form.js +38 -20
  3. package/dist/tmagic-form.js.map +1 -1
  4. package/dist/tmagic-form.umd.cjs +38 -20
  5. package/dist/tmagic-form.umd.cjs.map +1 -1
  6. package/package.json +3 -3
  7. package/src/containers/Container.vue +1 -1
  8. package/src/fields/Cascader.vue +2 -1
  9. package/src/fields/Checkbox.vue +1 -0
  10. package/src/fields/CheckboxGroup.vue +1 -0
  11. package/src/fields/ColorPicker.vue +1 -0
  12. package/src/fields/Date.vue +1 -0
  13. package/src/fields/DateTime.vue +1 -0
  14. package/src/fields/Daterange.vue +1 -0
  15. package/src/fields/Display.vue +1 -0
  16. package/src/fields/DynamicField.vue +1 -0
  17. package/src/fields/Hidden.vue +1 -0
  18. package/src/fields/Link.vue +1 -0
  19. package/src/fields/Number.vue +1 -0
  20. package/src/fields/RadioGroup.vue +1 -0
  21. package/src/fields/Select.vue +1 -0
  22. package/src/fields/Switch.vue +1 -0
  23. package/src/fields/Text.vue +1 -0
  24. package/src/fields/Textarea.vue +1 -0
  25. package/src/fields/Time.vue +1 -0
  26. package/src/schema.ts +3 -1
  27. package/src/theme/form.scss +6 -0
  28. package/types/containers/Table.vue.d.ts +2 -2
  29. package/types/fields/Cascader.vue.d.ts +2 -0
  30. package/types/fields/Checkbox.vue.d.ts +2 -0
  31. package/types/fields/CheckboxGroup.vue.d.ts +2 -0
  32. package/types/fields/ColorPicker.vue.d.ts +2 -0
  33. package/types/fields/Date.vue.d.ts +2 -0
  34. package/types/fields/DateTime.vue.d.ts +2 -0
  35. package/types/fields/Daterange.vue.d.ts +2 -0
  36. package/types/fields/Display.vue.d.ts +2 -0
  37. package/types/fields/DynamicField.vue.d.ts +2 -0
  38. package/types/fields/Hidden.vue.d.ts +2 -0
  39. package/types/fields/Link.vue.d.ts +2 -0
  40. package/types/fields/Number.vue.d.ts +2 -0
  41. package/types/fields/RadioGroup.vue.d.ts +2 -0
  42. package/types/fields/Select.vue.d.ts +2 -0
  43. package/types/fields/Switch.vue.d.ts +2 -0
  44. package/types/fields/Text.vue.d.ts +2 -0
  45. package/types/fields/Textarea.vue.d.ts +2 -0
  46. package/types/fields/Time.vue.d.ts +2 -0
  47. package/types/schema.d.ts +2 -3
package/dist/style.css CHANGED
@@ -36,6 +36,9 @@
36
36
  .m-form .el-form-item.hidden > .el-form-item__label {
37
37
  display: none;
38
38
  }
39
+ .m-form .t-form__item.hidden > .t-form__label {
40
+ display: none;
41
+ }
39
42
 
40
43
  .magic-datetime-picker-popper .el-picker-panel__footer button:first-child {
41
44
  display: none;
@@ -253,7 +253,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
253
253
  }
254
254
  return value;
255
255
  });
256
- const itemLabelWidth = computed(() => props.config.labelWidth || props.labelWidth);
256
+ const itemLabelWidth = computed(() => props.config.labelWidth ?? props.labelWidth);
257
257
  watchEffect(() => {
258
258
  expand.value = props.expandMore;
259
259
  });
@@ -2158,7 +2158,8 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
2158
2158
  name: null,
2159
2159
  prop: null,
2160
2160
  disabled: { type: Boolean },
2161
- size: null
2161
+ size: null,
2162
+ lastValues: null
2162
2163
  },
2163
2164
  emits: ["change"],
2164
2165
  setup(__props, { emit }) {
@@ -2202,7 +2203,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
2202
2203
  watchEffect(
2203
2204
  () => options.value = props.config.options(mForm, { model: props.model, formValues: mForm.values })
2204
2205
  );
2205
- } else if (!props.config.options || !props.config.options.length || props.config.remote) {
2206
+ } else if (!props.config.options?.length || props.config.remote) {
2206
2207
  Promise.resolve(setRemoteOptions());
2207
2208
  }
2208
2209
  const changeHandler = (value) => {
@@ -2245,7 +2246,8 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
2245
2246
  name: null,
2246
2247
  prop: null,
2247
2248
  disabled: { type: Boolean },
2248
- size: null
2249
+ size: null,
2250
+ lastValues: null
2249
2251
  },
2250
2252
  emits: ["change"],
2251
2253
  setup(__props, { emit }) {
@@ -2306,7 +2308,8 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
2306
2308
  name: null,
2307
2309
  prop: null,
2308
2310
  disabled: { type: Boolean },
2309
- size: null
2311
+ size: null,
2312
+ lastValues: null
2310
2313
  },
2311
2314
  emits: ["change"],
2312
2315
  setup(__props, { emit }) {
@@ -2368,7 +2371,8 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
2368
2371
  name: null,
2369
2372
  prop: null,
2370
2373
  disabled: { type: Boolean },
2371
- size: null
2374
+ size: null,
2375
+ lastValues: null
2372
2376
  },
2373
2377
  emits: ["change"],
2374
2378
  setup(__props, { emit }) {
@@ -2401,7 +2405,8 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
2401
2405
  name: null,
2402
2406
  prop: null,
2403
2407
  disabled: { type: Boolean },
2404
- size: null
2408
+ size: null,
2409
+ lastValues: null
2405
2410
  },
2406
2411
  emits: ["change"],
2407
2412
  setup(__props, { emit }) {
@@ -2440,7 +2445,8 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
2440
2445
  name: null,
2441
2446
  prop: null,
2442
2447
  disabled: { type: Boolean },
2443
- size: null
2448
+ size: null,
2449
+ lastValues: null
2444
2450
  },
2445
2451
  emits: ["change"],
2446
2452
  setup(__props, { emit }) {
@@ -2541,7 +2547,8 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
2541
2547
  name: null,
2542
2548
  prop: null,
2543
2549
  disabled: { type: Boolean },
2544
- size: null
2550
+ size: null,
2551
+ lastValues: null
2545
2552
  },
2546
2553
  emits: ["change"],
2547
2554
  setup(__props, { emit }) {
@@ -2588,7 +2595,8 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
2588
2595
  initValues: null,
2589
2596
  values: null,
2590
2597
  name: null,
2591
- prop: null
2598
+ prop: null,
2599
+ lastValues: null
2592
2600
  },
2593
2601
  setup(__props) {
2594
2602
  const props = __props;
@@ -2616,7 +2624,8 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
2616
2624
  name: null,
2617
2625
  prop: null,
2618
2626
  disabled: { type: Boolean },
2619
- size: null
2627
+ size: null,
2628
+ lastValues: null
2620
2629
  },
2621
2630
  emits: ["change"],
2622
2631
  setup(__props, { emit }) {
@@ -2705,7 +2714,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
2705
2714
  initValues: null,
2706
2715
  values: null,
2707
2716
  name: null,
2708
- prop: null
2717
+ prop: null,
2718
+ lastValues: null
2709
2719
  },
2710
2720
  setup(__props) {
2711
2721
  const props = __props;
@@ -3081,7 +3091,8 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3081
3091
  name: null,
3082
3092
  prop: null,
3083
3093
  disabled: { type: Boolean },
3084
- size: null
3094
+ size: null,
3095
+ lastValues: null
3085
3096
  },
3086
3097
  emits: ["change"],
3087
3098
  setup(__props, { emit }) {
@@ -3178,7 +3189,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
3178
3189
  name: null,
3179
3190
  prop: null,
3180
3191
  disabled: { type: Boolean },
3181
- size: null
3192
+ size: null,
3193
+ lastValues: null
3182
3194
  },
3183
3195
  emits: ["change", "input"],
3184
3196
  setup(__props, { emit }) {
@@ -3225,7 +3237,8 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
3225
3237
  name: null,
3226
3238
  prop: null,
3227
3239
  disabled: { type: Boolean },
3228
- size: null
3240
+ size: null,
3241
+ lastValues: null
3229
3242
  },
3230
3243
  emits: ["change"],
3231
3244
  setup(__props, { emit }) {
@@ -3334,7 +3347,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3334
3347
  name: null,
3335
3348
  prop: null,
3336
3349
  disabled: { type: Boolean },
3337
- size: null
3350
+ size: null,
3351
+ lastValues: null
3338
3352
  },
3339
3353
  emits: ["change"],
3340
3354
  setup(__props, { emit }) {
@@ -3689,7 +3703,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3689
3703
  name: null,
3690
3704
  prop: null,
3691
3705
  disabled: { type: Boolean },
3692
- size: null
3706
+ size: null,
3707
+ lastValues: null
3693
3708
  },
3694
3709
  emits: ["change"],
3695
3710
  setup(__props, { emit }) {
@@ -3746,7 +3761,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3746
3761
  name: null,
3747
3762
  prop: null,
3748
3763
  disabled: { type: Boolean },
3749
- size: null
3764
+ size: null,
3765
+ lastValues: null
3750
3766
  },
3751
3767
  emits: ["change", "input"],
3752
3768
  setup(__props, { emit }) {
@@ -3868,7 +3884,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3868
3884
  name: null,
3869
3885
  prop: null,
3870
3886
  disabled: { type: Boolean },
3871
- size: null
3887
+ size: null,
3888
+ lastValues: null
3872
3889
  },
3873
3890
  emits: ["change", "input"],
3874
3891
  setup(__props, { emit }) {
@@ -3911,7 +3928,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3911
3928
  name: null,
3912
3929
  prop: null,
3913
3930
  disabled: { type: Boolean },
3914
- size: null
3931
+ size: null,
3932
+ lastValues: null
3915
3933
  },
3916
3934
  emits: ["change"],
3917
3935
  setup(__props, { emit }) {