@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.cjs
CHANGED
|
@@ -3750,7 +3750,8 @@ const props$19 = {
|
|
|
3750
3750
|
nullValue: {
|
|
3751
3751
|
type: [Number, String, Object],
|
|
3752
3752
|
default: void 0
|
|
3753
|
-
}
|
|
3753
|
+
},
|
|
3754
|
+
label: String
|
|
3754
3755
|
};
|
|
3755
3756
|
|
|
3756
3757
|
const props$18 = {
|
|
@@ -11447,7 +11448,14 @@ const props$L = {
|
|
|
11447
11448
|
styleless: {
|
|
11448
11449
|
type: Boolean,
|
|
11449
11450
|
default: false
|
|
11450
|
-
}
|
|
11451
|
+
},
|
|
11452
|
+
// 给formItem统一注入
|
|
11453
|
+
contentStyle: [Object, String],
|
|
11454
|
+
contentClass: [Object, String],
|
|
11455
|
+
labelStyle: [Object, String],
|
|
11456
|
+
labelClass: [Object, String],
|
|
11457
|
+
errorStyle: [Object, String],
|
|
11458
|
+
errorClass: [Object, String]
|
|
11451
11459
|
};
|
|
11452
11460
|
|
|
11453
11461
|
const useForm = (expose, options = {}) => {
|
|
@@ -11607,7 +11615,9 @@ const props$K = {
|
|
|
11607
11615
|
contentStyle: [Object, String],
|
|
11608
11616
|
contentClass: [Object, String],
|
|
11609
11617
|
labelStyle: [Object, String],
|
|
11610
|
-
labelClass: [Object, String]
|
|
11618
|
+
labelClass: [Object, String],
|
|
11619
|
+
errorStyle: [Object, String],
|
|
11620
|
+
errorClass: [Object, String]
|
|
11611
11621
|
};
|
|
11612
11622
|
|
|
11613
11623
|
const filterEmpty = (val) => {
|
|
@@ -11689,6 +11699,7 @@ const useFormItem = (expose) => {
|
|
|
11689
11699
|
width: labelPosition.value !== "top" && labelWidth && labelWidth > 0 ? `${labelWidth}px` : "auto",
|
|
11690
11700
|
textAlign: labelPosition.value === "top" ? "left" : labelPosition.value
|
|
11691
11701
|
},
|
|
11702
|
+
form.props.labelStyle,
|
|
11692
11703
|
props.labelStyle
|
|
11693
11704
|
];
|
|
11694
11705
|
});
|
|
@@ -11699,9 +11710,22 @@ const useFormItem = (expose) => {
|
|
|
11699
11710
|
marginLeft: !hasLabel.value && isNest.value ? 0 : labelWidth && labelWidth > 0 ? `${labelWidth}px` : "unset",
|
|
11700
11711
|
marginBottom: isNest.value && !isNestLast.value ? `20px` : 0
|
|
11701
11712
|
},
|
|
11713
|
+
form.props.contentStyle,
|
|
11702
11714
|
props.contentStyle
|
|
11703
11715
|
];
|
|
11704
11716
|
});
|
|
11717
|
+
const errorStyle = vue.computed(() => {
|
|
11718
|
+
return [form.props.errorStyle, props.errorStyle];
|
|
11719
|
+
});
|
|
11720
|
+
const labelClass = vue.computed(() => {
|
|
11721
|
+
return [form.props.labelClass, props.labelClass];
|
|
11722
|
+
});
|
|
11723
|
+
const contentClass = vue.computed(() => {
|
|
11724
|
+
return [form.props.contentClass, props.contentClass];
|
|
11725
|
+
});
|
|
11726
|
+
const errorClass = vue.computed(() => {
|
|
11727
|
+
return [form.props.errorClass, props.errorClass];
|
|
11728
|
+
});
|
|
11705
11729
|
const isStyleless = vue.computed(() => {
|
|
11706
11730
|
return props.styleless || form.props.styleless;
|
|
11707
11731
|
});
|
|
@@ -11864,6 +11888,10 @@ const useFormItem = (expose) => {
|
|
|
11864
11888
|
classes,
|
|
11865
11889
|
labelStyle,
|
|
11866
11890
|
contentStyle,
|
|
11891
|
+
errorStyle,
|
|
11892
|
+
labelClass,
|
|
11893
|
+
contentClass,
|
|
11894
|
+
errorClass,
|
|
11867
11895
|
showError,
|
|
11868
11896
|
labelPosition
|
|
11869
11897
|
};
|
|
@@ -11886,6 +11914,10 @@ const FormItem = /* @__PURE__ */ vue.defineComponent({
|
|
|
11886
11914
|
classes,
|
|
11887
11915
|
labelStyle,
|
|
11888
11916
|
contentStyle,
|
|
11917
|
+
errorStyle,
|
|
11918
|
+
labelClass,
|
|
11919
|
+
contentClass,
|
|
11920
|
+
errorClass,
|
|
11889
11921
|
showError,
|
|
11890
11922
|
validateMessage
|
|
11891
11923
|
} = it;
|
|
@@ -11899,27 +11931,30 @@ const FormItem = /* @__PURE__ */ vue.defineComponent({
|
|
|
11899
11931
|
show: showError.value,
|
|
11900
11932
|
nest: isNest.value,
|
|
11901
11933
|
message: validateMessage.value,
|
|
11902
|
-
class: errorColorClass
|
|
11934
|
+
class: [errorColorClass, ...errorClass.value],
|
|
11935
|
+
style: errorStyle.value
|
|
11903
11936
|
})];
|
|
11904
11937
|
return vue.createVNode("div", {
|
|
11905
11938
|
"class": ['vc-form-item', classes.value]
|
|
11906
11939
|
}, [(label || slots.label) && vue.createVNode("div", {
|
|
11907
11940
|
"style": labelStyle.value,
|
|
11908
|
-
"class": ['vc-form-item__label',
|
|
11941
|
+
"class": ['vc-form-item__label', ...labelClass.value],
|
|
11909
11942
|
"for": labelFor
|
|
11910
11943
|
}, [vue.createVNode("label", null, [label || slots.label?.()])]), vue.createVNode("div", {
|
|
11911
11944
|
"class": "vc-form-item__wrapper"
|
|
11912
11945
|
}, [vue.createVNode("div", {
|
|
11913
|
-
"class": ['vc-form-item__content',
|
|
11946
|
+
"class": ['vc-form-item__content', ...contentClass.value],
|
|
11914
11947
|
"style": contentStyle.value
|
|
11915
11948
|
}, [slots.default?.(), slots.error ? slots.error({
|
|
11916
11949
|
show: showError.value,
|
|
11917
11950
|
nest: isNest.value,
|
|
11918
11951
|
message: validateMessage.value,
|
|
11919
|
-
class: errorColorClass
|
|
11952
|
+
class: [errorColorClass, ...errorClass.value],
|
|
11953
|
+
style: errorStyle.value
|
|
11920
11954
|
}) : vue.createVNode(TransitionFade, null, {
|
|
11921
11955
|
default: () => [vue.withDirectives(vue.createVNode("div", {
|
|
11922
|
-
"class": ['vc-form-item__tip', isNest.value ? 'is-nest' : '', errorColorClass]
|
|
11956
|
+
"class": ['vc-form-item__tip', isNest.value ? 'is-nest' : '', errorColorClass, ...errorClass.value],
|
|
11957
|
+
"style": [errorStyle.value]
|
|
11923
11958
|
}, [validateMessage.value]), [[vue.vShow, showError.value]])]
|
|
11924
11959
|
})])])]);
|
|
11925
11960
|
};
|
|
@@ -11985,6 +12020,10 @@ const MFormItem = /* @__PURE__ */ vue.defineComponent({
|
|
|
11985
12020
|
classes,
|
|
11986
12021
|
labelStyle,
|
|
11987
12022
|
contentStyle,
|
|
12023
|
+
errorStyle,
|
|
12024
|
+
labelClass,
|
|
12025
|
+
contentClass,
|
|
12026
|
+
errorClass,
|
|
11988
12027
|
isNest,
|
|
11989
12028
|
showError,
|
|
11990
12029
|
validateMessage
|
|
@@ -12000,7 +12039,8 @@ const MFormItem = /* @__PURE__ */ vue.defineComponent({
|
|
|
12000
12039
|
show: showError.value,
|
|
12001
12040
|
nest: isNest.value,
|
|
12002
12041
|
message: validateMessage.value,
|
|
12003
|
-
class: errorColorClass
|
|
12042
|
+
class: [errorColorClass, ...errorClass.value],
|
|
12043
|
+
style: errorStyle.value
|
|
12004
12044
|
})];
|
|
12005
12045
|
return vue.createVNode("div", {
|
|
12006
12046
|
"style": {
|
|
@@ -12012,14 +12052,15 @@ const MFormItem = /* @__PURE__ */ vue.defineComponent({
|
|
|
12012
12052
|
}, [(props.label || slots.label) && vue.createVNode("label", {
|
|
12013
12053
|
"for": labelFor,
|
|
12014
12054
|
"style": labelStyle.value,
|
|
12015
|
-
"class":
|
|
12055
|
+
"class": ['vcm-form-item__label', ...labelClass.value]
|
|
12016
12056
|
}, [label || slots.label?.()]), vue.createVNode("div", {
|
|
12017
12057
|
"style": contentStyle.value,
|
|
12018
|
-
"class":
|
|
12058
|
+
"class": ['vcm-form-item__content', ...contentClass.value]
|
|
12019
12059
|
}, [slots.default?.(), showMessage && showError.value && vue.createVNode("div", {
|
|
12020
12060
|
"class": [{
|
|
12021
12061
|
'is-nest': isNest.value
|
|
12022
|
-
}, errorColorClass]
|
|
12062
|
+
}, errorColorClass, ...errorClass.value],
|
|
12063
|
+
"style": errorStyle.value
|
|
12023
12064
|
}, [slots.error ? slots.error({
|
|
12024
12065
|
message: validateMessage.value
|
|
12025
12066
|
}) : validateMessage.value])])])]);
|
|
@@ -14290,7 +14331,7 @@ const Select = /* @__PURE__ */ vue.defineComponent({
|
|
|
14290
14331
|
"style": its.value.style,
|
|
14291
14332
|
"animation": "y",
|
|
14292
14333
|
"onMouseenter": () => isHover.value = true,
|
|
14293
|
-
"
|
|
14334
|
+
"onMouseleave": () => isHover.value = false,
|
|
14294
14335
|
"onReady": () => emit('ready'),
|
|
14295
14336
|
"onClose": () => emit('close'),
|
|
14296
14337
|
"onVisibleChange": () => emit('visible-change', isActive.value),
|
|
@@ -14306,6 +14347,13 @@ const Select = /* @__PURE__ */ vue.defineComponent({
|
|
|
14306
14347
|
"readonly": true,
|
|
14307
14348
|
"placeholder": its.value.attrs?.placeholder || '请选择'
|
|
14308
14349
|
}, {
|
|
14350
|
+
prepend: () => {
|
|
14351
|
+
if (slots.prepend) return slots.prepend?.();
|
|
14352
|
+
if (!props.label) return null;
|
|
14353
|
+
return vue.createVNode("span", {
|
|
14354
|
+
"class": "vc-select__label"
|
|
14355
|
+
}, [props.label]);
|
|
14356
|
+
},
|
|
14309
14357
|
content: multiple.value && currentValue.value && currentValue.value.length > 0 ? () => {
|
|
14310
14358
|
return vue.createVNode("div", {
|
|
14311
14359
|
"class": [classes.value, 'vc-select__tags']
|
|
@@ -14327,7 +14375,7 @@ const Select = /* @__PURE__ */ vue.defineComponent({
|
|
|
14327
14375
|
}, [vue.createVNode(Icon, {
|
|
14328
14376
|
"type": showClear.value ? 'clear' : icon.value,
|
|
14329
14377
|
"class": [{
|
|
14330
|
-
'is-arrow': !showClear
|
|
14378
|
+
'is-arrow': !showClear.value
|
|
14331
14379
|
}, 'vc-select__icon'],
|
|
14332
14380
|
"onClick": handleClear
|
|
14333
14381
|
}, null)]);
|
|
@@ -16716,6 +16764,7 @@ const useSwitch = (expose) => {
|
|
|
16716
16764
|
});
|
|
16717
16765
|
const classes = vue.computed(() => {
|
|
16718
16766
|
return {
|
|
16767
|
+
"is-disabled": props.disabled,
|
|
16719
16768
|
"is-loading": isLoading.value,
|
|
16720
16769
|
"is-checked": checked.value
|
|
16721
16770
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -438,6 +438,7 @@ nullValue: {
|
|
|
438
438
|
type: (ObjectConstructor | StringConstructor | NumberConstructor)[];
|
|
439
439
|
default: undefined;
|
|
440
440
|
};
|
|
441
|
+
label: StringConstructor;
|
|
441
442
|
disabled: {
|
|
442
443
|
type: BooleanConstructor;
|
|
443
444
|
default: boolean;
|
|
@@ -523,6 +524,7 @@ nullValue: {
|
|
|
523
524
|
type: (ObjectConstructor | StringConstructor | NumberConstructor)[];
|
|
524
525
|
default: undefined;
|
|
525
526
|
};
|
|
527
|
+
label: StringConstructor;
|
|
526
528
|
disabled: {
|
|
527
529
|
type: BooleanConstructor;
|
|
528
530
|
default: boolean;
|
|
@@ -1866,6 +1868,12 @@ styleless: {
|
|
|
1866
1868
|
type: BooleanConstructor;
|
|
1867
1869
|
default: boolean;
|
|
1868
1870
|
};
|
|
1871
|
+
contentStyle: (ObjectConstructor | StringConstructor)[];
|
|
1872
|
+
contentClass: (ObjectConstructor | StringConstructor)[];
|
|
1873
|
+
labelStyle: (ObjectConstructor | StringConstructor)[];
|
|
1874
|
+
labelClass: (ObjectConstructor | StringConstructor)[];
|
|
1875
|
+
errorStyle: (ObjectConstructor | StringConstructor)[];
|
|
1876
|
+
errorClass: (ObjectConstructor | StringConstructor)[];
|
|
1869
1877
|
}>, () => VNode<RendererNode, RendererElement, {
|
|
1870
1878
|
[key: string]: any;
|
|
1871
1879
|
}>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
@@ -1902,6 +1910,12 @@ styleless: {
|
|
|
1902
1910
|
type: BooleanConstructor;
|
|
1903
1911
|
default: boolean;
|
|
1904
1912
|
};
|
|
1913
|
+
contentStyle: (ObjectConstructor | StringConstructor)[];
|
|
1914
|
+
contentClass: (ObjectConstructor | StringConstructor)[];
|
|
1915
|
+
labelStyle: (ObjectConstructor | StringConstructor)[];
|
|
1916
|
+
labelClass: (ObjectConstructor | StringConstructor)[];
|
|
1917
|
+
errorStyle: (ObjectConstructor | StringConstructor)[];
|
|
1918
|
+
errorClass: (ObjectConstructor | StringConstructor)[];
|
|
1905
1919
|
}>> & Readonly<{}>, {
|
|
1906
1920
|
tag: string;
|
|
1907
1921
|
styleless: boolean;
|
|
@@ -1958,6 +1972,8 @@ contentStyle: (ObjectConstructor | StringConstructor)[];
|
|
|
1958
1972
|
contentClass: (ObjectConstructor | StringConstructor)[];
|
|
1959
1973
|
labelStyle: (ObjectConstructor | StringConstructor)[];
|
|
1960
1974
|
labelClass: (ObjectConstructor | StringConstructor)[];
|
|
1975
|
+
errorStyle: (ObjectConstructor | StringConstructor)[];
|
|
1976
|
+
errorClass: (ObjectConstructor | StringConstructor)[];
|
|
1961
1977
|
}>, () => JSX_2.Element | (VNode<RendererNode, RendererElement, {
|
|
1962
1978
|
[key: string]: any;
|
|
1963
1979
|
}>[] | undefined)[], {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
@@ -2007,6 +2023,8 @@ contentStyle: (ObjectConstructor | StringConstructor)[];
|
|
|
2007
2023
|
contentClass: (ObjectConstructor | StringConstructor)[];
|
|
2008
2024
|
labelStyle: (ObjectConstructor | StringConstructor)[];
|
|
2009
2025
|
labelClass: (ObjectConstructor | StringConstructor)[];
|
|
2026
|
+
errorStyle: (ObjectConstructor | StringConstructor)[];
|
|
2027
|
+
errorClass: (ObjectConstructor | StringConstructor)[];
|
|
2010
2028
|
}>> & Readonly<{}>, {
|
|
2011
2029
|
label: string;
|
|
2012
2030
|
styleless: boolean;
|
|
@@ -3090,6 +3108,7 @@ nullValue: {
|
|
|
3090
3108
|
type: (ObjectConstructor | StringConstructor | NumberConstructor)[];
|
|
3091
3109
|
default: undefined;
|
|
3092
3110
|
};
|
|
3111
|
+
label: StringConstructor;
|
|
3093
3112
|
disabled: {
|
|
3094
3113
|
type: BooleanConstructor;
|
|
3095
3114
|
default: boolean;
|
|
@@ -3175,6 +3194,7 @@ nullValue: {
|
|
|
3175
3194
|
type: (ObjectConstructor | StringConstructor | NumberConstructor)[];
|
|
3176
3195
|
default: undefined;
|
|
3177
3196
|
};
|
|
3197
|
+
label: StringConstructor;
|
|
3178
3198
|
disabled: {
|
|
3179
3199
|
type: BooleanConstructor;
|
|
3180
3200
|
default: boolean;
|
|
@@ -4047,10 +4067,10 @@ cancelDisabled: boolean;
|
|
|
4047
4067
|
title?: string | undefined;
|
|
4048
4068
|
onCancel?: Function | undefined;
|
|
4049
4069
|
wrapperStyle?: string | Record<string, any> | undefined;
|
|
4050
|
-
onOk?: Function | undefined;
|
|
4051
|
-
wrapperClass?: string | Record<string, any> | undefined;
|
|
4052
4070
|
contentStyle?: string | Record<string, any> | undefined;
|
|
4053
4071
|
contentClass?: string | Record<string, any> | undefined;
|
|
4072
|
+
onOk?: Function | undefined;
|
|
4073
|
+
wrapperClass?: string | Record<string, any> | undefined;
|
|
4054
4074
|
maskStyle?: string | Record<string, any> | undefined;
|
|
4055
4075
|
} & {
|
|
4056
4076
|
onClose: (...args: any[]) => any;
|
|
@@ -4701,6 +4721,12 @@ styleless: {
|
|
|
4701
4721
|
type: BooleanConstructor;
|
|
4702
4722
|
default: boolean;
|
|
4703
4723
|
};
|
|
4724
|
+
contentStyle: (ObjectConstructor | StringConstructor)[];
|
|
4725
|
+
contentClass: (ObjectConstructor | StringConstructor)[];
|
|
4726
|
+
labelStyle: (ObjectConstructor | StringConstructor)[];
|
|
4727
|
+
labelClass: (ObjectConstructor | StringConstructor)[];
|
|
4728
|
+
errorStyle: (ObjectConstructor | StringConstructor)[];
|
|
4729
|
+
errorClass: (ObjectConstructor | StringConstructor)[];
|
|
4704
4730
|
}>, () => VNode<RendererNode, RendererElement, {
|
|
4705
4731
|
[key: string]: any;
|
|
4706
4732
|
}>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
@@ -4745,6 +4771,12 @@ styleless: {
|
|
|
4745
4771
|
type: BooleanConstructor;
|
|
4746
4772
|
default: boolean;
|
|
4747
4773
|
};
|
|
4774
|
+
contentStyle: (ObjectConstructor | StringConstructor)[];
|
|
4775
|
+
contentClass: (ObjectConstructor | StringConstructor)[];
|
|
4776
|
+
labelStyle: (ObjectConstructor | StringConstructor)[];
|
|
4777
|
+
labelClass: (ObjectConstructor | StringConstructor)[];
|
|
4778
|
+
errorStyle: (ObjectConstructor | StringConstructor)[];
|
|
4779
|
+
errorClass: (ObjectConstructor | StringConstructor)[];
|
|
4748
4780
|
}>> & Readonly<{}>, {
|
|
4749
4781
|
tag: string;
|
|
4750
4782
|
border: boolean;
|
|
@@ -4807,6 +4839,8 @@ contentStyle: (ObjectConstructor | StringConstructor)[];
|
|
|
4807
4839
|
contentClass: (ObjectConstructor | StringConstructor)[];
|
|
4808
4840
|
labelStyle: (ObjectConstructor | StringConstructor)[];
|
|
4809
4841
|
labelClass: (ObjectConstructor | StringConstructor)[];
|
|
4842
|
+
errorStyle: (ObjectConstructor | StringConstructor)[];
|
|
4843
|
+
errorClass: (ObjectConstructor | StringConstructor)[];
|
|
4810
4844
|
}>, () => JSX_2.Element | (VNode<RendererNode, RendererElement, {
|
|
4811
4845
|
[key: string]: any;
|
|
4812
4846
|
}>[] | undefined)[], {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
@@ -4860,6 +4894,8 @@ contentStyle: (ObjectConstructor | StringConstructor)[];
|
|
|
4860
4894
|
contentClass: (ObjectConstructor | StringConstructor)[];
|
|
4861
4895
|
labelStyle: (ObjectConstructor | StringConstructor)[];
|
|
4862
4896
|
labelClass: (ObjectConstructor | StringConstructor)[];
|
|
4897
|
+
errorStyle: (ObjectConstructor | StringConstructor)[];
|
|
4898
|
+
errorClass: (ObjectConstructor | StringConstructor)[];
|
|
4863
4899
|
}>> & Readonly<{}>, {
|
|
4864
4900
|
label: string;
|
|
4865
4901
|
styleless: boolean;
|
|
@@ -8042,6 +8078,8 @@ tag: string;
|
|
|
8042
8078
|
height: string | number;
|
|
8043
8079
|
always: boolean;
|
|
8044
8080
|
wrapperStyle: StyleValue;
|
|
8081
|
+
contentStyle: StyleValue;
|
|
8082
|
+
contentClass: StyleValue;
|
|
8045
8083
|
thumbMinSize: number;
|
|
8046
8084
|
native: boolean;
|
|
8047
8085
|
autoResize: boolean;
|
|
@@ -8049,8 +8087,6 @@ trackOffsetX: number[];
|
|
|
8049
8087
|
trackOffsetY: number[];
|
|
8050
8088
|
maxHeight: string | number;
|
|
8051
8089
|
wrapperClass: StyleValue;
|
|
8052
|
-
contentStyle: StyleValue;
|
|
8053
|
-
contentClass: StyleValue;
|
|
8054
8090
|
showBar: boolean;
|
|
8055
8091
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
8056
8092
|
|
|
@@ -8114,6 +8150,7 @@ nullValue: {
|
|
|
8114
8150
|
type: (ObjectConstructor | StringConstructor | NumberConstructor)[];
|
|
8115
8151
|
default: undefined;
|
|
8116
8152
|
};
|
|
8153
|
+
label: StringConstructor;
|
|
8117
8154
|
disabled: {
|
|
8118
8155
|
type: BooleanConstructor;
|
|
8119
8156
|
default: boolean;
|
|
@@ -8191,6 +8228,7 @@ nullValue: {
|
|
|
8191
8228
|
type: (ObjectConstructor | StringConstructor | NumberConstructor)[];
|
|
8192
8229
|
default: undefined;
|
|
8193
8230
|
};
|
|
8231
|
+
label: StringConstructor;
|
|
8194
8232
|
disabled: {
|
|
8195
8233
|
type: BooleanConstructor;
|
|
8196
8234
|
default: boolean;
|
|
@@ -10213,6 +10251,7 @@ nullValue: {
|
|
|
10213
10251
|
type: (ObjectConstructor | StringConstructor | NumberConstructor)[];
|
|
10214
10252
|
default: undefined;
|
|
10215
10253
|
};
|
|
10254
|
+
label: StringConstructor;
|
|
10216
10255
|
disabled: {
|
|
10217
10256
|
type: BooleanConstructor;
|
|
10218
10257
|
default: boolean;
|
|
@@ -10295,6 +10334,7 @@ nullValue: {
|
|
|
10295
10334
|
type: (ObjectConstructor | StringConstructor | NumberConstructor)[];
|
|
10296
10335
|
default: undefined;
|
|
10297
10336
|
};
|
|
10337
|
+
label: StringConstructor;
|
|
10298
10338
|
disabled: {
|
|
10299
10339
|
type: BooleanConstructor;
|
|
10300
10340
|
default: boolean;
|
|
@@ -11839,6 +11879,12 @@ declare const props_3: {
|
|
|
11839
11879
|
type: BooleanConstructor;
|
|
11840
11880
|
default: boolean;
|
|
11841
11881
|
};
|
|
11882
|
+
contentStyle: (ObjectConstructor | StringConstructor)[];
|
|
11883
|
+
contentClass: (ObjectConstructor | StringConstructor)[];
|
|
11884
|
+
labelStyle: (ObjectConstructor | StringConstructor)[];
|
|
11885
|
+
labelClass: (ObjectConstructor | StringConstructor)[];
|
|
11886
|
+
errorStyle: (ObjectConstructor | StringConstructor)[];
|
|
11887
|
+
errorClass: (ObjectConstructor | StringConstructor)[];
|
|
11842
11888
|
};
|
|
11843
11889
|
|
|
11844
11890
|
declare type Props_4 = ExtractPropTypes<typeof props_4>;
|
|
@@ -12630,6 +12676,8 @@ tag: string;
|
|
|
12630
12676
|
height: string | number;
|
|
12631
12677
|
always: boolean;
|
|
12632
12678
|
wrapperStyle: StyleValue;
|
|
12679
|
+
contentStyle: StyleValue;
|
|
12680
|
+
contentClass: StyleValue;
|
|
12633
12681
|
thumbMinSize: number;
|
|
12634
12682
|
native: boolean;
|
|
12635
12683
|
autoResize: boolean;
|
|
@@ -12637,8 +12685,6 @@ trackOffsetX: number[];
|
|
|
12637
12685
|
trackOffsetY: number[];
|
|
12638
12686
|
maxHeight: string | number;
|
|
12639
12687
|
wrapperClass: StyleValue;
|
|
12640
|
-
contentStyle: StyleValue;
|
|
12641
|
-
contentClass: StyleValue;
|
|
12642
12688
|
showBar: boolean;
|
|
12643
12689
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
12644
12690
|
|
|
@@ -12791,6 +12837,8 @@ tag: string;
|
|
|
12791
12837
|
height: string | number;
|
|
12792
12838
|
always: boolean;
|
|
12793
12839
|
wrapperStyle: StyleValue;
|
|
12840
|
+
contentStyle: StyleValue;
|
|
12841
|
+
contentClass: StyleValue;
|
|
12794
12842
|
thumbMinSize: number;
|
|
12795
12843
|
native: boolean;
|
|
12796
12844
|
autoResize: boolean;
|
|
@@ -12798,8 +12846,6 @@ trackOffsetX: number[];
|
|
|
12798
12846
|
trackOffsetY: number[];
|
|
12799
12847
|
maxHeight: string | number;
|
|
12800
12848
|
wrapperClass: StyleValue;
|
|
12801
|
-
contentStyle: StyleValue;
|
|
12802
|
-
contentClass: StyleValue;
|
|
12803
12849
|
showBar: boolean;
|
|
12804
12850
|
stopPropagation: boolean;
|
|
12805
12851
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
@@ -12864,6 +12910,7 @@ nullValue: {
|
|
|
12864
12910
|
type: (ObjectConstructor | StringConstructor | NumberConstructor)[];
|
|
12865
12911
|
default: undefined;
|
|
12866
12912
|
};
|
|
12913
|
+
label: StringConstructor;
|
|
12867
12914
|
disabled: {
|
|
12868
12915
|
type: BooleanConstructor;
|
|
12869
12916
|
default: boolean;
|
|
@@ -12941,6 +12988,7 @@ nullValue: {
|
|
|
12941
12988
|
type: (ObjectConstructor | StringConstructor | NumberConstructor)[];
|
|
12942
12989
|
default: undefined;
|
|
12943
12990
|
};
|
|
12991
|
+
label: StringConstructor;
|
|
12944
12992
|
disabled: {
|
|
12945
12993
|
type: BooleanConstructor;
|
|
12946
12994
|
default: boolean;
|
|
@@ -15225,6 +15273,7 @@ nullValue: {
|
|
|
15225
15273
|
type: (ObjectConstructor | StringConstructor | NumberConstructor)[];
|
|
15226
15274
|
default: undefined;
|
|
15227
15275
|
};
|
|
15276
|
+
label: StringConstructor;
|
|
15228
15277
|
disabled: {
|
|
15229
15278
|
type: BooleanConstructor;
|
|
15230
15279
|
default: boolean;
|
|
@@ -15307,6 +15356,7 @@ nullValue: {
|
|
|
15307
15356
|
type: (ObjectConstructor | StringConstructor | NumberConstructor)[];
|
|
15308
15357
|
default: undefined;
|
|
15309
15358
|
};
|
|
15359
|
+
label: StringConstructor;
|
|
15310
15360
|
disabled: {
|
|
15311
15361
|
type: BooleanConstructor;
|
|
15312
15362
|
default: boolean;
|
package/dist/index.iife.js
CHANGED
|
@@ -9278,7 +9278,8 @@ var VcComponents = (function (exports, vue) {
|
|
|
9278
9278
|
nullValue: {
|
|
9279
9279
|
type: [Number, String, Object],
|
|
9280
9280
|
default: void 0
|
|
9281
|
-
}
|
|
9281
|
+
},
|
|
9282
|
+
label: String
|
|
9282
9283
|
};
|
|
9283
9284
|
|
|
9284
9285
|
const props$18 = {
|
|
@@ -19858,7 +19859,14 @@ var VcComponents = (function (exports, vue) {
|
|
|
19858
19859
|
styleless: {
|
|
19859
19860
|
type: Boolean,
|
|
19860
19861
|
default: false
|
|
19861
|
-
}
|
|
19862
|
+
},
|
|
19863
|
+
// 给formItem统一注入
|
|
19864
|
+
contentStyle: [Object, String],
|
|
19865
|
+
contentClass: [Object, String],
|
|
19866
|
+
labelStyle: [Object, String],
|
|
19867
|
+
labelClass: [Object, String],
|
|
19868
|
+
errorStyle: [Object, String],
|
|
19869
|
+
errorClass: [Object, String]
|
|
19862
19870
|
};
|
|
19863
19871
|
|
|
19864
19872
|
const useForm = (expose, options = {}) => {
|
|
@@ -20018,7 +20026,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
20018
20026
|
contentStyle: [Object, String],
|
|
20019
20027
|
contentClass: [Object, String],
|
|
20020
20028
|
labelStyle: [Object, String],
|
|
20021
|
-
labelClass: [Object, String]
|
|
20029
|
+
labelClass: [Object, String],
|
|
20030
|
+
errorStyle: [Object, String],
|
|
20031
|
+
errorClass: [Object, String]
|
|
20022
20032
|
};
|
|
20023
20033
|
|
|
20024
20034
|
class Validator {
|
|
@@ -20232,6 +20242,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
20232
20242
|
width: labelPosition.value !== "top" && labelWidth && labelWidth > 0 ? `${labelWidth}px` : "auto",
|
|
20233
20243
|
textAlign: labelPosition.value === "top" ? "left" : labelPosition.value
|
|
20234
20244
|
},
|
|
20245
|
+
form.props.labelStyle,
|
|
20235
20246
|
props.labelStyle
|
|
20236
20247
|
];
|
|
20237
20248
|
});
|
|
@@ -20242,9 +20253,22 @@ var VcComponents = (function (exports, vue) {
|
|
|
20242
20253
|
marginLeft: !hasLabel.value && isNest.value ? 0 : labelWidth && labelWidth > 0 ? `${labelWidth}px` : "unset",
|
|
20243
20254
|
marginBottom: isNest.value && !isNestLast.value ? `20px` : 0
|
|
20244
20255
|
},
|
|
20256
|
+
form.props.contentStyle,
|
|
20245
20257
|
props.contentStyle
|
|
20246
20258
|
];
|
|
20247
20259
|
});
|
|
20260
|
+
const errorStyle = vue.computed(() => {
|
|
20261
|
+
return [form.props.errorStyle, props.errorStyle];
|
|
20262
|
+
});
|
|
20263
|
+
const labelClass = vue.computed(() => {
|
|
20264
|
+
return [form.props.labelClass, props.labelClass];
|
|
20265
|
+
});
|
|
20266
|
+
const contentClass = vue.computed(() => {
|
|
20267
|
+
return [form.props.contentClass, props.contentClass];
|
|
20268
|
+
});
|
|
20269
|
+
const errorClass = vue.computed(() => {
|
|
20270
|
+
return [form.props.errorClass, props.errorClass];
|
|
20271
|
+
});
|
|
20248
20272
|
const isStyleless = vue.computed(() => {
|
|
20249
20273
|
return props.styleless || form.props.styleless;
|
|
20250
20274
|
});
|
|
@@ -20407,6 +20431,10 @@ var VcComponents = (function (exports, vue) {
|
|
|
20407
20431
|
classes,
|
|
20408
20432
|
labelStyle,
|
|
20409
20433
|
contentStyle,
|
|
20434
|
+
errorStyle,
|
|
20435
|
+
labelClass,
|
|
20436
|
+
contentClass,
|
|
20437
|
+
errorClass,
|
|
20410
20438
|
showError,
|
|
20411
20439
|
labelPosition
|
|
20412
20440
|
};
|
|
@@ -20429,6 +20457,10 @@ var VcComponents = (function (exports, vue) {
|
|
|
20429
20457
|
classes,
|
|
20430
20458
|
labelStyle,
|
|
20431
20459
|
contentStyle,
|
|
20460
|
+
errorStyle,
|
|
20461
|
+
labelClass,
|
|
20462
|
+
contentClass,
|
|
20463
|
+
errorClass,
|
|
20432
20464
|
showError,
|
|
20433
20465
|
validateMessage
|
|
20434
20466
|
} = it;
|
|
@@ -20442,27 +20474,30 @@ var VcComponents = (function (exports, vue) {
|
|
|
20442
20474
|
show: showError.value,
|
|
20443
20475
|
nest: isNest.value,
|
|
20444
20476
|
message: validateMessage.value,
|
|
20445
|
-
class: errorColorClass
|
|
20477
|
+
class: [errorColorClass, ...errorClass.value],
|
|
20478
|
+
style: errorStyle.value
|
|
20446
20479
|
})];
|
|
20447
20480
|
return vue.createVNode("div", {
|
|
20448
20481
|
"class": ['vc-form-item', classes.value]
|
|
20449
20482
|
}, [(label || slots.label) && vue.createVNode("div", {
|
|
20450
20483
|
"style": labelStyle.value,
|
|
20451
|
-
"class": ['vc-form-item__label',
|
|
20484
|
+
"class": ['vc-form-item__label', ...labelClass.value],
|
|
20452
20485
|
"for": labelFor
|
|
20453
20486
|
}, [vue.createVNode("label", null, [label || slots.label?.()])]), vue.createVNode("div", {
|
|
20454
20487
|
"class": "vc-form-item__wrapper"
|
|
20455
20488
|
}, [vue.createVNode("div", {
|
|
20456
|
-
"class": ['vc-form-item__content',
|
|
20489
|
+
"class": ['vc-form-item__content', ...contentClass.value],
|
|
20457
20490
|
"style": contentStyle.value
|
|
20458
20491
|
}, [slots.default?.(), slots.error ? slots.error({
|
|
20459
20492
|
show: showError.value,
|
|
20460
20493
|
nest: isNest.value,
|
|
20461
20494
|
message: validateMessage.value,
|
|
20462
|
-
class: errorColorClass
|
|
20495
|
+
class: [errorColorClass, ...errorClass.value],
|
|
20496
|
+
style: errorStyle.value
|
|
20463
20497
|
}) : vue.createVNode(TransitionFade, null, {
|
|
20464
20498
|
default: () => [vue.withDirectives(vue.createVNode("div", {
|
|
20465
|
-
"class": ['vc-form-item__tip', isNest.value ? 'is-nest' : '', errorColorClass]
|
|
20499
|
+
"class": ['vc-form-item__tip', isNest.value ? 'is-nest' : '', errorColorClass, ...errorClass.value],
|
|
20500
|
+
"style": [errorStyle.value]
|
|
20466
20501
|
}, [validateMessage.value]), [[vue.vShow, showError.value]])]
|
|
20467
20502
|
})])])]);
|
|
20468
20503
|
};
|
|
@@ -20528,6 +20563,10 @@ var VcComponents = (function (exports, vue) {
|
|
|
20528
20563
|
classes,
|
|
20529
20564
|
labelStyle,
|
|
20530
20565
|
contentStyle,
|
|
20566
|
+
errorStyle,
|
|
20567
|
+
labelClass,
|
|
20568
|
+
contentClass,
|
|
20569
|
+
errorClass,
|
|
20531
20570
|
isNest,
|
|
20532
20571
|
showError,
|
|
20533
20572
|
validateMessage
|
|
@@ -20543,7 +20582,8 @@ var VcComponents = (function (exports, vue) {
|
|
|
20543
20582
|
show: showError.value,
|
|
20544
20583
|
nest: isNest.value,
|
|
20545
20584
|
message: validateMessage.value,
|
|
20546
|
-
class: errorColorClass
|
|
20585
|
+
class: [errorColorClass, ...errorClass.value],
|
|
20586
|
+
style: errorStyle.value
|
|
20547
20587
|
})];
|
|
20548
20588
|
return vue.createVNode("div", {
|
|
20549
20589
|
"style": {
|
|
@@ -20555,14 +20595,15 @@ var VcComponents = (function (exports, vue) {
|
|
|
20555
20595
|
}, [(props.label || slots.label) && vue.createVNode("label", {
|
|
20556
20596
|
"for": labelFor,
|
|
20557
20597
|
"style": labelStyle.value,
|
|
20558
|
-
"class":
|
|
20598
|
+
"class": ['vcm-form-item__label', ...labelClass.value]
|
|
20559
20599
|
}, [label || slots.label?.()]), vue.createVNode("div", {
|
|
20560
20600
|
"style": contentStyle.value,
|
|
20561
|
-
"class":
|
|
20601
|
+
"class": ['vcm-form-item__content', ...contentClass.value]
|
|
20562
20602
|
}, [slots.default?.(), showMessage && showError.value && vue.createVNode("div", {
|
|
20563
20603
|
"class": [{
|
|
20564
20604
|
'is-nest': isNest.value
|
|
20565
|
-
}, errorColorClass]
|
|
20605
|
+
}, errorColorClass, ...errorClass.value],
|
|
20606
|
+
"style": errorStyle.value
|
|
20566
20607
|
}, [slots.error ? slots.error({
|
|
20567
20608
|
message: validateMessage.value
|
|
20568
20609
|
}) : validateMessage.value])])])]);
|
|
@@ -23207,7 +23248,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
23207
23248
|
"style": its.value.style,
|
|
23208
23249
|
"animation": "y",
|
|
23209
23250
|
"onMouseenter": () => isHover.value = true,
|
|
23210
|
-
"
|
|
23251
|
+
"onMouseleave": () => isHover.value = false,
|
|
23211
23252
|
"onReady": () => emit('ready'),
|
|
23212
23253
|
"onClose": () => emit('close'),
|
|
23213
23254
|
"onVisibleChange": () => emit('visible-change', isActive.value),
|
|
@@ -23223,6 +23264,13 @@ var VcComponents = (function (exports, vue) {
|
|
|
23223
23264
|
"readonly": true,
|
|
23224
23265
|
"placeholder": its.value.attrs?.placeholder || '请选择'
|
|
23225
23266
|
}, {
|
|
23267
|
+
prepend: () => {
|
|
23268
|
+
if (slots.prepend) return slots.prepend?.();
|
|
23269
|
+
if (!props.label) return null;
|
|
23270
|
+
return vue.createVNode("span", {
|
|
23271
|
+
"class": "vc-select__label"
|
|
23272
|
+
}, [props.label]);
|
|
23273
|
+
},
|
|
23226
23274
|
content: multiple.value && currentValue.value && currentValue.value.length > 0 ? () => {
|
|
23227
23275
|
return vue.createVNode("div", {
|
|
23228
23276
|
"class": [classes.value, 'vc-select__tags']
|
|
@@ -23244,7 +23292,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
23244
23292
|
}, [vue.createVNode(Icon, {
|
|
23245
23293
|
"type": showClear.value ? 'clear' : icon.value,
|
|
23246
23294
|
"class": [{
|
|
23247
|
-
'is-arrow': !showClear
|
|
23295
|
+
'is-arrow': !showClear.value
|
|
23248
23296
|
}, 'vc-select__icon'],
|
|
23249
23297
|
"onClick": handleClear
|
|
23250
23298
|
}, null)]);
|
|
@@ -25747,6 +25795,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
25747
25795
|
});
|
|
25748
25796
|
const classes = vue.computed(() => {
|
|
25749
25797
|
return {
|
|
25798
|
+
"is-disabled": props.disabled,
|
|
25750
25799
|
"is-loading": isLoading.value,
|
|
25751
25800
|
"is-checked": checked.value
|
|
25752
25801
|
};
|