@deot/vc-components 1.0.27 → 1.0.29
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 +835 -432
- package/dist/index.d.ts +460 -22
- package/dist/index.iife.js +825 -422
- package/dist/index.js +833 -434
- package/dist/index.style.css +1 -1
- package/dist/index.umd.cjs +825 -422
- package/package.json +1 -1
package/dist/index.umd.cjs
CHANGED
|
@@ -67,9 +67,9 @@
|
|
|
67
67
|
|
|
68
68
|
/** @jsxImportSource vue */
|
|
69
69
|
|
|
70
|
-
const COMPONENT_NAME$
|
|
70
|
+
const COMPONENT_NAME$22 = 'vc-action-sheet';
|
|
71
71
|
const ActionSheet = /* @__PURE__ */ vue.defineComponent({
|
|
72
|
-
name: COMPONENT_NAME$
|
|
72
|
+
name: COMPONENT_NAME$22,
|
|
73
73
|
props: props$1q,
|
|
74
74
|
setup(props, {
|
|
75
75
|
slots
|
|
@@ -256,9 +256,9 @@
|
|
|
256
256
|
|
|
257
257
|
/** @jsxImportSource vue */
|
|
258
258
|
|
|
259
|
-
const COMPONENT_NAME$
|
|
259
|
+
const COMPONENT_NAME$21 = 'vc-icon';
|
|
260
260
|
const Icon = /* @__PURE__ */ vue.defineComponent({
|
|
261
|
-
name: COMPONENT_NAME$
|
|
261
|
+
name: COMPONENT_NAME$21,
|
|
262
262
|
props: props$1o,
|
|
263
263
|
setup(props) {
|
|
264
264
|
const viewBox = vue.ref('0 0 1024 1024');
|
|
@@ -457,9 +457,9 @@
|
|
|
457
457
|
};
|
|
458
458
|
};
|
|
459
459
|
|
|
460
|
-
const COMPONENT_NAME$
|
|
460
|
+
const COMPONENT_NAME$20 = "vc-transition";
|
|
461
461
|
const Transition = vue.defineComponent({
|
|
462
|
-
name: COMPONENT_NAME$
|
|
462
|
+
name: COMPONENT_NAME$20,
|
|
463
463
|
props: props$1n,
|
|
464
464
|
// 当不声明emits的情况下,事件存在于attrs中
|
|
465
465
|
inheritAttrs: false,
|
|
@@ -480,9 +480,9 @@
|
|
|
480
480
|
}
|
|
481
481
|
});
|
|
482
482
|
|
|
483
|
-
const COMPONENT_NAME$
|
|
483
|
+
const COMPONENT_NAME$1$ = "vc-transition-collapse";
|
|
484
484
|
const TransitionCollapse = vue.defineComponent({
|
|
485
|
-
name: COMPONENT_NAME$
|
|
485
|
+
name: COMPONENT_NAME$1$,
|
|
486
486
|
props: props$1n,
|
|
487
487
|
// 当不声明emits的情况下,事件存在于attrs中
|
|
488
488
|
inheritAttrs: false,
|
|
@@ -601,9 +601,9 @@
|
|
|
601
601
|
}
|
|
602
602
|
});
|
|
603
603
|
|
|
604
|
-
const COMPONENT_NAME$
|
|
604
|
+
const COMPONENT_NAME$1_ = "vc-transition-fade";
|
|
605
605
|
const TransitionFade = vue.defineComponent({
|
|
606
|
-
name: COMPONENT_NAME$
|
|
606
|
+
name: COMPONENT_NAME$1_,
|
|
607
607
|
props: {
|
|
608
608
|
...props$1n,
|
|
609
609
|
// inheritAttrs必须是false
|
|
@@ -638,9 +638,9 @@
|
|
|
638
638
|
}
|
|
639
639
|
});
|
|
640
640
|
|
|
641
|
-
const COMPONENT_NAME$
|
|
641
|
+
const COMPONENT_NAME$1Z = "vc-transition-scale";
|
|
642
642
|
const TransitionScale = vue.defineComponent({
|
|
643
|
-
name: COMPONENT_NAME$
|
|
643
|
+
name: COMPONENT_NAME$1Z,
|
|
644
644
|
props: {
|
|
645
645
|
...props$1n,
|
|
646
646
|
mode: {
|
|
@@ -680,9 +680,9 @@
|
|
|
680
680
|
}
|
|
681
681
|
});
|
|
682
682
|
|
|
683
|
-
const COMPONENT_NAME$
|
|
683
|
+
const COMPONENT_NAME$1Y = "vc-transition-slide";
|
|
684
684
|
const TransitionSlide = vue.defineComponent({
|
|
685
|
-
name: COMPONENT_NAME$
|
|
685
|
+
name: COMPONENT_NAME$1Y,
|
|
686
686
|
props: {
|
|
687
687
|
...props$1n,
|
|
688
688
|
mode: {
|
|
@@ -722,9 +722,9 @@
|
|
|
722
722
|
}
|
|
723
723
|
});
|
|
724
724
|
|
|
725
|
-
const COMPONENT_NAME$
|
|
725
|
+
const COMPONENT_NAME$1X = "vc-transition-zoom";
|
|
726
726
|
const TransitionZoom = vue.defineComponent({
|
|
727
|
-
name: COMPONENT_NAME$
|
|
727
|
+
name: COMPONENT_NAME$1X,
|
|
728
728
|
props: {
|
|
729
729
|
...props$1n,
|
|
730
730
|
mode: {
|
|
@@ -766,7 +766,7 @@
|
|
|
766
766
|
|
|
767
767
|
/** @jsxImportSource vue */
|
|
768
768
|
|
|
769
|
-
const COMPONENT_NAME$
|
|
769
|
+
const COMPONENT_NAME$1W = 'vc-alert';
|
|
770
770
|
|
|
771
771
|
// [color, borderColor, backgroundColor], -> CSS
|
|
772
772
|
const THEME_MAP = {
|
|
@@ -776,7 +776,7 @@
|
|
|
776
776
|
warning: ['#ffbf00', '#ffe58f', '#fffbe6']
|
|
777
777
|
};
|
|
778
778
|
const Alert = /* @__PURE__ */ vue.defineComponent({
|
|
779
|
-
name: COMPONENT_NAME$
|
|
779
|
+
name: COMPONENT_NAME$1W,
|
|
780
780
|
props: props$1p,
|
|
781
781
|
setup(props, {
|
|
782
782
|
slots,
|
|
@@ -875,9 +875,9 @@
|
|
|
875
875
|
|
|
876
876
|
/** @jsxImportSource vue */
|
|
877
877
|
|
|
878
|
-
const COMPONENT_NAME$
|
|
878
|
+
const COMPONENT_NAME$1V = 'vc-artboard';
|
|
879
879
|
const Artboard = /* @__PURE__ */ vue.defineComponent({
|
|
880
|
-
name: COMPONENT_NAME$
|
|
880
|
+
name: COMPONENT_NAME$1V,
|
|
881
881
|
props: props$1m,
|
|
882
882
|
setup(props, {
|
|
883
883
|
slots
|
|
@@ -916,9 +916,9 @@
|
|
|
916
916
|
|
|
917
917
|
/** @jsxImportSource vue */
|
|
918
918
|
|
|
919
|
-
const COMPONENT_NAME$
|
|
919
|
+
const COMPONENT_NAME$1U = 'vc-spin';
|
|
920
920
|
const Spin = /* @__PURE__ */ vue.defineComponent({
|
|
921
|
-
name: COMPONENT_NAME$
|
|
921
|
+
name: COMPONENT_NAME$1U,
|
|
922
922
|
props: props$1l,
|
|
923
923
|
setup(props, {
|
|
924
924
|
slots
|
|
@@ -5774,9 +5774,9 @@
|
|
|
5774
5774
|
exclude: RegExp
|
|
5775
5775
|
};
|
|
5776
5776
|
|
|
5777
|
-
const COMPONENT_NAME$
|
|
5777
|
+
const COMPONENT_NAME$1T = "vc-debounce";
|
|
5778
5778
|
const Debounce = vue.defineComponent({
|
|
5779
|
-
name: COMPONENT_NAME$
|
|
5779
|
+
name: COMPONENT_NAME$1T,
|
|
5780
5780
|
props: props$1k,
|
|
5781
5781
|
/**
|
|
5782
5782
|
* 不声明emits使得事件被透传放入attrs中, 这样可以让所有的事件透传
|
|
@@ -5848,9 +5848,9 @@
|
|
|
5848
5848
|
|
|
5849
5849
|
/** @jsxImportSource vue */
|
|
5850
5850
|
|
|
5851
|
-
const COMPONENT_NAME$
|
|
5851
|
+
const COMPONENT_NAME$1S = 'vc-button';
|
|
5852
5852
|
const Button = /* @__PURE__ */ vue.defineComponent({
|
|
5853
|
-
name: COMPONENT_NAME$
|
|
5853
|
+
name: COMPONENT_NAME$1S,
|
|
5854
5854
|
emits: ['click'],
|
|
5855
5855
|
props: props$1j,
|
|
5856
5856
|
setup(props, {
|
|
@@ -5932,9 +5932,9 @@
|
|
|
5932
5932
|
|
|
5933
5933
|
/** @jsxImportSource vue */
|
|
5934
5934
|
|
|
5935
|
-
const COMPONENT_NAME$
|
|
5935
|
+
const COMPONENT_NAME$1R = 'vc-button-group';
|
|
5936
5936
|
const ButtonGroup = /* @__PURE__ */ vue.defineComponent({
|
|
5937
|
-
name: COMPONENT_NAME$
|
|
5937
|
+
name: COMPONENT_NAME$1R,
|
|
5938
5938
|
props: props$1i,
|
|
5939
5939
|
setup(props, {
|
|
5940
5940
|
slots
|
|
@@ -5968,9 +5968,9 @@
|
|
|
5968
5968
|
|
|
5969
5969
|
/** @jsxImportSource vue */
|
|
5970
5970
|
|
|
5971
|
-
const COMPONENT_NAME$
|
|
5971
|
+
const COMPONENT_NAME$1Q = 'vc-calendar';
|
|
5972
5972
|
const Calendar$1 = /* @__PURE__ */ vue.defineComponent({
|
|
5973
|
-
name: COMPONENT_NAME$
|
|
5973
|
+
name: COMPONENT_NAME$1Q,
|
|
5974
5974
|
props: props$1h,
|
|
5975
5975
|
setup(props, {
|
|
5976
5976
|
slots
|
|
@@ -6008,9 +6008,9 @@
|
|
|
6008
6008
|
|
|
6009
6009
|
/** @jsxImportSource vue */
|
|
6010
6010
|
|
|
6011
|
-
const COMPONENT_NAME$
|
|
6011
|
+
const COMPONENT_NAME$1P = 'vc-card';
|
|
6012
6012
|
const Card = /* @__PURE__ */ vue.defineComponent({
|
|
6013
|
-
name: COMPONENT_NAME$
|
|
6013
|
+
name: COMPONENT_NAME$1P,
|
|
6014
6014
|
props: props$1g,
|
|
6015
6015
|
setup(props, {
|
|
6016
6016
|
slots
|
|
@@ -6046,9 +6046,9 @@
|
|
|
6046
6046
|
|
|
6047
6047
|
/** @jsxImportSource vue */
|
|
6048
6048
|
|
|
6049
|
-
const COMPONENT_NAME$
|
|
6049
|
+
const COMPONENT_NAME$1O = 'vc-carousel';
|
|
6050
6050
|
const Carousel = /* @__PURE__ */ vue.defineComponent({
|
|
6051
|
-
name: COMPONENT_NAME$
|
|
6051
|
+
name: COMPONENT_NAME$1O,
|
|
6052
6052
|
props: props$1f,
|
|
6053
6053
|
setup(props, {
|
|
6054
6054
|
slots
|
|
@@ -6072,9 +6072,9 @@
|
|
|
6072
6072
|
|
|
6073
6073
|
/** @jsxImportSource vue */
|
|
6074
6074
|
|
|
6075
|
-
const COMPONENT_NAME$
|
|
6075
|
+
const COMPONENT_NAME$1N = 'vc-cascader';
|
|
6076
6076
|
const Cascader = /* @__PURE__ */ vue.defineComponent({
|
|
6077
|
-
name: COMPONENT_NAME$
|
|
6077
|
+
name: COMPONENT_NAME$1N,
|
|
6078
6078
|
props: props$1e,
|
|
6079
6079
|
setup(props, {
|
|
6080
6080
|
slots
|
|
@@ -6206,9 +6206,9 @@
|
|
|
6206
6206
|
|
|
6207
6207
|
/** @jsxImportSource vue */
|
|
6208
6208
|
|
|
6209
|
-
const COMPONENT_NAME$
|
|
6209
|
+
const COMPONENT_NAME$1M = 'vc-chart';
|
|
6210
6210
|
const Chart = /* @__PURE__ */ vue.defineComponent({
|
|
6211
|
-
name: COMPONENT_NAME$
|
|
6211
|
+
name: COMPONENT_NAME$1M,
|
|
6212
6212
|
props: props$1d,
|
|
6213
6213
|
emits: [...EVENTS, 'ready'],
|
|
6214
6214
|
setup(props, {
|
|
@@ -6440,9 +6440,9 @@
|
|
|
6440
6440
|
|
|
6441
6441
|
/** @jsxImportSource vue */
|
|
6442
6442
|
|
|
6443
|
-
const COMPONENT_NAME$
|
|
6443
|
+
const COMPONENT_NAME$1L = 'vc-checkbox';
|
|
6444
6444
|
const Checkbox = /* @__PURE__ */ vue.defineComponent({
|
|
6445
|
-
name: COMPONENT_NAME$
|
|
6445
|
+
name: COMPONENT_NAME$1L,
|
|
6446
6446
|
props: props$1c,
|
|
6447
6447
|
emits: ['update:modelValue', 'change'],
|
|
6448
6448
|
setup(props, {
|
|
@@ -6529,9 +6529,9 @@
|
|
|
6529
6529
|
|
|
6530
6530
|
/** @jsxImportSource vue */
|
|
6531
6531
|
|
|
6532
|
-
const COMPONENT_NAME$
|
|
6532
|
+
const COMPONENT_NAME$1K = 'vc-checkbox-group';
|
|
6533
6533
|
const CheckboxGroup = /* @__PURE__ */ vue.defineComponent({
|
|
6534
|
-
name: COMPONENT_NAME$
|
|
6534
|
+
name: COMPONENT_NAME$1K,
|
|
6535
6535
|
props: props$1b,
|
|
6536
6536
|
emits: ['update:modelValue', 'change'],
|
|
6537
6537
|
setup(props, {
|
|
@@ -6549,9 +6549,9 @@
|
|
|
6549
6549
|
|
|
6550
6550
|
/** @jsxImportSource vue */
|
|
6551
6551
|
|
|
6552
|
-
const COMPONENT_NAME$
|
|
6552
|
+
const COMPONENT_NAME$1J = 'vcm-checkbox';
|
|
6553
6553
|
const MCheckbox = /* @__PURE__ */ vue.defineComponent({
|
|
6554
|
-
name: COMPONENT_NAME$
|
|
6554
|
+
name: COMPONENT_NAME$1J,
|
|
6555
6555
|
props: props$1c,
|
|
6556
6556
|
emits: ['update:modelValue', 'change'],
|
|
6557
6557
|
setup(props, {
|
|
@@ -6591,9 +6591,9 @@
|
|
|
6591
6591
|
|
|
6592
6592
|
/** @jsxImportSource vue */
|
|
6593
6593
|
|
|
6594
|
-
const COMPONENT_NAME$
|
|
6594
|
+
const COMPONENT_NAME$1I = 'vcm-checkbox-group';
|
|
6595
6595
|
const MCheckboxGroup = /* @__PURE__ */ vue.defineComponent({
|
|
6596
|
-
name: COMPONENT_NAME$
|
|
6596
|
+
name: COMPONENT_NAME$1I,
|
|
6597
6597
|
props: props$1b,
|
|
6598
6598
|
emits: ['update:modelValue', 'change'],
|
|
6599
6599
|
setup(props, {
|
|
@@ -6652,9 +6652,9 @@
|
|
|
6652
6652
|
}
|
|
6653
6653
|
};
|
|
6654
6654
|
|
|
6655
|
-
const COMPONENT_NAME$
|
|
6655
|
+
const COMPONENT_NAME$1H = "vc-customer";
|
|
6656
6656
|
const Customer = vue.defineComponent({
|
|
6657
|
-
name: COMPONENT_NAME$
|
|
6657
|
+
name: COMPONENT_NAME$1H,
|
|
6658
6658
|
props: props$19,
|
|
6659
6659
|
setup(props, context) {
|
|
6660
6660
|
return () => vue.h(() => {
|
|
@@ -6665,9 +6665,9 @@
|
|
|
6665
6665
|
|
|
6666
6666
|
/** @jsxImportSource vue */
|
|
6667
6667
|
|
|
6668
|
-
const COMPONENT_NAME$
|
|
6668
|
+
const COMPONENT_NAME$1G = 'vc-message';
|
|
6669
6669
|
const MessageView = /* @__PURE__ */ vue.defineComponent({
|
|
6670
|
-
name: COMPONENT_NAME$
|
|
6670
|
+
name: COMPONENT_NAME$1G,
|
|
6671
6671
|
emits: ['before-close', 'close', 'portal-fulfilled'],
|
|
6672
6672
|
props: props$1a,
|
|
6673
6673
|
setup(props, {
|
|
@@ -7227,7 +7227,7 @@
|
|
|
7227
7227
|
}
|
|
7228
7228
|
}
|
|
7229
7229
|
|
|
7230
|
-
const COMPONENT_NAME$
|
|
7230
|
+
const COMPONENT_NAME$1F = "vc-portal";
|
|
7231
7231
|
class Portal {
|
|
7232
7232
|
/**
|
|
7233
7233
|
* 清理Portals类型组件
|
|
@@ -7279,7 +7279,7 @@
|
|
|
7279
7279
|
this.wrapper = wrapper;
|
|
7280
7280
|
this.globalOptions = {
|
|
7281
7281
|
...options,
|
|
7282
|
-
name: options?.name || wrapper.name || getUid(COMPONENT_NAME$
|
|
7282
|
+
name: options?.name || wrapper.name || getUid(COMPONENT_NAME$1F)
|
|
7283
7283
|
};
|
|
7284
7284
|
}
|
|
7285
7285
|
popup(propsData, options) {
|
|
@@ -7378,7 +7378,7 @@
|
|
|
7378
7378
|
...rest
|
|
7379
7379
|
} = options;
|
|
7380
7380
|
let useAllNodes = fragment;
|
|
7381
|
-
const name = multiple ? `${name$}__${getUid(COMPONENT_NAME$
|
|
7381
|
+
const name = multiple ? `${name$}__${getUid(COMPONENT_NAME$1F)}` : name$;
|
|
7382
7382
|
const container = document.createElement(tag);
|
|
7383
7383
|
const root = typeof el === "object" ? el : document.querySelector(el || "body");
|
|
7384
7384
|
!alive && Portal.leafs.get(name)?.destroy();
|
|
@@ -7412,7 +7412,7 @@
|
|
|
7412
7412
|
} else {
|
|
7413
7413
|
const wrapper = this.wrapper;
|
|
7414
7414
|
const app = vue.createApp({
|
|
7415
|
-
name: COMPONENT_NAME$
|
|
7415
|
+
name: COMPONENT_NAME$1F,
|
|
7416
7416
|
parent,
|
|
7417
7417
|
setup() {
|
|
7418
7418
|
if (alive) {
|
|
@@ -7524,13 +7524,13 @@
|
|
|
7524
7524
|
}
|
|
7525
7525
|
};
|
|
7526
7526
|
|
|
7527
|
-
const COMPONENT_NAME$
|
|
7527
|
+
const COMPONENT_NAME$1E = 'vc-portal-view';
|
|
7528
7528
|
|
|
7529
7529
|
/**
|
|
7530
7530
|
* 写法不同,但与vue@2.x 保持一致
|
|
7531
7531
|
*/
|
|
7532
7532
|
const PortalView = /* @__PURE__ */ vue.defineComponent({
|
|
7533
|
-
name: COMPONENT_NAME$
|
|
7533
|
+
name: COMPONENT_NAME$1E,
|
|
7534
7534
|
props: props$18,
|
|
7535
7535
|
setup(props, {
|
|
7536
7536
|
slots
|
|
@@ -7701,9 +7701,9 @@
|
|
|
7701
7701
|
return () => vue.h(props.tag, { onClick: handleClick, class: "vc-clipboard" }, slots?.default?.());
|
|
7702
7702
|
};
|
|
7703
7703
|
|
|
7704
|
-
const COMPONENT_NAME$
|
|
7704
|
+
const COMPONENT_NAME$1D = "vc-clipboard";
|
|
7705
7705
|
const Clipboard$1 = vue.defineComponent({
|
|
7706
|
-
name: COMPONENT_NAME$
|
|
7706
|
+
name: COMPONENT_NAME$1D,
|
|
7707
7707
|
props: props$17,
|
|
7708
7708
|
setup() {
|
|
7709
7709
|
return useClipboard((content) => Message.success({ content }));
|
|
@@ -7743,9 +7743,9 @@
|
|
|
7743
7743
|
|
|
7744
7744
|
/** @jsxImportSource vue */
|
|
7745
7745
|
|
|
7746
|
-
const COMPONENT_NAME$
|
|
7746
|
+
const COMPONENT_NAME$1C = 'vcm-toast';
|
|
7747
7747
|
const MToastView = /* @__PURE__ */ vue.defineComponent({
|
|
7748
|
-
name: COMPONENT_NAME$
|
|
7748
|
+
name: COMPONENT_NAME$1C,
|
|
7749
7749
|
emits: ['close', 'portal-fulfilled'],
|
|
7750
7750
|
props: props$16,
|
|
7751
7751
|
setup(props, {
|
|
@@ -7847,9 +7847,9 @@
|
|
|
7847
7847
|
const error$2 = create$6({ mode: "error" });
|
|
7848
7848
|
const MToast = Object.assign(MToastView, { destroy: destroy$4, info: info$2, success: success$2, loading, warning: warning$2, error: error$2 });
|
|
7849
7849
|
|
|
7850
|
-
const COMPONENT_NAME$
|
|
7850
|
+
const COMPONENT_NAME$1B = "vcm-clipboard";
|
|
7851
7851
|
const MClipboard$1 = vue.defineComponent({
|
|
7852
|
-
name: COMPONENT_NAME$
|
|
7852
|
+
name: COMPONENT_NAME$1B,
|
|
7853
7853
|
props: props$17,
|
|
7854
7854
|
setup() {
|
|
7855
7855
|
return useClipboard((content) => MToast.info({ content }));
|
|
@@ -7881,9 +7881,9 @@
|
|
|
7881
7881
|
}
|
|
7882
7882
|
};
|
|
7883
7883
|
|
|
7884
|
-
const COMPONENT_NAME$
|
|
7884
|
+
const COMPONENT_NAME$1A = "vc-collapse";
|
|
7885
7885
|
const Collapse = vue.defineComponent({
|
|
7886
|
-
name: COMPONENT_NAME$
|
|
7886
|
+
name: COMPONENT_NAME$1A,
|
|
7887
7887
|
props: props$15,
|
|
7888
7888
|
emits: ["update:moodelValue", "change"],
|
|
7889
7889
|
setup(props, { slots, emit }) {
|
|
@@ -7997,12 +7997,12 @@
|
|
|
7997
7997
|
|
|
7998
7998
|
/** @jsxImportSource vue */
|
|
7999
7999
|
|
|
8000
|
-
function _isSlot$
|
|
8000
|
+
function _isSlot$2(s) {
|
|
8001
8001
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
8002
8002
|
}
|
|
8003
|
-
const COMPONENT_NAME$
|
|
8003
|
+
const COMPONENT_NAME$1z = 'vc-expand';
|
|
8004
8004
|
const Expand$1 = /* @__PURE__ */ vue.defineComponent({
|
|
8005
|
-
name: COMPONENT_NAME$
|
|
8005
|
+
name: COMPONENT_NAME$1z,
|
|
8006
8006
|
props: props$13,
|
|
8007
8007
|
setup(props, {
|
|
8008
8008
|
slots
|
|
@@ -8021,7 +8021,7 @@
|
|
|
8021
8021
|
enter: 200,
|
|
8022
8022
|
leave: 200
|
|
8023
8023
|
}
|
|
8024
|
-
}, _isSlot$
|
|
8024
|
+
}, _isSlot$2(_slot = vue.withDirectives(vue.createVNode(Content, null, {
|
|
8025
8025
|
default: () => [(props.alive || !props.alive && isActive.value) && slots.default?.()]
|
|
8026
8026
|
}), [[vue.vShow, isActive.value]])) ? _slot : {
|
|
8027
8027
|
default: () => [_slot]
|
|
@@ -8032,9 +8032,9 @@
|
|
|
8032
8032
|
|
|
8033
8033
|
/** @jsxImportSource vue */
|
|
8034
8034
|
|
|
8035
|
-
const COMPONENT_NAME$
|
|
8035
|
+
const COMPONENT_NAME$1y = 'vc-collapse-item';
|
|
8036
8036
|
const CollapseItem = /* @__PURE__ */ vue.defineComponent({
|
|
8037
|
-
name: COMPONENT_NAME$
|
|
8037
|
+
name: COMPONENT_NAME$1y,
|
|
8038
8038
|
props: props$14,
|
|
8039
8039
|
setup(props, {
|
|
8040
8040
|
slots,
|
|
@@ -8109,9 +8109,9 @@
|
|
|
8109
8109
|
|
|
8110
8110
|
/** @jsxImportSource vue */
|
|
8111
8111
|
|
|
8112
|
-
const COMPONENT_NAME$
|
|
8112
|
+
const COMPONENT_NAME$1x = 'vc-color-picker';
|
|
8113
8113
|
const ColorPicker = /* @__PURE__ */ vue.defineComponent({
|
|
8114
|
-
name: COMPONENT_NAME$
|
|
8114
|
+
name: COMPONENT_NAME$1x,
|
|
8115
8115
|
props: props$12,
|
|
8116
8116
|
setup(props, {
|
|
8117
8117
|
slots
|
|
@@ -8135,9 +8135,9 @@
|
|
|
8135
8135
|
|
|
8136
8136
|
/** @jsxImportSource vue */
|
|
8137
8137
|
|
|
8138
|
-
const COMPONENT_NAME$
|
|
8138
|
+
const COMPONENT_NAME$1w = 'vc-countdown';
|
|
8139
8139
|
const Countdown = /* @__PURE__ */ vue.defineComponent({
|
|
8140
|
-
name: COMPONENT_NAME$
|
|
8140
|
+
name: COMPONENT_NAME$1w,
|
|
8141
8141
|
props: props$11,
|
|
8142
8142
|
setup(props, {
|
|
8143
8143
|
slots
|
|
@@ -8651,9 +8651,9 @@
|
|
|
8651
8651
|
|
|
8652
8652
|
/** @jsxImportSource vue */
|
|
8653
8653
|
|
|
8654
|
-
const COMPONENT_NAME$
|
|
8654
|
+
const COMPONENT_NAME$1v = 'vc-input';
|
|
8655
8655
|
const Input = /* @__PURE__ */ vue.defineComponent({
|
|
8656
|
-
name: COMPONENT_NAME$
|
|
8656
|
+
name: COMPONENT_NAME$1v,
|
|
8657
8657
|
inheritAttrs: false,
|
|
8658
8658
|
props: {
|
|
8659
8659
|
...props$$,
|
|
@@ -8666,7 +8666,8 @@
|
|
|
8666
8666
|
emits: ['update:modelValue', 'input', 'change', 'focus', 'blur', 'clear', 'paste', 'keydown', 'keypress', 'keyup', 'enter', 'tip'],
|
|
8667
8667
|
setup(props, {
|
|
8668
8668
|
slots,
|
|
8669
|
-
expose
|
|
8669
|
+
expose,
|
|
8670
|
+
attrs
|
|
8670
8671
|
}) {
|
|
8671
8672
|
const input = vue.ref();
|
|
8672
8673
|
useNativeEmitter(input, expose);
|
|
@@ -8733,9 +8734,9 @@
|
|
|
8733
8734
|
}, classes.value]
|
|
8734
8735
|
}, [slots.prepend?.() || props.prepend && vue.createVNode(Icon, {
|
|
8735
8736
|
"type": props.prepend
|
|
8736
|
-
}, null)]), vue.createVNode("div", {
|
|
8737
|
+
}, null)]), vue.createVNode("div", vue.mergeProps({
|
|
8737
8738
|
"class": ['vc-input__content', classes.value]
|
|
8738
|
-
}, [slots.content
|
|
8739
|
+
}, slots.content ? it.value.listeners : {}), [slots.content ? slots.content() : renderInput(false)]), !props.disabled && props.clearable && vue.createVNode(TransitionFade, null, {
|
|
8739
8740
|
default: () => [vue.createVNode(Icon, {
|
|
8740
8741
|
"class": "vc-input__icon-clear",
|
|
8741
8742
|
"type": "clear",
|
|
@@ -8987,9 +8988,9 @@
|
|
|
8987
8988
|
|
|
8988
8989
|
/** @jsxImportSource vue */
|
|
8989
8990
|
|
|
8990
|
-
const COMPONENT_NAME$
|
|
8991
|
+
const COMPONENT_NAME$1u = 'vc-input-number';
|
|
8991
8992
|
const InputNumber = /* @__PURE__ */ vue.defineComponent({
|
|
8992
|
-
name: COMPONENT_NAME$
|
|
8993
|
+
name: COMPONENT_NAME$1u,
|
|
8993
8994
|
props: props$X,
|
|
8994
8995
|
inheritAttrs: false,
|
|
8995
8996
|
setup(props, {
|
|
@@ -9053,9 +9054,9 @@
|
|
|
9053
9054
|
|
|
9054
9055
|
/** @jsxImportSource vue */
|
|
9055
9056
|
|
|
9056
|
-
const COMPONENT_NAME$
|
|
9057
|
+
const COMPONENT_NAME$1t = 'vc-input-search';
|
|
9057
9058
|
const InputSearch = /* @__PURE__ */ vue.defineComponent({
|
|
9058
|
-
name: COMPONENT_NAME$
|
|
9059
|
+
name: COMPONENT_NAME$1t,
|
|
9059
9060
|
props: props$W,
|
|
9060
9061
|
inheritAttrs: false,
|
|
9061
9062
|
setup(props, {
|
|
@@ -9343,12 +9344,9 @@
|
|
|
9343
9344
|
|
|
9344
9345
|
/** @jsxImportSource vue */
|
|
9345
9346
|
|
|
9346
|
-
|
|
9347
|
-
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
9348
|
-
}
|
|
9349
|
-
const COMPONENT_NAME$1q = 'vc-popover-wrapper';
|
|
9347
|
+
const COMPONENT_NAME$1s = 'vc-popover-wrapper';
|
|
9350
9348
|
const PopoverWrapper = /* @__PURE__ */ vue.defineComponent({
|
|
9351
|
-
name: COMPONENT_NAME$
|
|
9349
|
+
name: COMPONENT_NAME$1s,
|
|
9352
9350
|
props: props$_,
|
|
9353
9351
|
emits: ['portal-fulfilled', 'close'],
|
|
9354
9352
|
setup(props, {
|
|
@@ -9410,7 +9408,12 @@
|
|
|
9410
9408
|
return container;
|
|
9411
9409
|
}
|
|
9412
9410
|
};
|
|
9413
|
-
|
|
9411
|
+
|
|
9412
|
+
/**
|
|
9413
|
+
* 添加debounce解决连续setPopupStyle的情况
|
|
9414
|
+
* 待排查
|
|
9415
|
+
*/
|
|
9416
|
+
const setPopupStyle = debounce$1(() => {
|
|
9414
9417
|
if (!vnode.el) return;
|
|
9415
9418
|
const triggerEl = getHackContainer();
|
|
9416
9419
|
const {
|
|
@@ -9440,13 +9443,15 @@
|
|
|
9440
9443
|
fitPos.value = result;
|
|
9441
9444
|
wrapperStyle.value = $wrapperStyle;
|
|
9442
9445
|
arrowStyle.value = $arrowStyle;
|
|
9443
|
-
|
|
9444
9446
|
// 自适应高度
|
|
9445
9447
|
if (props.autoWidth) return;
|
|
9446
9448
|
wrapperW.value = {
|
|
9447
9449
|
width: `${triggerEl.getBoundingClientRect().width}px`
|
|
9448
9450
|
};
|
|
9449
|
-
}
|
|
9451
|
+
}, 50, {
|
|
9452
|
+
leading: true,
|
|
9453
|
+
trailing: false
|
|
9454
|
+
});
|
|
9450
9455
|
let timer;
|
|
9451
9456
|
let isPressMouse = false;
|
|
9452
9457
|
const handleTriggerChange = e => {
|
|
@@ -9501,7 +9506,7 @@
|
|
|
9501
9506
|
switch (direction[0]) {
|
|
9502
9507
|
case 'top':
|
|
9503
9508
|
case 'bottom':
|
|
9504
|
-
if (left + vnode.el.offsetWidth
|
|
9509
|
+
if (left + vnode.el.offsetWidth > window.innerWidth) {
|
|
9505
9510
|
wrapperStyle.value = {
|
|
9506
9511
|
...wrapperStyle.value,
|
|
9507
9512
|
left: `${window.innerWidth - vnode.el.offsetWidth}px`
|
|
@@ -9561,7 +9566,6 @@
|
|
|
9561
9566
|
}
|
|
9562
9567
|
});
|
|
9563
9568
|
return () => {
|
|
9564
|
-
let _slot;
|
|
9565
9569
|
return vue.createVNode(TransitionScale, {
|
|
9566
9570
|
"mode": props.animation || 'part',
|
|
9567
9571
|
"duration": {
|
|
@@ -9569,38 +9573,40 @@
|
|
|
9569
9573
|
leave: 150
|
|
9570
9574
|
},
|
|
9571
9575
|
"onAfterLeave": handleRemove
|
|
9572
|
-
},
|
|
9573
|
-
|
|
9574
|
-
|
|
9575
|
-
|
|
9576
|
-
|
|
9577
|
-
|
|
9578
|
-
|
|
9579
|
-
|
|
9580
|
-
|
|
9581
|
-
|
|
9582
|
-
|
|
9583
|
-
|
|
9584
|
-
|
|
9585
|
-
"
|
|
9586
|
-
|
|
9587
|
-
|
|
9588
|
-
|
|
9589
|
-
|
|
9590
|
-
"
|
|
9591
|
-
|
|
9592
|
-
|
|
9576
|
+
}, {
|
|
9577
|
+
default: () => [vue.withDirectives(vue.createVNode("div", {
|
|
9578
|
+
"style": [wrapperStyle.value, wrapperW.value, props.portalStyle],
|
|
9579
|
+
"class": [wrapperClasses.value, props.portalClass, 'vc-popover-wrapper'],
|
|
9580
|
+
"onMousedown": () => !props.hover && handleMouseDown(),
|
|
9581
|
+
"onMouseenter": e => props.hover && handleChange(e, {
|
|
9582
|
+
visible: true
|
|
9583
|
+
}),
|
|
9584
|
+
"onMouseleave": e => props.hover && handleChange(e, {
|
|
9585
|
+
visible: false
|
|
9586
|
+
})
|
|
9587
|
+
}, [vue.createVNode("div", {
|
|
9588
|
+
"class": [themeClasses.value, 'vc-popover-wrapper__container']
|
|
9589
|
+
}, [props.arrow && vue.createVNode("div", {
|
|
9590
|
+
"style": arrowStyle.value,
|
|
9591
|
+
"class": [themeClasses.value, posClasses.value, 'vc-popover-wrapper__arrow']
|
|
9592
|
+
}, null), slots.content ? slots.content() : typeof props.content === 'function' ? vue.createVNode(Customer, {
|
|
9593
|
+
"render": props.content
|
|
9594
|
+
}, null) : vue.createVNode("div", {
|
|
9595
|
+
"innerHTML": props.content
|
|
9596
|
+
}, null)])]), [[vue.vShow, isActive.value]])]
|
|
9593
9597
|
});
|
|
9594
9598
|
};
|
|
9595
9599
|
}
|
|
9596
9600
|
});
|
|
9597
|
-
const PopoverPortal = new Portal(PopoverWrapper
|
|
9601
|
+
const PopoverPortal = new Portal(PopoverWrapper, {
|
|
9602
|
+
leaveDelay: 0
|
|
9603
|
+
});
|
|
9598
9604
|
|
|
9599
9605
|
/** @jsxImportSource vue */
|
|
9600
9606
|
|
|
9601
|
-
const COMPONENT_NAME$
|
|
9607
|
+
const COMPONENT_NAME$1r = 'vc-popover';
|
|
9602
9608
|
const Popover$1 = /* @__PURE__ */ vue.defineComponent({
|
|
9603
|
-
name: COMPONENT_NAME$
|
|
9609
|
+
name: COMPONENT_NAME$1r,
|
|
9604
9610
|
props: props$Z,
|
|
9605
9611
|
emits: ['update:modelValue', 'visible-change', 'ready', 'close'],
|
|
9606
9612
|
setup(props, {
|
|
@@ -10701,9 +10707,9 @@
|
|
|
10701
10707
|
}
|
|
10702
10708
|
return view;
|
|
10703
10709
|
};
|
|
10704
|
-
const COMPONENT_NAME$
|
|
10710
|
+
const COMPONENT_NAME$1q = 'vc-date-confirm';
|
|
10705
10711
|
const Confirm = /* @__PURE__ */ vue.defineComponent({
|
|
10706
|
-
name: COMPONENT_NAME$
|
|
10712
|
+
name: COMPONENT_NAME$1q,
|
|
10707
10713
|
props: {
|
|
10708
10714
|
showTime: {
|
|
10709
10715
|
type: Boolean,
|
|
@@ -10767,9 +10773,9 @@
|
|
|
10767
10773
|
|
|
10768
10774
|
/** @jsxImportSource vue */
|
|
10769
10775
|
|
|
10770
|
-
const COMPONENT_NAME$
|
|
10776
|
+
const COMPONENT_NAME$1p = 'vc-date-header';
|
|
10771
10777
|
const DateHeader = /* @__PURE__ */ vue.defineComponent({
|
|
10772
|
-
name: COMPONENT_NAME$
|
|
10778
|
+
name: COMPONENT_NAME$1p,
|
|
10773
10779
|
props: {
|
|
10774
10780
|
panelDate: Date,
|
|
10775
10781
|
showNext: {
|
|
@@ -10853,9 +10859,9 @@
|
|
|
10853
10859
|
|
|
10854
10860
|
/** @jsxImportSource vue */
|
|
10855
10861
|
|
|
10856
|
-
const COMPONENT_NAME$
|
|
10862
|
+
const COMPONENT_NAME$1o = 'vc-date-table';
|
|
10857
10863
|
const DateTable = /* @__PURE__ */ vue.defineComponent({
|
|
10858
|
-
name: COMPONENT_NAME$
|
|
10864
|
+
name: COMPONENT_NAME$1o,
|
|
10859
10865
|
props: {
|
|
10860
10866
|
value: Array,
|
|
10861
10867
|
firstDayOfWeek: {
|
|
@@ -11064,9 +11070,9 @@
|
|
|
11064
11070
|
|
|
11065
11071
|
/** @jsxImportSource vue */
|
|
11066
11072
|
|
|
11067
|
-
const COMPONENT_NAME$
|
|
11073
|
+
const COMPONENT_NAME$1n = 'vc-month-table';
|
|
11068
11074
|
const MonthTable = /* @__PURE__ */ vue.defineComponent({
|
|
11069
|
-
name: COMPONENT_NAME$
|
|
11075
|
+
name: COMPONENT_NAME$1n,
|
|
11070
11076
|
props: {
|
|
11071
11077
|
value: Array,
|
|
11072
11078
|
panelDate: Date,
|
|
@@ -11198,7 +11204,7 @@
|
|
|
11198
11204
|
|
|
11199
11205
|
/** @jsxImportSource vue */
|
|
11200
11206
|
|
|
11201
|
-
const COMPONENT_NAME$
|
|
11207
|
+
const COMPONENT_NAME$1m = 'vc-quarter-table';
|
|
11202
11208
|
|
|
11203
11209
|
/**
|
|
11204
11210
|
* 获取季度对应的月份范围
|
|
@@ -11232,7 +11238,7 @@
|
|
|
11232
11238
|
}
|
|
11233
11239
|
};
|
|
11234
11240
|
const QuarterTable = /* @__PURE__ */ vue.defineComponent({
|
|
11235
|
-
name: COMPONENT_NAME$
|
|
11241
|
+
name: COMPONENT_NAME$1m,
|
|
11236
11242
|
props: {
|
|
11237
11243
|
value: Array,
|
|
11238
11244
|
panelDate: Date,
|
|
@@ -11355,9 +11361,9 @@
|
|
|
11355
11361
|
|
|
11356
11362
|
/** @jsxImportSource vue */
|
|
11357
11363
|
|
|
11358
|
-
const COMPONENT_NAME$
|
|
11364
|
+
const COMPONENT_NAME$1l = 'vc-shortcuts-select';
|
|
11359
11365
|
const ShortcutsSelect = /* @__PURE__ */ vue.defineComponent({
|
|
11360
|
-
name: COMPONENT_NAME$
|
|
11366
|
+
name: COMPONENT_NAME$1l,
|
|
11361
11367
|
props: {
|
|
11362
11368
|
panelDate: Date,
|
|
11363
11369
|
config: Array,
|
|
@@ -11397,9 +11403,9 @@
|
|
|
11397
11403
|
|
|
11398
11404
|
/** @jsxImportSource vue */
|
|
11399
11405
|
|
|
11400
|
-
const COMPONENT_NAME$
|
|
11406
|
+
const COMPONENT_NAME$1k = 'vc-time-select';
|
|
11401
11407
|
const TimeSelect = /* @__PURE__ */ vue.defineComponent({
|
|
11402
|
-
name: COMPONENT_NAME$
|
|
11408
|
+
name: COMPONENT_NAME$1k,
|
|
11403
11409
|
props: {
|
|
11404
11410
|
hours: {
|
|
11405
11411
|
type: [Number, String],
|
|
@@ -11678,9 +11684,9 @@
|
|
|
11678
11684
|
|
|
11679
11685
|
/** @jsxImportSource vue */
|
|
11680
11686
|
|
|
11681
|
-
const COMPONENT_NAME$
|
|
11687
|
+
const COMPONENT_NAME$1j = 'vc-year-table';
|
|
11682
11688
|
const YearTable = /* @__PURE__ */ vue.defineComponent({
|
|
11683
|
-
name: COMPONENT_NAME$
|
|
11689
|
+
name: COMPONENT_NAME$1j,
|
|
11684
11690
|
props: {
|
|
11685
11691
|
value: Array,
|
|
11686
11692
|
panelDate: Date,
|
|
@@ -11803,9 +11809,9 @@
|
|
|
11803
11809
|
}
|
|
11804
11810
|
return true;
|
|
11805
11811
|
};
|
|
11806
|
-
const COMPONENT_NAME$
|
|
11812
|
+
const COMPONENT_NAME$1i = 'vc-date-range-panel';
|
|
11807
11813
|
const DateRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
11808
|
-
name: COMPONENT_NAME$
|
|
11814
|
+
name: COMPONENT_NAME$1i,
|
|
11809
11815
|
props: {
|
|
11810
11816
|
...props$V,
|
|
11811
11817
|
confirm: {
|
|
@@ -12184,9 +12190,9 @@
|
|
|
12184
12190
|
|
|
12185
12191
|
/** @jsxImportSource vue */
|
|
12186
12192
|
|
|
12187
|
-
const COMPONENT_NAME$
|
|
12193
|
+
const COMPONENT_NAME$1h = 'vc-date-panel';
|
|
12188
12194
|
const DatePanel = /* @__PURE__ */ vue.defineComponent({
|
|
12189
|
-
name: COMPONENT_NAME$
|
|
12195
|
+
name: COMPONENT_NAME$1h,
|
|
12190
12196
|
props: {
|
|
12191
12197
|
...props$V,
|
|
12192
12198
|
type: String,
|
|
@@ -12394,9 +12400,9 @@
|
|
|
12394
12400
|
const endYear = value[1].getFullYear();
|
|
12395
12401
|
return startYear === endYear;
|
|
12396
12402
|
};
|
|
12397
|
-
const COMPONENT_NAME$
|
|
12403
|
+
const COMPONENT_NAME$1g = 'vc-monthrange-panel';
|
|
12398
12404
|
const MonthRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
12399
|
-
name: COMPONENT_NAME$
|
|
12405
|
+
name: COMPONENT_NAME$1g,
|
|
12400
12406
|
props: {
|
|
12401
12407
|
...props$V,
|
|
12402
12408
|
confirm: {
|
|
@@ -12571,9 +12577,9 @@
|
|
|
12571
12577
|
const endYear = value[1].getFullYear();
|
|
12572
12578
|
return startYear === endYear;
|
|
12573
12579
|
};
|
|
12574
|
-
const COMPONENT_NAME$
|
|
12580
|
+
const COMPONENT_NAME$1f = 'vc-quarterrange-panel';
|
|
12575
12581
|
const QuarterRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
12576
|
-
name: COMPONENT_NAME$
|
|
12582
|
+
name: COMPONENT_NAME$1f,
|
|
12577
12583
|
props: {
|
|
12578
12584
|
...props$V,
|
|
12579
12585
|
confirm: {
|
|
@@ -12812,9 +12818,9 @@
|
|
|
12812
12818
|
seconds
|
|
12813
12819
|
};
|
|
12814
12820
|
};
|
|
12815
|
-
const COMPONENT_NAME$
|
|
12821
|
+
const COMPONENT_NAME$1e = 'vc-timerange-panel';
|
|
12816
12822
|
const TimeRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
12817
|
-
name: COMPONENT_NAME$
|
|
12823
|
+
name: COMPONENT_NAME$1e,
|
|
12818
12824
|
props: props$U,
|
|
12819
12825
|
emits: ['pick', 'clear', 'ok'],
|
|
12820
12826
|
setup(props, {
|
|
@@ -12913,9 +12919,9 @@
|
|
|
12913
12919
|
|
|
12914
12920
|
/** @jsxImportSource vue */
|
|
12915
12921
|
|
|
12916
|
-
const COMPONENT_NAME$
|
|
12922
|
+
const COMPONENT_NAME$1d = 'vc-time-panel';
|
|
12917
12923
|
const TimePanel = /* @__PURE__ */ vue.defineComponent({
|
|
12918
|
-
name: COMPONENT_NAME$
|
|
12924
|
+
name: COMPONENT_NAME$1d,
|
|
12919
12925
|
props: props$U,
|
|
12920
12926
|
emits: ['pick', 'clear', 'ok'],
|
|
12921
12927
|
setup(props, {
|
|
@@ -12970,7 +12976,7 @@
|
|
|
12970
12976
|
|
|
12971
12977
|
/** @jsxImportSource vue */
|
|
12972
12978
|
|
|
12973
|
-
const COMPONENT_NAME$
|
|
12979
|
+
const COMPONENT_NAME$1c = 'vc-date-picker';
|
|
12974
12980
|
const getPanel$1 = type => {
|
|
12975
12981
|
if (['daterange', 'datetimerange'].includes(type)) {
|
|
12976
12982
|
return DateRangePanel;
|
|
@@ -12981,7 +12987,7 @@
|
|
|
12981
12987
|
}
|
|
12982
12988
|
return DatePanel;
|
|
12983
12989
|
};
|
|
12984
|
-
const DatePicker = createPicker(COMPONENT_NAME$
|
|
12990
|
+
const DatePicker = createPicker(COMPONENT_NAME$1c, props$10, () => {
|
|
12985
12991
|
const props = vue.getCurrentInstance().props;
|
|
12986
12992
|
const icon = vue.ref('date');
|
|
12987
12993
|
const panel = vue.shallowRef({});
|
|
@@ -13014,9 +13020,9 @@
|
|
|
13014
13020
|
|
|
13015
13021
|
/** @jsxImportSource vue */
|
|
13016
13022
|
|
|
13017
|
-
const COMPONENT_NAME$
|
|
13023
|
+
const COMPONENT_NAME$1b = 'vc-divider';
|
|
13018
13024
|
const Divider = /* @__PURE__ */ vue.defineComponent({
|
|
13019
|
-
name: COMPONENT_NAME$
|
|
13025
|
+
name: COMPONENT_NAME$1b,
|
|
13020
13026
|
props: props$T,
|
|
13021
13027
|
setup(props, {
|
|
13022
13028
|
slots
|
|
@@ -13171,7 +13177,7 @@
|
|
|
13171
13177
|
|
|
13172
13178
|
/** @jsxImportSource vue */
|
|
13173
13179
|
|
|
13174
|
-
const COMPONENT_NAME$
|
|
13180
|
+
const COMPONENT_NAME$1a = 'vc-scroller-track';
|
|
13175
13181
|
const BAR_MAP = {
|
|
13176
13182
|
vertical: {
|
|
13177
13183
|
scroll: 'scrollTop',
|
|
@@ -13191,7 +13197,7 @@
|
|
|
13191
13197
|
}
|
|
13192
13198
|
};
|
|
13193
13199
|
const Track$1 = /* @__PURE__ */ vue.defineComponent({
|
|
13194
|
-
name: COMPONENT_NAME$
|
|
13200
|
+
name: COMPONENT_NAME$1a,
|
|
13195
13201
|
props: props$S,
|
|
13196
13202
|
emits: ['change'],
|
|
13197
13203
|
inheritAttrs: false,
|
|
@@ -13381,9 +13387,9 @@
|
|
|
13381
13387
|
|
|
13382
13388
|
/** @jsxImportSource vue */
|
|
13383
13389
|
|
|
13384
|
-
const COMPONENT_NAME$
|
|
13390
|
+
const COMPONENT_NAME$19 = 'vc-scroller-bar';
|
|
13385
13391
|
const Bar = /* @__PURE__ */ vue.defineComponent({
|
|
13386
|
-
name: COMPONENT_NAME$
|
|
13392
|
+
name: COMPONENT_NAME$19,
|
|
13387
13393
|
props: props$R,
|
|
13388
13394
|
emits: ['change'],
|
|
13389
13395
|
setup(props, {
|
|
@@ -13598,7 +13604,7 @@
|
|
|
13598
13604
|
|
|
13599
13605
|
/** @jsxImportSource vue */
|
|
13600
13606
|
|
|
13601
|
-
const COMPONENT_NAME$
|
|
13607
|
+
const COMPONENT_NAME$18 = 'vc-scroller';
|
|
13602
13608
|
|
|
13603
13609
|
/**
|
|
13604
13610
|
* 作为备选方案,目前推荐使用ScrollerWheel
|
|
@@ -13609,7 +13615,7 @@
|
|
|
13609
13615
|
* 2. 增加了一层嵌套
|
|
13610
13616
|
*/
|
|
13611
13617
|
const Scroller = /* @__PURE__ */ vue.defineComponent({
|
|
13612
|
-
name: COMPONENT_NAME$
|
|
13618
|
+
name: COMPONENT_NAME$18,
|
|
13613
13619
|
props: props$Q,
|
|
13614
13620
|
emits: ['scroll'],
|
|
13615
13621
|
setup(props, {
|
|
@@ -14559,7 +14565,7 @@
|
|
|
14559
14565
|
|
|
14560
14566
|
/** @jsxImportSource vue */
|
|
14561
14567
|
|
|
14562
|
-
const COMPONENT_NAME$
|
|
14568
|
+
const COMPONENT_NAME$17 = 'vc-scroller-wheel';
|
|
14563
14569
|
|
|
14564
14570
|
/**
|
|
14565
14571
|
* 为减少一层嵌套,为去除滚动bar的抖动,使用wheel模拟
|
|
@@ -14581,7 +14587,7 @@
|
|
|
14581
14587
|
* 设置scrollTop不会reflow和repaint,不需要考虑transfrom来改变content(transform也只在draw完成)
|
|
14582
14588
|
*/
|
|
14583
14589
|
const ScrollerWheel = /* @__PURE__ */ vue.defineComponent({
|
|
14584
|
-
name: COMPONENT_NAME$
|
|
14590
|
+
name: COMPONENT_NAME$17,
|
|
14585
14591
|
props: Object.assign(props$Q, {
|
|
14586
14592
|
stopPropagation: {
|
|
14587
14593
|
type: Boolean,
|
|
@@ -14770,9 +14776,9 @@
|
|
|
14770
14776
|
|
|
14771
14777
|
/** @jsxImportSource vue */
|
|
14772
14778
|
|
|
14773
|
-
const COMPONENT_NAME$
|
|
14779
|
+
const COMPONENT_NAME$16 = 'vc-drawer';
|
|
14774
14780
|
const DrawerView = /* @__PURE__ */ vue.defineComponent({
|
|
14775
|
-
name: COMPONENT_NAME$
|
|
14781
|
+
name: COMPONENT_NAME$16,
|
|
14776
14782
|
props: props$P,
|
|
14777
14783
|
emits: ['close', 'update:modelValue', 'visible-change'],
|
|
14778
14784
|
setup(props, {
|
|
@@ -14940,30 +14946,178 @@
|
|
|
14940
14946
|
const MDrawerView = DrawerView;
|
|
14941
14947
|
|
|
14942
14948
|
const props$O = {
|
|
14943
|
-
|
|
14949
|
+
modelValue: {
|
|
14950
|
+
type: Boolean,
|
|
14951
|
+
default: false
|
|
14952
|
+
},
|
|
14953
|
+
portalClass: [String, Object],
|
|
14954
|
+
placement: {
|
|
14944
14955
|
type: String,
|
|
14945
|
-
default: "
|
|
14956
|
+
default: "bottom"
|
|
14957
|
+
},
|
|
14958
|
+
trigger: {
|
|
14959
|
+
type: String,
|
|
14960
|
+
default: "hover"
|
|
14961
|
+
},
|
|
14962
|
+
arrow: {
|
|
14963
|
+
type: Boolean,
|
|
14964
|
+
default: false
|
|
14946
14965
|
}
|
|
14947
14966
|
};
|
|
14948
14967
|
|
|
14949
14968
|
/** @jsxImportSource vue */
|
|
14950
14969
|
|
|
14951
|
-
const COMPONENT_NAME$
|
|
14970
|
+
const COMPONENT_NAME$15 = 'vc-dropdown';
|
|
14952
14971
|
const Dropdown = /* @__PURE__ */ vue.defineComponent({
|
|
14953
|
-
name: COMPONENT_NAME$
|
|
14972
|
+
name: COMPONENT_NAME$15,
|
|
14954
14973
|
props: props$O,
|
|
14974
|
+
inheritAttrs: false,
|
|
14975
|
+
emits: ['update:modelValue', 'ready', 'close', 'visible-change', 'click'],
|
|
14955
14976
|
setup(props, {
|
|
14977
|
+
slots,
|
|
14978
|
+
emit,
|
|
14979
|
+
expose
|
|
14980
|
+
}) {
|
|
14981
|
+
const its = useAttrs({
|
|
14982
|
+
merge: false
|
|
14983
|
+
});
|
|
14984
|
+
const isActive = vue.ref(false);
|
|
14985
|
+
const dropdownId = vue.ref(getUid('dropdown'));
|
|
14986
|
+
const inherit = vue.computed(() => {
|
|
14987
|
+
return {
|
|
14988
|
+
style: its.value.style,
|
|
14989
|
+
class: its.value.class
|
|
14990
|
+
};
|
|
14991
|
+
});
|
|
14992
|
+
const attrs = vue.computed(() => {
|
|
14993
|
+
return its.value.attrs;
|
|
14994
|
+
});
|
|
14995
|
+
vue.watch(() => props.modelValue, v => {
|
|
14996
|
+
isActive.value = v;
|
|
14997
|
+
}, {
|
|
14998
|
+
immediate: true
|
|
14999
|
+
});
|
|
15000
|
+
|
|
15001
|
+
/**
|
|
15002
|
+
* v-model 同步, 外部的数据改变时不会触发
|
|
15003
|
+
*/
|
|
15004
|
+
const sync = () => {
|
|
15005
|
+
emit('update:modelValue', isActive.value);
|
|
15006
|
+
emit('visible-change', isActive.value);
|
|
15007
|
+
};
|
|
15008
|
+
const handleChange = v => {
|
|
15009
|
+
isActive.value = v;
|
|
15010
|
+
sync();
|
|
15011
|
+
};
|
|
15012
|
+
const close = () => {
|
|
15013
|
+
isActive.value = false;
|
|
15014
|
+
sync();
|
|
15015
|
+
};
|
|
15016
|
+
expose({
|
|
15017
|
+
close,
|
|
15018
|
+
dropdownId
|
|
15019
|
+
});
|
|
15020
|
+
return () => {
|
|
15021
|
+
return vue.createVNode(Popover, vue.mergeProps(attrs.value, {
|
|
15022
|
+
"modelValue": isActive.value,
|
|
15023
|
+
"placement": props.placement,
|
|
15024
|
+
"trigger": props.trigger,
|
|
15025
|
+
"arrow": props.arrow,
|
|
15026
|
+
"portalClass": ['is-padding-none', 'vc-dropdown-wrapper', props.portalClass],
|
|
15027
|
+
"class": ['vc-dropdown', inherit.value.class],
|
|
15028
|
+
"style": inherit.value.style,
|
|
15029
|
+
"onReady": () => emit('ready'),
|
|
15030
|
+
"onClose": () => emit('close'),
|
|
15031
|
+
"onVisibleChange": handleChange
|
|
15032
|
+
}), {
|
|
15033
|
+
default: () => slots?.default?.(),
|
|
15034
|
+
content: () => slots?.content?.()
|
|
15035
|
+
});
|
|
15036
|
+
};
|
|
15037
|
+
}
|
|
15038
|
+
});
|
|
15039
|
+
|
|
15040
|
+
/** @jsxImportSource vue */
|
|
15041
|
+
|
|
15042
|
+
const COMPONENT_NAME$14 = 'vc-dropdown-menu';
|
|
15043
|
+
const DropdownMenu = /* @__PURE__ */ vue.defineComponent({
|
|
15044
|
+
name: COMPONENT_NAME$14,
|
|
15045
|
+
setup(_, {
|
|
14956
15046
|
slots
|
|
14957
15047
|
}) {
|
|
14958
15048
|
return () => {
|
|
14959
|
-
return vue.createVNode("
|
|
14960
|
-
"class": "vc-dropdown"
|
|
15049
|
+
return vue.createVNode("ul", {
|
|
15050
|
+
"class": "vc-dropdown-menu"
|
|
14961
15051
|
}, [slots?.default?.()]);
|
|
14962
15052
|
};
|
|
14963
15053
|
}
|
|
14964
15054
|
});
|
|
14965
15055
|
|
|
15056
|
+
/** @jsxImportSource vue */
|
|
15057
|
+
|
|
15058
|
+
const COMPONENT_NAME$13 = 'vc-dropdown-item';
|
|
15059
|
+
const DropdownItem = /* @__PURE__ */ vue.defineComponent({
|
|
15060
|
+
name: COMPONENT_NAME$13,
|
|
15061
|
+
props: {
|
|
15062
|
+
value: {
|
|
15063
|
+
type: [String, Number],
|
|
15064
|
+
value: undefined
|
|
15065
|
+
},
|
|
15066
|
+
label: {
|
|
15067
|
+
type: [String, Number],
|
|
15068
|
+
value: undefined
|
|
15069
|
+
},
|
|
15070
|
+
disabled: {
|
|
15071
|
+
type: Boolean,
|
|
15072
|
+
default: false
|
|
15073
|
+
},
|
|
15074
|
+
selected: {
|
|
15075
|
+
type: Boolean,
|
|
15076
|
+
default: false
|
|
15077
|
+
},
|
|
15078
|
+
divided: {
|
|
15079
|
+
type: Boolean,
|
|
15080
|
+
default: false
|
|
15081
|
+
},
|
|
15082
|
+
closable: {
|
|
15083
|
+
type: Boolean,
|
|
15084
|
+
default: true
|
|
15085
|
+
}
|
|
15086
|
+
},
|
|
15087
|
+
setup(props, {
|
|
15088
|
+
slots,
|
|
15089
|
+
emit
|
|
15090
|
+
}) {
|
|
15091
|
+
const owner = getInstance$1('dropdown', 'dropdownId');
|
|
15092
|
+
const currentValue = vue.computed(() => {
|
|
15093
|
+
const v = typeof props.value === 'undefined' || props.value === '' ? props.label : props.value;
|
|
15094
|
+
return v;
|
|
15095
|
+
});
|
|
15096
|
+
const classes = vue.computed(() => {
|
|
15097
|
+
return {
|
|
15098
|
+
'is-selected': props.selected,
|
|
15099
|
+
'is-divided': props.divided,
|
|
15100
|
+
'is-disabled': props.disabled
|
|
15101
|
+
};
|
|
15102
|
+
});
|
|
15103
|
+
const handleClick = e => {
|
|
15104
|
+
if (props.disabled) return;
|
|
15105
|
+
emit('click', currentValue.value, e);
|
|
15106
|
+
owner.emit('click', currentValue.value, e);
|
|
15107
|
+
props.closable && owner.exposed?.close();
|
|
15108
|
+
};
|
|
15109
|
+
return () => {
|
|
15110
|
+
return vue.createVNode("li", {
|
|
15111
|
+
"class": [classes.value, 'vc-dropdown-item'],
|
|
15112
|
+
"onClick": handleClick
|
|
15113
|
+
}, [slots.default ? slots.default?.() : props.label]);
|
|
15114
|
+
};
|
|
15115
|
+
}
|
|
15116
|
+
});
|
|
15117
|
+
|
|
14966
15118
|
const MDropdown = Dropdown;
|
|
15119
|
+
const MDropdownMenu = DropdownMenu;
|
|
15120
|
+
const MDropdownItem = DropdownItem;
|
|
14967
15121
|
|
|
14968
15122
|
const props$N = {
|
|
14969
15123
|
tag: {
|
|
@@ -15381,6 +15535,8 @@
|
|
|
15381
15535
|
"is-validating": validateState.value === "validating",
|
|
15382
15536
|
"is-inline": form.props.inline,
|
|
15383
15537
|
"is-nest": isNest.value,
|
|
15538
|
+
"is-alone": !props.showMessage,
|
|
15539
|
+
// 用于单独去除form-item的默认margin_bottom
|
|
15384
15540
|
[`is-${labelPosition.value}`]: true
|
|
15385
15541
|
};
|
|
15386
15542
|
});
|
|
@@ -19159,6 +19315,9 @@
|
|
|
19159
19315
|
type: Boolean,
|
|
19160
19316
|
default: false
|
|
19161
19317
|
},
|
|
19318
|
+
// draggable为true时有效
|
|
19319
|
+
x: Number,
|
|
19320
|
+
y: Number,
|
|
19162
19321
|
okText: {
|
|
19163
19322
|
type: [String, Boolean],
|
|
19164
19323
|
default: "确定"
|
|
@@ -19216,8 +19375,8 @@
|
|
|
19216
19375
|
const header = vue.shallowRef();
|
|
19217
19376
|
const scroller = vue.shallowRef();
|
|
19218
19377
|
const resizer = vue.shallowRef();
|
|
19219
|
-
const x = vue.ref(
|
|
19220
|
-
const y = vue.ref(
|
|
19378
|
+
const x = vue.ref(props.x);
|
|
19379
|
+
const y = vue.ref(props.y);
|
|
19221
19380
|
const isActive = vue.ref(false);
|
|
19222
19381
|
|
|
19223
19382
|
// 注: 服务端渲染为0, 在客服端激活前,展示端存在问题【高度不定】
|
|
@@ -19259,8 +19418,8 @@
|
|
|
19259
19418
|
});
|
|
19260
19419
|
const draggableStyle = vue.computed(() => {
|
|
19261
19420
|
if (IS_SERVER$2 || !props.draggable) return {};
|
|
19262
|
-
const left = x.value
|
|
19263
|
-
const top = y.value
|
|
19421
|
+
const left = typeof x.value === 'undefined' ? window.innerWidth / 2 - defaultSize.value.width / 2 : x.value;
|
|
19422
|
+
const top = typeof y.value === 'undefined' ? window.innerHeight / 2 - defaultSize.value.height / 2 : y.value;
|
|
19264
19423
|
return {
|
|
19265
19424
|
left: `${left}px`,
|
|
19266
19425
|
top: `${top}px`
|
|
@@ -20857,10 +21016,49 @@
|
|
|
20857
21016
|
const MPicker = Picker;
|
|
20858
21017
|
|
|
20859
21018
|
const props$p = {
|
|
20860
|
-
|
|
21019
|
+
title: {
|
|
21020
|
+
type: [String, Function],
|
|
21021
|
+
default: ""
|
|
21022
|
+
},
|
|
21023
|
+
content: {
|
|
21024
|
+
type: [String, Function],
|
|
21025
|
+
default: ""
|
|
21026
|
+
},
|
|
21027
|
+
modelValue: {
|
|
21028
|
+
type: Boolean,
|
|
21029
|
+
default: false
|
|
21030
|
+
},
|
|
21031
|
+
placement: {
|
|
20861
21032
|
type: String,
|
|
20862
|
-
default: "
|
|
20863
|
-
}
|
|
21033
|
+
default: "top"
|
|
21034
|
+
},
|
|
21035
|
+
trigger: {
|
|
21036
|
+
type: String,
|
|
21037
|
+
default: "click"
|
|
21038
|
+
},
|
|
21039
|
+
okText: {
|
|
21040
|
+
type: String,
|
|
21041
|
+
default: "确定"
|
|
21042
|
+
},
|
|
21043
|
+
cancelText: {
|
|
21044
|
+
type: String,
|
|
21045
|
+
default: "取消"
|
|
21046
|
+
},
|
|
21047
|
+
okType: {
|
|
21048
|
+
type: String,
|
|
21049
|
+
default: "primary"
|
|
21050
|
+
},
|
|
21051
|
+
cancelType: {
|
|
21052
|
+
type: String,
|
|
21053
|
+
default: "default"
|
|
21054
|
+
},
|
|
21055
|
+
type: {
|
|
21056
|
+
type: String,
|
|
21057
|
+
default: "warning",
|
|
21058
|
+
validator: (v) => /(warning|info|success|error)/.test(v)
|
|
21059
|
+
},
|
|
21060
|
+
width: [String, Number],
|
|
21061
|
+
portalClass: [String, Object]
|
|
20864
21062
|
};
|
|
20865
21063
|
|
|
20866
21064
|
/** @jsxImportSource vue */
|
|
@@ -20869,13 +21067,125 @@
|
|
|
20869
21067
|
const Popconfirm = /* @__PURE__ */ vue.defineComponent({
|
|
20870
21068
|
name: COMPONENT_NAME$C,
|
|
20871
21069
|
props: props$p,
|
|
21070
|
+
inheritAttrs: false,
|
|
21071
|
+
emits: ['update:modelValue', 'visible-change', 'ready', 'close', 'cancel', 'ok'],
|
|
20872
21072
|
setup(props, {
|
|
20873
|
-
slots
|
|
21073
|
+
slots,
|
|
21074
|
+
emit
|
|
20874
21075
|
}) {
|
|
21076
|
+
const instance = vue.getCurrentInstance();
|
|
21077
|
+
const its = useAttrs({
|
|
21078
|
+
merge: false
|
|
21079
|
+
});
|
|
21080
|
+
const isActive = vue.ref(false);
|
|
21081
|
+
const contentStyle = vue.computed(() => {
|
|
21082
|
+
return props.content || !!slots.content ? {
|
|
21083
|
+
marginBottom: '15px'
|
|
21084
|
+
} : {};
|
|
21085
|
+
});
|
|
21086
|
+
const inherit = vue.computed(() => {
|
|
21087
|
+
return {
|
|
21088
|
+
style: its.value.style,
|
|
21089
|
+
class: its.value.class
|
|
21090
|
+
};
|
|
21091
|
+
});
|
|
21092
|
+
const attrs = vue.computed(() => {
|
|
21093
|
+
return its.value.attrs;
|
|
21094
|
+
});
|
|
21095
|
+
vue.watch(() => props.modelValue, v => {
|
|
21096
|
+
isActive.value = v;
|
|
21097
|
+
}, {
|
|
21098
|
+
immediate: true
|
|
21099
|
+
});
|
|
21100
|
+
|
|
21101
|
+
/**
|
|
21102
|
+
* v-model 同步, 外部的数据改变时不会触发
|
|
21103
|
+
*/
|
|
21104
|
+
const sync = () => {
|
|
21105
|
+
emit('update:modelValue', isActive.value);
|
|
21106
|
+
emit('visible-change', isActive.value);
|
|
21107
|
+
};
|
|
21108
|
+
const handleBefore = (e, hook) => {
|
|
21109
|
+
e.stopPropagation();
|
|
21110
|
+
e.preventDefault();
|
|
21111
|
+
if (!isActive.value) return;
|
|
21112
|
+
const fn = hook && hook(e);
|
|
21113
|
+
if (fn && fn.then) {
|
|
21114
|
+
return fn.then(res => {
|
|
21115
|
+
isActive.value = false;
|
|
21116
|
+
sync();
|
|
21117
|
+
return res;
|
|
21118
|
+
});
|
|
21119
|
+
} else if (!fn || fn === true) {
|
|
21120
|
+
isActive.value = false;
|
|
21121
|
+
sync();
|
|
21122
|
+
}
|
|
21123
|
+
};
|
|
21124
|
+
const handleOk = (...rest) => {
|
|
21125
|
+
const ok = instance.vnode.props?.onOk || (() => {});
|
|
21126
|
+
return ok(...rest);
|
|
21127
|
+
};
|
|
21128
|
+
const handleCancel = (...rest) => {
|
|
21129
|
+
const cancel = instance.vnode.props?.onCancel || (() => {});
|
|
21130
|
+
return cancel(...rest);
|
|
21131
|
+
};
|
|
21132
|
+
const handleChange = v => {
|
|
21133
|
+
isActive.value = v;
|
|
21134
|
+
sync();
|
|
21135
|
+
};
|
|
20875
21136
|
return () => {
|
|
20876
|
-
return vue.createVNode(
|
|
20877
|
-
"
|
|
20878
|
-
|
|
21137
|
+
return vue.createVNode(Popover, vue.mergeProps(attrs.value, {
|
|
21138
|
+
"modelValue": isActive.value,
|
|
21139
|
+
"placement": props.placement,
|
|
21140
|
+
"trigger": props.trigger,
|
|
21141
|
+
"portalClass": ['is-padding-none', 'vc-popconfirm-wrapper', props.portalClass],
|
|
21142
|
+
"class": ['vc-popconfirm', inherit.value.class],
|
|
21143
|
+
"style": inherit.value.style,
|
|
21144
|
+
"onReady": () => emit('ready'),
|
|
21145
|
+
"onClose": () => emit('close'),
|
|
21146
|
+
"onVisibleChange": handleChange
|
|
21147
|
+
}), {
|
|
21148
|
+
default: () => slots?.default?.(),
|
|
21149
|
+
content: () => {
|
|
21150
|
+
return vue.createVNode("div", {
|
|
21151
|
+
"style": [{
|
|
21152
|
+
width: `${props.width}px`
|
|
21153
|
+
}],
|
|
21154
|
+
"class": "vc-popconfirm__wrapper"
|
|
21155
|
+
}, [vue.createVNode("div", {
|
|
21156
|
+
"class": "vc-popconfirm__title"
|
|
21157
|
+
}, [slots.icon ? slots.icon() : vue.createVNode(Icon, {
|
|
21158
|
+
"type": props.type,
|
|
21159
|
+
"class": [`is-${props.type}`, 'vc-popconfirm__icon']
|
|
21160
|
+
}, null), vue.createVNode("div", null, [slots.title ? slots.title() : typeof props.title === 'string' ? vue.createVNode("div", {
|
|
21161
|
+
"innerHTML": props.title
|
|
21162
|
+
}, null) : typeof props.title === 'function' ? vue.createVNode(Customer, {
|
|
21163
|
+
"render": props.title
|
|
21164
|
+
}, null) : null])]), vue.createVNode("div", {
|
|
21165
|
+
"style": contentStyle.value,
|
|
21166
|
+
"class": "vc-popconfirm__content"
|
|
21167
|
+
}, [slots.content ? slots.content() : typeof props.content === 'string' ? vue.createVNode("div", {
|
|
21168
|
+
"innerHTML": props.content
|
|
21169
|
+
}, null) : typeof props.content === 'function' ? vue.createVNode(Customer, {
|
|
21170
|
+
"render": props.content
|
|
21171
|
+
}, null) : null]), vue.createVNode("div", {
|
|
21172
|
+
"class": "vc-popconfirm__footer"
|
|
21173
|
+
}, [vue.createVNode(Button, {
|
|
21174
|
+
"type": props.cancelType,
|
|
21175
|
+
"style": "margin-right: 8px;",
|
|
21176
|
+
"size": "small",
|
|
21177
|
+
"onClick": e => handleBefore(e, handleCancel)
|
|
21178
|
+
}, {
|
|
21179
|
+
default: () => [props.cancelText]
|
|
21180
|
+
}), vue.createVNode(Button, {
|
|
21181
|
+
"type": props.okType,
|
|
21182
|
+
"size": "small",
|
|
21183
|
+
"onClick": e => handleBefore(e, handleOk)
|
|
21184
|
+
}, {
|
|
21185
|
+
default: () => [props.okText]
|
|
21186
|
+
})])]);
|
|
21187
|
+
}
|
|
21188
|
+
});
|
|
20879
21189
|
};
|
|
20880
21190
|
}
|
|
20881
21191
|
});
|
|
@@ -22596,6 +22906,18 @@
|
|
|
22596
22906
|
uncheckedText: {
|
|
22597
22907
|
type: String,
|
|
22598
22908
|
default: ""
|
|
22909
|
+
},
|
|
22910
|
+
width: {
|
|
22911
|
+
type: Number,
|
|
22912
|
+
default: 36
|
|
22913
|
+
},
|
|
22914
|
+
height: {
|
|
22915
|
+
type: Number,
|
|
22916
|
+
default: 20
|
|
22917
|
+
},
|
|
22918
|
+
borderWidth: {
|
|
22919
|
+
type: Number,
|
|
22920
|
+
default: 1
|
|
22599
22921
|
}
|
|
22600
22922
|
};
|
|
22601
22923
|
|
|
@@ -22678,28 +23000,65 @@
|
|
|
22678
23000
|
expose
|
|
22679
23001
|
}) {
|
|
22680
23002
|
const {
|
|
23003
|
+
checked,
|
|
22681
23004
|
classes,
|
|
22682
23005
|
currentValue,
|
|
22683
23006
|
isLoading,
|
|
22684
23007
|
handleToggle
|
|
22685
23008
|
} = useSwitch(expose);
|
|
23009
|
+
const size = vue.computed(() => {
|
|
23010
|
+
return props.height - props.borderWidth * 4;
|
|
23011
|
+
});
|
|
23012
|
+
const lefts = vue.computed(() => {
|
|
23013
|
+
return {
|
|
23014
|
+
inner: checked.value ? props.width - props.borderWidth * 3 - size.value : props.borderWidth,
|
|
23015
|
+
loading: checked.value ? props.height - props.borderWidth * 2 : props.borderWidth * 2
|
|
23016
|
+
};
|
|
23017
|
+
});
|
|
23018
|
+
const contentOffset = vue.computed(() => {
|
|
23019
|
+
return Math.max(props.height / 2, size.value) + props.borderWidth * 2;
|
|
23020
|
+
});
|
|
22686
23021
|
return () => {
|
|
22687
|
-
return vue.createVNode("
|
|
22688
|
-
"
|
|
23022
|
+
return vue.createVNode("div", {
|
|
23023
|
+
"style": {
|
|
23024
|
+
width: `${props.width}px`
|
|
23025
|
+
},
|
|
23026
|
+
"class": [classes.value, 'vc-switch']
|
|
23027
|
+
}, [vue.createVNode("span", {
|
|
23028
|
+
"style": {
|
|
23029
|
+
height: `${props.height}px`,
|
|
23030
|
+
borderWidth: `${props.borderWidth}px`
|
|
23031
|
+
},
|
|
23032
|
+
"class": "vc-switch__wrapper",
|
|
22689
23033
|
"onClick": handleToggle
|
|
22690
23034
|
}, [vue.createVNode("input", {
|
|
22691
23035
|
"name": props.name,
|
|
22692
23036
|
"value": currentValue.value,
|
|
22693
23037
|
"type": "hidden"
|
|
22694
23038
|
}, null), vue.createVNode("span", {
|
|
22695
|
-
"class": "vc-switch__content"
|
|
23039
|
+
"class": "vc-switch__content",
|
|
23040
|
+
"style": {
|
|
23041
|
+
left: `${checked.value ? props.height / 4 : contentOffset.value}px`,
|
|
23042
|
+
right: `${checked.value ? contentOffset.value : props.height / 4}px`,
|
|
23043
|
+
top: 0,
|
|
23044
|
+
bottom: 0
|
|
23045
|
+
}
|
|
22696
23046
|
}, [currentValue.value === props.checkedValue ? slots.checked ? slots.checked() : props.checkedText : null, currentValue.value === props.uncheckedValue ? slots.unchecked ? slots.unchecked() : props.uncheckedText : null]), vue.createVNode("span", {
|
|
22697
|
-
"class": "vc-switch__inner"
|
|
23047
|
+
"class": "vc-switch__inner",
|
|
23048
|
+
"style": {
|
|
23049
|
+
width: `${size.value}px`,
|
|
23050
|
+
height: `${size.value}px`,
|
|
23051
|
+
left: `${lefts.value.inner}px`,
|
|
23052
|
+
top: `${props.borderWidth}px`
|
|
23053
|
+
}
|
|
22698
23054
|
}, null), isLoading.value && vue.createVNode(Spin, {
|
|
22699
23055
|
"size": 14,
|
|
22700
23056
|
"foreground": "#fff",
|
|
22701
|
-
"class": "vc-switch__loading"
|
|
22702
|
-
|
|
23057
|
+
"class": "vc-switch__loading",
|
|
23058
|
+
"style": {
|
|
23059
|
+
left: `${lefts.value.loading}px`
|
|
23060
|
+
}
|
|
23061
|
+
}, null)])]);
|
|
22703
23062
|
};
|
|
22704
23063
|
}
|
|
22705
23064
|
});
|
|
@@ -41069,6 +41428,79 @@
|
|
|
41069
41428
|
}
|
|
41070
41429
|
});
|
|
41071
41430
|
|
|
41431
|
+
const HIDDEN_TEXT_STYLE = `
|
|
41432
|
+
position: absolute!important;
|
|
41433
|
+
word-break: break-all!important;
|
|
41434
|
+
overflow: auto!important;
|
|
41435
|
+
opacity: 1!important;
|
|
41436
|
+
z-index: -1000!important;
|
|
41437
|
+
top: 0!important;
|
|
41438
|
+
right: 100px!important;
|
|
41439
|
+
`;
|
|
41440
|
+
const SIZING_STYLE$1 = [
|
|
41441
|
+
"letter-spacing",
|
|
41442
|
+
"line-height",
|
|
41443
|
+
"padding-top",
|
|
41444
|
+
"padding-bottom",
|
|
41445
|
+
"font-family",
|
|
41446
|
+
"font-weight",
|
|
41447
|
+
"font-size",
|
|
41448
|
+
"text-rendering",
|
|
41449
|
+
"text-transform",
|
|
41450
|
+
"width",
|
|
41451
|
+
// 'text-indent', // 需要额外计算
|
|
41452
|
+
"padding-left",
|
|
41453
|
+
"padding-right",
|
|
41454
|
+
"border-width",
|
|
41455
|
+
"box-sizing"
|
|
41456
|
+
];
|
|
41457
|
+
let hiddenEl$1;
|
|
41458
|
+
const getFitIndex = (options = {}) => {
|
|
41459
|
+
const { el, line, value, suffix, indent = 0 } = options;
|
|
41460
|
+
let lineHeight = parseInt(getStyle$1(el, "line-height"), 10);
|
|
41461
|
+
if (!hiddenEl$1) {
|
|
41462
|
+
hiddenEl$1 = document.createElement("div");
|
|
41463
|
+
document.body.appendChild(hiddenEl$1);
|
|
41464
|
+
}
|
|
41465
|
+
el.getAttribute("wrap") ? hiddenEl$1.setAttribute("wrap", el.getAttribute("wrap")) : hiddenEl$1.removeAttribute("wrap");
|
|
41466
|
+
const {
|
|
41467
|
+
paddingSize,
|
|
41468
|
+
borderSize,
|
|
41469
|
+
boxSizing,
|
|
41470
|
+
sizingStyle
|
|
41471
|
+
} = utils.getComputedStyle(el, SIZING_STYLE$1);
|
|
41472
|
+
const textIndent = `text-indent: ${parseInt(getStyle$1(el, "text-indent"), 10) + indent}px;`;
|
|
41473
|
+
hiddenEl$1.setAttribute("style", `${sizingStyle};${textIndent};${HIDDEN_TEXT_STYLE}`);
|
|
41474
|
+
let sideHeight = paddingSize || 0;
|
|
41475
|
+
boxSizing === "border-box" && (sideHeight += borderSize);
|
|
41476
|
+
if (Number.isNaN(lineHeight)) {
|
|
41477
|
+
hiddenEl$1.innerText = ".";
|
|
41478
|
+
lineHeight = hiddenEl$1.clientHeight - sideHeight;
|
|
41479
|
+
}
|
|
41480
|
+
let endIndex = -1;
|
|
41481
|
+
const strs = (typeof value === "number" ? `${value}` : value || "").split("");
|
|
41482
|
+
let innerText = "";
|
|
41483
|
+
for (let i = 0; i < strs.length; i++) {
|
|
41484
|
+
innerText += strs[i];
|
|
41485
|
+
hiddenEl$1.innerText = innerText;
|
|
41486
|
+
if (endIndex === -1 && hiddenEl$1.clientHeight - sideHeight > lineHeight * line) {
|
|
41487
|
+
endIndex = i;
|
|
41488
|
+
break;
|
|
41489
|
+
}
|
|
41490
|
+
}
|
|
41491
|
+
if (endIndex >= 0 && endIndex <= strs.length - 1) {
|
|
41492
|
+
for (let i = endIndex - 1; i >= 0; i--) {
|
|
41493
|
+
innerText = innerText.substring(0, i);
|
|
41494
|
+
hiddenEl$1.innerText = innerText + suffix;
|
|
41495
|
+
if (hiddenEl$1.clientHeight - sideHeight <= lineHeight * line) {
|
|
41496
|
+
endIndex = i;
|
|
41497
|
+
break;
|
|
41498
|
+
}
|
|
41499
|
+
}
|
|
41500
|
+
}
|
|
41501
|
+
return endIndex;
|
|
41502
|
+
};
|
|
41503
|
+
|
|
41072
41504
|
const TableBody = /* @__PURE__ */ vue.defineComponent({
|
|
41073
41505
|
name: 'vc-table-body',
|
|
41074
41506
|
props: {
|
|
@@ -41177,10 +41609,13 @@
|
|
|
41177
41609
|
column
|
|
41178
41610
|
});
|
|
41179
41611
|
}
|
|
41180
|
-
return
|
|
41612
|
+
return {
|
|
41613
|
+
...cellStyle,
|
|
41614
|
+
...column.style
|
|
41615
|
+
};
|
|
41181
41616
|
};
|
|
41182
41617
|
const getCellClass = (rowIndex, columnIndex, row, column) => {
|
|
41183
|
-
const classes = [column.realAlign, column.
|
|
41618
|
+
const classes = [column.realAlign, column.class];
|
|
41184
41619
|
if (isColumnHidden(columnIndex)) {
|
|
41185
41620
|
classes.push('is-hidden');
|
|
41186
41621
|
}
|
|
@@ -41197,24 +41632,44 @@
|
|
|
41197
41632
|
}
|
|
41198
41633
|
return classes.join(' ');
|
|
41199
41634
|
};
|
|
41200
|
-
|
|
41635
|
+
let poper;
|
|
41636
|
+
const handleCellMouseEnter = (e, row, column) => {
|
|
41201
41637
|
const cell = getCell(e);
|
|
41638
|
+
const hoverState = {
|
|
41639
|
+
cell,
|
|
41640
|
+
column,
|
|
41641
|
+
row
|
|
41642
|
+
};
|
|
41202
41643
|
if (cell) {
|
|
41203
|
-
const column = getColumnByCell(states.columns, cell);
|
|
41204
|
-
const hoverState = {
|
|
41205
|
-
cell,
|
|
41206
|
-
column,
|
|
41207
|
-
row
|
|
41208
|
-
};
|
|
41209
41644
|
table.hoverState.value = hoverState;
|
|
41210
41645
|
table.emit('cell-mouse-enter', hoverState.row, hoverState.column, hoverState.cell, e);
|
|
41211
41646
|
}
|
|
41647
|
+
// 判断是否text-overflow, 如果是就显示tooltip
|
|
41648
|
+
const el = e.target.querySelector('.vc-table__text-line');
|
|
41649
|
+
if (!el) return;
|
|
41650
|
+
const value = `${row[column.prop]}`;
|
|
41651
|
+
const endIndex = getFitIndex({
|
|
41652
|
+
el,
|
|
41653
|
+
value,
|
|
41654
|
+
line: column.line,
|
|
41655
|
+
suffix: '...'
|
|
41656
|
+
});
|
|
41657
|
+
if (endIndex > 0 && endIndex < value.length - 1) {
|
|
41658
|
+
poper && poper.destroy();
|
|
41659
|
+
poper = Popover.open({
|
|
41660
|
+
el: document.body,
|
|
41661
|
+
triggerEl: el,
|
|
41662
|
+
hover: true,
|
|
41663
|
+
alone: true,
|
|
41664
|
+
autoWidth: true,
|
|
41665
|
+
content: value
|
|
41666
|
+
});
|
|
41667
|
+
}
|
|
41212
41668
|
};
|
|
41213
|
-
const handleCellMouseLeave = e => {
|
|
41669
|
+
const handleCellMouseLeave = (e, row, column) => {
|
|
41214
41670
|
const cell = getCell(e);
|
|
41215
41671
|
if (!cell) return;
|
|
41216
|
-
|
|
41217
|
-
table.emit('cell-mouse-leave', oldHoverState.row, oldHoverState.column, oldHoverState.cell, e);
|
|
41672
|
+
table.emit('cell-mouse-leave', row, column, cell, e);
|
|
41218
41673
|
};
|
|
41219
41674
|
const handleMouseEnter = debounce$1(index => {
|
|
41220
41675
|
table.store.setHoverRow(index);
|
|
@@ -41285,8 +41740,8 @@
|
|
|
41285
41740
|
"key": column.id,
|
|
41286
41741
|
"style": [getCellStyle(rowIndex, columnIndex, row, column), sizeStyle],
|
|
41287
41742
|
"class": [getCellClass(rowIndex, columnIndex, row, column), 'vc-table__td'],
|
|
41288
|
-
"onMouseenter": e => handleCellMouseEnter(e, row),
|
|
41289
|
-
"onMouseleave": e => handleCellMouseLeave(e)
|
|
41743
|
+
"onMouseenter": e => handleCellMouseEnter(e, row, column),
|
|
41744
|
+
"onMouseleave": e => handleCellMouseLeave(e, row, column)
|
|
41290
41745
|
}, [renderCell({
|
|
41291
41746
|
row,
|
|
41292
41747
|
column,
|
|
@@ -41342,7 +41797,11 @@
|
|
|
41342
41797
|
allowRender.value = true;
|
|
41343
41798
|
}
|
|
41344
41799
|
});
|
|
41345
|
-
vue.onBeforeUnmount(() =>
|
|
41800
|
+
vue.onBeforeUnmount(() => {
|
|
41801
|
+
poper && poper.destroy();
|
|
41802
|
+
timer && clearTimeout(timer);
|
|
41803
|
+
allowRender.value = false;
|
|
41804
|
+
});
|
|
41346
41805
|
return () => {
|
|
41347
41806
|
if (!allowRender.value) return;
|
|
41348
41807
|
return vue.createVNode("div", {
|
|
@@ -41469,10 +41928,13 @@
|
|
|
41469
41928
|
column
|
|
41470
41929
|
});
|
|
41471
41930
|
}
|
|
41472
|
-
return
|
|
41931
|
+
return {
|
|
41932
|
+
...headerCellStyle,
|
|
41933
|
+
...column.style
|
|
41934
|
+
};
|
|
41473
41935
|
};
|
|
41474
41936
|
const getHeaderCellClass = (rowIndex, columnIndex, row, column) => {
|
|
41475
|
-
const classes = [column.id, column.order, column.realHeaderAlign, column.
|
|
41937
|
+
const classes = [column.id, column.order, column.realHeaderAlign, column.class, column.labelClass];
|
|
41476
41938
|
if (rowIndex === 0 && columnsHidden.value[columnIndex]) {
|
|
41477
41939
|
classes.push('is-hidden');
|
|
41478
41940
|
}
|
|
@@ -42407,196 +42869,6 @@
|
|
|
42407
42869
|
}
|
|
42408
42870
|
});
|
|
42409
42871
|
|
|
42410
|
-
const props$b = {
|
|
42411
|
-
tag: {
|
|
42412
|
-
type: String,
|
|
42413
|
-
default: "div"
|
|
42414
|
-
},
|
|
42415
|
-
value: {
|
|
42416
|
-
type: String,
|
|
42417
|
-
default: ""
|
|
42418
|
-
},
|
|
42419
|
-
line: {
|
|
42420
|
-
type: Number,
|
|
42421
|
-
default: 0
|
|
42422
|
-
},
|
|
42423
|
-
// TODO: 是否改为tail-indent来表示尾部缩进
|
|
42424
|
-
indent: {
|
|
42425
|
-
type: Number,
|
|
42426
|
-
default: 0
|
|
42427
|
-
},
|
|
42428
|
-
resize: {
|
|
42429
|
-
type: [Boolean, Number],
|
|
42430
|
-
default: 100
|
|
42431
|
-
},
|
|
42432
|
-
suffix: {
|
|
42433
|
-
type: String,
|
|
42434
|
-
default: "..."
|
|
42435
|
-
},
|
|
42436
|
-
placement: {
|
|
42437
|
-
type: String,
|
|
42438
|
-
default: "top"
|
|
42439
|
-
},
|
|
42440
|
-
portalClass: [Object, String, Array],
|
|
42441
|
-
portalStyle: [Object, String, Array],
|
|
42442
|
-
renderRow: {
|
|
42443
|
-
type: Function,
|
|
42444
|
-
default: (props$) => {
|
|
42445
|
-
return props$.value;
|
|
42446
|
-
}
|
|
42447
|
-
}
|
|
42448
|
-
};
|
|
42449
|
-
|
|
42450
|
-
const HIDDEN_TEXT_STYLE = `
|
|
42451
|
-
position: absolute!important;
|
|
42452
|
-
word-break: break-all!important;
|
|
42453
|
-
overflow: auto!important;
|
|
42454
|
-
opacity: 0!important;
|
|
42455
|
-
z-index: -1000!important;
|
|
42456
|
-
top: 0!important;
|
|
42457
|
-
right: 0!important;
|
|
42458
|
-
`;
|
|
42459
|
-
const SIZING_STYLE$1 = [
|
|
42460
|
-
"letter-spacing",
|
|
42461
|
-
"line-height",
|
|
42462
|
-
"padding-top",
|
|
42463
|
-
"padding-bottom",
|
|
42464
|
-
"font-family",
|
|
42465
|
-
"font-weight",
|
|
42466
|
-
"font-size",
|
|
42467
|
-
"text-rendering",
|
|
42468
|
-
"text-transform",
|
|
42469
|
-
"width",
|
|
42470
|
-
// 'text-indent', // 需要额外计算
|
|
42471
|
-
"padding-left",
|
|
42472
|
-
"padding-right",
|
|
42473
|
-
"border-width",
|
|
42474
|
-
"box-sizing"
|
|
42475
|
-
];
|
|
42476
|
-
let hiddenEl$1;
|
|
42477
|
-
const getFitIndex = (options = {}) => {
|
|
42478
|
-
const { el, line, value, suffix, indent } = options;
|
|
42479
|
-
let lineHeight = parseInt(getStyle$1(el, "line-height"), 10);
|
|
42480
|
-
if (!hiddenEl$1) {
|
|
42481
|
-
hiddenEl$1 = document.createElement("div");
|
|
42482
|
-
document.body.appendChild(hiddenEl$1);
|
|
42483
|
-
}
|
|
42484
|
-
el.getAttribute("wrap") ? hiddenEl$1.setAttribute("wrap", el.getAttribute("wrap")) : hiddenEl$1.removeAttribute("wrap");
|
|
42485
|
-
const {
|
|
42486
|
-
paddingSize,
|
|
42487
|
-
borderSize,
|
|
42488
|
-
boxSizing,
|
|
42489
|
-
sizingStyle
|
|
42490
|
-
} = utils.getComputedStyle(el, SIZING_STYLE$1);
|
|
42491
|
-
const textIndent = `text-indent: ${parseInt(getStyle$1(el, "text-indent"), 10) + indent}px;`;
|
|
42492
|
-
hiddenEl$1.setAttribute("style", `${sizingStyle};${textIndent};${HIDDEN_TEXT_STYLE}`);
|
|
42493
|
-
let sideHeight = paddingSize || 0;
|
|
42494
|
-
boxSizing === "border-box" && (sideHeight += borderSize);
|
|
42495
|
-
if (Number.isNaN(lineHeight)) {
|
|
42496
|
-
hiddenEl$1.innerText = ".";
|
|
42497
|
-
lineHeight = hiddenEl$1.clientHeight - sideHeight;
|
|
42498
|
-
}
|
|
42499
|
-
let endIndex = 0;
|
|
42500
|
-
hiddenEl$1.innerText = suffix;
|
|
42501
|
-
(value || "").split("").forEach((item, i) => {
|
|
42502
|
-
let old = hiddenEl$1.innerText;
|
|
42503
|
-
old = old.substring(0, old.length - suffix.length);
|
|
42504
|
-
hiddenEl$1.innerText = old + item + suffix;
|
|
42505
|
-
if (hiddenEl$1.clientHeight - sideHeight > lineHeight * line && endIndex === 0) {
|
|
42506
|
-
endIndex = i;
|
|
42507
|
-
}
|
|
42508
|
-
});
|
|
42509
|
-
return endIndex;
|
|
42510
|
-
};
|
|
42511
|
-
|
|
42512
|
-
/** @jsxImportSource vue */
|
|
42513
|
-
|
|
42514
|
-
const COMPONENT_NAME$h = 'vc-text';
|
|
42515
|
-
const Text = /* @__PURE__ */ vue.defineComponent({
|
|
42516
|
-
name: COMPONENT_NAME$h,
|
|
42517
|
-
props: props$b,
|
|
42518
|
-
setup(props, {
|
|
42519
|
-
emit
|
|
42520
|
-
}) {
|
|
42521
|
-
const instance = vue.getCurrentInstance();
|
|
42522
|
-
const isActive = vue.ref(false);
|
|
42523
|
-
const endIndex = vue.ref(0);
|
|
42524
|
-
const styles = vue.computed(() => {
|
|
42525
|
-
return {
|
|
42526
|
-
cursor: endIndex.value === 0 ? 'unset' : 'pointer'
|
|
42527
|
-
};
|
|
42528
|
-
});
|
|
42529
|
-
const calcPosition = () => {
|
|
42530
|
-
const {
|
|
42531
|
-
suffix,
|
|
42532
|
-
line,
|
|
42533
|
-
value,
|
|
42534
|
-
indent
|
|
42535
|
-
} = props;
|
|
42536
|
-
if (line === 0) {
|
|
42537
|
-
endIndex.value = 0;
|
|
42538
|
-
isActive.value = true;
|
|
42539
|
-
} else {
|
|
42540
|
-
endIndex.value = getFitIndex({
|
|
42541
|
-
el: instance.vnode.el,
|
|
42542
|
-
line,
|
|
42543
|
-
value,
|
|
42544
|
-
suffix,
|
|
42545
|
-
indent
|
|
42546
|
-
});
|
|
42547
|
-
isActive.value = true;
|
|
42548
|
-
}
|
|
42549
|
-
emit('clip', endIndex.value);
|
|
42550
|
-
};
|
|
42551
|
-
const handleResize = props.resize === true || props.resize === 0 ? calcPosition : debounce$1(calcPosition, props.resize || 0);
|
|
42552
|
-
let poper;
|
|
42553
|
-
const handleMouseOver = e => {
|
|
42554
|
-
if (endIndex.value > 0) {
|
|
42555
|
-
poper = Popover.open({
|
|
42556
|
-
el: document.body,
|
|
42557
|
-
name: 'vc-text-popover',
|
|
42558
|
-
// 确保不重复创建
|
|
42559
|
-
triggerEl: e.target,
|
|
42560
|
-
hover: true,
|
|
42561
|
-
theme: 'dark',
|
|
42562
|
-
placement: props.placement,
|
|
42563
|
-
portalClass: props.portalClass,
|
|
42564
|
-
portalStyle: [props.portalStyle || `width: ${e.target.clientWidth}px`, 'word-break: break-all'],
|
|
42565
|
-
content: props.value
|
|
42566
|
-
});
|
|
42567
|
-
}
|
|
42568
|
-
};
|
|
42569
|
-
const handleMouseOut = () => {
|
|
42570
|
-
// Do.
|
|
42571
|
-
};
|
|
42572
|
-
['value', 'indent', 'line'].forEach(key => {
|
|
42573
|
-
vue.watch(() => props[key], calcPosition);
|
|
42574
|
-
});
|
|
42575
|
-
vue.onMounted(() => {
|
|
42576
|
-
props.resize !== false && Resize.on(instance.vnode.el, handleResize); // 首次会执行一次
|
|
42577
|
-
});
|
|
42578
|
-
vue.onBeforeUnmount(() => {
|
|
42579
|
-
props.resize !== false && Resize.off(instance.vnode.el, handleResize);
|
|
42580
|
-
poper?.destroy?.();
|
|
42581
|
-
});
|
|
42582
|
-
const Content = props.tag;
|
|
42583
|
-
return () => {
|
|
42584
|
-
return vue.createVNode(Content, {
|
|
42585
|
-
"class": "vc-text",
|
|
42586
|
-
"style": styles.value,
|
|
42587
|
-
"onMouseover": handleMouseOver,
|
|
42588
|
-
"onMouseout": handleMouseOut
|
|
42589
|
-
}, {
|
|
42590
|
-
default: () => [isActive.value ? vue.createVNode(Customer, {
|
|
42591
|
-
"value": endIndex.value > 0 ? `${props.value.slice(0, endIndex.value)}${props.suffix}` : props.value,
|
|
42592
|
-
"index": endIndex.value,
|
|
42593
|
-
"render": props.renderRow
|
|
42594
|
-
}, null) : null]
|
|
42595
|
-
});
|
|
42596
|
-
};
|
|
42597
|
-
}
|
|
42598
|
-
});
|
|
42599
|
-
|
|
42600
42872
|
const cellStarts = {
|
|
42601
42873
|
default: {
|
|
42602
42874
|
order: ''
|
|
@@ -42604,8 +42876,7 @@
|
|
|
42604
42876
|
selection: {
|
|
42605
42877
|
width: 60,
|
|
42606
42878
|
minWidth: 60,
|
|
42607
|
-
order: ''
|
|
42608
|
-
className: 'vc-table-column--selection'
|
|
42879
|
+
order: ''
|
|
42609
42880
|
},
|
|
42610
42881
|
expand: {
|
|
42611
42882
|
width: 60,
|
|
@@ -42651,7 +42922,8 @@
|
|
|
42651
42922
|
}, null), [[vue.vShow, store.states.expandSelectable || level === 0]]);
|
|
42652
42923
|
},
|
|
42653
42924
|
sortable: false,
|
|
42654
|
-
resizable: false
|
|
42925
|
+
resizable: false,
|
|
42926
|
+
class: 'vc-table__selection-column'
|
|
42655
42927
|
},
|
|
42656
42928
|
index: {
|
|
42657
42929
|
renderHeader(h, {
|
|
@@ -42701,7 +42973,7 @@
|
|
|
42701
42973
|
},
|
|
42702
42974
|
sortable: false,
|
|
42703
42975
|
resizable: false,
|
|
42704
|
-
|
|
42976
|
+
class: 'vc-table__expand-column'
|
|
42705
42977
|
}
|
|
42706
42978
|
};
|
|
42707
42979
|
|
|
@@ -42721,17 +42993,13 @@
|
|
|
42721
42993
|
}
|
|
42722
42994
|
const line = column.line || VcInstance.options.TableColumn?.line;
|
|
42723
42995
|
if (line && value) {
|
|
42724
|
-
const base = rowData.isHead || rowData.isTail ? 36 : 24; // 目前gap是12
|
|
42725
42996
|
const style = {
|
|
42726
|
-
|
|
42727
|
-
// TODO: 含有border还要-1
|
|
42728
|
-
width: (column.realWidth || column.width) - base + 'px'
|
|
42997
|
+
'-webkit-line-clamp': line
|
|
42729
42998
|
};
|
|
42730
|
-
return vue.createVNode(
|
|
42731
|
-
"
|
|
42732
|
-
"
|
|
42733
|
-
|
|
42734
|
-
}, null);
|
|
42999
|
+
return vue.createVNode("div", {
|
|
43000
|
+
"class": "vc-table__text-line",
|
|
43001
|
+
"style": style
|
|
43002
|
+
}, [value]);
|
|
42735
43003
|
}
|
|
42736
43004
|
return value;
|
|
42737
43005
|
};
|
|
@@ -42779,6 +43047,7 @@
|
|
|
42779
43047
|
|
|
42780
43048
|
const TableColumn = /* @__PURE__ */ vue.defineComponent({
|
|
42781
43049
|
name: 'vc-table-column',
|
|
43050
|
+
inheritAttrs: false,
|
|
42782
43051
|
props: {
|
|
42783
43052
|
type: {
|
|
42784
43053
|
type: String,
|
|
@@ -42790,7 +43059,6 @@
|
|
|
42790
43059
|
default: 0
|
|
42791
43060
|
},
|
|
42792
43061
|
label: String,
|
|
42793
|
-
customClass: String,
|
|
42794
43062
|
labelClass: String,
|
|
42795
43063
|
prop: String,
|
|
42796
43064
|
width: Number,
|
|
@@ -42827,7 +43095,8 @@
|
|
|
42827
43095
|
tooltip: [String, Function]
|
|
42828
43096
|
},
|
|
42829
43097
|
setup(props, {
|
|
42830
|
-
slots
|
|
43098
|
+
slots,
|
|
43099
|
+
attrs
|
|
42831
43100
|
}) {
|
|
42832
43101
|
const instance = vue.getCurrentInstance();
|
|
42833
43102
|
const table = vue.inject('vc-table');
|
|
@@ -42877,7 +43146,7 @@
|
|
|
42877
43146
|
Object.keys(source).forEach(prop => {
|
|
42878
43147
|
const value = source[prop];
|
|
42879
43148
|
if (value !== undefined) {
|
|
42880
|
-
column[prop] = prop === '
|
|
43149
|
+
column[prop] = prop === 'class' ? `${column[prop] ? `${column[prop]} ` : ''}${value}` : value;
|
|
42881
43150
|
}
|
|
42882
43151
|
});
|
|
42883
43152
|
return column;
|
|
@@ -42947,7 +43216,7 @@
|
|
|
42947
43216
|
// 存在树形数组,且当前行无箭头图标且处于当前展开列,表格对齐
|
|
42948
43217
|
if (!isEmpty$1(table.store.states.treeData) && !prefix && data.isExpandColumn) {
|
|
42949
43218
|
prefix = vue.createVNode("span", {
|
|
42950
|
-
"class": "vc-
|
|
43219
|
+
"class": "vc-table__unexpand__indent"
|
|
42951
43220
|
}, null);
|
|
42952
43221
|
}
|
|
42953
43222
|
const {
|
|
@@ -42963,6 +43232,8 @@
|
|
|
42963
43232
|
const defaults = {
|
|
42964
43233
|
colspan: 1,
|
|
42965
43234
|
rowspan: 1,
|
|
43235
|
+
class: attrs.class,
|
|
43236
|
+
style: attrs.style,
|
|
42966
43237
|
...cellStarts[props.type],
|
|
42967
43238
|
id: columnId.value,
|
|
42968
43239
|
realAlign,
|
|
@@ -43049,7 +43320,7 @@
|
|
|
43049
43320
|
const MTable = Table;
|
|
43050
43321
|
const MTableColumn = TableColumn;
|
|
43051
43322
|
|
|
43052
|
-
const props$
|
|
43323
|
+
const props$b = {
|
|
43053
43324
|
type: {
|
|
43054
43325
|
type: String,
|
|
43055
43326
|
validator: (v) => /^(line|card)$/.test(v),
|
|
@@ -43208,10 +43479,10 @@
|
|
|
43208
43479
|
|
|
43209
43480
|
/** @jsxImportSource vue */
|
|
43210
43481
|
|
|
43211
|
-
const COMPONENT_NAME$
|
|
43482
|
+
const COMPONENT_NAME$h = 'vc-tabs';
|
|
43212
43483
|
const Tabs = /* @__PURE__ */ vue.defineComponent({
|
|
43213
|
-
name: COMPONENT_NAME$
|
|
43214
|
-
props: props$
|
|
43484
|
+
name: COMPONENT_NAME$h,
|
|
43485
|
+
props: props$b,
|
|
43215
43486
|
emits: ['update:modelValue', 'change', 'click'],
|
|
43216
43487
|
setup(props, {
|
|
43217
43488
|
slots
|
|
@@ -43376,7 +43647,7 @@
|
|
|
43376
43647
|
}
|
|
43377
43648
|
});
|
|
43378
43649
|
|
|
43379
|
-
const props$
|
|
43650
|
+
const props$a = {
|
|
43380
43651
|
value: {
|
|
43381
43652
|
type: [String, Number]
|
|
43382
43653
|
},
|
|
@@ -43458,10 +43729,10 @@
|
|
|
43458
43729
|
|
|
43459
43730
|
/** @jsxImportSource vue */
|
|
43460
43731
|
|
|
43461
|
-
const COMPONENT_NAME$
|
|
43732
|
+
const COMPONENT_NAME$g = 'vc-tabs-pane';
|
|
43462
43733
|
const TabsPane = /* @__PURE__ */ vue.defineComponent({
|
|
43463
|
-
name: COMPONENT_NAME$
|
|
43464
|
-
props: props$
|
|
43734
|
+
name: COMPONENT_NAME$g,
|
|
43735
|
+
props: props$a,
|
|
43465
43736
|
setup(_, {
|
|
43466
43737
|
slots
|
|
43467
43738
|
}) {
|
|
@@ -43476,8 +43747,8 @@
|
|
|
43476
43747
|
}
|
|
43477
43748
|
});
|
|
43478
43749
|
|
|
43479
|
-
const props$
|
|
43480
|
-
...props$
|
|
43750
|
+
const props$9 = {
|
|
43751
|
+
...props$b,
|
|
43481
43752
|
theme: {
|
|
43482
43753
|
type: String,
|
|
43483
43754
|
default: "light",
|
|
@@ -43515,10 +43786,10 @@
|
|
|
43515
43786
|
|
|
43516
43787
|
/** @jsxImportSource vue */
|
|
43517
43788
|
|
|
43518
|
-
const COMPONENT_NAME$
|
|
43789
|
+
const COMPONENT_NAME$f = 'vcm-tabs';
|
|
43519
43790
|
const MTabs = /* @__PURE__ */ vue.defineComponent({
|
|
43520
|
-
name: COMPONENT_NAME$
|
|
43521
|
-
props: props$
|
|
43791
|
+
name: COMPONENT_NAME$f,
|
|
43792
|
+
props: props$9,
|
|
43522
43793
|
emits: ['update:modelValue', 'change', 'click'],
|
|
43523
43794
|
setup(props, {
|
|
43524
43795
|
slots
|
|
@@ -43782,10 +44053,10 @@
|
|
|
43782
44053
|
|
|
43783
44054
|
/** @jsxImportSource vue */
|
|
43784
44055
|
|
|
43785
|
-
const COMPONENT_NAME$
|
|
44056
|
+
const COMPONENT_NAME$e = 'vcm-tabs-pane';
|
|
43786
44057
|
const MTabsPane = /* @__PURE__ */ vue.defineComponent({
|
|
43787
|
-
name: COMPONENT_NAME$
|
|
43788
|
-
props: props$
|
|
44058
|
+
name: COMPONENT_NAME$e,
|
|
44059
|
+
props: props$a,
|
|
43789
44060
|
setup(_, {
|
|
43790
44061
|
slots
|
|
43791
44062
|
}) {
|
|
@@ -43802,6 +44073,134 @@
|
|
|
43802
44073
|
|
|
43803
44074
|
const MTag = Tag;
|
|
43804
44075
|
|
|
44076
|
+
const props$8 = {
|
|
44077
|
+
tag: {
|
|
44078
|
+
type: String,
|
|
44079
|
+
default: "div"
|
|
44080
|
+
},
|
|
44081
|
+
value: {
|
|
44082
|
+
type: String,
|
|
44083
|
+
default: ""
|
|
44084
|
+
},
|
|
44085
|
+
line: {
|
|
44086
|
+
type: Number,
|
|
44087
|
+
default: 0
|
|
44088
|
+
},
|
|
44089
|
+
// TODO: 是否改为tail-indent来表示尾部缩进
|
|
44090
|
+
indent: {
|
|
44091
|
+
type: Number,
|
|
44092
|
+
default: 0
|
|
44093
|
+
},
|
|
44094
|
+
resize: {
|
|
44095
|
+
type: [Boolean, Number],
|
|
44096
|
+
default: 100
|
|
44097
|
+
},
|
|
44098
|
+
suffix: {
|
|
44099
|
+
type: String,
|
|
44100
|
+
default: "..."
|
|
44101
|
+
},
|
|
44102
|
+
placement: {
|
|
44103
|
+
type: String,
|
|
44104
|
+
default: "top"
|
|
44105
|
+
},
|
|
44106
|
+
portalClass: [Object, String, Array],
|
|
44107
|
+
portalStyle: [Object, String, Array],
|
|
44108
|
+
renderRow: {
|
|
44109
|
+
type: Function,
|
|
44110
|
+
default: (props$) => {
|
|
44111
|
+
return props$.value;
|
|
44112
|
+
}
|
|
44113
|
+
}
|
|
44114
|
+
};
|
|
44115
|
+
|
|
44116
|
+
/** @jsxImportSource vue */
|
|
44117
|
+
|
|
44118
|
+
const COMPONENT_NAME$d = 'vc-text';
|
|
44119
|
+
const Text = /* @__PURE__ */ vue.defineComponent({
|
|
44120
|
+
name: COMPONENT_NAME$d,
|
|
44121
|
+
props: props$8,
|
|
44122
|
+
setup(props, {
|
|
44123
|
+
emit
|
|
44124
|
+
}) {
|
|
44125
|
+
const instance = vue.getCurrentInstance();
|
|
44126
|
+
const isActive = vue.ref(false);
|
|
44127
|
+
const endIndex = vue.ref(-1);
|
|
44128
|
+
const styles = vue.computed(() => {
|
|
44129
|
+
return {
|
|
44130
|
+
cursor: endIndex.value <= 0 ? 'unset' : 'pointer'
|
|
44131
|
+
};
|
|
44132
|
+
});
|
|
44133
|
+
const calcPosition = () => {
|
|
44134
|
+
const {
|
|
44135
|
+
suffix,
|
|
44136
|
+
line,
|
|
44137
|
+
value,
|
|
44138
|
+
indent
|
|
44139
|
+
} = props;
|
|
44140
|
+
if (line === 0) {
|
|
44141
|
+
endIndex.value = -1;
|
|
44142
|
+
isActive.value = true;
|
|
44143
|
+
} else {
|
|
44144
|
+
endIndex.value = getFitIndex({
|
|
44145
|
+
el: instance.vnode.el,
|
|
44146
|
+
line,
|
|
44147
|
+
value,
|
|
44148
|
+
suffix,
|
|
44149
|
+
indent
|
|
44150
|
+
});
|
|
44151
|
+
isActive.value = true;
|
|
44152
|
+
}
|
|
44153
|
+
emit('clip', endIndex.value);
|
|
44154
|
+
};
|
|
44155
|
+
const handleResize = props.resize === true || props.resize === 0 ? calcPosition : debounce$1(calcPosition, props.resize || 0);
|
|
44156
|
+
let poper;
|
|
44157
|
+
const handleMouseOver = e => {
|
|
44158
|
+
if (endIndex.value > 0) {
|
|
44159
|
+
poper = Popover.open({
|
|
44160
|
+
el: document.body,
|
|
44161
|
+
name: 'vc-text-popover',
|
|
44162
|
+
// 确保不重复创建
|
|
44163
|
+
triggerEl: e.target,
|
|
44164
|
+
hover: true,
|
|
44165
|
+
theme: 'dark',
|
|
44166
|
+
placement: props.placement,
|
|
44167
|
+
portalClass: props.portalClass,
|
|
44168
|
+
portalStyle: [props.portalStyle || `width: ${e.target.clientWidth}px`, 'word-break: break-all'],
|
|
44169
|
+
content: props.value
|
|
44170
|
+
});
|
|
44171
|
+
}
|
|
44172
|
+
};
|
|
44173
|
+
const handleMouseOut = () => {
|
|
44174
|
+
// Do.
|
|
44175
|
+
};
|
|
44176
|
+
['value', 'indent', 'line'].forEach(key => {
|
|
44177
|
+
vue.watch(() => props[key], calcPosition);
|
|
44178
|
+
});
|
|
44179
|
+
vue.onMounted(() => {
|
|
44180
|
+
props.resize !== false && Resize.on(instance.vnode.el, handleResize); // 首次会执行一次
|
|
44181
|
+
});
|
|
44182
|
+
vue.onBeforeUnmount(() => {
|
|
44183
|
+
props.resize !== false && Resize.off(instance.vnode.el, handleResize);
|
|
44184
|
+
poper?.destroy?.();
|
|
44185
|
+
});
|
|
44186
|
+
const Content = props.tag;
|
|
44187
|
+
return () => {
|
|
44188
|
+
return vue.createVNode(Content, {
|
|
44189
|
+
"class": "vc-text",
|
|
44190
|
+
"style": styles.value,
|
|
44191
|
+
"onMouseover": handleMouseOver,
|
|
44192
|
+
"onMouseout": handleMouseOut
|
|
44193
|
+
}, {
|
|
44194
|
+
default: () => [isActive.value ? vue.createVNode(Customer, {
|
|
44195
|
+
"value": endIndex.value > 0 ? `${props.value.slice(0, endIndex.value)}${props.suffix}` : props.value,
|
|
44196
|
+
"index": endIndex.value,
|
|
44197
|
+
"render": props.renderRow
|
|
44198
|
+
}, null) : null]
|
|
44199
|
+
});
|
|
44200
|
+
};
|
|
44201
|
+
}
|
|
44202
|
+
});
|
|
44203
|
+
|
|
43805
44204
|
const MText = Text;
|
|
43806
44205
|
|
|
43807
44206
|
const HIDDEN_TEXTAREA_STYLE = `
|
|
@@ -132678,6 +133077,8 @@
|
|
|
132678
133077
|
exports.Drawer = Drawer;
|
|
132679
133078
|
exports.DrawerView = DrawerView;
|
|
132680
133079
|
exports.Dropdown = Dropdown;
|
|
133080
|
+
exports.DropdownItem = DropdownItem;
|
|
133081
|
+
exports.DropdownMenu = DropdownMenu;
|
|
132681
133082
|
exports.Editor = Editor;
|
|
132682
133083
|
exports.Expand = Expand$1;
|
|
132683
133084
|
exports.Form = Form;
|
|
@@ -132719,6 +133120,8 @@
|
|
|
132719
133120
|
exports.MDrawer = MDrawer;
|
|
132720
133121
|
exports.MDrawerView = MDrawerView;
|
|
132721
133122
|
exports.MDropdown = MDropdown;
|
|
133123
|
+
exports.MDropdownItem = MDropdownItem;
|
|
133124
|
+
exports.MDropdownMenu = MDropdownMenu;
|
|
132722
133125
|
exports.MEditor = MEditor;
|
|
132723
133126
|
exports.MExpand = MExpand;
|
|
132724
133127
|
exports.MForm = MForm;
|