@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 CHANGED
@@ -296,7 +296,9 @@ const Affix = /* @__PURE__ */ vue.defineComponent({
296
296
  [`vc-affix__${props.fixed ? 'fixed' : 'absolute'}`]: isActive.value
297
297
  },
298
298
  "style": contentStyle.value
299
- }, [slots?.default?.()])]);
299
+ }, [slots?.default?.({
300
+ active: isActive.value
301
+ })])]);
300
302
  };
301
303
  }
302
304
  });
@@ -11445,7 +11447,14 @@ const props$L = {
11445
11447
  styleless: {
11446
11448
  type: Boolean,
11447
11449
  default: false
11448
- }
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]
11449
11458
  };
11450
11459
 
11451
11460
  const useForm = (expose, options = {}) => {
@@ -11605,7 +11614,9 @@ const props$K = {
11605
11614
  contentStyle: [Object, String],
11606
11615
  contentClass: [Object, String],
11607
11616
  labelStyle: [Object, String],
11608
- labelClass: [Object, String]
11617
+ labelClass: [Object, String],
11618
+ errorStyle: [Object, String],
11619
+ errorClass: [Object, String]
11609
11620
  };
11610
11621
 
11611
11622
  const filterEmpty = (val) => {
@@ -11687,6 +11698,7 @@ const useFormItem = (expose) => {
11687
11698
  width: labelPosition.value !== "top" && labelWidth && labelWidth > 0 ? `${labelWidth}px` : "auto",
11688
11699
  textAlign: labelPosition.value === "top" ? "left" : labelPosition.value
11689
11700
  },
11701
+ form.props.labelStyle,
11690
11702
  props.labelStyle
11691
11703
  ];
11692
11704
  });
@@ -11697,9 +11709,22 @@ const useFormItem = (expose) => {
11697
11709
  marginLeft: !hasLabel.value && isNest.value ? 0 : labelWidth && labelWidth > 0 ? `${labelWidth}px` : "unset",
11698
11710
  marginBottom: isNest.value && !isNestLast.value ? `20px` : 0
11699
11711
  },
11712
+ form.props.contentStyle,
11700
11713
  props.contentStyle
11701
11714
  ];
11702
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
+ });
11703
11728
  const isStyleless = vue.computed(() => {
11704
11729
  return props.styleless || form.props.styleless;
11705
11730
  });
@@ -11862,6 +11887,10 @@ const useFormItem = (expose) => {
11862
11887
  classes,
11863
11888
  labelStyle,
11864
11889
  contentStyle,
11890
+ errorStyle,
11891
+ labelClass,
11892
+ contentClass,
11893
+ errorClass,
11865
11894
  showError,
11866
11895
  labelPosition
11867
11896
  };
@@ -11884,6 +11913,10 @@ const FormItem = /* @__PURE__ */ vue.defineComponent({
11884
11913
  classes,
11885
11914
  labelStyle,
11886
11915
  contentStyle,
11916
+ errorStyle,
11917
+ labelClass,
11918
+ contentClass,
11919
+ errorClass,
11887
11920
  showError,
11888
11921
  validateMessage
11889
11922
  } = it;
@@ -11897,27 +11930,30 @@ const FormItem = /* @__PURE__ */ vue.defineComponent({
11897
11930
  show: showError.value,
11898
11931
  nest: isNest.value,
11899
11932
  message: validateMessage.value,
11900
- class: errorColorClass
11933
+ class: [errorColorClass, ...errorClass.value],
11934
+ style: errorStyle.value
11901
11935
  })];
11902
11936
  return vue.createVNode("div", {
11903
11937
  "class": ['vc-form-item', classes.value]
11904
11938
  }, [(label || slots.label) && vue.createVNode("div", {
11905
11939
  "style": labelStyle.value,
11906
- "class": ['vc-form-item__label', props.labelClass],
11940
+ "class": ['vc-form-item__label', ...labelClass.value],
11907
11941
  "for": labelFor
11908
11942
  }, [vue.createVNode("label", null, [label || slots.label?.()])]), vue.createVNode("div", {
11909
11943
  "class": "vc-form-item__wrapper"
11910
11944
  }, [vue.createVNode("div", {
11911
- "class": ['vc-form-item__content', props.contentClass],
11945
+ "class": ['vc-form-item__content', ...contentClass.value],
11912
11946
  "style": contentStyle.value
11913
11947
  }, [slots.default?.(), slots.error ? slots.error({
11914
11948
  show: showError.value,
11915
11949
  nest: isNest.value,
11916
11950
  message: validateMessage.value,
11917
- class: errorColorClass
11951
+ class: [errorColorClass, ...errorClass.value],
11952
+ style: errorStyle.value
11918
11953
  }) : vue.createVNode(TransitionFade, null, {
11919
11954
  default: () => [vue.withDirectives(vue.createVNode("div", {
11920
- "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]
11921
11957
  }, [validateMessage.value]), [[vue.vShow, showError.value]])]
11922
11958
  })])])]);
11923
11959
  };
@@ -11983,6 +12019,10 @@ const MFormItem = /* @__PURE__ */ vue.defineComponent({
11983
12019
  classes,
11984
12020
  labelStyle,
11985
12021
  contentStyle,
12022
+ errorStyle,
12023
+ labelClass,
12024
+ contentClass,
12025
+ errorClass,
11986
12026
  isNest,
11987
12027
  showError,
11988
12028
  validateMessage
@@ -11998,7 +12038,8 @@ const MFormItem = /* @__PURE__ */ vue.defineComponent({
11998
12038
  show: showError.value,
11999
12039
  nest: isNest.value,
12000
12040
  message: validateMessage.value,
12001
- class: errorColorClass
12041
+ class: [errorColorClass, ...errorClass.value],
12042
+ style: errorStyle.value
12002
12043
  })];
12003
12044
  return vue.createVNode("div", {
12004
12045
  "style": {
@@ -12010,14 +12051,15 @@ const MFormItem = /* @__PURE__ */ vue.defineComponent({
12010
12051
  }, [(props.label || slots.label) && vue.createVNode("label", {
12011
12052
  "for": labelFor,
12012
12053
  "style": labelStyle.value,
12013
- "class": "vcm-form-item__label"
12054
+ "class": ['vcm-form-item__label', ...labelClass.value]
12014
12055
  }, [label || slots.label?.()]), vue.createVNode("div", {
12015
12056
  "style": contentStyle.value,
12016
- "class": "vcm-form-item__content"
12057
+ "class": ['vcm-form-item__content', ...contentClass.value]
12017
12058
  }, [slots.default?.(), showMessage && showError.value && vue.createVNode("div", {
12018
12059
  "class": [{
12019
12060
  'is-nest': isNest.value
12020
- }, errorColorClass]
12061
+ }, errorColorClass, ...errorClass.value],
12062
+ "style": errorStyle.value
12021
12063
  }, [slots.error ? slots.error({
12022
12064
  message: validateMessage.value
12023
12065
  }) : validateMessage.value])])])]);
@@ -16714,6 +16756,7 @@ const useSwitch = (expose) => {
16714
16756
  });
16715
16757
  const classes = vue.computed(() => {
16716
16758
  return {
16759
+ "is-disabled": props.disabled,
16717
16760
  "is-loading": isLoading.value,
16718
16761
  "is-checked": checked.value
16719
16762
  };
@@ -20001,6 +20044,7 @@ const useTabs = (options = {}) => {
20001
20044
  emit("update:modelValue", currentValue.value);
20002
20045
  emit("change", currentValue.value);
20003
20046
  emit("click", currentValue.value);
20047
+ nav.anchor && document.querySelector(nav.anchor)?.scrollIntoView?.({ behavior: "smooth" });
20004
20048
  };
20005
20049
  const handleResize = () => {
20006
20050
  if (instance.isUnmounted) return;
@@ -20260,6 +20304,9 @@ const props$b = {
20260
20304
  type: [String, Function],
20261
20305
  default: ""
20262
20306
  },
20307
+ anchor: {
20308
+ type: String
20309
+ },
20263
20310
  /**
20264
20311
  * 服务端渲染时,lazy设置为false,可以把内容渲染出来;
20265
20312
  * 不能设置为!IS_SERVER, 会影响客服端激活,不一样会存在问题
@@ -20716,6 +20763,10 @@ const props$9 = {
20716
20763
  default: (props$) => {
20717
20764
  return props$.value;
20718
20765
  }
20766
+ },
20767
+ theme: {
20768
+ type: String,
20769
+ default: "dark"
20719
20770
  }
20720
20771
  };
20721
20772
 
@@ -20768,7 +20819,7 @@ const Text = /* @__PURE__ */ vue.defineComponent({
20768
20819
  // 确保不重复创建
20769
20820
  triggerEl: e.target,
20770
20821
  hover: true,
20771
- theme: 'dark',
20822
+ theme: props.theme,
20772
20823
  placement: props.placement,
20773
20824
  portalClass: props.portalClass,
20774
20825
  portalStyle: [props.portalStyle || `width: ${e.target.clientWidth}px`, 'word-break: break-all'],
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
 
@@ -8817,6 +8849,9 @@ label: {
8817
8849
  type: (StringConstructor | FunctionConstructor)[];
8818
8850
  default: string;
8819
8851
  };
8852
+ anchor: {
8853
+ type: StringConstructor;
8854
+ };
8820
8855
  lazy: {
8821
8856
  type: BooleanConstructor;
8822
8857
  default: boolean;
@@ -8834,6 +8869,9 @@ label: {
8834
8869
  type: (StringConstructor | FunctionConstructor)[];
8835
8870
  default: string;
8836
8871
  };
8872
+ anchor: {
8873
+ type: StringConstructor;
8874
+ };
8837
8875
  lazy: {
8838
8876
  type: BooleanConstructor;
8839
8877
  default: boolean;
@@ -8945,6 +8983,10 @@ renderRow: {
8945
8983
  type: FunctionConstructor;
8946
8984
  default: (props$: any) => any;
8947
8985
  };
8986
+ theme: {
8987
+ type: StringConstructor;
8988
+ default: string;
8989
+ };
8948
8990
  }>, () => JSX_2.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
8949
8991
  tag: {
8950
8992
  type: StringConstructor;
@@ -8980,12 +9022,17 @@ renderRow: {
8980
9022
  type: FunctionConstructor;
8981
9023
  default: (props$: any) => any;
8982
9024
  };
9025
+ theme: {
9026
+ type: StringConstructor;
9027
+ default: string;
9028
+ };
8983
9029
  }>> & Readonly<{}>, {
8984
9030
  resize: number | boolean;
8985
9031
  tag: string;
8986
9032
  line: number;
8987
9033
  placement: string;
8988
9034
  value: string;
9035
+ theme: string;
8989
9036
  indent: number;
8990
9037
  suffix: string;
8991
9038
  renderRow: Function;
@@ -11824,6 +11871,12 @@ declare const props_3: {
11824
11871
  type: BooleanConstructor;
11825
11872
  default: boolean;
11826
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)[];
11827
11880
  };
11828
11881
 
11829
11882
  declare type Props_4 = ExtractPropTypes<typeof props_4>;
@@ -12615,6 +12668,8 @@ tag: string;
12615
12668
  height: string | number;
12616
12669
  always: boolean;
12617
12670
  wrapperStyle: StyleValue;
12671
+ contentStyle: StyleValue;
12672
+ contentClass: StyleValue;
12618
12673
  thumbMinSize: number;
12619
12674
  native: boolean;
12620
12675
  autoResize: boolean;
@@ -12622,8 +12677,6 @@ trackOffsetX: number[];
12622
12677
  trackOffsetY: number[];
12623
12678
  maxHeight: string | number;
12624
12679
  wrapperClass: StyleValue;
12625
- contentStyle: StyleValue;
12626
- contentClass: StyleValue;
12627
12680
  showBar: boolean;
12628
12681
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
12629
12682
 
@@ -12776,6 +12829,8 @@ tag: string;
12776
12829
  height: string | number;
12777
12830
  always: boolean;
12778
12831
  wrapperStyle: StyleValue;
12832
+ contentStyle: StyleValue;
12833
+ contentClass: StyleValue;
12779
12834
  thumbMinSize: number;
12780
12835
  native: boolean;
12781
12836
  autoResize: boolean;
@@ -12783,8 +12838,6 @@ trackOffsetX: number[];
12783
12838
  trackOffsetY: number[];
12784
12839
  maxHeight: string | number;
12785
12840
  wrapperClass: StyleValue;
12786
- contentStyle: StyleValue;
12787
- contentClass: StyleValue;
12788
12841
  showBar: boolean;
12789
12842
  stopPropagation: boolean;
12790
12843
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
@@ -13480,6 +13533,9 @@ label: {
13480
13533
  type: (StringConstructor | FunctionConstructor)[];
13481
13534
  default: string;
13482
13535
  };
13536
+ anchor: {
13537
+ type: StringConstructor;
13538
+ };
13483
13539
  lazy: {
13484
13540
  type: BooleanConstructor;
13485
13541
  default: boolean;
@@ -13497,6 +13553,9 @@ label: {
13497
13553
  type: (StringConstructor | FunctionConstructor)[];
13498
13554
  default: string;
13499
13555
  };
13556
+ anchor: {
13557
+ type: StringConstructor;
13558
+ };
13500
13559
  lazy: {
13501
13560
  type: BooleanConstructor;
13502
13561
  default: boolean;
@@ -13608,6 +13667,10 @@ renderRow: {
13608
13667
  type: FunctionConstructor;
13609
13668
  default: (props$: any) => any;
13610
13669
  };
13670
+ theme: {
13671
+ type: StringConstructor;
13672
+ default: string;
13673
+ };
13611
13674
  }>, () => JSX_2.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
13612
13675
  tag: {
13613
13676
  type: StringConstructor;
@@ -13643,12 +13706,17 @@ renderRow: {
13643
13706
  type: FunctionConstructor;
13644
13707
  default: (props$: any) => any;
13645
13708
  };
13709
+ theme: {
13710
+ type: StringConstructor;
13711
+ default: string;
13712
+ };
13646
13713
  }>> & Readonly<{}>, {
13647
13714
  resize: number | boolean;
13648
13715
  tag: string;
13649
13716
  line: number;
13650
13717
  placement: string;
13651
13718
  value: string;
13719
+ theme: string;
13652
13720
  indent: number;
13653
13721
  suffix: string;
13654
13722
  renderRow: Function;
@@ -474,7 +474,9 @@ var VcComponents = (function (exports, vue) {
474
474
  [`vc-affix__${props.fixed ? 'fixed' : 'absolute'}`]: isActive.value
475
475
  },
476
476
  "style": contentStyle.value
477
- }, [slots?.default?.()])]);
477
+ }, [slots?.default?.({
478
+ active: isActive.value
479
+ })])]);
478
480
  };
479
481
  }
480
482
  });
@@ -19856,7 +19858,14 @@ var VcComponents = (function (exports, vue) {
19856
19858
  styleless: {
19857
19859
  type: Boolean,
19858
19860
  default: false
19859
- }
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]
19860
19869
  };
19861
19870
 
19862
19871
  const useForm = (expose, options = {}) => {
@@ -20016,7 +20025,9 @@ var VcComponents = (function (exports, vue) {
20016
20025
  contentStyle: [Object, String],
20017
20026
  contentClass: [Object, String],
20018
20027
  labelStyle: [Object, String],
20019
- labelClass: [Object, String]
20028
+ labelClass: [Object, String],
20029
+ errorStyle: [Object, String],
20030
+ errorClass: [Object, String]
20020
20031
  };
20021
20032
 
20022
20033
  class Validator {
@@ -20230,6 +20241,7 @@ var VcComponents = (function (exports, vue) {
20230
20241
  width: labelPosition.value !== "top" && labelWidth && labelWidth > 0 ? `${labelWidth}px` : "auto",
20231
20242
  textAlign: labelPosition.value === "top" ? "left" : labelPosition.value
20232
20243
  },
20244
+ form.props.labelStyle,
20233
20245
  props.labelStyle
20234
20246
  ];
20235
20247
  });
@@ -20240,9 +20252,22 @@ var VcComponents = (function (exports, vue) {
20240
20252
  marginLeft: !hasLabel.value && isNest.value ? 0 : labelWidth && labelWidth > 0 ? `${labelWidth}px` : "unset",
20241
20253
  marginBottom: isNest.value && !isNestLast.value ? `20px` : 0
20242
20254
  },
20255
+ form.props.contentStyle,
20243
20256
  props.contentStyle
20244
20257
  ];
20245
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
+ });
20246
20271
  const isStyleless = vue.computed(() => {
20247
20272
  return props.styleless || form.props.styleless;
20248
20273
  });
@@ -20405,6 +20430,10 @@ var VcComponents = (function (exports, vue) {
20405
20430
  classes,
20406
20431
  labelStyle,
20407
20432
  contentStyle,
20433
+ errorStyle,
20434
+ labelClass,
20435
+ contentClass,
20436
+ errorClass,
20408
20437
  showError,
20409
20438
  labelPosition
20410
20439
  };
@@ -20427,6 +20456,10 @@ var VcComponents = (function (exports, vue) {
20427
20456
  classes,
20428
20457
  labelStyle,
20429
20458
  contentStyle,
20459
+ errorStyle,
20460
+ labelClass,
20461
+ contentClass,
20462
+ errorClass,
20430
20463
  showError,
20431
20464
  validateMessage
20432
20465
  } = it;
@@ -20440,27 +20473,30 @@ var VcComponents = (function (exports, vue) {
20440
20473
  show: showError.value,
20441
20474
  nest: isNest.value,
20442
20475
  message: validateMessage.value,
20443
- class: errorColorClass
20476
+ class: [errorColorClass, ...errorClass.value],
20477
+ style: errorStyle.value
20444
20478
  })];
20445
20479
  return vue.createVNode("div", {
20446
20480
  "class": ['vc-form-item', classes.value]
20447
20481
  }, [(label || slots.label) && vue.createVNode("div", {
20448
20482
  "style": labelStyle.value,
20449
- "class": ['vc-form-item__label', props.labelClass],
20483
+ "class": ['vc-form-item__label', ...labelClass.value],
20450
20484
  "for": labelFor
20451
20485
  }, [vue.createVNode("label", null, [label || slots.label?.()])]), vue.createVNode("div", {
20452
20486
  "class": "vc-form-item__wrapper"
20453
20487
  }, [vue.createVNode("div", {
20454
- "class": ['vc-form-item__content', props.contentClass],
20488
+ "class": ['vc-form-item__content', ...contentClass.value],
20455
20489
  "style": contentStyle.value
20456
20490
  }, [slots.default?.(), slots.error ? slots.error({
20457
20491
  show: showError.value,
20458
20492
  nest: isNest.value,
20459
20493
  message: validateMessage.value,
20460
- class: errorColorClass
20494
+ class: [errorColorClass, ...errorClass.value],
20495
+ style: errorStyle.value
20461
20496
  }) : vue.createVNode(TransitionFade, null, {
20462
20497
  default: () => [vue.withDirectives(vue.createVNode("div", {
20463
- "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]
20464
20500
  }, [validateMessage.value]), [[vue.vShow, showError.value]])]
20465
20501
  })])])]);
20466
20502
  };
@@ -20526,6 +20562,10 @@ var VcComponents = (function (exports, vue) {
20526
20562
  classes,
20527
20563
  labelStyle,
20528
20564
  contentStyle,
20565
+ errorStyle,
20566
+ labelClass,
20567
+ contentClass,
20568
+ errorClass,
20529
20569
  isNest,
20530
20570
  showError,
20531
20571
  validateMessage
@@ -20541,7 +20581,8 @@ var VcComponents = (function (exports, vue) {
20541
20581
  show: showError.value,
20542
20582
  nest: isNest.value,
20543
20583
  message: validateMessage.value,
20544
- class: errorColorClass
20584
+ class: [errorColorClass, ...errorClass.value],
20585
+ style: errorStyle.value
20545
20586
  })];
20546
20587
  return vue.createVNode("div", {
20547
20588
  "style": {
@@ -20553,14 +20594,15 @@ var VcComponents = (function (exports, vue) {
20553
20594
  }, [(props.label || slots.label) && vue.createVNode("label", {
20554
20595
  "for": labelFor,
20555
20596
  "style": labelStyle.value,
20556
- "class": "vcm-form-item__label"
20597
+ "class": ['vcm-form-item__label', ...labelClass.value]
20557
20598
  }, [label || slots.label?.()]), vue.createVNode("div", {
20558
20599
  "style": contentStyle.value,
20559
- "class": "vcm-form-item__content"
20600
+ "class": ['vcm-form-item__content', ...contentClass.value]
20560
20601
  }, [slots.default?.(), showMessage && showError.value && vue.createVNode("div", {
20561
20602
  "class": [{
20562
20603
  'is-nest': isNest.value
20563
- }, errorColorClass]
20604
+ }, errorColorClass, ...errorClass.value],
20605
+ "style": errorStyle.value
20564
20606
  }, [slots.error ? slots.error({
20565
20607
  message: validateMessage.value
20566
20608
  }) : validateMessage.value])])])]);
@@ -25745,6 +25787,7 @@ var VcComponents = (function (exports, vue) {
25745
25787
  });
25746
25788
  const classes = vue.computed(() => {
25747
25789
  return {
25790
+ "is-disabled": props.disabled,
25748
25791
  "is-loading": isLoading.value,
25749
25792
  "is-checked": checked.value
25750
25793
  };
@@ -29032,6 +29075,7 @@ var VcComponents = (function (exports, vue) {
29032
29075
  emit("update:modelValue", currentValue.value);
29033
29076
  emit("change", currentValue.value);
29034
29077
  emit("click", currentValue.value);
29078
+ nav.anchor && document.querySelector(nav.anchor)?.scrollIntoView?.({ behavior: "smooth" });
29035
29079
  };
29036
29080
  const handleResize = () => {
29037
29081
  if (instance.isUnmounted) return;
@@ -29291,6 +29335,9 @@ var VcComponents = (function (exports, vue) {
29291
29335
  type: [String, Function],
29292
29336
  default: ""
29293
29337
  },
29338
+ anchor: {
29339
+ type: String
29340
+ },
29294
29341
  /**
29295
29342
  * 服务端渲染时,lazy设置为false,可以把内容渲染出来;
29296
29343
  * 不能设置为!IS_SERVER, 会影响客服端激活,不一样会存在问题
@@ -29747,6 +29794,10 @@ var VcComponents = (function (exports, vue) {
29747
29794
  default: (props$) => {
29748
29795
  return props$.value;
29749
29796
  }
29797
+ },
29798
+ theme: {
29799
+ type: String,
29800
+ default: "dark"
29750
29801
  }
29751
29802
  };
29752
29803
 
@@ -29799,7 +29850,7 @@ var VcComponents = (function (exports, vue) {
29799
29850
  // 确保不重复创建
29800
29851
  triggerEl: e.target,
29801
29852
  hover: true,
29802
- theme: 'dark',
29853
+ theme: props.theme,
29803
29854
  placement: props.placement,
29804
29855
  portalClass: props.portalClass,
29805
29856
  portalStyle: [props.portalStyle || `width: ${e.target.clientWidth}px`, 'word-break: break-all'],