@deot/vc 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.d.ts CHANGED
@@ -763,6 +763,7 @@ export declare const Components: {
763
763
  type: (ObjectConstructor | StringConstructor | NumberConstructor)[];
764
764
  default: undefined;
765
765
  };
766
+ label: StringConstructor;
766
767
  id: {
767
768
  type: StringConstructor;
768
769
  };
@@ -848,6 +849,7 @@ export declare const Components: {
848
849
  type: (ObjectConstructor | StringConstructor | NumberConstructor)[];
849
850
  default: undefined;
850
851
  };
852
+ label: StringConstructor;
851
853
  id: {
852
854
  type: StringConstructor;
853
855
  };
@@ -959,6 +961,7 @@ export declare const Components: {
959
961
  type: (ObjectConstructor | StringConstructor | NumberConstructor)[];
960
962
  default: undefined;
961
963
  };
964
+ label: StringConstructor;
962
965
  id: {
963
966
  type: StringConstructor;
964
967
  };
@@ -1044,6 +1047,7 @@ export declare const Components: {
1044
1047
  type: (ObjectConstructor | StringConstructor | NumberConstructor)[];
1045
1048
  default: undefined;
1046
1049
  };
1050
+ label: StringConstructor;
1047
1051
  id: {
1048
1052
  type: StringConstructor;
1049
1053
  };
@@ -2495,10 +2499,10 @@ export declare const Components: {
2495
2499
  title?: string | undefined;
2496
2500
  onCancel?: Function | undefined;
2497
2501
  wrapperStyle?: string | Record<string, any> | undefined;
2498
- onOk?: Function | undefined;
2499
- wrapperClass?: string | Record<string, any> | undefined;
2500
2502
  contentStyle?: string | Record<string, any> | undefined;
2501
2503
  contentClass?: string | Record<string, any> | undefined;
2504
+ onOk?: Function | undefined;
2505
+ wrapperClass?: string | Record<string, any> | undefined;
2502
2506
  maskStyle?: string | Record<string, any> | undefined;
2503
2507
  } & {
2504
2508
  onClose: (...args: any[]) => any;
@@ -2801,10 +2805,10 @@ export declare const Components: {
2801
2805
  title?: string | undefined;
2802
2806
  onCancel?: Function | undefined;
2803
2807
  wrapperStyle?: string | Record<string, any> | undefined;
2804
- onOk?: Function | undefined;
2805
- wrapperClass?: string | Record<string, any> | undefined;
2806
2808
  contentStyle?: string | Record<string, any> | undefined;
2807
2809
  contentClass?: string | Record<string, any> | undefined;
2810
+ onOk?: Function | undefined;
2811
+ wrapperClass?: string | Record<string, any> | undefined;
2808
2812
  maskStyle?: string | Record<string, any> | undefined;
2809
2813
  } & {
2810
2814
  onClose: (...args: any[]) => any;
@@ -3573,6 +3577,12 @@ export declare const Components: {
3573
3577
  type: BooleanConstructor;
3574
3578
  default: boolean;
3575
3579
  };
3580
+ contentStyle: (ObjectConstructor | StringConstructor)[];
3581
+ contentClass: (ObjectConstructor | StringConstructor)[];
3582
+ labelStyle: (ObjectConstructor | StringConstructor)[];
3583
+ labelClass: (ObjectConstructor | StringConstructor)[];
3584
+ errorStyle: (ObjectConstructor | StringConstructor)[];
3585
+ errorClass: (ObjectConstructor | StringConstructor)[];
3576
3586
  }>, () => VNode<RendererNode, RendererElement, {
3577
3587
  [key: string]: any;
3578
3588
  }>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
@@ -3609,6 +3619,12 @@ export declare const Components: {
3609
3619
  type: BooleanConstructor;
3610
3620
  default: boolean;
3611
3621
  };
3622
+ contentStyle: (ObjectConstructor | StringConstructor)[];
3623
+ contentClass: (ObjectConstructor | StringConstructor)[];
3624
+ labelStyle: (ObjectConstructor | StringConstructor)[];
3625
+ labelClass: (ObjectConstructor | StringConstructor)[];
3626
+ errorStyle: (ObjectConstructor | StringConstructor)[];
3627
+ errorClass: (ObjectConstructor | StringConstructor)[];
3612
3628
  }>> & Readonly<{}>, {
3613
3629
  tag: string;
3614
3630
  styleless: boolean;
@@ -3659,6 +3675,12 @@ export declare const Components: {
3659
3675
  type: BooleanConstructor;
3660
3676
  default: boolean;
3661
3677
  };
3678
+ contentStyle: (ObjectConstructor | StringConstructor)[];
3679
+ contentClass: (ObjectConstructor | StringConstructor)[];
3680
+ labelStyle: (ObjectConstructor | StringConstructor)[];
3681
+ labelClass: (ObjectConstructor | StringConstructor)[];
3682
+ errorStyle: (ObjectConstructor | StringConstructor)[];
3683
+ errorClass: (ObjectConstructor | StringConstructor)[];
3662
3684
  }>, () => VNode<RendererNode, RendererElement, {
3663
3685
  [key: string]: any;
3664
3686
  }>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
@@ -3703,6 +3725,12 @@ export declare const Components: {
3703
3725
  type: BooleanConstructor;
3704
3726
  default: boolean;
3705
3727
  };
3728
+ contentStyle: (ObjectConstructor | StringConstructor)[];
3729
+ contentClass: (ObjectConstructor | StringConstructor)[];
3730
+ labelStyle: (ObjectConstructor | StringConstructor)[];
3731
+ labelClass: (ObjectConstructor | StringConstructor)[];
3732
+ errorStyle: (ObjectConstructor | StringConstructor)[];
3733
+ errorClass: (ObjectConstructor | StringConstructor)[];
3706
3734
  }>> & Readonly<{}>, {
3707
3735
  tag: string;
3708
3736
  border: boolean;
@@ -3760,6 +3788,8 @@ export declare const Components: {
3760
3788
  contentClass: (ObjectConstructor | StringConstructor)[];
3761
3789
  labelStyle: (ObjectConstructor | StringConstructor)[];
3762
3790
  labelClass: (ObjectConstructor | StringConstructor)[];
3791
+ errorStyle: (ObjectConstructor | StringConstructor)[];
3792
+ errorClass: (ObjectConstructor | StringConstructor)[];
3763
3793
  }>, () => JSX_2.Element | (VNode<RendererNode, RendererElement, {
3764
3794
  [key: string]: any;
3765
3795
  }>[] | undefined)[], {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
@@ -3809,6 +3839,8 @@ export declare const Components: {
3809
3839
  contentClass: (ObjectConstructor | StringConstructor)[];
3810
3840
  labelStyle: (ObjectConstructor | StringConstructor)[];
3811
3841
  labelClass: (ObjectConstructor | StringConstructor)[];
3842
+ errorStyle: (ObjectConstructor | StringConstructor)[];
3843
+ errorClass: (ObjectConstructor | StringConstructor)[];
3812
3844
  }>> & Readonly<{}>, {
3813
3845
  label: string;
3814
3846
  styleless: boolean;
@@ -3868,6 +3900,8 @@ export declare const Components: {
3868
3900
  contentClass: (ObjectConstructor | StringConstructor)[];
3869
3901
  labelStyle: (ObjectConstructor | StringConstructor)[];
3870
3902
  labelClass: (ObjectConstructor | StringConstructor)[];
3903
+ errorStyle: (ObjectConstructor | StringConstructor)[];
3904
+ errorClass: (ObjectConstructor | StringConstructor)[];
3871
3905
  }>, () => JSX_2.Element | (VNode<RendererNode, RendererElement, {
3872
3906
  [key: string]: any;
3873
3907
  }>[] | undefined)[], {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
@@ -3921,6 +3955,8 @@ export declare const Components: {
3921
3955
  contentClass: (ObjectConstructor | StringConstructor)[];
3922
3956
  labelStyle: (ObjectConstructor | StringConstructor)[];
3923
3957
  labelClass: (ObjectConstructor | StringConstructor)[];
3958
+ errorStyle: (ObjectConstructor | StringConstructor)[];
3959
+ errorClass: (ObjectConstructor | StringConstructor)[];
3924
3960
  }>> & Readonly<{}>, {
3925
3961
  label: string;
3926
3962
  styleless: boolean;
@@ -5671,10 +5707,10 @@ export declare const Components: {
5671
5707
  x?: number | undefined;
5672
5708
  y?: number | undefined;
5673
5709
  wrapperStyle?: string | Record<string, any> | undefined;
5674
- onOk?: Function | undefined;
5675
- wrapperClass?: string | Record<string, any> | undefined;
5676
5710
  contentStyle?: string | Record<string, any> | undefined;
5677
5711
  contentClass?: string | Record<string, any> | undefined;
5712
+ onOk?: Function | undefined;
5713
+ wrapperClass?: string | Record<string, any> | undefined;
5678
5714
  } & {
5679
5715
  onClose: (...args: any[]) => any;
5680
5716
  }>) => PortalLeaf;
@@ -5704,10 +5740,10 @@ export declare const Components: {
5704
5740
  x?: number | undefined;
5705
5741
  y?: number | undefined;
5706
5742
  wrapperStyle?: string | Record<string, any> | undefined;
5707
- onOk?: Function | undefined;
5708
- wrapperClass?: string | Record<string, any> | undefined;
5709
5743
  contentStyle?: string | Record<string, any> | undefined;
5710
5744
  contentClass?: string | Record<string, any> | undefined;
5745
+ onOk?: Function | undefined;
5746
+ wrapperClass?: string | Record<string, any> | undefined;
5711
5747
  } & {
5712
5748
  onClose: (...args: any[]) => any;
5713
5749
  }>) => PortalLeaf;
@@ -5737,10 +5773,10 @@ export declare const Components: {
5737
5773
  x?: number | undefined;
5738
5774
  y?: number | undefined;
5739
5775
  wrapperStyle?: string | Record<string, any> | undefined;
5740
- onOk?: Function | undefined;
5741
- wrapperClass?: string | Record<string, any> | undefined;
5742
5776
  contentStyle?: string | Record<string, any> | undefined;
5743
5777
  contentClass?: string | Record<string, any> | undefined;
5778
+ onOk?: Function | undefined;
5779
+ wrapperClass?: string | Record<string, any> | undefined;
5744
5780
  } & {
5745
5781
  onClose: (...args: any[]) => any;
5746
5782
  }>) => PortalLeaf;
@@ -5770,10 +5806,10 @@ export declare const Components: {
5770
5806
  x?: number | undefined;
5771
5807
  y?: number | undefined;
5772
5808
  wrapperStyle?: string | Record<string, any> | undefined;
5773
- onOk?: Function | undefined;
5774
- wrapperClass?: string | Record<string, any> | undefined;
5775
5809
  contentStyle?: string | Record<string, any> | undefined;
5776
5810
  contentClass?: string | Record<string, any> | undefined;
5811
+ onOk?: Function | undefined;
5812
+ wrapperClass?: string | Record<string, any> | undefined;
5777
5813
  } & {
5778
5814
  onClose: (...args: any[]) => any;
5779
5815
  }>) => PortalLeaf;
@@ -8620,6 +8656,8 @@ export declare const Components: {
8620
8656
  height: string | number;
8621
8657
  always: boolean;
8622
8658
  wrapperStyle: StyleValue;
8659
+ contentStyle: StyleValue;
8660
+ contentClass: StyleValue;
8623
8661
  thumbMinSize: number;
8624
8662
  native: boolean;
8625
8663
  autoResize: boolean;
@@ -8627,8 +8665,6 @@ export declare const Components: {
8627
8665
  trackOffsetY: number[];
8628
8666
  maxHeight: string | number;
8629
8667
  wrapperClass: StyleValue;
8630
- contentStyle: StyleValue;
8631
- contentClass: StyleValue;
8632
8668
  showBar: boolean;
8633
8669
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
8634
8670
  MScroller: DefineComponent<ExtractPropTypes< {
@@ -8762,6 +8798,8 @@ export declare const Components: {
8762
8798
  height: string | number;
8763
8799
  always: boolean;
8764
8800
  wrapperStyle: StyleValue;
8801
+ contentStyle: StyleValue;
8802
+ contentClass: StyleValue;
8765
8803
  thumbMinSize: number;
8766
8804
  native: boolean;
8767
8805
  autoResize: boolean;
@@ -8769,8 +8807,6 @@ export declare const Components: {
8769
8807
  trackOffsetY: number[];
8770
8808
  maxHeight: string | number;
8771
8809
  wrapperClass: StyleValue;
8772
- contentStyle: StyleValue;
8773
- contentClass: StyleValue;
8774
8810
  showBar: boolean;
8775
8811
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
8776
8812
  Select: DefineComponent<ExtractPropTypes< {
@@ -8833,6 +8869,7 @@ export declare const Components: {
8833
8869
  type: (ObjectConstructor | StringConstructor | NumberConstructor)[];
8834
8870
  default: undefined;
8835
8871
  };
8872
+ label: StringConstructor;
8836
8873
  id: {
8837
8874
  type: StringConstructor;
8838
8875
  };
@@ -8910,6 +8947,7 @@ export declare const Components: {
8910
8947
  type: (ObjectConstructor | StringConstructor | NumberConstructor)[];
8911
8948
  default: undefined;
8912
8949
  };
8950
+ label: StringConstructor;
8913
8951
  id: {
8914
8952
  type: StringConstructor;
8915
8953
  };
@@ -9012,6 +9050,7 @@ export declare const Components: {
9012
9050
  type: (ObjectConstructor | StringConstructor | NumberConstructor)[];
9013
9051
  default: undefined;
9014
9052
  };
9053
+ label: StringConstructor;
9015
9054
  id: {
9016
9055
  type: StringConstructor;
9017
9056
  };
@@ -9089,6 +9128,7 @@ export declare const Components: {
9089
9128
  type: (ObjectConstructor | StringConstructor | NumberConstructor)[];
9090
9129
  default: undefined;
9091
9130
  };
9131
+ label: StringConstructor;
9092
9132
  id: {
9093
9133
  type: StringConstructor;
9094
9134
  };
@@ -12594,7 +12594,8 @@ var Vc = (function (exports, vue) {
12594
12594
  nullValue: {
12595
12595
  type: [Number, String, Object],
12596
12596
  default: void 0
12597
- }
12597
+ },
12598
+ label: String
12598
12599
  };
12599
12600
  const props$18 = {
12600
12601
  ...props$19,
@@ -19889,7 +19890,14 @@ var Vc = (function (exports, vue) {
19889
19890
  styleless: {
19890
19891
  type: Boolean,
19891
19892
  default: false
19892
- }
19893
+ },
19894
+ // 给formItem统一注入
19895
+ contentStyle: [Object, String],
19896
+ contentClass: [Object, String],
19897
+ labelStyle: [Object, String],
19898
+ labelClass: [Object, String],
19899
+ errorStyle: [Object, String],
19900
+ errorClass: [Object, String]
19893
19901
  };
19894
19902
  const useForm = (expose, options = {}) => {
19895
19903
  const instance = vue.getCurrentInstance();
@@ -20046,7 +20054,9 @@ var Vc = (function (exports, vue) {
20046
20054
  contentStyle: [Object, String],
20047
20055
  contentClass: [Object, String],
20048
20056
  labelStyle: [Object, String],
20049
- labelClass: [Object, String]
20057
+ labelClass: [Object, String],
20058
+ errorStyle: [Object, String],
20059
+ errorClass: [Object, String]
20050
20060
  };
20051
20061
  const filterEmpty = (val) => {
20052
20062
  if (val instanceof Array) {
@@ -20127,6 +20137,7 @@ var Vc = (function (exports, vue) {
20127
20137
  width: labelPosition.value !== "top" && labelWidth && labelWidth > 0 ? `${labelWidth}px` : "auto",
20128
20138
  textAlign: labelPosition.value === "top" ? "left" : labelPosition.value
20129
20139
  },
20140
+ form.props.labelStyle,
20130
20141
  props2.labelStyle
20131
20142
  ];
20132
20143
  });
@@ -20137,9 +20148,22 @@ var Vc = (function (exports, vue) {
20137
20148
  marginLeft: !hasLabel.value && isNest.value ? 0 : labelWidth && labelWidth > 0 ? `${labelWidth}px` : "unset",
20138
20149
  marginBottom: isNest.value && !isNestLast.value ? `20px` : 0
20139
20150
  },
20151
+ form.props.contentStyle,
20140
20152
  props2.contentStyle
20141
20153
  ];
20142
20154
  });
20155
+ const errorStyle = vue.computed(() => {
20156
+ return [form.props.errorStyle, props2.errorStyle];
20157
+ });
20158
+ const labelClass = vue.computed(() => {
20159
+ return [form.props.labelClass, props2.labelClass];
20160
+ });
20161
+ const contentClass = vue.computed(() => {
20162
+ return [form.props.contentClass, props2.contentClass];
20163
+ });
20164
+ const errorClass = vue.computed(() => {
20165
+ return [form.props.errorClass, props2.errorClass];
20166
+ });
20143
20167
  const isStyleless = vue.computed(() => {
20144
20168
  return props2.styleless || form.props.styleless;
20145
20169
  });
@@ -20302,6 +20326,10 @@ var Vc = (function (exports, vue) {
20302
20326
  classes,
20303
20327
  labelStyle,
20304
20328
  contentStyle,
20329
+ errorStyle,
20330
+ labelClass,
20331
+ contentClass,
20332
+ errorClass,
20305
20333
  showError,
20306
20334
  labelPosition
20307
20335
  };
@@ -20321,6 +20349,10 @@ var Vc = (function (exports, vue) {
20321
20349
  classes,
20322
20350
  labelStyle,
20323
20351
  contentStyle,
20352
+ errorStyle,
20353
+ labelClass,
20354
+ contentClass,
20355
+ errorClass,
20324
20356
  showError,
20325
20357
  validateMessage
20326
20358
  } = it;
@@ -20334,27 +20366,30 @@ var Vc = (function (exports, vue) {
20334
20366
  show: showError.value,
20335
20367
  nest: isNest.value,
20336
20368
  message: validateMessage.value,
20337
- class: errorColorClass
20369
+ class: [errorColorClass, ...errorClass.value],
20370
+ style: errorStyle.value
20338
20371
  })];
20339
20372
  return vue.createVNode("div", {
20340
20373
  "class": ["vc-form-item", classes.value]
20341
20374
  }, [(label || slots.label) && vue.createVNode("div", {
20342
20375
  "style": labelStyle.value,
20343
- "class": ["vc-form-item__label", props2.labelClass],
20376
+ "class": ["vc-form-item__label", ...labelClass.value],
20344
20377
  "for": labelFor
20345
20378
  }, [vue.createVNode("label", null, [label || slots.label?.()])]), vue.createVNode("div", {
20346
20379
  "class": "vc-form-item__wrapper"
20347
20380
  }, [vue.createVNode("div", {
20348
- "class": ["vc-form-item__content", props2.contentClass],
20381
+ "class": ["vc-form-item__content", ...contentClass.value],
20349
20382
  "style": contentStyle.value
20350
20383
  }, [slots.default?.(), slots.error ? slots.error({
20351
20384
  show: showError.value,
20352
20385
  nest: isNest.value,
20353
20386
  message: validateMessage.value,
20354
- class: errorColorClass
20387
+ class: [errorColorClass, ...errorClass.value],
20388
+ style: errorStyle.value
20355
20389
  }) : vue.createVNode(TransitionFade, null, {
20356
20390
  default: () => [vue.withDirectives(vue.createVNode("div", {
20357
- "class": ["vc-form-item__tip", isNest.value ? "is-nest" : "", errorColorClass]
20391
+ "class": ["vc-form-item__tip", isNest.value ? "is-nest" : "", errorColorClass, ...errorClass.value],
20392
+ "style": [errorStyle.value]
20358
20393
  }, [validateMessage.value]), [[vue.vShow, showError.value]])]
20359
20394
  })])])]);
20360
20395
  };
@@ -20414,6 +20449,10 @@ var Vc = (function (exports, vue) {
20414
20449
  classes,
20415
20450
  labelStyle,
20416
20451
  contentStyle,
20452
+ errorStyle,
20453
+ labelClass,
20454
+ contentClass,
20455
+ errorClass,
20417
20456
  isNest,
20418
20457
  showError,
20419
20458
  validateMessage
@@ -20429,7 +20468,8 @@ var Vc = (function (exports, vue) {
20429
20468
  show: showError.value,
20430
20469
  nest: isNest.value,
20431
20470
  message: validateMessage.value,
20432
- class: errorColorClass
20471
+ class: [errorColorClass, ...errorClass.value],
20472
+ style: errorStyle.value
20433
20473
  })];
20434
20474
  return vue.createVNode("div", {
20435
20475
  "style": {
@@ -20441,14 +20481,15 @@ var Vc = (function (exports, vue) {
20441
20481
  }, [(props2.label || slots.label) && vue.createVNode("label", {
20442
20482
  "for": labelFor,
20443
20483
  "style": labelStyle.value,
20444
- "class": "vcm-form-item__label"
20484
+ "class": ["vcm-form-item__label", ...labelClass.value]
20445
20485
  }, [label || slots.label?.()]), vue.createVNode("div", {
20446
20486
  "style": contentStyle.value,
20447
- "class": "vcm-form-item__content"
20487
+ "class": ["vcm-form-item__content", ...contentClass.value]
20448
20488
  }, [slots.default?.(), showMessage && showError.value && vue.createVNode("div", {
20449
20489
  "class": [{
20450
20490
  "is-nest": isNest.value
20451
- }, errorColorClass]
20491
+ }, errorColorClass, ...errorClass.value],
20492
+ "style": errorStyle.value
20452
20493
  }, [slots.error ? slots.error({
20453
20494
  message: validateMessage.value
20454
20495
  }) : validateMessage.value])])])]);
@@ -22552,7 +22593,7 @@ var Vc = (function (exports, vue) {
22552
22593
  "style": its.value.style,
22553
22594
  "animation": "y",
22554
22595
  "onMouseenter": () => isHover.value = true,
22555
- "onMuseleave": () => isHover.value = false,
22596
+ "onMouseleave": () => isHover.value = false,
22556
22597
  "onReady": () => emit("ready"),
22557
22598
  "onClose": () => emit("close"),
22558
22599
  "onVisibleChange": () => emit("visible-change", isActive.value),
@@ -22568,6 +22609,13 @@ var Vc = (function (exports, vue) {
22568
22609
  "readonly": true,
22569
22610
  "placeholder": its.value.attrs?.placeholder || "请选择"
22570
22611
  }, {
22612
+ prepend: () => {
22613
+ if (slots.prepend) return slots.prepend?.();
22614
+ if (!props2.label) return null;
22615
+ return vue.createVNode("span", {
22616
+ "class": "vc-select__label"
22617
+ }, [props2.label]);
22618
+ },
22571
22619
  content: multiple.value && currentValue.value && currentValue.value.length > 0 ? () => {
22572
22620
  return vue.createVNode("div", {
22573
22621
  "class": [classes.value, "vc-select__tags"]
@@ -22589,7 +22637,7 @@ var Vc = (function (exports, vue) {
22589
22637
  }, [vue.createVNode(Icon, {
22590
22638
  "type": showClear.value ? "clear" : icon.value,
22591
22639
  "class": [{
22592
- "is-arrow": !showClear
22640
+ "is-arrow": !showClear.value
22593
22641
  }, "vc-select__icon"],
22594
22642
  "onClick": handleClear
22595
22643
  }, null)]);
@@ -24814,6 +24862,7 @@ var Vc = (function (exports, vue) {
24814
24862
  });
24815
24863
  const classes = vue.computed(() => {
24816
24864
  return {
24865
+ "is-disabled": props2.disabled,
24817
24866
  "is-loading": isLoading.value,
24818
24867
  "is-checked": checked.value
24819
24868
  };
@@ -12597,7 +12597,8 @@
12597
12597
  nullValue: {
12598
12598
  type: [Number, String, Object],
12599
12599
  default: void 0
12600
- }
12600
+ },
12601
+ label: String
12601
12602
  };
12602
12603
  const props$18 = {
12603
12604
  ...props$19,
@@ -19892,7 +19893,14 @@
19892
19893
  styleless: {
19893
19894
  type: Boolean,
19894
19895
  default: false
19895
- }
19896
+ },
19897
+ // 给formItem统一注入
19898
+ contentStyle: [Object, String],
19899
+ contentClass: [Object, String],
19900
+ labelStyle: [Object, String],
19901
+ labelClass: [Object, String],
19902
+ errorStyle: [Object, String],
19903
+ errorClass: [Object, String]
19896
19904
  };
19897
19905
  const useForm = (expose, options = {}) => {
19898
19906
  const instance = vue.getCurrentInstance();
@@ -20049,7 +20057,9 @@
20049
20057
  contentStyle: [Object, String],
20050
20058
  contentClass: [Object, String],
20051
20059
  labelStyle: [Object, String],
20052
- labelClass: [Object, String]
20060
+ labelClass: [Object, String],
20061
+ errorStyle: [Object, String],
20062
+ errorClass: [Object, String]
20053
20063
  };
20054
20064
  const filterEmpty = (val) => {
20055
20065
  if (val instanceof Array) {
@@ -20130,6 +20140,7 @@
20130
20140
  width: labelPosition.value !== "top" && labelWidth && labelWidth > 0 ? `${labelWidth}px` : "auto",
20131
20141
  textAlign: labelPosition.value === "top" ? "left" : labelPosition.value
20132
20142
  },
20143
+ form.props.labelStyle,
20133
20144
  props2.labelStyle
20134
20145
  ];
20135
20146
  });
@@ -20140,9 +20151,22 @@
20140
20151
  marginLeft: !hasLabel.value && isNest.value ? 0 : labelWidth && labelWidth > 0 ? `${labelWidth}px` : "unset",
20141
20152
  marginBottom: isNest.value && !isNestLast.value ? `20px` : 0
20142
20153
  },
20154
+ form.props.contentStyle,
20143
20155
  props2.contentStyle
20144
20156
  ];
20145
20157
  });
20158
+ const errorStyle = vue.computed(() => {
20159
+ return [form.props.errorStyle, props2.errorStyle];
20160
+ });
20161
+ const labelClass = vue.computed(() => {
20162
+ return [form.props.labelClass, props2.labelClass];
20163
+ });
20164
+ const contentClass = vue.computed(() => {
20165
+ return [form.props.contentClass, props2.contentClass];
20166
+ });
20167
+ const errorClass = vue.computed(() => {
20168
+ return [form.props.errorClass, props2.errorClass];
20169
+ });
20146
20170
  const isStyleless = vue.computed(() => {
20147
20171
  return props2.styleless || form.props.styleless;
20148
20172
  });
@@ -20305,6 +20329,10 @@
20305
20329
  classes,
20306
20330
  labelStyle,
20307
20331
  contentStyle,
20332
+ errorStyle,
20333
+ labelClass,
20334
+ contentClass,
20335
+ errorClass,
20308
20336
  showError,
20309
20337
  labelPosition
20310
20338
  };
@@ -20324,6 +20352,10 @@
20324
20352
  classes,
20325
20353
  labelStyle,
20326
20354
  contentStyle,
20355
+ errorStyle,
20356
+ labelClass,
20357
+ contentClass,
20358
+ errorClass,
20327
20359
  showError,
20328
20360
  validateMessage
20329
20361
  } = it;
@@ -20337,27 +20369,30 @@
20337
20369
  show: showError.value,
20338
20370
  nest: isNest.value,
20339
20371
  message: validateMessage.value,
20340
- class: errorColorClass
20372
+ class: [errorColorClass, ...errorClass.value],
20373
+ style: errorStyle.value
20341
20374
  })];
20342
20375
  return vue.createVNode("div", {
20343
20376
  "class": ["vc-form-item", classes.value]
20344
20377
  }, [(label || slots.label) && vue.createVNode("div", {
20345
20378
  "style": labelStyle.value,
20346
- "class": ["vc-form-item__label", props2.labelClass],
20379
+ "class": ["vc-form-item__label", ...labelClass.value],
20347
20380
  "for": labelFor
20348
20381
  }, [vue.createVNode("label", null, [label || slots.label?.()])]), vue.createVNode("div", {
20349
20382
  "class": "vc-form-item__wrapper"
20350
20383
  }, [vue.createVNode("div", {
20351
- "class": ["vc-form-item__content", props2.contentClass],
20384
+ "class": ["vc-form-item__content", ...contentClass.value],
20352
20385
  "style": contentStyle.value
20353
20386
  }, [slots.default?.(), slots.error ? slots.error({
20354
20387
  show: showError.value,
20355
20388
  nest: isNest.value,
20356
20389
  message: validateMessage.value,
20357
- class: errorColorClass
20390
+ class: [errorColorClass, ...errorClass.value],
20391
+ style: errorStyle.value
20358
20392
  }) : vue.createVNode(TransitionFade, null, {
20359
20393
  default: () => [vue.withDirectives(vue.createVNode("div", {
20360
- "class": ["vc-form-item__tip", isNest.value ? "is-nest" : "", errorColorClass]
20394
+ "class": ["vc-form-item__tip", isNest.value ? "is-nest" : "", errorColorClass, ...errorClass.value],
20395
+ "style": [errorStyle.value]
20361
20396
  }, [validateMessage.value]), [[vue.vShow, showError.value]])]
20362
20397
  })])])]);
20363
20398
  };
@@ -20417,6 +20452,10 @@
20417
20452
  classes,
20418
20453
  labelStyle,
20419
20454
  contentStyle,
20455
+ errorStyle,
20456
+ labelClass,
20457
+ contentClass,
20458
+ errorClass,
20420
20459
  isNest,
20421
20460
  showError,
20422
20461
  validateMessage
@@ -20432,7 +20471,8 @@
20432
20471
  show: showError.value,
20433
20472
  nest: isNest.value,
20434
20473
  message: validateMessage.value,
20435
- class: errorColorClass
20474
+ class: [errorColorClass, ...errorClass.value],
20475
+ style: errorStyle.value
20436
20476
  })];
20437
20477
  return vue.createVNode("div", {
20438
20478
  "style": {
@@ -20444,14 +20484,15 @@
20444
20484
  }, [(props2.label || slots.label) && vue.createVNode("label", {
20445
20485
  "for": labelFor,
20446
20486
  "style": labelStyle.value,
20447
- "class": "vcm-form-item__label"
20487
+ "class": ["vcm-form-item__label", ...labelClass.value]
20448
20488
  }, [label || slots.label?.()]), vue.createVNode("div", {
20449
20489
  "style": contentStyle.value,
20450
- "class": "vcm-form-item__content"
20490
+ "class": ["vcm-form-item__content", ...contentClass.value]
20451
20491
  }, [slots.default?.(), showMessage && showError.value && vue.createVNode("div", {
20452
20492
  "class": [{
20453
20493
  "is-nest": isNest.value
20454
- }, errorColorClass]
20494
+ }, errorColorClass, ...errorClass.value],
20495
+ "style": errorStyle.value
20455
20496
  }, [slots.error ? slots.error({
20456
20497
  message: validateMessage.value
20457
20498
  }) : validateMessage.value])])])]);
@@ -22555,7 +22596,7 @@
22555
22596
  "style": its.value.style,
22556
22597
  "animation": "y",
22557
22598
  "onMouseenter": () => isHover.value = true,
22558
- "onMuseleave": () => isHover.value = false,
22599
+ "onMouseleave": () => isHover.value = false,
22559
22600
  "onReady": () => emit("ready"),
22560
22601
  "onClose": () => emit("close"),
22561
22602
  "onVisibleChange": () => emit("visible-change", isActive.value),
@@ -22571,6 +22612,13 @@
22571
22612
  "readonly": true,
22572
22613
  "placeholder": its.value.attrs?.placeholder || "请选择"
22573
22614
  }, {
22615
+ prepend: () => {
22616
+ if (slots.prepend) return slots.prepend?.();
22617
+ if (!props2.label) return null;
22618
+ return vue.createVNode("span", {
22619
+ "class": "vc-select__label"
22620
+ }, [props2.label]);
22621
+ },
22574
22622
  content: multiple.value && currentValue.value && currentValue.value.length > 0 ? () => {
22575
22623
  return vue.createVNode("div", {
22576
22624
  "class": [classes.value, "vc-select__tags"]
@@ -22592,7 +22640,7 @@
22592
22640
  }, [vue.createVNode(Icon, {
22593
22641
  "type": showClear.value ? "clear" : icon.value,
22594
22642
  "class": [{
22595
- "is-arrow": !showClear
22643
+ "is-arrow": !showClear.value
22596
22644
  }, "vc-select__icon"],
22597
22645
  "onClick": handleClear
22598
22646
  }, null)]);
@@ -24817,6 +24865,7 @@
24817
24865
  });
24818
24866
  const classes = vue.computed(() => {
24819
24867
  return {
24868
+ "is-disabled": props2.disabled,
24820
24869
  "is-loading": isLoading.value,
24821
24870
  "is-checked": checked.value
24822
24871
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deot/vc",
3
- "version": "1.0.45",
3
+ "version": "1.0.47",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -19,9 +19,9 @@
19
19
  "access": "public"
20
20
  },
21
21
  "dependencies": {
22
- "@deot/vc-components": "^1.0.45",
23
- "@deot/vc-hooks": "^1.0.45",
24
- "@deot/vc-shared": "^1.0.45"
22
+ "@deot/vc-components": "^1.0.47",
23
+ "@deot/vc-hooks": "^1.0.47",
24
+ "@deot/vc-shared": "^1.0.47"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "vue": "*"