@tmagic/form 1.2.15 → 1.3.0-alpha.0
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 +3 -0
- package/dist/tmagic-form.js +38 -20
- package/dist/tmagic-form.js.map +1 -1
- package/dist/tmagic-form.umd.cjs +38 -20
- package/dist/tmagic-form.umd.cjs.map +1 -1
- package/package.json +3 -3
- package/src/containers/Container.vue +1 -1
- package/src/fields/Cascader.vue +2 -1
- package/src/fields/Checkbox.vue +1 -0
- package/src/fields/CheckboxGroup.vue +1 -0
- package/src/fields/ColorPicker.vue +1 -0
- package/src/fields/Date.vue +1 -0
- package/src/fields/DateTime.vue +1 -0
- package/src/fields/Daterange.vue +1 -0
- package/src/fields/Display.vue +1 -0
- package/src/fields/DynamicField.vue +1 -0
- package/src/fields/Hidden.vue +1 -0
- package/src/fields/Link.vue +1 -0
- package/src/fields/Number.vue +1 -0
- package/src/fields/RadioGroup.vue +1 -0
- package/src/fields/Select.vue +1 -0
- package/src/fields/Switch.vue +1 -0
- package/src/fields/Text.vue +1 -0
- package/src/fields/Textarea.vue +1 -0
- package/src/fields/Time.vue +1 -0
- package/src/schema.ts +3 -1
- package/src/theme/form.scss +6 -0
- package/types/containers/Table.vue.d.ts +2 -2
- package/types/fields/Cascader.vue.d.ts +2 -0
- package/types/fields/Checkbox.vue.d.ts +2 -0
- package/types/fields/CheckboxGroup.vue.d.ts +2 -0
- package/types/fields/ColorPicker.vue.d.ts +2 -0
- package/types/fields/Date.vue.d.ts +2 -0
- package/types/fields/DateTime.vue.d.ts +2 -0
- package/types/fields/Daterange.vue.d.ts +2 -0
- package/types/fields/Display.vue.d.ts +2 -0
- package/types/fields/DynamicField.vue.d.ts +2 -0
- package/types/fields/Hidden.vue.d.ts +2 -0
- package/types/fields/Link.vue.d.ts +2 -0
- package/types/fields/Number.vue.d.ts +2 -0
- package/types/fields/RadioGroup.vue.d.ts +2 -0
- package/types/fields/Select.vue.d.ts +2 -0
- package/types/fields/Switch.vue.d.ts +2 -0
- package/types/fields/Text.vue.d.ts +2 -0
- package/types/fields/Textarea.vue.d.ts +2 -0
- package/types/fields/Time.vue.d.ts +2 -0
- package/types/schema.d.ts +2 -3
package/dist/tmagic-form.umd.cjs
CHANGED
|
@@ -251,7 +251,7 @@
|
|
|
251
251
|
}
|
|
252
252
|
return value;
|
|
253
253
|
});
|
|
254
|
-
const itemLabelWidth = vue.computed(() => props.config.labelWidth
|
|
254
|
+
const itemLabelWidth = vue.computed(() => props.config.labelWidth ?? props.labelWidth);
|
|
255
255
|
vue.watchEffect(() => {
|
|
256
256
|
expand.value = props.expandMore;
|
|
257
257
|
});
|
|
@@ -2156,7 +2156,8 @@
|
|
|
2156
2156
|
name: null,
|
|
2157
2157
|
prop: null,
|
|
2158
2158
|
disabled: { type: Boolean },
|
|
2159
|
-
size: null
|
|
2159
|
+
size: null,
|
|
2160
|
+
lastValues: null
|
|
2160
2161
|
},
|
|
2161
2162
|
emits: ["change"],
|
|
2162
2163
|
setup(__props, { emit }) {
|
|
@@ -2200,7 +2201,7 @@
|
|
|
2200
2201
|
vue.watchEffect(
|
|
2201
2202
|
() => options.value = props.config.options(mForm, { model: props.model, formValues: mForm.values })
|
|
2202
2203
|
);
|
|
2203
|
-
} else if (!props.config.options
|
|
2204
|
+
} else if (!props.config.options?.length || props.config.remote) {
|
|
2204
2205
|
Promise.resolve(setRemoteOptions());
|
|
2205
2206
|
}
|
|
2206
2207
|
const changeHandler = (value) => {
|
|
@@ -2243,7 +2244,8 @@
|
|
|
2243
2244
|
name: null,
|
|
2244
2245
|
prop: null,
|
|
2245
2246
|
disabled: { type: Boolean },
|
|
2246
|
-
size: null
|
|
2247
|
+
size: null,
|
|
2248
|
+
lastValues: null
|
|
2247
2249
|
},
|
|
2248
2250
|
emits: ["change"],
|
|
2249
2251
|
setup(__props, { emit }) {
|
|
@@ -2304,7 +2306,8 @@
|
|
|
2304
2306
|
name: null,
|
|
2305
2307
|
prop: null,
|
|
2306
2308
|
disabled: { type: Boolean },
|
|
2307
|
-
size: null
|
|
2309
|
+
size: null,
|
|
2310
|
+
lastValues: null
|
|
2308
2311
|
},
|
|
2309
2312
|
emits: ["change"],
|
|
2310
2313
|
setup(__props, { emit }) {
|
|
@@ -2366,7 +2369,8 @@
|
|
|
2366
2369
|
name: null,
|
|
2367
2370
|
prop: null,
|
|
2368
2371
|
disabled: { type: Boolean },
|
|
2369
|
-
size: null
|
|
2372
|
+
size: null,
|
|
2373
|
+
lastValues: null
|
|
2370
2374
|
},
|
|
2371
2375
|
emits: ["change"],
|
|
2372
2376
|
setup(__props, { emit }) {
|
|
@@ -2399,7 +2403,8 @@
|
|
|
2399
2403
|
name: null,
|
|
2400
2404
|
prop: null,
|
|
2401
2405
|
disabled: { type: Boolean },
|
|
2402
|
-
size: null
|
|
2406
|
+
size: null,
|
|
2407
|
+
lastValues: null
|
|
2403
2408
|
},
|
|
2404
2409
|
emits: ["change"],
|
|
2405
2410
|
setup(__props, { emit }) {
|
|
@@ -2438,7 +2443,8 @@
|
|
|
2438
2443
|
name: null,
|
|
2439
2444
|
prop: null,
|
|
2440
2445
|
disabled: { type: Boolean },
|
|
2441
|
-
size: null
|
|
2446
|
+
size: null,
|
|
2447
|
+
lastValues: null
|
|
2442
2448
|
},
|
|
2443
2449
|
emits: ["change"],
|
|
2444
2450
|
setup(__props, { emit }) {
|
|
@@ -2539,7 +2545,8 @@
|
|
|
2539
2545
|
name: null,
|
|
2540
2546
|
prop: null,
|
|
2541
2547
|
disabled: { type: Boolean },
|
|
2542
|
-
size: null
|
|
2548
|
+
size: null,
|
|
2549
|
+
lastValues: null
|
|
2543
2550
|
},
|
|
2544
2551
|
emits: ["change"],
|
|
2545
2552
|
setup(__props, { emit }) {
|
|
@@ -2586,7 +2593,8 @@
|
|
|
2586
2593
|
initValues: null,
|
|
2587
2594
|
values: null,
|
|
2588
2595
|
name: null,
|
|
2589
|
-
prop: null
|
|
2596
|
+
prop: null,
|
|
2597
|
+
lastValues: null
|
|
2590
2598
|
},
|
|
2591
2599
|
setup(__props) {
|
|
2592
2600
|
const props = __props;
|
|
@@ -2614,7 +2622,8 @@
|
|
|
2614
2622
|
name: null,
|
|
2615
2623
|
prop: null,
|
|
2616
2624
|
disabled: { type: Boolean },
|
|
2617
|
-
size: null
|
|
2625
|
+
size: null,
|
|
2626
|
+
lastValues: null
|
|
2618
2627
|
},
|
|
2619
2628
|
emits: ["change"],
|
|
2620
2629
|
setup(__props, { emit }) {
|
|
@@ -2703,7 +2712,8 @@
|
|
|
2703
2712
|
initValues: null,
|
|
2704
2713
|
values: null,
|
|
2705
2714
|
name: null,
|
|
2706
|
-
prop: null
|
|
2715
|
+
prop: null,
|
|
2716
|
+
lastValues: null
|
|
2707
2717
|
},
|
|
2708
2718
|
setup(__props) {
|
|
2709
2719
|
const props = __props;
|
|
@@ -3079,7 +3089,8 @@
|
|
|
3079
3089
|
name: null,
|
|
3080
3090
|
prop: null,
|
|
3081
3091
|
disabled: { type: Boolean },
|
|
3082
|
-
size: null
|
|
3092
|
+
size: null,
|
|
3093
|
+
lastValues: null
|
|
3083
3094
|
},
|
|
3084
3095
|
emits: ["change"],
|
|
3085
3096
|
setup(__props, { emit }) {
|
|
@@ -3176,7 +3187,8 @@
|
|
|
3176
3187
|
name: null,
|
|
3177
3188
|
prop: null,
|
|
3178
3189
|
disabled: { type: Boolean },
|
|
3179
|
-
size: null
|
|
3190
|
+
size: null,
|
|
3191
|
+
lastValues: null
|
|
3180
3192
|
},
|
|
3181
3193
|
emits: ["change", "input"],
|
|
3182
3194
|
setup(__props, { emit }) {
|
|
@@ -3223,7 +3235,8 @@
|
|
|
3223
3235
|
name: null,
|
|
3224
3236
|
prop: null,
|
|
3225
3237
|
disabled: { type: Boolean },
|
|
3226
|
-
size: null
|
|
3238
|
+
size: null,
|
|
3239
|
+
lastValues: null
|
|
3227
3240
|
},
|
|
3228
3241
|
emits: ["change"],
|
|
3229
3242
|
setup(__props, { emit }) {
|
|
@@ -3332,7 +3345,8 @@
|
|
|
3332
3345
|
name: null,
|
|
3333
3346
|
prop: null,
|
|
3334
3347
|
disabled: { type: Boolean },
|
|
3335
|
-
size: null
|
|
3348
|
+
size: null,
|
|
3349
|
+
lastValues: null
|
|
3336
3350
|
},
|
|
3337
3351
|
emits: ["change"],
|
|
3338
3352
|
setup(__props, { emit }) {
|
|
@@ -3687,7 +3701,8 @@
|
|
|
3687
3701
|
name: null,
|
|
3688
3702
|
prop: null,
|
|
3689
3703
|
disabled: { type: Boolean },
|
|
3690
|
-
size: null
|
|
3704
|
+
size: null,
|
|
3705
|
+
lastValues: null
|
|
3691
3706
|
},
|
|
3692
3707
|
emits: ["change"],
|
|
3693
3708
|
setup(__props, { emit }) {
|
|
@@ -3744,7 +3759,8 @@
|
|
|
3744
3759
|
name: null,
|
|
3745
3760
|
prop: null,
|
|
3746
3761
|
disabled: { type: Boolean },
|
|
3747
|
-
size: null
|
|
3762
|
+
size: null,
|
|
3763
|
+
lastValues: null
|
|
3748
3764
|
},
|
|
3749
3765
|
emits: ["change", "input"],
|
|
3750
3766
|
setup(__props, { emit }) {
|
|
@@ -3866,7 +3882,8 @@
|
|
|
3866
3882
|
name: null,
|
|
3867
3883
|
prop: null,
|
|
3868
3884
|
disabled: { type: Boolean },
|
|
3869
|
-
size: null
|
|
3885
|
+
size: null,
|
|
3886
|
+
lastValues: null
|
|
3870
3887
|
},
|
|
3871
3888
|
emits: ["change", "input"],
|
|
3872
3889
|
setup(__props, { emit }) {
|
|
@@ -3909,7 +3926,8 @@
|
|
|
3909
3926
|
name: null,
|
|
3910
3927
|
prop: null,
|
|
3911
3928
|
disabled: { type: Boolean },
|
|
3912
|
-
size: null
|
|
3929
|
+
size: null,
|
|
3930
|
+
lastValues: null
|
|
3913
3931
|
},
|
|
3914
3932
|
emits: ["change"],
|
|
3915
3933
|
setup(__props, { emit }) {
|