@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 CHANGED
@@ -11447,7 +11447,14 @@ const props$L = {
11447
11447
  styleless: {
11448
11448
  type: Boolean,
11449
11449
  default: false
11450
- }
11450
+ },
11451
+ // 给formItem统一注入
11452
+ contentStyle: [Object, String],
11453
+ contentClass: [Object, String],
11454
+ labelStyle: [Object, String],
11455
+ labelClass: [Object, String],
11456
+ errorStyle: [Object, String],
11457
+ errorClass: [Object, String]
11451
11458
  };
11452
11459
 
11453
11460
  const useForm = (expose, options = {}) => {
@@ -11607,7 +11614,9 @@ const props$K = {
11607
11614
  contentStyle: [Object, String],
11608
11615
  contentClass: [Object, String],
11609
11616
  labelStyle: [Object, String],
11610
- labelClass: [Object, String]
11617
+ labelClass: [Object, String],
11618
+ errorStyle: [Object, String],
11619
+ errorClass: [Object, String]
11611
11620
  };
11612
11621
 
11613
11622
  const filterEmpty = (val) => {
@@ -11689,6 +11698,7 @@ const useFormItem = (expose) => {
11689
11698
  width: labelPosition.value !== "top" && labelWidth && labelWidth > 0 ? `${labelWidth}px` : "auto",
11690
11699
  textAlign: labelPosition.value === "top" ? "left" : labelPosition.value
11691
11700
  },
11701
+ form.props.labelStyle,
11692
11702
  props.labelStyle
11693
11703
  ];
11694
11704
  });
@@ -11699,9 +11709,22 @@ const useFormItem = (expose) => {
11699
11709
  marginLeft: !hasLabel.value && isNest.value ? 0 : labelWidth && labelWidth > 0 ? `${labelWidth}px` : "unset",
11700
11710
  marginBottom: isNest.value && !isNestLast.value ? `20px` : 0
11701
11711
  },
11712
+ form.props.contentStyle,
11702
11713
  props.contentStyle
11703
11714
  ];
11704
11715
  });
11716
+ const errorStyle = vue.computed(() => {
11717
+ return [form.props.errorStyle, props.errorStyle];
11718
+ });
11719
+ const labelClass = vue.computed(() => {
11720
+ return [form.props.labelClass, props.labelClass];
11721
+ });
11722
+ const contentClass = vue.computed(() => {
11723
+ return [form.props.contentClass, props.contentClass];
11724
+ });
11725
+ const errorClass = vue.computed(() => {
11726
+ return [form.props.errorClass, props.errorClass];
11727
+ });
11705
11728
  const isStyleless = vue.computed(() => {
11706
11729
  return props.styleless || form.props.styleless;
11707
11730
  });
@@ -11864,6 +11887,10 @@ const useFormItem = (expose) => {
11864
11887
  classes,
11865
11888
  labelStyle,
11866
11889
  contentStyle,
11890
+ errorStyle,
11891
+ labelClass,
11892
+ contentClass,
11893
+ errorClass,
11867
11894
  showError,
11868
11895
  labelPosition
11869
11896
  };
@@ -11886,6 +11913,10 @@ const FormItem = /* @__PURE__ */ vue.defineComponent({
11886
11913
  classes,
11887
11914
  labelStyle,
11888
11915
  contentStyle,
11916
+ errorStyle,
11917
+ labelClass,
11918
+ contentClass,
11919
+ errorClass,
11889
11920
  showError,
11890
11921
  validateMessage
11891
11922
  } = it;
@@ -11899,27 +11930,30 @@ const FormItem = /* @__PURE__ */ vue.defineComponent({
11899
11930
  show: showError.value,
11900
11931
  nest: isNest.value,
11901
11932
  message: validateMessage.value,
11902
- class: errorColorClass
11933
+ class: [errorColorClass, ...errorClass.value],
11934
+ style: errorStyle.value
11903
11935
  })];
11904
11936
  return vue.createVNode("div", {
11905
11937
  "class": ['vc-form-item', classes.value]
11906
11938
  }, [(label || slots.label) && vue.createVNode("div", {
11907
11939
  "style": labelStyle.value,
11908
- "class": ['vc-form-item__label', props.labelClass],
11940
+ "class": ['vc-form-item__label', ...labelClass.value],
11909
11941
  "for": labelFor
11910
11942
  }, [vue.createVNode("label", null, [label || slots.label?.()])]), vue.createVNode("div", {
11911
11943
  "class": "vc-form-item__wrapper"
11912
11944
  }, [vue.createVNode("div", {
11913
- "class": ['vc-form-item__content', props.contentClass],
11945
+ "class": ['vc-form-item__content', ...contentClass.value],
11914
11946
  "style": contentStyle.value
11915
11947
  }, [slots.default?.(), slots.error ? slots.error({
11916
11948
  show: showError.value,
11917
11949
  nest: isNest.value,
11918
11950
  message: validateMessage.value,
11919
- class: errorColorClass
11951
+ class: [errorColorClass, ...errorClass.value],
11952
+ style: errorStyle.value
11920
11953
  }) : vue.createVNode(TransitionFade, null, {
11921
11954
  default: () => [vue.withDirectives(vue.createVNode("div", {
11922
- "class": ['vc-form-item__tip', isNest.value ? 'is-nest' : '', errorColorClass]
11955
+ "class": ['vc-form-item__tip', isNest.value ? 'is-nest' : '', errorColorClass, ...errorClass.value],
11956
+ "style": [errorStyle.value]
11923
11957
  }, [validateMessage.value]), [[vue.vShow, showError.value]])]
11924
11958
  })])])]);
11925
11959
  };
@@ -11985,6 +12019,10 @@ const MFormItem = /* @__PURE__ */ vue.defineComponent({
11985
12019
  classes,
11986
12020
  labelStyle,
11987
12021
  contentStyle,
12022
+ errorStyle,
12023
+ labelClass,
12024
+ contentClass,
12025
+ errorClass,
11988
12026
  isNest,
11989
12027
  showError,
11990
12028
  validateMessage
@@ -12000,7 +12038,8 @@ const MFormItem = /* @__PURE__ */ vue.defineComponent({
12000
12038
  show: showError.value,
12001
12039
  nest: isNest.value,
12002
12040
  message: validateMessage.value,
12003
- class: errorColorClass
12041
+ class: [errorColorClass, ...errorClass.value],
12042
+ style: errorStyle.value
12004
12043
  })];
12005
12044
  return vue.createVNode("div", {
12006
12045
  "style": {
@@ -12012,14 +12051,15 @@ const MFormItem = /* @__PURE__ */ vue.defineComponent({
12012
12051
  }, [(props.label || slots.label) && vue.createVNode("label", {
12013
12052
  "for": labelFor,
12014
12053
  "style": labelStyle.value,
12015
- "class": "vcm-form-item__label"
12054
+ "class": ['vcm-form-item__label', ...labelClass.value]
12016
12055
  }, [label || slots.label?.()]), vue.createVNode("div", {
12017
12056
  "style": contentStyle.value,
12018
- "class": "vcm-form-item__content"
12057
+ "class": ['vcm-form-item__content', ...contentClass.value]
12019
12058
  }, [slots.default?.(), showMessage && showError.value && vue.createVNode("div", {
12020
12059
  "class": [{
12021
12060
  'is-nest': isNest.value
12022
- }, errorColorClass]
12061
+ }, errorColorClass, ...errorClass.value],
12062
+ "style": errorStyle.value
12023
12063
  }, [slots.error ? slots.error({
12024
12064
  message: validateMessage.value
12025
12065
  }) : validateMessage.value])])])]);
@@ -16716,6 +16756,7 @@ const useSwitch = (expose) => {
16716
16756
  });
16717
16757
  const classes = vue.computed(() => {
16718
16758
  return {
16759
+ "is-disabled": props.disabled,
16719
16760
  "is-loading": isLoading.value,
16720
16761
  "is-checked": checked.value
16721
16762
  };
package/dist/index.d.ts CHANGED
@@ -1866,6 +1866,12 @@ styleless: {
1866
1866
  type: BooleanConstructor;
1867
1867
  default: boolean;
1868
1868
  };
1869
+ contentStyle: (ObjectConstructor | StringConstructor)[];
1870
+ contentClass: (ObjectConstructor | StringConstructor)[];
1871
+ labelStyle: (ObjectConstructor | StringConstructor)[];
1872
+ labelClass: (ObjectConstructor | StringConstructor)[];
1873
+ errorStyle: (ObjectConstructor | StringConstructor)[];
1874
+ errorClass: (ObjectConstructor | StringConstructor)[];
1869
1875
  }>, () => VNode<RendererNode, RendererElement, {
1870
1876
  [key: string]: any;
1871
1877
  }>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
@@ -1902,6 +1908,12 @@ styleless: {
1902
1908
  type: BooleanConstructor;
1903
1909
  default: boolean;
1904
1910
  };
1911
+ contentStyle: (ObjectConstructor | StringConstructor)[];
1912
+ contentClass: (ObjectConstructor | StringConstructor)[];
1913
+ labelStyle: (ObjectConstructor | StringConstructor)[];
1914
+ labelClass: (ObjectConstructor | StringConstructor)[];
1915
+ errorStyle: (ObjectConstructor | StringConstructor)[];
1916
+ errorClass: (ObjectConstructor | StringConstructor)[];
1905
1917
  }>> & Readonly<{}>, {
1906
1918
  tag: string;
1907
1919
  styleless: boolean;
@@ -1958,6 +1970,8 @@ contentStyle: (ObjectConstructor | StringConstructor)[];
1958
1970
  contentClass: (ObjectConstructor | StringConstructor)[];
1959
1971
  labelStyle: (ObjectConstructor | StringConstructor)[];
1960
1972
  labelClass: (ObjectConstructor | StringConstructor)[];
1973
+ errorStyle: (ObjectConstructor | StringConstructor)[];
1974
+ errorClass: (ObjectConstructor | StringConstructor)[];
1961
1975
  }>, () => JSX_2.Element | (VNode<RendererNode, RendererElement, {
1962
1976
  [key: string]: any;
1963
1977
  }>[] | undefined)[], {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
@@ -2007,6 +2021,8 @@ contentStyle: (ObjectConstructor | StringConstructor)[];
2007
2021
  contentClass: (ObjectConstructor | StringConstructor)[];
2008
2022
  labelStyle: (ObjectConstructor | StringConstructor)[];
2009
2023
  labelClass: (ObjectConstructor | StringConstructor)[];
2024
+ errorStyle: (ObjectConstructor | StringConstructor)[];
2025
+ errorClass: (ObjectConstructor | StringConstructor)[];
2010
2026
  }>> & Readonly<{}>, {
2011
2027
  label: string;
2012
2028
  styleless: boolean;
@@ -4047,10 +4063,10 @@ cancelDisabled: boolean;
4047
4063
  title?: string | undefined;
4048
4064
  onCancel?: Function | undefined;
4049
4065
  wrapperStyle?: string | Record<string, any> | undefined;
4050
- onOk?: Function | undefined;
4051
- wrapperClass?: string | Record<string, any> | undefined;
4052
4066
  contentStyle?: string | Record<string, any> | undefined;
4053
4067
  contentClass?: string | Record<string, any> | undefined;
4068
+ onOk?: Function | undefined;
4069
+ wrapperClass?: string | Record<string, any> | undefined;
4054
4070
  maskStyle?: string | Record<string, any> | undefined;
4055
4071
  } & {
4056
4072
  onClose: (...args: any[]) => any;
@@ -4701,6 +4717,12 @@ styleless: {
4701
4717
  type: BooleanConstructor;
4702
4718
  default: boolean;
4703
4719
  };
4720
+ contentStyle: (ObjectConstructor | StringConstructor)[];
4721
+ contentClass: (ObjectConstructor | StringConstructor)[];
4722
+ labelStyle: (ObjectConstructor | StringConstructor)[];
4723
+ labelClass: (ObjectConstructor | StringConstructor)[];
4724
+ errorStyle: (ObjectConstructor | StringConstructor)[];
4725
+ errorClass: (ObjectConstructor | StringConstructor)[];
4704
4726
  }>, () => VNode<RendererNode, RendererElement, {
4705
4727
  [key: string]: any;
4706
4728
  }>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
@@ -4745,6 +4767,12 @@ styleless: {
4745
4767
  type: BooleanConstructor;
4746
4768
  default: boolean;
4747
4769
  };
4770
+ contentStyle: (ObjectConstructor | StringConstructor)[];
4771
+ contentClass: (ObjectConstructor | StringConstructor)[];
4772
+ labelStyle: (ObjectConstructor | StringConstructor)[];
4773
+ labelClass: (ObjectConstructor | StringConstructor)[];
4774
+ errorStyle: (ObjectConstructor | StringConstructor)[];
4775
+ errorClass: (ObjectConstructor | StringConstructor)[];
4748
4776
  }>> & Readonly<{}>, {
4749
4777
  tag: string;
4750
4778
  border: boolean;
@@ -4807,6 +4835,8 @@ contentStyle: (ObjectConstructor | StringConstructor)[];
4807
4835
  contentClass: (ObjectConstructor | StringConstructor)[];
4808
4836
  labelStyle: (ObjectConstructor | StringConstructor)[];
4809
4837
  labelClass: (ObjectConstructor | StringConstructor)[];
4838
+ errorStyle: (ObjectConstructor | StringConstructor)[];
4839
+ errorClass: (ObjectConstructor | StringConstructor)[];
4810
4840
  }>, () => JSX_2.Element | (VNode<RendererNode, RendererElement, {
4811
4841
  [key: string]: any;
4812
4842
  }>[] | undefined)[], {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
@@ -4860,6 +4890,8 @@ contentStyle: (ObjectConstructor | StringConstructor)[];
4860
4890
  contentClass: (ObjectConstructor | StringConstructor)[];
4861
4891
  labelStyle: (ObjectConstructor | StringConstructor)[];
4862
4892
  labelClass: (ObjectConstructor | StringConstructor)[];
4893
+ errorStyle: (ObjectConstructor | StringConstructor)[];
4894
+ errorClass: (ObjectConstructor | StringConstructor)[];
4863
4895
  }>> & Readonly<{}>, {
4864
4896
  label: string;
4865
4897
  styleless: boolean;
@@ -8042,6 +8074,8 @@ tag: string;
8042
8074
  height: string | number;
8043
8075
  always: boolean;
8044
8076
  wrapperStyle: StyleValue;
8077
+ contentStyle: StyleValue;
8078
+ contentClass: StyleValue;
8045
8079
  thumbMinSize: number;
8046
8080
  native: boolean;
8047
8081
  autoResize: boolean;
@@ -8049,8 +8083,6 @@ trackOffsetX: number[];
8049
8083
  trackOffsetY: number[];
8050
8084
  maxHeight: string | number;
8051
8085
  wrapperClass: StyleValue;
8052
- contentStyle: StyleValue;
8053
- contentClass: StyleValue;
8054
8086
  showBar: boolean;
8055
8087
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
8056
8088
 
@@ -11839,6 +11871,12 @@ declare const props_3: {
11839
11871
  type: BooleanConstructor;
11840
11872
  default: boolean;
11841
11873
  };
11874
+ contentStyle: (ObjectConstructor | StringConstructor)[];
11875
+ contentClass: (ObjectConstructor | StringConstructor)[];
11876
+ labelStyle: (ObjectConstructor | StringConstructor)[];
11877
+ labelClass: (ObjectConstructor | StringConstructor)[];
11878
+ errorStyle: (ObjectConstructor | StringConstructor)[];
11879
+ errorClass: (ObjectConstructor | StringConstructor)[];
11842
11880
  };
11843
11881
 
11844
11882
  declare type Props_4 = ExtractPropTypes<typeof props_4>;
@@ -12630,6 +12668,8 @@ tag: string;
12630
12668
  height: string | number;
12631
12669
  always: boolean;
12632
12670
  wrapperStyle: StyleValue;
12671
+ contentStyle: StyleValue;
12672
+ contentClass: StyleValue;
12633
12673
  thumbMinSize: number;
12634
12674
  native: boolean;
12635
12675
  autoResize: boolean;
@@ -12637,8 +12677,6 @@ trackOffsetX: number[];
12637
12677
  trackOffsetY: number[];
12638
12678
  maxHeight: string | number;
12639
12679
  wrapperClass: StyleValue;
12640
- contentStyle: StyleValue;
12641
- contentClass: StyleValue;
12642
12680
  showBar: boolean;
12643
12681
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
12644
12682
 
@@ -12791,6 +12829,8 @@ tag: string;
12791
12829
  height: string | number;
12792
12830
  always: boolean;
12793
12831
  wrapperStyle: StyleValue;
12832
+ contentStyle: StyleValue;
12833
+ contentClass: StyleValue;
12794
12834
  thumbMinSize: number;
12795
12835
  native: boolean;
12796
12836
  autoResize: boolean;
@@ -12798,8 +12838,6 @@ trackOffsetX: number[];
12798
12838
  trackOffsetY: number[];
12799
12839
  maxHeight: string | number;
12800
12840
  wrapperClass: StyleValue;
12801
- contentStyle: StyleValue;
12802
- contentClass: StyleValue;
12803
12841
  showBar: boolean;
12804
12842
  stopPropagation: boolean;
12805
12843
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
@@ -19858,7 +19858,14 @@ var VcComponents = (function (exports, vue) {
19858
19858
  styleless: {
19859
19859
  type: Boolean,
19860
19860
  default: false
19861
- }
19861
+ },
19862
+ // 给formItem统一注入
19863
+ contentStyle: [Object, String],
19864
+ contentClass: [Object, String],
19865
+ labelStyle: [Object, String],
19866
+ labelClass: [Object, String],
19867
+ errorStyle: [Object, String],
19868
+ errorClass: [Object, String]
19862
19869
  };
19863
19870
 
19864
19871
  const useForm = (expose, options = {}) => {
@@ -20018,7 +20025,9 @@ var VcComponents = (function (exports, vue) {
20018
20025
  contentStyle: [Object, String],
20019
20026
  contentClass: [Object, String],
20020
20027
  labelStyle: [Object, String],
20021
- labelClass: [Object, String]
20028
+ labelClass: [Object, String],
20029
+ errorStyle: [Object, String],
20030
+ errorClass: [Object, String]
20022
20031
  };
20023
20032
 
20024
20033
  class Validator {
@@ -20232,6 +20241,7 @@ var VcComponents = (function (exports, vue) {
20232
20241
  width: labelPosition.value !== "top" && labelWidth && labelWidth > 0 ? `${labelWidth}px` : "auto",
20233
20242
  textAlign: labelPosition.value === "top" ? "left" : labelPosition.value
20234
20243
  },
20244
+ form.props.labelStyle,
20235
20245
  props.labelStyle
20236
20246
  ];
20237
20247
  });
@@ -20242,9 +20252,22 @@ var VcComponents = (function (exports, vue) {
20242
20252
  marginLeft: !hasLabel.value && isNest.value ? 0 : labelWidth && labelWidth > 0 ? `${labelWidth}px` : "unset",
20243
20253
  marginBottom: isNest.value && !isNestLast.value ? `20px` : 0
20244
20254
  },
20255
+ form.props.contentStyle,
20245
20256
  props.contentStyle
20246
20257
  ];
20247
20258
  });
20259
+ const errorStyle = vue.computed(() => {
20260
+ return [form.props.errorStyle, props.errorStyle];
20261
+ });
20262
+ const labelClass = vue.computed(() => {
20263
+ return [form.props.labelClass, props.labelClass];
20264
+ });
20265
+ const contentClass = vue.computed(() => {
20266
+ return [form.props.contentClass, props.contentClass];
20267
+ });
20268
+ const errorClass = vue.computed(() => {
20269
+ return [form.props.errorClass, props.errorClass];
20270
+ });
20248
20271
  const isStyleless = vue.computed(() => {
20249
20272
  return props.styleless || form.props.styleless;
20250
20273
  });
@@ -20407,6 +20430,10 @@ var VcComponents = (function (exports, vue) {
20407
20430
  classes,
20408
20431
  labelStyle,
20409
20432
  contentStyle,
20433
+ errorStyle,
20434
+ labelClass,
20435
+ contentClass,
20436
+ errorClass,
20410
20437
  showError,
20411
20438
  labelPosition
20412
20439
  };
@@ -20429,6 +20456,10 @@ var VcComponents = (function (exports, vue) {
20429
20456
  classes,
20430
20457
  labelStyle,
20431
20458
  contentStyle,
20459
+ errorStyle,
20460
+ labelClass,
20461
+ contentClass,
20462
+ errorClass,
20432
20463
  showError,
20433
20464
  validateMessage
20434
20465
  } = it;
@@ -20442,27 +20473,30 @@ var VcComponents = (function (exports, vue) {
20442
20473
  show: showError.value,
20443
20474
  nest: isNest.value,
20444
20475
  message: validateMessage.value,
20445
- class: errorColorClass
20476
+ class: [errorColorClass, ...errorClass.value],
20477
+ style: errorStyle.value
20446
20478
  })];
20447
20479
  return vue.createVNode("div", {
20448
20480
  "class": ['vc-form-item', classes.value]
20449
20481
  }, [(label || slots.label) && vue.createVNode("div", {
20450
20482
  "style": labelStyle.value,
20451
- "class": ['vc-form-item__label', props.labelClass],
20483
+ "class": ['vc-form-item__label', ...labelClass.value],
20452
20484
  "for": labelFor
20453
20485
  }, [vue.createVNode("label", null, [label || slots.label?.()])]), vue.createVNode("div", {
20454
20486
  "class": "vc-form-item__wrapper"
20455
20487
  }, [vue.createVNode("div", {
20456
- "class": ['vc-form-item__content', props.contentClass],
20488
+ "class": ['vc-form-item__content', ...contentClass.value],
20457
20489
  "style": contentStyle.value
20458
20490
  }, [slots.default?.(), slots.error ? slots.error({
20459
20491
  show: showError.value,
20460
20492
  nest: isNest.value,
20461
20493
  message: validateMessage.value,
20462
- class: errorColorClass
20494
+ class: [errorColorClass, ...errorClass.value],
20495
+ style: errorStyle.value
20463
20496
  }) : vue.createVNode(TransitionFade, null, {
20464
20497
  default: () => [vue.withDirectives(vue.createVNode("div", {
20465
- "class": ['vc-form-item__tip', isNest.value ? 'is-nest' : '', errorColorClass]
20498
+ "class": ['vc-form-item__tip', isNest.value ? 'is-nest' : '', errorColorClass, ...errorClass.value],
20499
+ "style": [errorStyle.value]
20466
20500
  }, [validateMessage.value]), [[vue.vShow, showError.value]])]
20467
20501
  })])])]);
20468
20502
  };
@@ -20528,6 +20562,10 @@ var VcComponents = (function (exports, vue) {
20528
20562
  classes,
20529
20563
  labelStyle,
20530
20564
  contentStyle,
20565
+ errorStyle,
20566
+ labelClass,
20567
+ contentClass,
20568
+ errorClass,
20531
20569
  isNest,
20532
20570
  showError,
20533
20571
  validateMessage
@@ -20543,7 +20581,8 @@ var VcComponents = (function (exports, vue) {
20543
20581
  show: showError.value,
20544
20582
  nest: isNest.value,
20545
20583
  message: validateMessage.value,
20546
- class: errorColorClass
20584
+ class: [errorColorClass, ...errorClass.value],
20585
+ style: errorStyle.value
20547
20586
  })];
20548
20587
  return vue.createVNode("div", {
20549
20588
  "style": {
@@ -20555,14 +20594,15 @@ var VcComponents = (function (exports, vue) {
20555
20594
  }, [(props.label || slots.label) && vue.createVNode("label", {
20556
20595
  "for": labelFor,
20557
20596
  "style": labelStyle.value,
20558
- "class": "vcm-form-item__label"
20597
+ "class": ['vcm-form-item__label', ...labelClass.value]
20559
20598
  }, [label || slots.label?.()]), vue.createVNode("div", {
20560
20599
  "style": contentStyle.value,
20561
- "class": "vcm-form-item__content"
20600
+ "class": ['vcm-form-item__content', ...contentClass.value]
20562
20601
  }, [slots.default?.(), showMessage && showError.value && vue.createVNode("div", {
20563
20602
  "class": [{
20564
20603
  'is-nest': isNest.value
20565
- }, errorColorClass]
20604
+ }, errorColorClass, ...errorClass.value],
20605
+ "style": errorStyle.value
20566
20606
  }, [slots.error ? slots.error({
20567
20607
  message: validateMessage.value
20568
20608
  }) : validateMessage.value])])])]);
@@ -25747,6 +25787,7 @@ var VcComponents = (function (exports, vue) {
25747
25787
  });
25748
25788
  const classes = vue.computed(() => {
25749
25789
  return {
25790
+ "is-disabled": props.disabled,
25750
25791
  "is-loading": isLoading.value,
25751
25792
  "is-checked": checked.value
25752
25793
  };
package/dist/index.js CHANGED
@@ -11425,7 +11425,14 @@ const props$L = {
11425
11425
  styleless: {
11426
11426
  type: Boolean,
11427
11427
  default: false
11428
- }
11428
+ },
11429
+ // 给formItem统一注入
11430
+ contentStyle: [Object, String],
11431
+ contentClass: [Object, String],
11432
+ labelStyle: [Object, String],
11433
+ labelClass: [Object, String],
11434
+ errorStyle: [Object, String],
11435
+ errorClass: [Object, String]
11429
11436
  };
11430
11437
 
11431
11438
  const useForm = (expose, options = {}) => {
@@ -11585,7 +11592,9 @@ const props$K = {
11585
11592
  contentStyle: [Object, String],
11586
11593
  contentClass: [Object, String],
11587
11594
  labelStyle: [Object, String],
11588
- labelClass: [Object, String]
11595
+ labelClass: [Object, String],
11596
+ errorStyle: [Object, String],
11597
+ errorClass: [Object, String]
11589
11598
  };
11590
11599
 
11591
11600
  const filterEmpty = (val) => {
@@ -11667,6 +11676,7 @@ const useFormItem = (expose) => {
11667
11676
  width: labelPosition.value !== "top" && labelWidth && labelWidth > 0 ? `${labelWidth}px` : "auto",
11668
11677
  textAlign: labelPosition.value === "top" ? "left" : labelPosition.value
11669
11678
  },
11679
+ form.props.labelStyle,
11670
11680
  props.labelStyle
11671
11681
  ];
11672
11682
  });
@@ -11677,9 +11687,22 @@ const useFormItem = (expose) => {
11677
11687
  marginLeft: !hasLabel.value && isNest.value ? 0 : labelWidth && labelWidth > 0 ? `${labelWidth}px` : "unset",
11678
11688
  marginBottom: isNest.value && !isNestLast.value ? `20px` : 0
11679
11689
  },
11690
+ form.props.contentStyle,
11680
11691
  props.contentStyle
11681
11692
  ];
11682
11693
  });
11694
+ const errorStyle = computed(() => {
11695
+ return [form.props.errorStyle, props.errorStyle];
11696
+ });
11697
+ const labelClass = computed(() => {
11698
+ return [form.props.labelClass, props.labelClass];
11699
+ });
11700
+ const contentClass = computed(() => {
11701
+ return [form.props.contentClass, props.contentClass];
11702
+ });
11703
+ const errorClass = computed(() => {
11704
+ return [form.props.errorClass, props.errorClass];
11705
+ });
11683
11706
  const isStyleless = computed(() => {
11684
11707
  return props.styleless || form.props.styleless;
11685
11708
  });
@@ -11842,6 +11865,10 @@ const useFormItem = (expose) => {
11842
11865
  classes,
11843
11866
  labelStyle,
11844
11867
  contentStyle,
11868
+ errorStyle,
11869
+ labelClass,
11870
+ contentClass,
11871
+ errorClass,
11845
11872
  showError,
11846
11873
  labelPosition
11847
11874
  };
@@ -11864,6 +11891,10 @@ const FormItem = /* @__PURE__ */ defineComponent({
11864
11891
  classes,
11865
11892
  labelStyle,
11866
11893
  contentStyle,
11894
+ errorStyle,
11895
+ labelClass,
11896
+ contentClass,
11897
+ errorClass,
11867
11898
  showError,
11868
11899
  validateMessage
11869
11900
  } = it;
@@ -11877,27 +11908,30 @@ const FormItem = /* @__PURE__ */ defineComponent({
11877
11908
  show: showError.value,
11878
11909
  nest: isNest.value,
11879
11910
  message: validateMessage.value,
11880
- class: errorColorClass
11911
+ class: [errorColorClass, ...errorClass.value],
11912
+ style: errorStyle.value
11881
11913
  })];
11882
11914
  return createVNode("div", {
11883
11915
  "class": ['vc-form-item', classes.value]
11884
11916
  }, [(label || slots.label) && createVNode("div", {
11885
11917
  "style": labelStyle.value,
11886
- "class": ['vc-form-item__label', props.labelClass],
11918
+ "class": ['vc-form-item__label', ...labelClass.value],
11887
11919
  "for": labelFor
11888
11920
  }, [createVNode("label", null, [label || slots.label?.()])]), createVNode("div", {
11889
11921
  "class": "vc-form-item__wrapper"
11890
11922
  }, [createVNode("div", {
11891
- "class": ['vc-form-item__content', props.contentClass],
11923
+ "class": ['vc-form-item__content', ...contentClass.value],
11892
11924
  "style": contentStyle.value
11893
11925
  }, [slots.default?.(), slots.error ? slots.error({
11894
11926
  show: showError.value,
11895
11927
  nest: isNest.value,
11896
11928
  message: validateMessage.value,
11897
- class: errorColorClass
11929
+ class: [errorColorClass, ...errorClass.value],
11930
+ style: errorStyle.value
11898
11931
  }) : createVNode(TransitionFade, null, {
11899
11932
  default: () => [withDirectives(createVNode("div", {
11900
- "class": ['vc-form-item__tip', isNest.value ? 'is-nest' : '', errorColorClass]
11933
+ "class": ['vc-form-item__tip', isNest.value ? 'is-nest' : '', errorColorClass, ...errorClass.value],
11934
+ "style": [errorStyle.value]
11901
11935
  }, [validateMessage.value]), [[vShow, showError.value]])]
11902
11936
  })])])]);
11903
11937
  };
@@ -11963,6 +11997,10 @@ const MFormItem = /* @__PURE__ */ defineComponent({
11963
11997
  classes,
11964
11998
  labelStyle,
11965
11999
  contentStyle,
12000
+ errorStyle,
12001
+ labelClass,
12002
+ contentClass,
12003
+ errorClass,
11966
12004
  isNest,
11967
12005
  showError,
11968
12006
  validateMessage
@@ -11978,7 +12016,8 @@ const MFormItem = /* @__PURE__ */ defineComponent({
11978
12016
  show: showError.value,
11979
12017
  nest: isNest.value,
11980
12018
  message: validateMessage.value,
11981
- class: errorColorClass
12019
+ class: [errorColorClass, ...errorClass.value],
12020
+ style: errorStyle.value
11982
12021
  })];
11983
12022
  return createVNode("div", {
11984
12023
  "style": {
@@ -11990,14 +12029,15 @@ const MFormItem = /* @__PURE__ */ defineComponent({
11990
12029
  }, [(props.label || slots.label) && createVNode("label", {
11991
12030
  "for": labelFor,
11992
12031
  "style": labelStyle.value,
11993
- "class": "vcm-form-item__label"
12032
+ "class": ['vcm-form-item__label', ...labelClass.value]
11994
12033
  }, [label || slots.label?.()]), createVNode("div", {
11995
12034
  "style": contentStyle.value,
11996
- "class": "vcm-form-item__content"
12035
+ "class": ['vcm-form-item__content', ...contentClass.value]
11997
12036
  }, [slots.default?.(), showMessage && showError.value && createVNode("div", {
11998
12037
  "class": [{
11999
12038
  'is-nest': isNest.value
12000
- }, errorColorClass]
12039
+ }, errorColorClass, ...errorClass.value],
12040
+ "style": errorStyle.value
12001
12041
  }, [slots.error ? slots.error({
12002
12042
  message: validateMessage.value
12003
12043
  }) : validateMessage.value])])])]);
@@ -16694,6 +16734,7 @@ const useSwitch = (expose) => {
16694
16734
  });
16695
16735
  const classes = computed(() => {
16696
16736
  return {
16737
+ "is-disabled": props.disabled,
16697
16738
  "is-loading": isLoading.value,
16698
16739
  "is-checked": checked.value
16699
16740
  };