@deot/vc 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.d.ts CHANGED
@@ -2495,10 +2495,10 @@ export declare const Components: {
2495
2495
  title?: string | undefined;
2496
2496
  onCancel?: Function | undefined;
2497
2497
  wrapperStyle?: string | Record<string, any> | undefined;
2498
- onOk?: Function | undefined;
2499
- wrapperClass?: string | Record<string, any> | undefined;
2500
2498
  contentStyle?: string | Record<string, any> | undefined;
2501
2499
  contentClass?: string | Record<string, any> | undefined;
2500
+ onOk?: Function | undefined;
2501
+ wrapperClass?: string | Record<string, any> | undefined;
2502
2502
  maskStyle?: string | Record<string, any> | undefined;
2503
2503
  } & {
2504
2504
  onClose: (...args: any[]) => any;
@@ -2801,10 +2801,10 @@ export declare const Components: {
2801
2801
  title?: string | undefined;
2802
2802
  onCancel?: Function | undefined;
2803
2803
  wrapperStyle?: string | Record<string, any> | undefined;
2804
- onOk?: Function | undefined;
2805
- wrapperClass?: string | Record<string, any> | undefined;
2806
2804
  contentStyle?: string | Record<string, any> | undefined;
2807
2805
  contentClass?: string | Record<string, any> | undefined;
2806
+ onOk?: Function | undefined;
2807
+ wrapperClass?: string | Record<string, any> | undefined;
2808
2808
  maskStyle?: string | Record<string, any> | undefined;
2809
2809
  } & {
2810
2810
  onClose: (...args: any[]) => any;
@@ -3573,6 +3573,12 @@ export declare const Components: {
3573
3573
  type: BooleanConstructor;
3574
3574
  default: boolean;
3575
3575
  };
3576
+ contentStyle: (ObjectConstructor | StringConstructor)[];
3577
+ contentClass: (ObjectConstructor | StringConstructor)[];
3578
+ labelStyle: (ObjectConstructor | StringConstructor)[];
3579
+ labelClass: (ObjectConstructor | StringConstructor)[];
3580
+ errorStyle: (ObjectConstructor | StringConstructor)[];
3581
+ errorClass: (ObjectConstructor | StringConstructor)[];
3576
3582
  }>, () => VNode<RendererNode, RendererElement, {
3577
3583
  [key: string]: any;
3578
3584
  }>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
@@ -3609,6 +3615,12 @@ export declare const Components: {
3609
3615
  type: BooleanConstructor;
3610
3616
  default: boolean;
3611
3617
  };
3618
+ contentStyle: (ObjectConstructor | StringConstructor)[];
3619
+ contentClass: (ObjectConstructor | StringConstructor)[];
3620
+ labelStyle: (ObjectConstructor | StringConstructor)[];
3621
+ labelClass: (ObjectConstructor | StringConstructor)[];
3622
+ errorStyle: (ObjectConstructor | StringConstructor)[];
3623
+ errorClass: (ObjectConstructor | StringConstructor)[];
3612
3624
  }>> & Readonly<{}>, {
3613
3625
  tag: string;
3614
3626
  styleless: boolean;
@@ -3659,6 +3671,12 @@ export declare const Components: {
3659
3671
  type: BooleanConstructor;
3660
3672
  default: boolean;
3661
3673
  };
3674
+ contentStyle: (ObjectConstructor | StringConstructor)[];
3675
+ contentClass: (ObjectConstructor | StringConstructor)[];
3676
+ labelStyle: (ObjectConstructor | StringConstructor)[];
3677
+ labelClass: (ObjectConstructor | StringConstructor)[];
3678
+ errorStyle: (ObjectConstructor | StringConstructor)[];
3679
+ errorClass: (ObjectConstructor | StringConstructor)[];
3662
3680
  }>, () => VNode<RendererNode, RendererElement, {
3663
3681
  [key: string]: any;
3664
3682
  }>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
@@ -3703,6 +3721,12 @@ export declare const Components: {
3703
3721
  type: BooleanConstructor;
3704
3722
  default: boolean;
3705
3723
  };
3724
+ contentStyle: (ObjectConstructor | StringConstructor)[];
3725
+ contentClass: (ObjectConstructor | StringConstructor)[];
3726
+ labelStyle: (ObjectConstructor | StringConstructor)[];
3727
+ labelClass: (ObjectConstructor | StringConstructor)[];
3728
+ errorStyle: (ObjectConstructor | StringConstructor)[];
3729
+ errorClass: (ObjectConstructor | StringConstructor)[];
3706
3730
  }>> & Readonly<{}>, {
3707
3731
  tag: string;
3708
3732
  border: boolean;
@@ -3760,6 +3784,8 @@ export declare const Components: {
3760
3784
  contentClass: (ObjectConstructor | StringConstructor)[];
3761
3785
  labelStyle: (ObjectConstructor | StringConstructor)[];
3762
3786
  labelClass: (ObjectConstructor | StringConstructor)[];
3787
+ errorStyle: (ObjectConstructor | StringConstructor)[];
3788
+ errorClass: (ObjectConstructor | StringConstructor)[];
3763
3789
  }>, () => JSX_2.Element | (VNode<RendererNode, RendererElement, {
3764
3790
  [key: string]: any;
3765
3791
  }>[] | undefined)[], {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
@@ -3809,6 +3835,8 @@ export declare const Components: {
3809
3835
  contentClass: (ObjectConstructor | StringConstructor)[];
3810
3836
  labelStyle: (ObjectConstructor | StringConstructor)[];
3811
3837
  labelClass: (ObjectConstructor | StringConstructor)[];
3838
+ errorStyle: (ObjectConstructor | StringConstructor)[];
3839
+ errorClass: (ObjectConstructor | StringConstructor)[];
3812
3840
  }>> & Readonly<{}>, {
3813
3841
  label: string;
3814
3842
  styleless: boolean;
@@ -3868,6 +3896,8 @@ export declare const Components: {
3868
3896
  contentClass: (ObjectConstructor | StringConstructor)[];
3869
3897
  labelStyle: (ObjectConstructor | StringConstructor)[];
3870
3898
  labelClass: (ObjectConstructor | StringConstructor)[];
3899
+ errorStyle: (ObjectConstructor | StringConstructor)[];
3900
+ errorClass: (ObjectConstructor | StringConstructor)[];
3871
3901
  }>, () => JSX_2.Element | (VNode<RendererNode, RendererElement, {
3872
3902
  [key: string]: any;
3873
3903
  }>[] | undefined)[], {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
@@ -3921,6 +3951,8 @@ export declare const Components: {
3921
3951
  contentClass: (ObjectConstructor | StringConstructor)[];
3922
3952
  labelStyle: (ObjectConstructor | StringConstructor)[];
3923
3953
  labelClass: (ObjectConstructor | StringConstructor)[];
3954
+ errorStyle: (ObjectConstructor | StringConstructor)[];
3955
+ errorClass: (ObjectConstructor | StringConstructor)[];
3924
3956
  }>> & Readonly<{}>, {
3925
3957
  label: string;
3926
3958
  styleless: boolean;
@@ -5671,10 +5703,10 @@ export declare const Components: {
5671
5703
  x?: number | undefined;
5672
5704
  y?: number | undefined;
5673
5705
  wrapperStyle?: string | Record<string, any> | undefined;
5674
- onOk?: Function | undefined;
5675
- wrapperClass?: string | Record<string, any> | undefined;
5676
5706
  contentStyle?: string | Record<string, any> | undefined;
5677
5707
  contentClass?: string | Record<string, any> | undefined;
5708
+ onOk?: Function | undefined;
5709
+ wrapperClass?: string | Record<string, any> | undefined;
5678
5710
  } & {
5679
5711
  onClose: (...args: any[]) => any;
5680
5712
  }>) => PortalLeaf;
@@ -5704,10 +5736,10 @@ export declare const Components: {
5704
5736
  x?: number | undefined;
5705
5737
  y?: number | undefined;
5706
5738
  wrapperStyle?: string | Record<string, any> | undefined;
5707
- onOk?: Function | undefined;
5708
- wrapperClass?: string | Record<string, any> | undefined;
5709
5739
  contentStyle?: string | Record<string, any> | undefined;
5710
5740
  contentClass?: string | Record<string, any> | undefined;
5741
+ onOk?: Function | undefined;
5742
+ wrapperClass?: string | Record<string, any> | undefined;
5711
5743
  } & {
5712
5744
  onClose: (...args: any[]) => any;
5713
5745
  }>) => PortalLeaf;
@@ -5737,10 +5769,10 @@ export declare const Components: {
5737
5769
  x?: number | undefined;
5738
5770
  y?: number | undefined;
5739
5771
  wrapperStyle?: string | Record<string, any> | undefined;
5740
- onOk?: Function | undefined;
5741
- wrapperClass?: string | Record<string, any> | undefined;
5742
5772
  contentStyle?: string | Record<string, any> | undefined;
5743
5773
  contentClass?: string | Record<string, any> | undefined;
5774
+ onOk?: Function | undefined;
5775
+ wrapperClass?: string | Record<string, any> | undefined;
5744
5776
  } & {
5745
5777
  onClose: (...args: any[]) => any;
5746
5778
  }>) => PortalLeaf;
@@ -5770,10 +5802,10 @@ export declare const Components: {
5770
5802
  x?: number | undefined;
5771
5803
  y?: number | undefined;
5772
5804
  wrapperStyle?: string | Record<string, any> | undefined;
5773
- onOk?: Function | undefined;
5774
- wrapperClass?: string | Record<string, any> | undefined;
5775
5805
  contentStyle?: string | Record<string, any> | undefined;
5776
5806
  contentClass?: string | Record<string, any> | undefined;
5807
+ onOk?: Function | undefined;
5808
+ wrapperClass?: string | Record<string, any> | undefined;
5777
5809
  } & {
5778
5810
  onClose: (...args: any[]) => any;
5779
5811
  }>) => PortalLeaf;
@@ -8620,6 +8652,8 @@ export declare const Components: {
8620
8652
  height: string | number;
8621
8653
  always: boolean;
8622
8654
  wrapperStyle: StyleValue;
8655
+ contentStyle: StyleValue;
8656
+ contentClass: StyleValue;
8623
8657
  thumbMinSize: number;
8624
8658
  native: boolean;
8625
8659
  autoResize: boolean;
@@ -8627,8 +8661,6 @@ export declare const Components: {
8627
8661
  trackOffsetY: number[];
8628
8662
  maxHeight: string | number;
8629
8663
  wrapperClass: StyleValue;
8630
- contentStyle: StyleValue;
8631
- contentClass: StyleValue;
8632
8664
  showBar: boolean;
8633
8665
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
8634
8666
  MScroller: DefineComponent<ExtractPropTypes< {
@@ -8762,6 +8794,8 @@ export declare const Components: {
8762
8794
  height: string | number;
8763
8795
  always: boolean;
8764
8796
  wrapperStyle: StyleValue;
8797
+ contentStyle: StyleValue;
8798
+ contentClass: StyleValue;
8765
8799
  thumbMinSize: number;
8766
8800
  native: boolean;
8767
8801
  autoResize: boolean;
@@ -8769,8 +8803,6 @@ export declare const Components: {
8769
8803
  trackOffsetY: number[];
8770
8804
  maxHeight: string | number;
8771
8805
  wrapperClass: StyleValue;
8772
- contentStyle: StyleValue;
8773
- contentClass: StyleValue;
8774
8806
  showBar: boolean;
8775
8807
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
8776
8808
  Select: DefineComponent<ExtractPropTypes< {
@@ -10200,6 +10232,9 @@ export declare const Components: {
10200
10232
  type: (StringConstructor | FunctionConstructor)[];
10201
10233
  default: string;
10202
10234
  };
10235
+ anchor: {
10236
+ type: StringConstructor;
10237
+ };
10203
10238
  lazy: {
10204
10239
  type: BooleanConstructor;
10205
10240
  default: boolean;
@@ -10217,6 +10252,9 @@ export declare const Components: {
10217
10252
  type: (StringConstructor | FunctionConstructor)[];
10218
10253
  default: string;
10219
10254
  };
10255
+ anchor: {
10256
+ type: StringConstructor;
10257
+ };
10220
10258
  lazy: {
10221
10259
  type: BooleanConstructor;
10222
10260
  default: boolean;
@@ -10240,6 +10278,9 @@ export declare const Components: {
10240
10278
  type: (StringConstructor | FunctionConstructor)[];
10241
10279
  default: string;
10242
10280
  };
10281
+ anchor: {
10282
+ type: StringConstructor;
10283
+ };
10243
10284
  lazy: {
10244
10285
  type: BooleanConstructor;
10245
10286
  default: boolean;
@@ -10257,6 +10298,9 @@ export declare const Components: {
10257
10298
  type: (StringConstructor | FunctionConstructor)[];
10258
10299
  default: string;
10259
10300
  };
10301
+ anchor: {
10302
+ type: StringConstructor;
10303
+ };
10260
10304
  lazy: {
10261
10305
  type: BooleanConstructor;
10262
10306
  default: boolean;
@@ -10426,6 +10470,10 @@ export declare const Components: {
10426
10470
  type: FunctionConstructor;
10427
10471
  default: (props$: any) => any;
10428
10472
  };
10473
+ theme: {
10474
+ type: StringConstructor;
10475
+ default: string;
10476
+ };
10429
10477
  }>, () => JSX_2.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
10430
10478
  tag: {
10431
10479
  type: StringConstructor;
@@ -10461,12 +10509,17 @@ export declare const Components: {
10461
10509
  type: FunctionConstructor;
10462
10510
  default: (props$: any) => any;
10463
10511
  };
10512
+ theme: {
10513
+ type: StringConstructor;
10514
+ default: string;
10515
+ };
10464
10516
  }>> & Readonly<{}>, {
10465
10517
  resize: number | boolean;
10466
10518
  tag: string;
10467
10519
  line: number;
10468
10520
  placement: string;
10469
10521
  value: string;
10522
+ theme: string;
10470
10523
  indent: number;
10471
10524
  suffix: string;
10472
10525
  renderRow: Function;
@@ -10506,6 +10559,10 @@ export declare const Components: {
10506
10559
  type: FunctionConstructor;
10507
10560
  default: (props$: any) => any;
10508
10561
  };
10562
+ theme: {
10563
+ type: StringConstructor;
10564
+ default: string;
10565
+ };
10509
10566
  }>, () => JSX_2.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
10510
10567
  tag: {
10511
10568
  type: StringConstructor;
@@ -10541,12 +10598,17 @@ export declare const Components: {
10541
10598
  type: FunctionConstructor;
10542
10599
  default: (props$: any) => any;
10543
10600
  };
10601
+ theme: {
10602
+ type: StringConstructor;
10603
+ default: string;
10604
+ };
10544
10605
  }>> & Readonly<{}>, {
10545
10606
  resize: number | boolean;
10546
10607
  tag: string;
10547
10608
  line: number;
10548
10609
  placement: string;
10549
10610
  value: string;
10611
+ theme: string;
10550
10612
  indent: number;
10551
10613
  suffix: string;
10552
10614
  renderRow: Function;
@@ -9312,7 +9312,9 @@ var Vc = (function (exports, vue) {
9312
9312
  [`vc-affix__${props2.fixed ? "fixed" : "absolute"}`]: isActive.value
9313
9313
  },
9314
9314
  "style": contentStyle.value
9315
- }, [slots?.default?.()])]);
9315
+ }, [slots?.default?.({
9316
+ active: isActive.value
9317
+ })])]);
9316
9318
  };
9317
9319
  }
9318
9320
  });
@@ -19887,7 +19889,14 @@ var Vc = (function (exports, vue) {
19887
19889
  styleless: {
19888
19890
  type: Boolean,
19889
19891
  default: false
19890
- }
19892
+ },
19893
+ // 给formItem统一注入
19894
+ contentStyle: [Object, String],
19895
+ contentClass: [Object, String],
19896
+ labelStyle: [Object, String],
19897
+ labelClass: [Object, String],
19898
+ errorStyle: [Object, String],
19899
+ errorClass: [Object, String]
19891
19900
  };
19892
19901
  const useForm = (expose, options = {}) => {
19893
19902
  const instance = vue.getCurrentInstance();
@@ -20044,7 +20053,9 @@ var Vc = (function (exports, vue) {
20044
20053
  contentStyle: [Object, String],
20045
20054
  contentClass: [Object, String],
20046
20055
  labelStyle: [Object, String],
20047
- labelClass: [Object, String]
20056
+ labelClass: [Object, String],
20057
+ errorStyle: [Object, String],
20058
+ errorClass: [Object, String]
20048
20059
  };
20049
20060
  const filterEmpty = (val) => {
20050
20061
  if (val instanceof Array) {
@@ -20125,6 +20136,7 @@ var Vc = (function (exports, vue) {
20125
20136
  width: labelPosition.value !== "top" && labelWidth && labelWidth > 0 ? `${labelWidth}px` : "auto",
20126
20137
  textAlign: labelPosition.value === "top" ? "left" : labelPosition.value
20127
20138
  },
20139
+ form.props.labelStyle,
20128
20140
  props2.labelStyle
20129
20141
  ];
20130
20142
  });
@@ -20135,9 +20147,22 @@ var Vc = (function (exports, vue) {
20135
20147
  marginLeft: !hasLabel.value && isNest.value ? 0 : labelWidth && labelWidth > 0 ? `${labelWidth}px` : "unset",
20136
20148
  marginBottom: isNest.value && !isNestLast.value ? `20px` : 0
20137
20149
  },
20150
+ form.props.contentStyle,
20138
20151
  props2.contentStyle
20139
20152
  ];
20140
20153
  });
20154
+ const errorStyle = vue.computed(() => {
20155
+ return [form.props.errorStyle, props2.errorStyle];
20156
+ });
20157
+ const labelClass = vue.computed(() => {
20158
+ return [form.props.labelClass, props2.labelClass];
20159
+ });
20160
+ const contentClass = vue.computed(() => {
20161
+ return [form.props.contentClass, props2.contentClass];
20162
+ });
20163
+ const errorClass = vue.computed(() => {
20164
+ return [form.props.errorClass, props2.errorClass];
20165
+ });
20141
20166
  const isStyleless = vue.computed(() => {
20142
20167
  return props2.styleless || form.props.styleless;
20143
20168
  });
@@ -20300,6 +20325,10 @@ var Vc = (function (exports, vue) {
20300
20325
  classes,
20301
20326
  labelStyle,
20302
20327
  contentStyle,
20328
+ errorStyle,
20329
+ labelClass,
20330
+ contentClass,
20331
+ errorClass,
20303
20332
  showError,
20304
20333
  labelPosition
20305
20334
  };
@@ -20319,6 +20348,10 @@ var Vc = (function (exports, vue) {
20319
20348
  classes,
20320
20349
  labelStyle,
20321
20350
  contentStyle,
20351
+ errorStyle,
20352
+ labelClass,
20353
+ contentClass,
20354
+ errorClass,
20322
20355
  showError,
20323
20356
  validateMessage
20324
20357
  } = it;
@@ -20332,27 +20365,30 @@ var Vc = (function (exports, vue) {
20332
20365
  show: showError.value,
20333
20366
  nest: isNest.value,
20334
20367
  message: validateMessage.value,
20335
- class: errorColorClass
20368
+ class: [errorColorClass, ...errorClass.value],
20369
+ style: errorStyle.value
20336
20370
  })];
20337
20371
  return vue.createVNode("div", {
20338
20372
  "class": ["vc-form-item", classes.value]
20339
20373
  }, [(label || slots.label) && vue.createVNode("div", {
20340
20374
  "style": labelStyle.value,
20341
- "class": ["vc-form-item__label", props2.labelClass],
20375
+ "class": ["vc-form-item__label", ...labelClass.value],
20342
20376
  "for": labelFor
20343
20377
  }, [vue.createVNode("label", null, [label || slots.label?.()])]), vue.createVNode("div", {
20344
20378
  "class": "vc-form-item__wrapper"
20345
20379
  }, [vue.createVNode("div", {
20346
- "class": ["vc-form-item__content", props2.contentClass],
20380
+ "class": ["vc-form-item__content", ...contentClass.value],
20347
20381
  "style": contentStyle.value
20348
20382
  }, [slots.default?.(), slots.error ? slots.error({
20349
20383
  show: showError.value,
20350
20384
  nest: isNest.value,
20351
20385
  message: validateMessage.value,
20352
- class: errorColorClass
20386
+ class: [errorColorClass, ...errorClass.value],
20387
+ style: errorStyle.value
20353
20388
  }) : vue.createVNode(TransitionFade, null, {
20354
20389
  default: () => [vue.withDirectives(vue.createVNode("div", {
20355
- "class": ["vc-form-item__tip", isNest.value ? "is-nest" : "", errorColorClass]
20390
+ "class": ["vc-form-item__tip", isNest.value ? "is-nest" : "", errorColorClass, ...errorClass.value],
20391
+ "style": [errorStyle.value]
20356
20392
  }, [validateMessage.value]), [[vue.vShow, showError.value]])]
20357
20393
  })])])]);
20358
20394
  };
@@ -20412,6 +20448,10 @@ var Vc = (function (exports, vue) {
20412
20448
  classes,
20413
20449
  labelStyle,
20414
20450
  contentStyle,
20451
+ errorStyle,
20452
+ labelClass,
20453
+ contentClass,
20454
+ errorClass,
20415
20455
  isNest,
20416
20456
  showError,
20417
20457
  validateMessage
@@ -20427,7 +20467,8 @@ var Vc = (function (exports, vue) {
20427
20467
  show: showError.value,
20428
20468
  nest: isNest.value,
20429
20469
  message: validateMessage.value,
20430
- class: errorColorClass
20470
+ class: [errorColorClass, ...errorClass.value],
20471
+ style: errorStyle.value
20431
20472
  })];
20432
20473
  return vue.createVNode("div", {
20433
20474
  "style": {
@@ -20439,14 +20480,15 @@ var Vc = (function (exports, vue) {
20439
20480
  }, [(props2.label || slots.label) && vue.createVNode("label", {
20440
20481
  "for": labelFor,
20441
20482
  "style": labelStyle.value,
20442
- "class": "vcm-form-item__label"
20483
+ "class": ["vcm-form-item__label", ...labelClass.value]
20443
20484
  }, [label || slots.label?.()]), vue.createVNode("div", {
20444
20485
  "style": contentStyle.value,
20445
- "class": "vcm-form-item__content"
20486
+ "class": ["vcm-form-item__content", ...contentClass.value]
20446
20487
  }, [slots.default?.(), showMessage && showError.value && vue.createVNode("div", {
20447
20488
  "class": [{
20448
20489
  "is-nest": isNest.value
20449
- }, errorColorClass]
20490
+ }, errorColorClass, ...errorClass.value],
20491
+ "style": errorStyle.value
20450
20492
  }, [slots.error ? slots.error({
20451
20493
  message: validateMessage.value
20452
20494
  }) : validateMessage.value])])])]);
@@ -24812,6 +24854,7 @@ var Vc = (function (exports, vue) {
24812
24854
  });
24813
24855
  const classes = vue.computed(() => {
24814
24856
  return {
24857
+ "is-disabled": props2.disabled,
24815
24858
  "is-loading": isLoading.value,
24816
24859
  "is-checked": checked.value
24817
24860
  };
@@ -27990,6 +28033,7 @@ var Vc = (function (exports, vue) {
27990
28033
  emit("update:modelValue", currentValue.value);
27991
28034
  emit("change", currentValue.value);
27992
28035
  emit("click", currentValue.value);
28036
+ nav.anchor && document.querySelector(nav.anchor)?.scrollIntoView?.({ behavior: "smooth" });
27993
28037
  };
27994
28038
  const handleResize = () => {
27995
28039
  if (instance.isUnmounted) return;
@@ -28226,6 +28270,9 @@ var Vc = (function (exports, vue) {
28226
28270
  type: [String, Function],
28227
28271
  default: ""
28228
28272
  },
28273
+ anchor: {
28274
+ type: String
28275
+ },
28229
28276
  /**
28230
28277
  * 服务端渲染时,lazy设置为false,可以把内容渲染出来;
28231
28278
  * 不能设置为!IS_SERVER, 会影响客服端激活,不一样会存在问题
@@ -28635,6 +28682,10 @@ var Vc = (function (exports, vue) {
28635
28682
  default: (props$) => {
28636
28683
  return props$.value;
28637
28684
  }
28685
+ },
28686
+ theme: {
28687
+ type: String,
28688
+ default: "dark"
28638
28689
  }
28639
28690
  };
28640
28691
  const COMPONENT_NAME$e = "vc-text";
@@ -28684,7 +28735,7 @@ var Vc = (function (exports, vue) {
28684
28735
  // 确保不重复创建
28685
28736
  triggerEl: e.target,
28686
28737
  hover: true,
28687
- theme: "dark",
28738
+ theme: props2.theme,
28688
28739
  placement: props2.placement,
28689
28740
  portalClass: props2.portalClass,
28690
28741
  portalStyle: [props2.portalStyle || `width: ${e.target.clientWidth}px`, "word-break: break-all"],
@@ -9315,7 +9315,9 @@
9315
9315
  [`vc-affix__${props2.fixed ? "fixed" : "absolute"}`]: isActive.value
9316
9316
  },
9317
9317
  "style": contentStyle.value
9318
- }, [slots?.default?.()])]);
9318
+ }, [slots?.default?.({
9319
+ active: isActive.value
9320
+ })])]);
9319
9321
  };
9320
9322
  }
9321
9323
  });
@@ -19890,7 +19892,14 @@
19890
19892
  styleless: {
19891
19893
  type: Boolean,
19892
19894
  default: false
19893
- }
19895
+ },
19896
+ // 给formItem统一注入
19897
+ contentStyle: [Object, String],
19898
+ contentClass: [Object, String],
19899
+ labelStyle: [Object, String],
19900
+ labelClass: [Object, String],
19901
+ errorStyle: [Object, String],
19902
+ errorClass: [Object, String]
19894
19903
  };
19895
19904
  const useForm = (expose, options = {}) => {
19896
19905
  const instance = vue.getCurrentInstance();
@@ -20047,7 +20056,9 @@
20047
20056
  contentStyle: [Object, String],
20048
20057
  contentClass: [Object, String],
20049
20058
  labelStyle: [Object, String],
20050
- labelClass: [Object, String]
20059
+ labelClass: [Object, String],
20060
+ errorStyle: [Object, String],
20061
+ errorClass: [Object, String]
20051
20062
  };
20052
20063
  const filterEmpty = (val) => {
20053
20064
  if (val instanceof Array) {
@@ -20128,6 +20139,7 @@
20128
20139
  width: labelPosition.value !== "top" && labelWidth && labelWidth > 0 ? `${labelWidth}px` : "auto",
20129
20140
  textAlign: labelPosition.value === "top" ? "left" : labelPosition.value
20130
20141
  },
20142
+ form.props.labelStyle,
20131
20143
  props2.labelStyle
20132
20144
  ];
20133
20145
  });
@@ -20138,9 +20150,22 @@
20138
20150
  marginLeft: !hasLabel.value && isNest.value ? 0 : labelWidth && labelWidth > 0 ? `${labelWidth}px` : "unset",
20139
20151
  marginBottom: isNest.value && !isNestLast.value ? `20px` : 0
20140
20152
  },
20153
+ form.props.contentStyle,
20141
20154
  props2.contentStyle
20142
20155
  ];
20143
20156
  });
20157
+ const errorStyle = vue.computed(() => {
20158
+ return [form.props.errorStyle, props2.errorStyle];
20159
+ });
20160
+ const labelClass = vue.computed(() => {
20161
+ return [form.props.labelClass, props2.labelClass];
20162
+ });
20163
+ const contentClass = vue.computed(() => {
20164
+ return [form.props.contentClass, props2.contentClass];
20165
+ });
20166
+ const errorClass = vue.computed(() => {
20167
+ return [form.props.errorClass, props2.errorClass];
20168
+ });
20144
20169
  const isStyleless = vue.computed(() => {
20145
20170
  return props2.styleless || form.props.styleless;
20146
20171
  });
@@ -20303,6 +20328,10 @@
20303
20328
  classes,
20304
20329
  labelStyle,
20305
20330
  contentStyle,
20331
+ errorStyle,
20332
+ labelClass,
20333
+ contentClass,
20334
+ errorClass,
20306
20335
  showError,
20307
20336
  labelPosition
20308
20337
  };
@@ -20322,6 +20351,10 @@
20322
20351
  classes,
20323
20352
  labelStyle,
20324
20353
  contentStyle,
20354
+ errorStyle,
20355
+ labelClass,
20356
+ contentClass,
20357
+ errorClass,
20325
20358
  showError,
20326
20359
  validateMessage
20327
20360
  } = it;
@@ -20335,27 +20368,30 @@
20335
20368
  show: showError.value,
20336
20369
  nest: isNest.value,
20337
20370
  message: validateMessage.value,
20338
- class: errorColorClass
20371
+ class: [errorColorClass, ...errorClass.value],
20372
+ style: errorStyle.value
20339
20373
  })];
20340
20374
  return vue.createVNode("div", {
20341
20375
  "class": ["vc-form-item", classes.value]
20342
20376
  }, [(label || slots.label) && vue.createVNode("div", {
20343
20377
  "style": labelStyle.value,
20344
- "class": ["vc-form-item__label", props2.labelClass],
20378
+ "class": ["vc-form-item__label", ...labelClass.value],
20345
20379
  "for": labelFor
20346
20380
  }, [vue.createVNode("label", null, [label || slots.label?.()])]), vue.createVNode("div", {
20347
20381
  "class": "vc-form-item__wrapper"
20348
20382
  }, [vue.createVNode("div", {
20349
- "class": ["vc-form-item__content", props2.contentClass],
20383
+ "class": ["vc-form-item__content", ...contentClass.value],
20350
20384
  "style": contentStyle.value
20351
20385
  }, [slots.default?.(), slots.error ? slots.error({
20352
20386
  show: showError.value,
20353
20387
  nest: isNest.value,
20354
20388
  message: validateMessage.value,
20355
- class: errorColorClass
20389
+ class: [errorColorClass, ...errorClass.value],
20390
+ style: errorStyle.value
20356
20391
  }) : vue.createVNode(TransitionFade, null, {
20357
20392
  default: () => [vue.withDirectives(vue.createVNode("div", {
20358
- "class": ["vc-form-item__tip", isNest.value ? "is-nest" : "", errorColorClass]
20393
+ "class": ["vc-form-item__tip", isNest.value ? "is-nest" : "", errorColorClass, ...errorClass.value],
20394
+ "style": [errorStyle.value]
20359
20395
  }, [validateMessage.value]), [[vue.vShow, showError.value]])]
20360
20396
  })])])]);
20361
20397
  };
@@ -20415,6 +20451,10 @@
20415
20451
  classes,
20416
20452
  labelStyle,
20417
20453
  contentStyle,
20454
+ errorStyle,
20455
+ labelClass,
20456
+ contentClass,
20457
+ errorClass,
20418
20458
  isNest,
20419
20459
  showError,
20420
20460
  validateMessage
@@ -20430,7 +20470,8 @@
20430
20470
  show: showError.value,
20431
20471
  nest: isNest.value,
20432
20472
  message: validateMessage.value,
20433
- class: errorColorClass
20473
+ class: [errorColorClass, ...errorClass.value],
20474
+ style: errorStyle.value
20434
20475
  })];
20435
20476
  return vue.createVNode("div", {
20436
20477
  "style": {
@@ -20442,14 +20483,15 @@
20442
20483
  }, [(props2.label || slots.label) && vue.createVNode("label", {
20443
20484
  "for": labelFor,
20444
20485
  "style": labelStyle.value,
20445
- "class": "vcm-form-item__label"
20486
+ "class": ["vcm-form-item__label", ...labelClass.value]
20446
20487
  }, [label || slots.label?.()]), vue.createVNode("div", {
20447
20488
  "style": contentStyle.value,
20448
- "class": "vcm-form-item__content"
20489
+ "class": ["vcm-form-item__content", ...contentClass.value]
20449
20490
  }, [slots.default?.(), showMessage && showError.value && vue.createVNode("div", {
20450
20491
  "class": [{
20451
20492
  "is-nest": isNest.value
20452
- }, errorColorClass]
20493
+ }, errorColorClass, ...errorClass.value],
20494
+ "style": errorStyle.value
20453
20495
  }, [slots.error ? slots.error({
20454
20496
  message: validateMessage.value
20455
20497
  }) : validateMessage.value])])])]);
@@ -24815,6 +24857,7 @@
24815
24857
  });
24816
24858
  const classes = vue.computed(() => {
24817
24859
  return {
24860
+ "is-disabled": props2.disabled,
24818
24861
  "is-loading": isLoading.value,
24819
24862
  "is-checked": checked.value
24820
24863
  };
@@ -27993,6 +28036,7 @@
27993
28036
  emit("update:modelValue", currentValue.value);
27994
28037
  emit("change", currentValue.value);
27995
28038
  emit("click", currentValue.value);
28039
+ nav.anchor && document.querySelector(nav.anchor)?.scrollIntoView?.({ behavior: "smooth" });
27996
28040
  };
27997
28041
  const handleResize = () => {
27998
28042
  if (instance.isUnmounted) return;
@@ -28229,6 +28273,9 @@
28229
28273
  type: [String, Function],
28230
28274
  default: ""
28231
28275
  },
28276
+ anchor: {
28277
+ type: String
28278
+ },
28232
28279
  /**
28233
28280
  * 服务端渲染时,lazy设置为false,可以把内容渲染出来;
28234
28281
  * 不能设置为!IS_SERVER, 会影响客服端激活,不一样会存在问题
@@ -28638,6 +28685,10 @@
28638
28685
  default: (props$) => {
28639
28686
  return props$.value;
28640
28687
  }
28688
+ },
28689
+ theme: {
28690
+ type: String,
28691
+ default: "dark"
28641
28692
  }
28642
28693
  };
28643
28694
  const COMPONENT_NAME$e = "vc-text";
@@ -28687,7 +28738,7 @@
28687
28738
  // 确保不重复创建
28688
28739
  triggerEl: e.target,
28689
28740
  hover: true,
28690
- theme: "dark",
28741
+ theme: props2.theme,
28691
28742
  placement: props2.placement,
28692
28743
  portalClass: props2.portalClass,
28693
28744
  portalStyle: [props2.portalStyle || `width: ${e.target.clientWidth}px`, "word-break: break-all"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deot/vc",
3
- "version": "1.0.44",
3
+ "version": "1.0.46",
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.44",
23
- "@deot/vc-hooks": "^1.0.44",
24
- "@deot/vc-shared": "^1.0.44"
22
+ "@deot/vc-components": "^1.0.46",
23
+ "@deot/vc-hooks": "^1.0.46",
24
+ "@deot/vc-shared": "^1.0.46"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "vue": "*"