@deot/vc-components 1.0.45 → 1.0.46
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/index.cjs +52 -11
- package/dist/index.d.ts +46 -8
- package/dist/index.iife.js +52 -11
- package/dist/index.js +52 -11
- package/dist/index.style.css +2 -2
- package/dist/index.umd.cjs +52 -11
- package/package.json +1 -1
package/dist/index.umd.cjs
CHANGED
|
@@ -19861,7 +19861,14 @@
|
|
|
19861
19861
|
styleless: {
|
|
19862
19862
|
type: Boolean,
|
|
19863
19863
|
default: false
|
|
19864
|
-
}
|
|
19864
|
+
},
|
|
19865
|
+
// 给formItem统一注入
|
|
19866
|
+
contentStyle: [Object, String],
|
|
19867
|
+
contentClass: [Object, String],
|
|
19868
|
+
labelStyle: [Object, String],
|
|
19869
|
+
labelClass: [Object, String],
|
|
19870
|
+
errorStyle: [Object, String],
|
|
19871
|
+
errorClass: [Object, String]
|
|
19865
19872
|
};
|
|
19866
19873
|
|
|
19867
19874
|
const useForm = (expose, options = {}) => {
|
|
@@ -20021,7 +20028,9 @@
|
|
|
20021
20028
|
contentStyle: [Object, String],
|
|
20022
20029
|
contentClass: [Object, String],
|
|
20023
20030
|
labelStyle: [Object, String],
|
|
20024
|
-
labelClass: [Object, String]
|
|
20031
|
+
labelClass: [Object, String],
|
|
20032
|
+
errorStyle: [Object, String],
|
|
20033
|
+
errorClass: [Object, String]
|
|
20025
20034
|
};
|
|
20026
20035
|
|
|
20027
20036
|
class Validator {
|
|
@@ -20235,6 +20244,7 @@
|
|
|
20235
20244
|
width: labelPosition.value !== "top" && labelWidth && labelWidth > 0 ? `${labelWidth}px` : "auto",
|
|
20236
20245
|
textAlign: labelPosition.value === "top" ? "left" : labelPosition.value
|
|
20237
20246
|
},
|
|
20247
|
+
form.props.labelStyle,
|
|
20238
20248
|
props.labelStyle
|
|
20239
20249
|
];
|
|
20240
20250
|
});
|
|
@@ -20245,9 +20255,22 @@
|
|
|
20245
20255
|
marginLeft: !hasLabel.value && isNest.value ? 0 : labelWidth && labelWidth > 0 ? `${labelWidth}px` : "unset",
|
|
20246
20256
|
marginBottom: isNest.value && !isNestLast.value ? `20px` : 0
|
|
20247
20257
|
},
|
|
20258
|
+
form.props.contentStyle,
|
|
20248
20259
|
props.contentStyle
|
|
20249
20260
|
];
|
|
20250
20261
|
});
|
|
20262
|
+
const errorStyle = vue.computed(() => {
|
|
20263
|
+
return [form.props.errorStyle, props.errorStyle];
|
|
20264
|
+
});
|
|
20265
|
+
const labelClass = vue.computed(() => {
|
|
20266
|
+
return [form.props.labelClass, props.labelClass];
|
|
20267
|
+
});
|
|
20268
|
+
const contentClass = vue.computed(() => {
|
|
20269
|
+
return [form.props.contentClass, props.contentClass];
|
|
20270
|
+
});
|
|
20271
|
+
const errorClass = vue.computed(() => {
|
|
20272
|
+
return [form.props.errorClass, props.errorClass];
|
|
20273
|
+
});
|
|
20251
20274
|
const isStyleless = vue.computed(() => {
|
|
20252
20275
|
return props.styleless || form.props.styleless;
|
|
20253
20276
|
});
|
|
@@ -20410,6 +20433,10 @@
|
|
|
20410
20433
|
classes,
|
|
20411
20434
|
labelStyle,
|
|
20412
20435
|
contentStyle,
|
|
20436
|
+
errorStyle,
|
|
20437
|
+
labelClass,
|
|
20438
|
+
contentClass,
|
|
20439
|
+
errorClass,
|
|
20413
20440
|
showError,
|
|
20414
20441
|
labelPosition
|
|
20415
20442
|
};
|
|
@@ -20432,6 +20459,10 @@
|
|
|
20432
20459
|
classes,
|
|
20433
20460
|
labelStyle,
|
|
20434
20461
|
contentStyle,
|
|
20462
|
+
errorStyle,
|
|
20463
|
+
labelClass,
|
|
20464
|
+
contentClass,
|
|
20465
|
+
errorClass,
|
|
20435
20466
|
showError,
|
|
20436
20467
|
validateMessage
|
|
20437
20468
|
} = it;
|
|
@@ -20445,27 +20476,30 @@
|
|
|
20445
20476
|
show: showError.value,
|
|
20446
20477
|
nest: isNest.value,
|
|
20447
20478
|
message: validateMessage.value,
|
|
20448
|
-
class: errorColorClass
|
|
20479
|
+
class: [errorColorClass, ...errorClass.value],
|
|
20480
|
+
style: errorStyle.value
|
|
20449
20481
|
})];
|
|
20450
20482
|
return vue.createVNode("div", {
|
|
20451
20483
|
"class": ['vc-form-item', classes.value]
|
|
20452
20484
|
}, [(label || slots.label) && vue.createVNode("div", {
|
|
20453
20485
|
"style": labelStyle.value,
|
|
20454
|
-
"class": ['vc-form-item__label',
|
|
20486
|
+
"class": ['vc-form-item__label', ...labelClass.value],
|
|
20455
20487
|
"for": labelFor
|
|
20456
20488
|
}, [vue.createVNode("label", null, [label || slots.label?.()])]), vue.createVNode("div", {
|
|
20457
20489
|
"class": "vc-form-item__wrapper"
|
|
20458
20490
|
}, [vue.createVNode("div", {
|
|
20459
|
-
"class": ['vc-form-item__content',
|
|
20491
|
+
"class": ['vc-form-item__content', ...contentClass.value],
|
|
20460
20492
|
"style": contentStyle.value
|
|
20461
20493
|
}, [slots.default?.(), slots.error ? slots.error({
|
|
20462
20494
|
show: showError.value,
|
|
20463
20495
|
nest: isNest.value,
|
|
20464
20496
|
message: validateMessage.value,
|
|
20465
|
-
class: errorColorClass
|
|
20497
|
+
class: [errorColorClass, ...errorClass.value],
|
|
20498
|
+
style: errorStyle.value
|
|
20466
20499
|
}) : vue.createVNode(TransitionFade, null, {
|
|
20467
20500
|
default: () => [vue.withDirectives(vue.createVNode("div", {
|
|
20468
|
-
"class": ['vc-form-item__tip', isNest.value ? 'is-nest' : '', errorColorClass]
|
|
20501
|
+
"class": ['vc-form-item__tip', isNest.value ? 'is-nest' : '', errorColorClass, ...errorClass.value],
|
|
20502
|
+
"style": [errorStyle.value]
|
|
20469
20503
|
}, [validateMessage.value]), [[vue.vShow, showError.value]])]
|
|
20470
20504
|
})])])]);
|
|
20471
20505
|
};
|
|
@@ -20531,6 +20565,10 @@
|
|
|
20531
20565
|
classes,
|
|
20532
20566
|
labelStyle,
|
|
20533
20567
|
contentStyle,
|
|
20568
|
+
errorStyle,
|
|
20569
|
+
labelClass,
|
|
20570
|
+
contentClass,
|
|
20571
|
+
errorClass,
|
|
20534
20572
|
isNest,
|
|
20535
20573
|
showError,
|
|
20536
20574
|
validateMessage
|
|
@@ -20546,7 +20584,8 @@
|
|
|
20546
20584
|
show: showError.value,
|
|
20547
20585
|
nest: isNest.value,
|
|
20548
20586
|
message: validateMessage.value,
|
|
20549
|
-
class: errorColorClass
|
|
20587
|
+
class: [errorColorClass, ...errorClass.value],
|
|
20588
|
+
style: errorStyle.value
|
|
20550
20589
|
})];
|
|
20551
20590
|
return vue.createVNode("div", {
|
|
20552
20591
|
"style": {
|
|
@@ -20558,14 +20597,15 @@
|
|
|
20558
20597
|
}, [(props.label || slots.label) && vue.createVNode("label", {
|
|
20559
20598
|
"for": labelFor,
|
|
20560
20599
|
"style": labelStyle.value,
|
|
20561
|
-
"class":
|
|
20600
|
+
"class": ['vcm-form-item__label', ...labelClass.value]
|
|
20562
20601
|
}, [label || slots.label?.()]), vue.createVNode("div", {
|
|
20563
20602
|
"style": contentStyle.value,
|
|
20564
|
-
"class":
|
|
20603
|
+
"class": ['vcm-form-item__content', ...contentClass.value]
|
|
20565
20604
|
}, [slots.default?.(), showMessage && showError.value && vue.createVNode("div", {
|
|
20566
20605
|
"class": [{
|
|
20567
20606
|
'is-nest': isNest.value
|
|
20568
|
-
}, errorColorClass]
|
|
20607
|
+
}, errorColorClass, ...errorClass.value],
|
|
20608
|
+
"style": errorStyle.value
|
|
20569
20609
|
}, [slots.error ? slots.error({
|
|
20570
20610
|
message: validateMessage.value
|
|
20571
20611
|
}) : validateMessage.value])])])]);
|
|
@@ -25750,6 +25790,7 @@
|
|
|
25750
25790
|
});
|
|
25751
25791
|
const classes = vue.computed(() => {
|
|
25752
25792
|
return {
|
|
25793
|
+
"is-disabled": props.disabled,
|
|
25753
25794
|
"is-loading": isLoading.value,
|
|
25754
25795
|
"is-checked": checked.value
|
|
25755
25796
|
};
|