@deot/vc-components 1.0.44 → 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 +64 -13
- package/dist/index.d.ts +76 -8
- package/dist/index.iife.js +64 -13
- package/dist/index.js +64 -13
- package/dist/index.style.css +2 -2
- package/dist/index.umd.cjs +64 -13
- package/package.json +1 -1
package/dist/index.umd.cjs
CHANGED
|
@@ -477,7 +477,9 @@
|
|
|
477
477
|
[`vc-affix__${props.fixed ? 'fixed' : 'absolute'}`]: isActive.value
|
|
478
478
|
},
|
|
479
479
|
"style": contentStyle.value
|
|
480
|
-
}, [slots?.default?.(
|
|
480
|
+
}, [slots?.default?.({
|
|
481
|
+
active: isActive.value
|
|
482
|
+
})])]);
|
|
481
483
|
};
|
|
482
484
|
}
|
|
483
485
|
});
|
|
@@ -19859,7 +19861,14 @@
|
|
|
19859
19861
|
styleless: {
|
|
19860
19862
|
type: Boolean,
|
|
19861
19863
|
default: false
|
|
19862
|
-
}
|
|
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]
|
|
19863
19872
|
};
|
|
19864
19873
|
|
|
19865
19874
|
const useForm = (expose, options = {}) => {
|
|
@@ -20019,7 +20028,9 @@
|
|
|
20019
20028
|
contentStyle: [Object, String],
|
|
20020
20029
|
contentClass: [Object, String],
|
|
20021
20030
|
labelStyle: [Object, String],
|
|
20022
|
-
labelClass: [Object, String]
|
|
20031
|
+
labelClass: [Object, String],
|
|
20032
|
+
errorStyle: [Object, String],
|
|
20033
|
+
errorClass: [Object, String]
|
|
20023
20034
|
};
|
|
20024
20035
|
|
|
20025
20036
|
class Validator {
|
|
@@ -20233,6 +20244,7 @@
|
|
|
20233
20244
|
width: labelPosition.value !== "top" && labelWidth && labelWidth > 0 ? `${labelWidth}px` : "auto",
|
|
20234
20245
|
textAlign: labelPosition.value === "top" ? "left" : labelPosition.value
|
|
20235
20246
|
},
|
|
20247
|
+
form.props.labelStyle,
|
|
20236
20248
|
props.labelStyle
|
|
20237
20249
|
];
|
|
20238
20250
|
});
|
|
@@ -20243,9 +20255,22 @@
|
|
|
20243
20255
|
marginLeft: !hasLabel.value && isNest.value ? 0 : labelWidth && labelWidth > 0 ? `${labelWidth}px` : "unset",
|
|
20244
20256
|
marginBottom: isNest.value && !isNestLast.value ? `20px` : 0
|
|
20245
20257
|
},
|
|
20258
|
+
form.props.contentStyle,
|
|
20246
20259
|
props.contentStyle
|
|
20247
20260
|
];
|
|
20248
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
|
+
});
|
|
20249
20274
|
const isStyleless = vue.computed(() => {
|
|
20250
20275
|
return props.styleless || form.props.styleless;
|
|
20251
20276
|
});
|
|
@@ -20408,6 +20433,10 @@
|
|
|
20408
20433
|
classes,
|
|
20409
20434
|
labelStyle,
|
|
20410
20435
|
contentStyle,
|
|
20436
|
+
errorStyle,
|
|
20437
|
+
labelClass,
|
|
20438
|
+
contentClass,
|
|
20439
|
+
errorClass,
|
|
20411
20440
|
showError,
|
|
20412
20441
|
labelPosition
|
|
20413
20442
|
};
|
|
@@ -20430,6 +20459,10 @@
|
|
|
20430
20459
|
classes,
|
|
20431
20460
|
labelStyle,
|
|
20432
20461
|
contentStyle,
|
|
20462
|
+
errorStyle,
|
|
20463
|
+
labelClass,
|
|
20464
|
+
contentClass,
|
|
20465
|
+
errorClass,
|
|
20433
20466
|
showError,
|
|
20434
20467
|
validateMessage
|
|
20435
20468
|
} = it;
|
|
@@ -20443,27 +20476,30 @@
|
|
|
20443
20476
|
show: showError.value,
|
|
20444
20477
|
nest: isNest.value,
|
|
20445
20478
|
message: validateMessage.value,
|
|
20446
|
-
class: errorColorClass
|
|
20479
|
+
class: [errorColorClass, ...errorClass.value],
|
|
20480
|
+
style: errorStyle.value
|
|
20447
20481
|
})];
|
|
20448
20482
|
return vue.createVNode("div", {
|
|
20449
20483
|
"class": ['vc-form-item', classes.value]
|
|
20450
20484
|
}, [(label || slots.label) && vue.createVNode("div", {
|
|
20451
20485
|
"style": labelStyle.value,
|
|
20452
|
-
"class": ['vc-form-item__label',
|
|
20486
|
+
"class": ['vc-form-item__label', ...labelClass.value],
|
|
20453
20487
|
"for": labelFor
|
|
20454
20488
|
}, [vue.createVNode("label", null, [label || slots.label?.()])]), vue.createVNode("div", {
|
|
20455
20489
|
"class": "vc-form-item__wrapper"
|
|
20456
20490
|
}, [vue.createVNode("div", {
|
|
20457
|
-
"class": ['vc-form-item__content',
|
|
20491
|
+
"class": ['vc-form-item__content', ...contentClass.value],
|
|
20458
20492
|
"style": contentStyle.value
|
|
20459
20493
|
}, [slots.default?.(), slots.error ? slots.error({
|
|
20460
20494
|
show: showError.value,
|
|
20461
20495
|
nest: isNest.value,
|
|
20462
20496
|
message: validateMessage.value,
|
|
20463
|
-
class: errorColorClass
|
|
20497
|
+
class: [errorColorClass, ...errorClass.value],
|
|
20498
|
+
style: errorStyle.value
|
|
20464
20499
|
}) : vue.createVNode(TransitionFade, null, {
|
|
20465
20500
|
default: () => [vue.withDirectives(vue.createVNode("div", {
|
|
20466
|
-
"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]
|
|
20467
20503
|
}, [validateMessage.value]), [[vue.vShow, showError.value]])]
|
|
20468
20504
|
})])])]);
|
|
20469
20505
|
};
|
|
@@ -20529,6 +20565,10 @@
|
|
|
20529
20565
|
classes,
|
|
20530
20566
|
labelStyle,
|
|
20531
20567
|
contentStyle,
|
|
20568
|
+
errorStyle,
|
|
20569
|
+
labelClass,
|
|
20570
|
+
contentClass,
|
|
20571
|
+
errorClass,
|
|
20532
20572
|
isNest,
|
|
20533
20573
|
showError,
|
|
20534
20574
|
validateMessage
|
|
@@ -20544,7 +20584,8 @@
|
|
|
20544
20584
|
show: showError.value,
|
|
20545
20585
|
nest: isNest.value,
|
|
20546
20586
|
message: validateMessage.value,
|
|
20547
|
-
class: errorColorClass
|
|
20587
|
+
class: [errorColorClass, ...errorClass.value],
|
|
20588
|
+
style: errorStyle.value
|
|
20548
20589
|
})];
|
|
20549
20590
|
return vue.createVNode("div", {
|
|
20550
20591
|
"style": {
|
|
@@ -20556,14 +20597,15 @@
|
|
|
20556
20597
|
}, [(props.label || slots.label) && vue.createVNode("label", {
|
|
20557
20598
|
"for": labelFor,
|
|
20558
20599
|
"style": labelStyle.value,
|
|
20559
|
-
"class":
|
|
20600
|
+
"class": ['vcm-form-item__label', ...labelClass.value]
|
|
20560
20601
|
}, [label || slots.label?.()]), vue.createVNode("div", {
|
|
20561
20602
|
"style": contentStyle.value,
|
|
20562
|
-
"class":
|
|
20603
|
+
"class": ['vcm-form-item__content', ...contentClass.value]
|
|
20563
20604
|
}, [slots.default?.(), showMessage && showError.value && vue.createVNode("div", {
|
|
20564
20605
|
"class": [{
|
|
20565
20606
|
'is-nest': isNest.value
|
|
20566
|
-
}, errorColorClass]
|
|
20607
|
+
}, errorColorClass, ...errorClass.value],
|
|
20608
|
+
"style": errorStyle.value
|
|
20567
20609
|
}, [slots.error ? slots.error({
|
|
20568
20610
|
message: validateMessage.value
|
|
20569
20611
|
}) : validateMessage.value])])])]);
|
|
@@ -25748,6 +25790,7 @@
|
|
|
25748
25790
|
});
|
|
25749
25791
|
const classes = vue.computed(() => {
|
|
25750
25792
|
return {
|
|
25793
|
+
"is-disabled": props.disabled,
|
|
25751
25794
|
"is-loading": isLoading.value,
|
|
25752
25795
|
"is-checked": checked.value
|
|
25753
25796
|
};
|
|
@@ -29035,6 +29078,7 @@
|
|
|
29035
29078
|
emit("update:modelValue", currentValue.value);
|
|
29036
29079
|
emit("change", currentValue.value);
|
|
29037
29080
|
emit("click", currentValue.value);
|
|
29081
|
+
nav.anchor && document.querySelector(nav.anchor)?.scrollIntoView?.({ behavior: "smooth" });
|
|
29038
29082
|
};
|
|
29039
29083
|
const handleResize = () => {
|
|
29040
29084
|
if (instance.isUnmounted) return;
|
|
@@ -29294,6 +29338,9 @@
|
|
|
29294
29338
|
type: [String, Function],
|
|
29295
29339
|
default: ""
|
|
29296
29340
|
},
|
|
29341
|
+
anchor: {
|
|
29342
|
+
type: String
|
|
29343
|
+
},
|
|
29297
29344
|
/**
|
|
29298
29345
|
* 服务端渲染时,lazy设置为false,可以把内容渲染出来;
|
|
29299
29346
|
* 不能设置为!IS_SERVER, 会影响客服端激活,不一样会存在问题
|
|
@@ -29750,6 +29797,10 @@
|
|
|
29750
29797
|
default: (props$) => {
|
|
29751
29798
|
return props$.value;
|
|
29752
29799
|
}
|
|
29800
|
+
},
|
|
29801
|
+
theme: {
|
|
29802
|
+
type: String,
|
|
29803
|
+
default: "dark"
|
|
29753
29804
|
}
|
|
29754
29805
|
};
|
|
29755
29806
|
|
|
@@ -29802,7 +29853,7 @@
|
|
|
29802
29853
|
// 确保不重复创建
|
|
29803
29854
|
triggerEl: e.target,
|
|
29804
29855
|
hover: true,
|
|
29805
|
-
theme:
|
|
29856
|
+
theme: props.theme,
|
|
29806
29857
|
placement: props.placement,
|
|
29807
29858
|
portalClass: props.portalClass,
|
|
29808
29859
|
portalStyle: [props.portalStyle || `width: ${e.target.clientWidth}px`, 'word-break: break-all'],
|