@deot/vc-components 1.0.45 → 1.0.47
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 +63 -14
- package/dist/index.d.ts +58 -8
- package/dist/index.iife.js +63 -14
- package/dist/index.js +63 -14
- package/dist/index.style.css +2 -2
- package/dist/index.umd.cjs +63 -14
- package/package.json +1 -1
package/dist/index.umd.cjs
CHANGED
|
@@ -9281,7 +9281,8 @@
|
|
|
9281
9281
|
nullValue: {
|
|
9282
9282
|
type: [Number, String, Object],
|
|
9283
9283
|
default: void 0
|
|
9284
|
-
}
|
|
9284
|
+
},
|
|
9285
|
+
label: String
|
|
9285
9286
|
};
|
|
9286
9287
|
|
|
9287
9288
|
const props$18 = {
|
|
@@ -19861,7 +19862,14 @@
|
|
|
19861
19862
|
styleless: {
|
|
19862
19863
|
type: Boolean,
|
|
19863
19864
|
default: false
|
|
19864
|
-
}
|
|
19865
|
+
},
|
|
19866
|
+
// 给formItem统一注入
|
|
19867
|
+
contentStyle: [Object, String],
|
|
19868
|
+
contentClass: [Object, String],
|
|
19869
|
+
labelStyle: [Object, String],
|
|
19870
|
+
labelClass: [Object, String],
|
|
19871
|
+
errorStyle: [Object, String],
|
|
19872
|
+
errorClass: [Object, String]
|
|
19865
19873
|
};
|
|
19866
19874
|
|
|
19867
19875
|
const useForm = (expose, options = {}) => {
|
|
@@ -20021,7 +20029,9 @@
|
|
|
20021
20029
|
contentStyle: [Object, String],
|
|
20022
20030
|
contentClass: [Object, String],
|
|
20023
20031
|
labelStyle: [Object, String],
|
|
20024
|
-
labelClass: [Object, String]
|
|
20032
|
+
labelClass: [Object, String],
|
|
20033
|
+
errorStyle: [Object, String],
|
|
20034
|
+
errorClass: [Object, String]
|
|
20025
20035
|
};
|
|
20026
20036
|
|
|
20027
20037
|
class Validator {
|
|
@@ -20235,6 +20245,7 @@
|
|
|
20235
20245
|
width: labelPosition.value !== "top" && labelWidth && labelWidth > 0 ? `${labelWidth}px` : "auto",
|
|
20236
20246
|
textAlign: labelPosition.value === "top" ? "left" : labelPosition.value
|
|
20237
20247
|
},
|
|
20248
|
+
form.props.labelStyle,
|
|
20238
20249
|
props.labelStyle
|
|
20239
20250
|
];
|
|
20240
20251
|
});
|
|
@@ -20245,9 +20256,22 @@
|
|
|
20245
20256
|
marginLeft: !hasLabel.value && isNest.value ? 0 : labelWidth && labelWidth > 0 ? `${labelWidth}px` : "unset",
|
|
20246
20257
|
marginBottom: isNest.value && !isNestLast.value ? `20px` : 0
|
|
20247
20258
|
},
|
|
20259
|
+
form.props.contentStyle,
|
|
20248
20260
|
props.contentStyle
|
|
20249
20261
|
];
|
|
20250
20262
|
});
|
|
20263
|
+
const errorStyle = vue.computed(() => {
|
|
20264
|
+
return [form.props.errorStyle, props.errorStyle];
|
|
20265
|
+
});
|
|
20266
|
+
const labelClass = vue.computed(() => {
|
|
20267
|
+
return [form.props.labelClass, props.labelClass];
|
|
20268
|
+
});
|
|
20269
|
+
const contentClass = vue.computed(() => {
|
|
20270
|
+
return [form.props.contentClass, props.contentClass];
|
|
20271
|
+
});
|
|
20272
|
+
const errorClass = vue.computed(() => {
|
|
20273
|
+
return [form.props.errorClass, props.errorClass];
|
|
20274
|
+
});
|
|
20251
20275
|
const isStyleless = vue.computed(() => {
|
|
20252
20276
|
return props.styleless || form.props.styleless;
|
|
20253
20277
|
});
|
|
@@ -20410,6 +20434,10 @@
|
|
|
20410
20434
|
classes,
|
|
20411
20435
|
labelStyle,
|
|
20412
20436
|
contentStyle,
|
|
20437
|
+
errorStyle,
|
|
20438
|
+
labelClass,
|
|
20439
|
+
contentClass,
|
|
20440
|
+
errorClass,
|
|
20413
20441
|
showError,
|
|
20414
20442
|
labelPosition
|
|
20415
20443
|
};
|
|
@@ -20432,6 +20460,10 @@
|
|
|
20432
20460
|
classes,
|
|
20433
20461
|
labelStyle,
|
|
20434
20462
|
contentStyle,
|
|
20463
|
+
errorStyle,
|
|
20464
|
+
labelClass,
|
|
20465
|
+
contentClass,
|
|
20466
|
+
errorClass,
|
|
20435
20467
|
showError,
|
|
20436
20468
|
validateMessage
|
|
20437
20469
|
} = it;
|
|
@@ -20445,27 +20477,30 @@
|
|
|
20445
20477
|
show: showError.value,
|
|
20446
20478
|
nest: isNest.value,
|
|
20447
20479
|
message: validateMessage.value,
|
|
20448
|
-
class: errorColorClass
|
|
20480
|
+
class: [errorColorClass, ...errorClass.value],
|
|
20481
|
+
style: errorStyle.value
|
|
20449
20482
|
})];
|
|
20450
20483
|
return vue.createVNode("div", {
|
|
20451
20484
|
"class": ['vc-form-item', classes.value]
|
|
20452
20485
|
}, [(label || slots.label) && vue.createVNode("div", {
|
|
20453
20486
|
"style": labelStyle.value,
|
|
20454
|
-
"class": ['vc-form-item__label',
|
|
20487
|
+
"class": ['vc-form-item__label', ...labelClass.value],
|
|
20455
20488
|
"for": labelFor
|
|
20456
20489
|
}, [vue.createVNode("label", null, [label || slots.label?.()])]), vue.createVNode("div", {
|
|
20457
20490
|
"class": "vc-form-item__wrapper"
|
|
20458
20491
|
}, [vue.createVNode("div", {
|
|
20459
|
-
"class": ['vc-form-item__content',
|
|
20492
|
+
"class": ['vc-form-item__content', ...contentClass.value],
|
|
20460
20493
|
"style": contentStyle.value
|
|
20461
20494
|
}, [slots.default?.(), slots.error ? slots.error({
|
|
20462
20495
|
show: showError.value,
|
|
20463
20496
|
nest: isNest.value,
|
|
20464
20497
|
message: validateMessage.value,
|
|
20465
|
-
class: errorColorClass
|
|
20498
|
+
class: [errorColorClass, ...errorClass.value],
|
|
20499
|
+
style: errorStyle.value
|
|
20466
20500
|
}) : vue.createVNode(TransitionFade, null, {
|
|
20467
20501
|
default: () => [vue.withDirectives(vue.createVNode("div", {
|
|
20468
|
-
"class": ['vc-form-item__tip', isNest.value ? 'is-nest' : '', errorColorClass]
|
|
20502
|
+
"class": ['vc-form-item__tip', isNest.value ? 'is-nest' : '', errorColorClass, ...errorClass.value],
|
|
20503
|
+
"style": [errorStyle.value]
|
|
20469
20504
|
}, [validateMessage.value]), [[vue.vShow, showError.value]])]
|
|
20470
20505
|
})])])]);
|
|
20471
20506
|
};
|
|
@@ -20531,6 +20566,10 @@
|
|
|
20531
20566
|
classes,
|
|
20532
20567
|
labelStyle,
|
|
20533
20568
|
contentStyle,
|
|
20569
|
+
errorStyle,
|
|
20570
|
+
labelClass,
|
|
20571
|
+
contentClass,
|
|
20572
|
+
errorClass,
|
|
20534
20573
|
isNest,
|
|
20535
20574
|
showError,
|
|
20536
20575
|
validateMessage
|
|
@@ -20546,7 +20585,8 @@
|
|
|
20546
20585
|
show: showError.value,
|
|
20547
20586
|
nest: isNest.value,
|
|
20548
20587
|
message: validateMessage.value,
|
|
20549
|
-
class: errorColorClass
|
|
20588
|
+
class: [errorColorClass, ...errorClass.value],
|
|
20589
|
+
style: errorStyle.value
|
|
20550
20590
|
})];
|
|
20551
20591
|
return vue.createVNode("div", {
|
|
20552
20592
|
"style": {
|
|
@@ -20558,14 +20598,15 @@
|
|
|
20558
20598
|
}, [(props.label || slots.label) && vue.createVNode("label", {
|
|
20559
20599
|
"for": labelFor,
|
|
20560
20600
|
"style": labelStyle.value,
|
|
20561
|
-
"class":
|
|
20601
|
+
"class": ['vcm-form-item__label', ...labelClass.value]
|
|
20562
20602
|
}, [label || slots.label?.()]), vue.createVNode("div", {
|
|
20563
20603
|
"style": contentStyle.value,
|
|
20564
|
-
"class":
|
|
20604
|
+
"class": ['vcm-form-item__content', ...contentClass.value]
|
|
20565
20605
|
}, [slots.default?.(), showMessage && showError.value && vue.createVNode("div", {
|
|
20566
20606
|
"class": [{
|
|
20567
20607
|
'is-nest': isNest.value
|
|
20568
|
-
}, errorColorClass]
|
|
20608
|
+
}, errorColorClass, ...errorClass.value],
|
|
20609
|
+
"style": errorStyle.value
|
|
20569
20610
|
}, [slots.error ? slots.error({
|
|
20570
20611
|
message: validateMessage.value
|
|
20571
20612
|
}) : validateMessage.value])])])]);
|
|
@@ -23210,7 +23251,7 @@
|
|
|
23210
23251
|
"style": its.value.style,
|
|
23211
23252
|
"animation": "y",
|
|
23212
23253
|
"onMouseenter": () => isHover.value = true,
|
|
23213
|
-
"
|
|
23254
|
+
"onMouseleave": () => isHover.value = false,
|
|
23214
23255
|
"onReady": () => emit('ready'),
|
|
23215
23256
|
"onClose": () => emit('close'),
|
|
23216
23257
|
"onVisibleChange": () => emit('visible-change', isActive.value),
|
|
@@ -23226,6 +23267,13 @@
|
|
|
23226
23267
|
"readonly": true,
|
|
23227
23268
|
"placeholder": its.value.attrs?.placeholder || '请选择'
|
|
23228
23269
|
}, {
|
|
23270
|
+
prepend: () => {
|
|
23271
|
+
if (slots.prepend) return slots.prepend?.();
|
|
23272
|
+
if (!props.label) return null;
|
|
23273
|
+
return vue.createVNode("span", {
|
|
23274
|
+
"class": "vc-select__label"
|
|
23275
|
+
}, [props.label]);
|
|
23276
|
+
},
|
|
23229
23277
|
content: multiple.value && currentValue.value && currentValue.value.length > 0 ? () => {
|
|
23230
23278
|
return vue.createVNode("div", {
|
|
23231
23279
|
"class": [classes.value, 'vc-select__tags']
|
|
@@ -23247,7 +23295,7 @@
|
|
|
23247
23295
|
}, [vue.createVNode(Icon, {
|
|
23248
23296
|
"type": showClear.value ? 'clear' : icon.value,
|
|
23249
23297
|
"class": [{
|
|
23250
|
-
'is-arrow': !showClear
|
|
23298
|
+
'is-arrow': !showClear.value
|
|
23251
23299
|
}, 'vc-select__icon'],
|
|
23252
23300
|
"onClick": handleClear
|
|
23253
23301
|
}, null)]);
|
|
@@ -25750,6 +25798,7 @@
|
|
|
25750
25798
|
});
|
|
25751
25799
|
const classes = vue.computed(() => {
|
|
25752
25800
|
return {
|
|
25801
|
+
"is-disabled": props.disabled,
|
|
25753
25802
|
"is-loading": isLoading.value,
|
|
25754
25803
|
"is-checked": checked.value
|
|
25755
25804
|
};
|