@deot/vc-components 1.0.28 → 1.0.30
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 +785 -436
- package/dist/index.d.ts +410 -40
- package/dist/index.iife.js +771 -422
- package/dist/index.js +783 -438
- package/dist/index.style.css +1 -1
- package/dist/index.umd.cjs +771 -422
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -103,9 +103,9 @@ const props$1q = {
|
|
|
103
103
|
|
|
104
104
|
/** @jsxImportSource vue */
|
|
105
105
|
|
|
106
|
-
const COMPONENT_NAME$
|
|
106
|
+
const COMPONENT_NAME$22 = 'vc-action-sheet';
|
|
107
107
|
const ActionSheet = /* @__PURE__ */ vue.defineComponent({
|
|
108
|
-
name: COMPONENT_NAME$
|
|
108
|
+
name: COMPONENT_NAME$22,
|
|
109
109
|
props: props$1q,
|
|
110
110
|
setup(props, {
|
|
111
111
|
slots
|
|
@@ -292,9 +292,9 @@ const IconManager = new Manager();
|
|
|
292
292
|
|
|
293
293
|
/** @jsxImportSource vue */
|
|
294
294
|
|
|
295
|
-
const COMPONENT_NAME$
|
|
295
|
+
const COMPONENT_NAME$21 = 'vc-icon';
|
|
296
296
|
const Icon = /* @__PURE__ */ vue.defineComponent({
|
|
297
|
-
name: COMPONENT_NAME$
|
|
297
|
+
name: COMPONENT_NAME$21,
|
|
298
298
|
props: props$1o,
|
|
299
299
|
setup(props) {
|
|
300
300
|
const viewBox = vue.ref('0 0 1024 1024');
|
|
@@ -493,9 +493,9 @@ const useTransition = () => {
|
|
|
493
493
|
};
|
|
494
494
|
};
|
|
495
495
|
|
|
496
|
-
const COMPONENT_NAME$
|
|
496
|
+
const COMPONENT_NAME$20 = "vc-transition";
|
|
497
497
|
const Transition = vue.defineComponent({
|
|
498
|
-
name: COMPONENT_NAME$
|
|
498
|
+
name: COMPONENT_NAME$20,
|
|
499
499
|
props: props$1n,
|
|
500
500
|
// 当不声明emits的情况下,事件存在于attrs中
|
|
501
501
|
inheritAttrs: false,
|
|
@@ -516,9 +516,9 @@ const Transition = vue.defineComponent({
|
|
|
516
516
|
}
|
|
517
517
|
});
|
|
518
518
|
|
|
519
|
-
const COMPONENT_NAME$
|
|
519
|
+
const COMPONENT_NAME$1$ = "vc-transition-collapse";
|
|
520
520
|
const TransitionCollapse = vue.defineComponent({
|
|
521
|
-
name: COMPONENT_NAME$
|
|
521
|
+
name: COMPONENT_NAME$1$,
|
|
522
522
|
props: props$1n,
|
|
523
523
|
// 当不声明emits的情况下,事件存在于attrs中
|
|
524
524
|
inheritAttrs: false,
|
|
@@ -637,9 +637,9 @@ const TransitionCollapse = vue.defineComponent({
|
|
|
637
637
|
}
|
|
638
638
|
});
|
|
639
639
|
|
|
640
|
-
const COMPONENT_NAME$
|
|
640
|
+
const COMPONENT_NAME$1_ = "vc-transition-fade";
|
|
641
641
|
const TransitionFade = vue.defineComponent({
|
|
642
|
-
name: COMPONENT_NAME$
|
|
642
|
+
name: COMPONENT_NAME$1_,
|
|
643
643
|
props: {
|
|
644
644
|
...props$1n,
|
|
645
645
|
// inheritAttrs必须是false
|
|
@@ -674,9 +674,9 @@ const TransitionFade = vue.defineComponent({
|
|
|
674
674
|
}
|
|
675
675
|
});
|
|
676
676
|
|
|
677
|
-
const COMPONENT_NAME$
|
|
677
|
+
const COMPONENT_NAME$1Z = "vc-transition-scale";
|
|
678
678
|
const TransitionScale = vue.defineComponent({
|
|
679
|
-
name: COMPONENT_NAME$
|
|
679
|
+
name: COMPONENT_NAME$1Z,
|
|
680
680
|
props: {
|
|
681
681
|
...props$1n,
|
|
682
682
|
mode: {
|
|
@@ -716,9 +716,9 @@ const TransitionScale = vue.defineComponent({
|
|
|
716
716
|
}
|
|
717
717
|
});
|
|
718
718
|
|
|
719
|
-
const COMPONENT_NAME$
|
|
719
|
+
const COMPONENT_NAME$1Y = "vc-transition-slide";
|
|
720
720
|
const TransitionSlide = vue.defineComponent({
|
|
721
|
-
name: COMPONENT_NAME$
|
|
721
|
+
name: COMPONENT_NAME$1Y,
|
|
722
722
|
props: {
|
|
723
723
|
...props$1n,
|
|
724
724
|
mode: {
|
|
@@ -758,9 +758,9 @@ const TransitionSlide = vue.defineComponent({
|
|
|
758
758
|
}
|
|
759
759
|
});
|
|
760
760
|
|
|
761
|
-
const COMPONENT_NAME$
|
|
761
|
+
const COMPONENT_NAME$1X = "vc-transition-zoom";
|
|
762
762
|
const TransitionZoom = vue.defineComponent({
|
|
763
|
-
name: COMPONENT_NAME$
|
|
763
|
+
name: COMPONENT_NAME$1X,
|
|
764
764
|
props: {
|
|
765
765
|
...props$1n,
|
|
766
766
|
mode: {
|
|
@@ -802,7 +802,7 @@ const TransitionZoom = vue.defineComponent({
|
|
|
802
802
|
|
|
803
803
|
/** @jsxImportSource vue */
|
|
804
804
|
|
|
805
|
-
const COMPONENT_NAME$
|
|
805
|
+
const COMPONENT_NAME$1W = 'vc-alert';
|
|
806
806
|
|
|
807
807
|
// [color, borderColor, backgroundColor], -> CSS
|
|
808
808
|
const THEME_MAP = {
|
|
@@ -812,7 +812,7 @@ const THEME_MAP = {
|
|
|
812
812
|
warning: ['#ffbf00', '#ffe58f', '#fffbe6']
|
|
813
813
|
};
|
|
814
814
|
const Alert = /* @__PURE__ */ vue.defineComponent({
|
|
815
|
-
name: COMPONENT_NAME$
|
|
815
|
+
name: COMPONENT_NAME$1W,
|
|
816
816
|
props: props$1p,
|
|
817
817
|
setup(props, {
|
|
818
818
|
slots,
|
|
@@ -911,9 +911,9 @@ const props$1m = {
|
|
|
911
911
|
|
|
912
912
|
/** @jsxImportSource vue */
|
|
913
913
|
|
|
914
|
-
const COMPONENT_NAME$
|
|
914
|
+
const COMPONENT_NAME$1V = 'vc-artboard';
|
|
915
915
|
const Artboard = /* @__PURE__ */ vue.defineComponent({
|
|
916
|
-
name: COMPONENT_NAME$
|
|
916
|
+
name: COMPONENT_NAME$1V,
|
|
917
917
|
props: props$1m,
|
|
918
918
|
setup(props, {
|
|
919
919
|
slots
|
|
@@ -952,9 +952,9 @@ const props$1l = {
|
|
|
952
952
|
|
|
953
953
|
/** @jsxImportSource vue */
|
|
954
954
|
|
|
955
|
-
const COMPONENT_NAME$
|
|
955
|
+
const COMPONENT_NAME$1U = 'vc-spin';
|
|
956
956
|
const Spin = /* @__PURE__ */ vue.defineComponent({
|
|
957
|
-
name: COMPONENT_NAME$
|
|
957
|
+
name: COMPONENT_NAME$1U,
|
|
958
958
|
props: props$1l,
|
|
959
959
|
setup(props, {
|
|
960
960
|
slots
|
|
@@ -1005,9 +1005,9 @@ const props$1k = {
|
|
|
1005
1005
|
exclude: RegExp
|
|
1006
1006
|
};
|
|
1007
1007
|
|
|
1008
|
-
const COMPONENT_NAME$
|
|
1008
|
+
const COMPONENT_NAME$1T = "vc-debounce";
|
|
1009
1009
|
const Debounce = vue.defineComponent({
|
|
1010
|
-
name: COMPONENT_NAME$
|
|
1010
|
+
name: COMPONENT_NAME$1T,
|
|
1011
1011
|
props: props$1k,
|
|
1012
1012
|
/**
|
|
1013
1013
|
* 不声明emits使得事件被透传放入attrs中, 这样可以让所有的事件透传
|
|
@@ -1079,9 +1079,9 @@ const props$1j = {
|
|
|
1079
1079
|
|
|
1080
1080
|
/** @jsxImportSource vue */
|
|
1081
1081
|
|
|
1082
|
-
const COMPONENT_NAME$
|
|
1082
|
+
const COMPONENT_NAME$1S = 'vc-button';
|
|
1083
1083
|
const Button = /* @__PURE__ */ vue.defineComponent({
|
|
1084
|
-
name: COMPONENT_NAME$
|
|
1084
|
+
name: COMPONENT_NAME$1S,
|
|
1085
1085
|
emits: ['click'],
|
|
1086
1086
|
props: props$1j,
|
|
1087
1087
|
setup(props, {
|
|
@@ -1163,9 +1163,9 @@ const props$1i = {
|
|
|
1163
1163
|
|
|
1164
1164
|
/** @jsxImportSource vue */
|
|
1165
1165
|
|
|
1166
|
-
const COMPONENT_NAME$
|
|
1166
|
+
const COMPONENT_NAME$1R = 'vc-button-group';
|
|
1167
1167
|
const ButtonGroup = /* @__PURE__ */ vue.defineComponent({
|
|
1168
|
-
name: COMPONENT_NAME$
|
|
1168
|
+
name: COMPONENT_NAME$1R,
|
|
1169
1169
|
props: props$1i,
|
|
1170
1170
|
setup(props, {
|
|
1171
1171
|
slots
|
|
@@ -1199,9 +1199,9 @@ const props$1h = {
|
|
|
1199
1199
|
|
|
1200
1200
|
/** @jsxImportSource vue */
|
|
1201
1201
|
|
|
1202
|
-
const COMPONENT_NAME$
|
|
1202
|
+
const COMPONENT_NAME$1Q = 'vc-calendar';
|
|
1203
1203
|
const Calendar = /* @__PURE__ */ vue.defineComponent({
|
|
1204
|
-
name: COMPONENT_NAME$
|
|
1204
|
+
name: COMPONENT_NAME$1Q,
|
|
1205
1205
|
props: props$1h,
|
|
1206
1206
|
setup(props, {
|
|
1207
1207
|
slots
|
|
@@ -1239,9 +1239,9 @@ const props$1g = {
|
|
|
1239
1239
|
|
|
1240
1240
|
/** @jsxImportSource vue */
|
|
1241
1241
|
|
|
1242
|
-
const COMPONENT_NAME$
|
|
1242
|
+
const COMPONENT_NAME$1P = 'vc-card';
|
|
1243
1243
|
const Card = /* @__PURE__ */ vue.defineComponent({
|
|
1244
|
-
name: COMPONENT_NAME$
|
|
1244
|
+
name: COMPONENT_NAME$1P,
|
|
1245
1245
|
props: props$1g,
|
|
1246
1246
|
setup(props, {
|
|
1247
1247
|
slots
|
|
@@ -1277,9 +1277,9 @@ const props$1f = {
|
|
|
1277
1277
|
|
|
1278
1278
|
/** @jsxImportSource vue */
|
|
1279
1279
|
|
|
1280
|
-
const COMPONENT_NAME$
|
|
1280
|
+
const COMPONENT_NAME$1O = 'vc-carousel';
|
|
1281
1281
|
const Carousel = /* @__PURE__ */ vue.defineComponent({
|
|
1282
|
-
name: COMPONENT_NAME$
|
|
1282
|
+
name: COMPONENT_NAME$1O,
|
|
1283
1283
|
props: props$1f,
|
|
1284
1284
|
setup(props, {
|
|
1285
1285
|
slots
|
|
@@ -1303,9 +1303,9 @@ const props$1e = {
|
|
|
1303
1303
|
|
|
1304
1304
|
/** @jsxImportSource vue */
|
|
1305
1305
|
|
|
1306
|
-
const COMPONENT_NAME$
|
|
1306
|
+
const COMPONENT_NAME$1N = 'vc-cascader';
|
|
1307
1307
|
const Cascader = /* @__PURE__ */ vue.defineComponent({
|
|
1308
|
-
name: COMPONENT_NAME$
|
|
1308
|
+
name: COMPONENT_NAME$1N,
|
|
1309
1309
|
props: props$1e,
|
|
1310
1310
|
setup(props, {
|
|
1311
1311
|
slots
|
|
@@ -1374,9 +1374,9 @@ const props$1d = {
|
|
|
1374
1374
|
|
|
1375
1375
|
/** @jsxImportSource vue */
|
|
1376
1376
|
|
|
1377
|
-
const COMPONENT_NAME$
|
|
1377
|
+
const COMPONENT_NAME$1M = 'vc-chart';
|
|
1378
1378
|
const Chart = /* @__PURE__ */ vue.defineComponent({
|
|
1379
|
-
name: COMPONENT_NAME$
|
|
1379
|
+
name: COMPONENT_NAME$1M,
|
|
1380
1380
|
props: props$1d,
|
|
1381
1381
|
emits: [...EVENTS, 'ready'],
|
|
1382
1382
|
setup(props, {
|
|
@@ -1608,9 +1608,9 @@ const useCheckbox = () => {
|
|
|
1608
1608
|
|
|
1609
1609
|
/** @jsxImportSource vue */
|
|
1610
1610
|
|
|
1611
|
-
const COMPONENT_NAME$
|
|
1611
|
+
const COMPONENT_NAME$1L = 'vc-checkbox';
|
|
1612
1612
|
const Checkbox = /* @__PURE__ */ vue.defineComponent({
|
|
1613
|
-
name: COMPONENT_NAME$
|
|
1613
|
+
name: COMPONENT_NAME$1L,
|
|
1614
1614
|
props: props$1c,
|
|
1615
1615
|
emits: ['update:modelValue', 'change'],
|
|
1616
1616
|
setup(props, {
|
|
@@ -1697,9 +1697,9 @@ const useCheckboxGroup = () => {
|
|
|
1697
1697
|
|
|
1698
1698
|
/** @jsxImportSource vue */
|
|
1699
1699
|
|
|
1700
|
-
const COMPONENT_NAME$
|
|
1700
|
+
const COMPONENT_NAME$1K = 'vc-checkbox-group';
|
|
1701
1701
|
const CheckboxGroup = /* @__PURE__ */ vue.defineComponent({
|
|
1702
|
-
name: COMPONENT_NAME$
|
|
1702
|
+
name: COMPONENT_NAME$1K,
|
|
1703
1703
|
props: props$1b,
|
|
1704
1704
|
emits: ['update:modelValue', 'change'],
|
|
1705
1705
|
setup(props, {
|
|
@@ -1717,9 +1717,9 @@ const CheckboxGroup = /* @__PURE__ */ vue.defineComponent({
|
|
|
1717
1717
|
|
|
1718
1718
|
/** @jsxImportSource vue */
|
|
1719
1719
|
|
|
1720
|
-
const COMPONENT_NAME$
|
|
1720
|
+
const COMPONENT_NAME$1J = 'vcm-checkbox';
|
|
1721
1721
|
const MCheckbox = /* @__PURE__ */ vue.defineComponent({
|
|
1722
|
-
name: COMPONENT_NAME$
|
|
1722
|
+
name: COMPONENT_NAME$1J,
|
|
1723
1723
|
props: props$1c,
|
|
1724
1724
|
emits: ['update:modelValue', 'change'],
|
|
1725
1725
|
setup(props, {
|
|
@@ -1759,9 +1759,9 @@ const MCheckbox = /* @__PURE__ */ vue.defineComponent({
|
|
|
1759
1759
|
|
|
1760
1760
|
/** @jsxImportSource vue */
|
|
1761
1761
|
|
|
1762
|
-
const COMPONENT_NAME$
|
|
1762
|
+
const COMPONENT_NAME$1I = 'vcm-checkbox-group';
|
|
1763
1763
|
const MCheckboxGroup = /* @__PURE__ */ vue.defineComponent({
|
|
1764
|
-
name: COMPONENT_NAME$
|
|
1764
|
+
name: COMPONENT_NAME$1I,
|
|
1765
1765
|
props: props$1b,
|
|
1766
1766
|
emits: ['update:modelValue', 'change'],
|
|
1767
1767
|
setup(props, {
|
|
@@ -1820,9 +1820,9 @@ const props$19 = {
|
|
|
1820
1820
|
}
|
|
1821
1821
|
};
|
|
1822
1822
|
|
|
1823
|
-
const COMPONENT_NAME$
|
|
1823
|
+
const COMPONENT_NAME$1H = "vc-customer";
|
|
1824
1824
|
const Customer = vue.defineComponent({
|
|
1825
|
-
name: COMPONENT_NAME$
|
|
1825
|
+
name: COMPONENT_NAME$1H,
|
|
1826
1826
|
props: props$19,
|
|
1827
1827
|
setup(props, context) {
|
|
1828
1828
|
return () => vue.h(() => {
|
|
@@ -1833,9 +1833,9 @@ const Customer = vue.defineComponent({
|
|
|
1833
1833
|
|
|
1834
1834
|
/** @jsxImportSource vue */
|
|
1835
1835
|
|
|
1836
|
-
const COMPONENT_NAME$
|
|
1836
|
+
const COMPONENT_NAME$1G = 'vc-message';
|
|
1837
1837
|
const MessageView = /* @__PURE__ */ vue.defineComponent({
|
|
1838
|
-
name: COMPONENT_NAME$
|
|
1838
|
+
name: COMPONENT_NAME$1G,
|
|
1839
1839
|
emits: ['before-close', 'close', 'portal-fulfilled'],
|
|
1840
1840
|
props: props$1a,
|
|
1841
1841
|
setup(props, {
|
|
@@ -1982,7 +1982,7 @@ class PortalLeaf {
|
|
|
1982
1982
|
}
|
|
1983
1983
|
}
|
|
1984
1984
|
|
|
1985
|
-
const COMPONENT_NAME$
|
|
1985
|
+
const COMPONENT_NAME$1F = "vc-portal";
|
|
1986
1986
|
class Portal {
|
|
1987
1987
|
/**
|
|
1988
1988
|
* 清理Portals类型组件
|
|
@@ -2034,7 +2034,7 @@ class Portal {
|
|
|
2034
2034
|
this.wrapper = wrapper;
|
|
2035
2035
|
this.globalOptions = {
|
|
2036
2036
|
...options,
|
|
2037
|
-
name: options?.name || wrapper.name || Utils__namespace.getUid(COMPONENT_NAME$
|
|
2037
|
+
name: options?.name || wrapper.name || Utils__namespace.getUid(COMPONENT_NAME$1F)
|
|
2038
2038
|
};
|
|
2039
2039
|
}
|
|
2040
2040
|
popup(propsData, options) {
|
|
@@ -2133,7 +2133,7 @@ class Portal {
|
|
|
2133
2133
|
...rest
|
|
2134
2134
|
} = options;
|
|
2135
2135
|
let useAllNodes = fragment;
|
|
2136
|
-
const name = multiple ? `${name$}__${Utils__namespace.getUid(COMPONENT_NAME$
|
|
2136
|
+
const name = multiple ? `${name$}__${Utils__namespace.getUid(COMPONENT_NAME$1F)}` : name$;
|
|
2137
2137
|
const container = document.createElement(tag);
|
|
2138
2138
|
const root = typeof el === "object" ? el : document.querySelector(el || "body");
|
|
2139
2139
|
!alive && Portal.leafs.get(name)?.destroy();
|
|
@@ -2167,7 +2167,7 @@ class Portal {
|
|
|
2167
2167
|
} else {
|
|
2168
2168
|
const wrapper = this.wrapper;
|
|
2169
2169
|
const app = vue.createApp({
|
|
2170
|
-
name: COMPONENT_NAME$
|
|
2170
|
+
name: COMPONENT_NAME$1F,
|
|
2171
2171
|
parent,
|
|
2172
2172
|
setup() {
|
|
2173
2173
|
if (alive) {
|
|
@@ -2279,13 +2279,13 @@ const props$18 = {
|
|
|
2279
2279
|
}
|
|
2280
2280
|
};
|
|
2281
2281
|
|
|
2282
|
-
const COMPONENT_NAME$
|
|
2282
|
+
const COMPONENT_NAME$1E = 'vc-portal-view';
|
|
2283
2283
|
|
|
2284
2284
|
/**
|
|
2285
2285
|
* 写法不同,但与vue@2.x 保持一致
|
|
2286
2286
|
*/
|
|
2287
2287
|
const PortalView = /* @__PURE__ */ vue.defineComponent({
|
|
2288
|
-
name: COMPONENT_NAME$
|
|
2288
|
+
name: COMPONENT_NAME$1E,
|
|
2289
2289
|
props: props$18,
|
|
2290
2290
|
setup(props, {
|
|
2291
2291
|
slots
|
|
@@ -2456,9 +2456,9 @@ const useClipboard = (done) => {
|
|
|
2456
2456
|
return () => vue.h(props.tag, { onClick: handleClick, class: "vc-clipboard" }, slots?.default?.());
|
|
2457
2457
|
};
|
|
2458
2458
|
|
|
2459
|
-
const COMPONENT_NAME$
|
|
2459
|
+
const COMPONENT_NAME$1D = "vc-clipboard";
|
|
2460
2460
|
const Clipboard$1 = vue.defineComponent({
|
|
2461
|
-
name: COMPONENT_NAME$
|
|
2461
|
+
name: COMPONENT_NAME$1D,
|
|
2462
2462
|
props: props$17,
|
|
2463
2463
|
setup() {
|
|
2464
2464
|
return useClipboard((content) => Message.success({ content }));
|
|
@@ -2498,9 +2498,9 @@ const MTransitionZoom = TransitionZoom;
|
|
|
2498
2498
|
|
|
2499
2499
|
/** @jsxImportSource vue */
|
|
2500
2500
|
|
|
2501
|
-
const COMPONENT_NAME$
|
|
2501
|
+
const COMPONENT_NAME$1C = 'vcm-toast';
|
|
2502
2502
|
const MToastView = /* @__PURE__ */ vue.defineComponent({
|
|
2503
|
-
name: COMPONENT_NAME$
|
|
2503
|
+
name: COMPONENT_NAME$1C,
|
|
2504
2504
|
emits: ['close', 'portal-fulfilled'],
|
|
2505
2505
|
props: props$16,
|
|
2506
2506
|
setup(props, {
|
|
@@ -2602,9 +2602,9 @@ const warning$2 = create$3({ mode: "warning" });
|
|
|
2602
2602
|
const error$2 = create$3({ mode: "error" });
|
|
2603
2603
|
const MToast = Object.assign(MToastView, { destroy: destroy$4, info: info$2, success: success$2, loading, warning: warning$2, error: error$2 });
|
|
2604
2604
|
|
|
2605
|
-
const COMPONENT_NAME$
|
|
2605
|
+
const COMPONENT_NAME$1B = "vcm-clipboard";
|
|
2606
2606
|
const MClipboard$1 = vue.defineComponent({
|
|
2607
|
-
name: COMPONENT_NAME$
|
|
2607
|
+
name: COMPONENT_NAME$1B,
|
|
2608
2608
|
props: props$17,
|
|
2609
2609
|
setup() {
|
|
2610
2610
|
return useClipboard((content) => MToast.info({ content }));
|
|
@@ -2636,9 +2636,9 @@ const props$15 = {
|
|
|
2636
2636
|
}
|
|
2637
2637
|
};
|
|
2638
2638
|
|
|
2639
|
-
const COMPONENT_NAME$
|
|
2639
|
+
const COMPONENT_NAME$1A = "vc-collapse";
|
|
2640
2640
|
const Collapse = vue.defineComponent({
|
|
2641
|
-
name: COMPONENT_NAME$
|
|
2641
|
+
name: COMPONENT_NAME$1A,
|
|
2642
2642
|
props: props$15,
|
|
2643
2643
|
emits: ["update:moodelValue", "change"],
|
|
2644
2644
|
setup(props, { slots, emit }) {
|
|
@@ -2752,12 +2752,12 @@ const props$13 = {
|
|
|
2752
2752
|
|
|
2753
2753
|
/** @jsxImportSource vue */
|
|
2754
2754
|
|
|
2755
|
-
function _isSlot$
|
|
2755
|
+
function _isSlot$2(s) {
|
|
2756
2756
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
2757
2757
|
}
|
|
2758
|
-
const COMPONENT_NAME$
|
|
2758
|
+
const COMPONENT_NAME$1z = 'vc-expand';
|
|
2759
2759
|
const Expand$1 = /* @__PURE__ */ vue.defineComponent({
|
|
2760
|
-
name: COMPONENT_NAME$
|
|
2760
|
+
name: COMPONENT_NAME$1z,
|
|
2761
2761
|
props: props$13,
|
|
2762
2762
|
setup(props, {
|
|
2763
2763
|
slots
|
|
@@ -2776,7 +2776,7 @@ const Expand$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
2776
2776
|
enter: 200,
|
|
2777
2777
|
leave: 200
|
|
2778
2778
|
}
|
|
2779
|
-
}, _isSlot$
|
|
2779
|
+
}, _isSlot$2(_slot = vue.withDirectives(vue.createVNode(Content, null, {
|
|
2780
2780
|
default: () => [(props.alive || !props.alive && isActive.value) && slots.default?.()]
|
|
2781
2781
|
}), [[vue.vShow, isActive.value]])) ? _slot : {
|
|
2782
2782
|
default: () => [_slot]
|
|
@@ -2787,9 +2787,9 @@ const Expand$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
2787
2787
|
|
|
2788
2788
|
/** @jsxImportSource vue */
|
|
2789
2789
|
|
|
2790
|
-
const COMPONENT_NAME$
|
|
2790
|
+
const COMPONENT_NAME$1y = 'vc-collapse-item';
|
|
2791
2791
|
const CollapseItem = /* @__PURE__ */ vue.defineComponent({
|
|
2792
|
-
name: COMPONENT_NAME$
|
|
2792
|
+
name: COMPONENT_NAME$1y,
|
|
2793
2793
|
props: props$14,
|
|
2794
2794
|
setup(props, {
|
|
2795
2795
|
slots,
|
|
@@ -2864,9 +2864,9 @@ const props$12 = {
|
|
|
2864
2864
|
|
|
2865
2865
|
/** @jsxImportSource vue */
|
|
2866
2866
|
|
|
2867
|
-
const COMPONENT_NAME$
|
|
2867
|
+
const COMPONENT_NAME$1x = 'vc-color-picker';
|
|
2868
2868
|
const ColorPicker = /* @__PURE__ */ vue.defineComponent({
|
|
2869
|
-
name: COMPONENT_NAME$
|
|
2869
|
+
name: COMPONENT_NAME$1x,
|
|
2870
2870
|
props: props$12,
|
|
2871
2871
|
setup(props, {
|
|
2872
2872
|
slots
|
|
@@ -2890,9 +2890,9 @@ const props$11 = {
|
|
|
2890
2890
|
|
|
2891
2891
|
/** @jsxImportSource vue */
|
|
2892
2892
|
|
|
2893
|
-
const COMPONENT_NAME$
|
|
2893
|
+
const COMPONENT_NAME$1w = 'vc-countdown';
|
|
2894
2894
|
const Countdown = /* @__PURE__ */ vue.defineComponent({
|
|
2895
|
-
name: COMPONENT_NAME$
|
|
2895
|
+
name: COMPONENT_NAME$1w,
|
|
2896
2896
|
props: props$11,
|
|
2897
2897
|
setup(props, {
|
|
2898
2898
|
slots
|
|
@@ -3342,9 +3342,9 @@ const useNativeEmitter = (input, expose) => {
|
|
|
3342
3342
|
|
|
3343
3343
|
/** @jsxImportSource vue */
|
|
3344
3344
|
|
|
3345
|
-
const COMPONENT_NAME$
|
|
3345
|
+
const COMPONENT_NAME$1v = 'vc-input';
|
|
3346
3346
|
const Input = /* @__PURE__ */ vue.defineComponent({
|
|
3347
|
-
name: COMPONENT_NAME$
|
|
3347
|
+
name: COMPONENT_NAME$1v,
|
|
3348
3348
|
inheritAttrs: false,
|
|
3349
3349
|
props: {
|
|
3350
3350
|
...props$$,
|
|
@@ -3357,7 +3357,8 @@ const Input = /* @__PURE__ */ vue.defineComponent({
|
|
|
3357
3357
|
emits: ['update:modelValue', 'input', 'change', 'focus', 'blur', 'clear', 'paste', 'keydown', 'keypress', 'keyup', 'enter', 'tip'],
|
|
3358
3358
|
setup(props, {
|
|
3359
3359
|
slots,
|
|
3360
|
-
expose
|
|
3360
|
+
expose,
|
|
3361
|
+
attrs
|
|
3361
3362
|
}) {
|
|
3362
3363
|
const input = vue.ref();
|
|
3363
3364
|
useNativeEmitter(input, expose);
|
|
@@ -3424,9 +3425,9 @@ const Input = /* @__PURE__ */ vue.defineComponent({
|
|
|
3424
3425
|
}, classes.value]
|
|
3425
3426
|
}, [slots.prepend?.() || props.prepend && vue.createVNode(Icon, {
|
|
3426
3427
|
"type": props.prepend
|
|
3427
|
-
}, null)]), vue.createVNode("div", {
|
|
3428
|
+
}, null)]), vue.createVNode("div", vue.mergeProps({
|
|
3428
3429
|
"class": ['vc-input__content', classes.value]
|
|
3429
|
-
}, [slots.content
|
|
3430
|
+
}, slots.content ? it.value.listeners : {}), [slots.content ? slots.content() : renderInput(false)]), !props.disabled && props.clearable && vue.createVNode(TransitionFade, null, {
|
|
3430
3431
|
default: () => [vue.createVNode(Icon, {
|
|
3431
3432
|
"class": "vc-input__icon-clear",
|
|
3432
3433
|
"type": "clear",
|
|
@@ -3678,9 +3679,9 @@ const useInputNumber = () => {
|
|
|
3678
3679
|
|
|
3679
3680
|
/** @jsxImportSource vue */
|
|
3680
3681
|
|
|
3681
|
-
const COMPONENT_NAME$
|
|
3682
|
+
const COMPONENT_NAME$1u = 'vc-input-number';
|
|
3682
3683
|
const InputNumber = /* @__PURE__ */ vue.defineComponent({
|
|
3683
|
-
name: COMPONENT_NAME$
|
|
3684
|
+
name: COMPONENT_NAME$1u,
|
|
3684
3685
|
props: props$X,
|
|
3685
3686
|
inheritAttrs: false,
|
|
3686
3687
|
setup(props, {
|
|
@@ -3744,9 +3745,9 @@ const props$W = {
|
|
|
3744
3745
|
|
|
3745
3746
|
/** @jsxImportSource vue */
|
|
3746
3747
|
|
|
3747
|
-
const COMPONENT_NAME$
|
|
3748
|
+
const COMPONENT_NAME$1t = 'vc-input-search';
|
|
3748
3749
|
const InputSearch = /* @__PURE__ */ vue.defineComponent({
|
|
3749
|
-
name: COMPONENT_NAME$
|
|
3750
|
+
name: COMPONENT_NAME$1t,
|
|
3750
3751
|
props: props$W,
|
|
3751
3752
|
inheritAttrs: false,
|
|
3752
3753
|
setup(props, {
|
|
@@ -4034,12 +4035,9 @@ const usePos = () => {
|
|
|
4034
4035
|
|
|
4035
4036
|
/** @jsxImportSource vue */
|
|
4036
4037
|
|
|
4037
|
-
|
|
4038
|
-
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
4039
|
-
}
|
|
4040
|
-
const COMPONENT_NAME$1q = 'vc-popover-wrapper';
|
|
4038
|
+
const COMPONENT_NAME$1s = 'vc-popover-wrapper';
|
|
4041
4039
|
const PopoverWrapper = /* @__PURE__ */ vue.defineComponent({
|
|
4042
|
-
name: COMPONENT_NAME$
|
|
4040
|
+
name: COMPONENT_NAME$1s,
|
|
4043
4041
|
props: props$_,
|
|
4044
4042
|
emits: ['portal-fulfilled', 'close'],
|
|
4045
4043
|
setup(props, {
|
|
@@ -4101,7 +4099,12 @@ const PopoverWrapper = /* @__PURE__ */ vue.defineComponent({
|
|
|
4101
4099
|
return container;
|
|
4102
4100
|
}
|
|
4103
4101
|
};
|
|
4104
|
-
|
|
4102
|
+
|
|
4103
|
+
/**
|
|
4104
|
+
* 添加debounce解决连续setPopupStyle的情况
|
|
4105
|
+
* 待排查
|
|
4106
|
+
*/
|
|
4107
|
+
const setPopupStyle = lodashEs.debounce(() => {
|
|
4105
4108
|
if (!vnode.el) return;
|
|
4106
4109
|
const triggerEl = getHackContainer();
|
|
4107
4110
|
const {
|
|
@@ -4131,13 +4134,15 @@ const PopoverWrapper = /* @__PURE__ */ vue.defineComponent({
|
|
|
4131
4134
|
fitPos.value = result;
|
|
4132
4135
|
wrapperStyle.value = $wrapperStyle;
|
|
4133
4136
|
arrowStyle.value = $arrowStyle;
|
|
4134
|
-
|
|
4135
4137
|
// 自适应高度
|
|
4136
4138
|
if (props.autoWidth) return;
|
|
4137
4139
|
wrapperW.value = {
|
|
4138
4140
|
width: `${triggerEl.getBoundingClientRect().width}px`
|
|
4139
4141
|
};
|
|
4140
|
-
}
|
|
4142
|
+
}, 50, {
|
|
4143
|
+
leading: true,
|
|
4144
|
+
trailing: false
|
|
4145
|
+
});
|
|
4141
4146
|
let timer;
|
|
4142
4147
|
let isPressMouse = false;
|
|
4143
4148
|
const handleTriggerChange = e => {
|
|
@@ -4192,7 +4197,7 @@ const PopoverWrapper = /* @__PURE__ */ vue.defineComponent({
|
|
|
4192
4197
|
switch (direction[0]) {
|
|
4193
4198
|
case 'top':
|
|
4194
4199
|
case 'bottom':
|
|
4195
|
-
if (left + vnode.el.offsetWidth
|
|
4200
|
+
if (left + vnode.el.offsetWidth > window.innerWidth) {
|
|
4196
4201
|
wrapperStyle.value = {
|
|
4197
4202
|
...wrapperStyle.value,
|
|
4198
4203
|
left: `${window.innerWidth - vnode.el.offsetWidth}px`
|
|
@@ -4252,7 +4257,6 @@ const PopoverWrapper = /* @__PURE__ */ vue.defineComponent({
|
|
|
4252
4257
|
}
|
|
4253
4258
|
});
|
|
4254
4259
|
return () => {
|
|
4255
|
-
let _slot;
|
|
4256
4260
|
return vue.createVNode(TransitionScale, {
|
|
4257
4261
|
"mode": props.animation || 'part',
|
|
4258
4262
|
"duration": {
|
|
@@ -4260,38 +4264,40 @@ const PopoverWrapper = /* @__PURE__ */ vue.defineComponent({
|
|
|
4260
4264
|
leave: 150
|
|
4261
4265
|
},
|
|
4262
4266
|
"onAfterLeave": handleRemove
|
|
4263
|
-
},
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
"
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
"
|
|
4282
|
-
|
|
4283
|
-
|
|
4267
|
+
}, {
|
|
4268
|
+
default: () => [vue.withDirectives(vue.createVNode("div", {
|
|
4269
|
+
"style": [wrapperStyle.value, wrapperW.value, props.portalStyle],
|
|
4270
|
+
"class": [wrapperClasses.value, props.portalClass, 'vc-popover-wrapper'],
|
|
4271
|
+
"onMousedown": () => !props.hover && handleMouseDown(),
|
|
4272
|
+
"onMouseenter": e => props.hover && handleChange(e, {
|
|
4273
|
+
visible: true
|
|
4274
|
+
}),
|
|
4275
|
+
"onMouseleave": e => props.hover && handleChange(e, {
|
|
4276
|
+
visible: false
|
|
4277
|
+
})
|
|
4278
|
+
}, [vue.createVNode("div", {
|
|
4279
|
+
"class": [themeClasses.value, 'vc-popover-wrapper__container']
|
|
4280
|
+
}, [props.arrow && vue.createVNode("div", {
|
|
4281
|
+
"style": arrowStyle.value,
|
|
4282
|
+
"class": [themeClasses.value, posClasses.value, 'vc-popover-wrapper__arrow']
|
|
4283
|
+
}, null), slots.content ? slots.content() : typeof props.content === 'function' ? vue.createVNode(Customer, {
|
|
4284
|
+
"render": props.content
|
|
4285
|
+
}, null) : vue.createVNode("div", {
|
|
4286
|
+
"innerHTML": props.content
|
|
4287
|
+
}, null)])]), [[vue.vShow, isActive.value]])]
|
|
4284
4288
|
});
|
|
4285
4289
|
};
|
|
4286
4290
|
}
|
|
4287
4291
|
});
|
|
4288
|
-
const PopoverPortal = new Portal(PopoverWrapper
|
|
4292
|
+
const PopoverPortal = new Portal(PopoverWrapper, {
|
|
4293
|
+
leaveDelay: 0
|
|
4294
|
+
});
|
|
4289
4295
|
|
|
4290
4296
|
/** @jsxImportSource vue */
|
|
4291
4297
|
|
|
4292
|
-
const COMPONENT_NAME$
|
|
4298
|
+
const COMPONENT_NAME$1r = 'vc-popover';
|
|
4293
4299
|
const Popover$1 = /* @__PURE__ */ vue.defineComponent({
|
|
4294
|
-
name: COMPONENT_NAME$
|
|
4300
|
+
name: COMPONENT_NAME$1r,
|
|
4295
4301
|
props: props$Z,
|
|
4296
4302
|
emits: ['update:modelValue', 'visible-change', 'ready', 'close'],
|
|
4297
4303
|
setup(props, {
|
|
@@ -5392,9 +5398,9 @@ const getTimeType = type => {
|
|
|
5392
5398
|
}
|
|
5393
5399
|
return view;
|
|
5394
5400
|
};
|
|
5395
|
-
const COMPONENT_NAME$
|
|
5401
|
+
const COMPONENT_NAME$1q = 'vc-date-confirm';
|
|
5396
5402
|
const Confirm = /* @__PURE__ */ vue.defineComponent({
|
|
5397
|
-
name: COMPONENT_NAME$
|
|
5403
|
+
name: COMPONENT_NAME$1q,
|
|
5398
5404
|
props: {
|
|
5399
5405
|
showTime: {
|
|
5400
5406
|
type: Boolean,
|
|
@@ -5458,9 +5464,9 @@ const Confirm = /* @__PURE__ */ vue.defineComponent({
|
|
|
5458
5464
|
|
|
5459
5465
|
/** @jsxImportSource vue */
|
|
5460
5466
|
|
|
5461
|
-
const COMPONENT_NAME$
|
|
5467
|
+
const COMPONENT_NAME$1p = 'vc-date-header';
|
|
5462
5468
|
const DateHeader = /* @__PURE__ */ vue.defineComponent({
|
|
5463
|
-
name: COMPONENT_NAME$
|
|
5469
|
+
name: COMPONENT_NAME$1p,
|
|
5464
5470
|
props: {
|
|
5465
5471
|
panelDate: Date,
|
|
5466
5472
|
showNext: {
|
|
@@ -5544,9 +5550,9 @@ const DateHeader = /* @__PURE__ */ vue.defineComponent({
|
|
|
5544
5550
|
|
|
5545
5551
|
/** @jsxImportSource vue */
|
|
5546
5552
|
|
|
5547
|
-
const COMPONENT_NAME$
|
|
5553
|
+
const COMPONENT_NAME$1o = 'vc-date-table';
|
|
5548
5554
|
const DateTable = /* @__PURE__ */ vue.defineComponent({
|
|
5549
|
-
name: COMPONENT_NAME$
|
|
5555
|
+
name: COMPONENT_NAME$1o,
|
|
5550
5556
|
props: {
|
|
5551
5557
|
value: Array,
|
|
5552
5558
|
firstDayOfWeek: {
|
|
@@ -5755,9 +5761,9 @@ const DateTable = /* @__PURE__ */ vue.defineComponent({
|
|
|
5755
5761
|
|
|
5756
5762
|
/** @jsxImportSource vue */
|
|
5757
5763
|
|
|
5758
|
-
const COMPONENT_NAME$
|
|
5764
|
+
const COMPONENT_NAME$1n = 'vc-month-table';
|
|
5759
5765
|
const MonthTable = /* @__PURE__ */ vue.defineComponent({
|
|
5760
|
-
name: COMPONENT_NAME$
|
|
5766
|
+
name: COMPONENT_NAME$1n,
|
|
5761
5767
|
props: {
|
|
5762
5768
|
value: Array,
|
|
5763
5769
|
panelDate: Date,
|
|
@@ -5889,7 +5895,7 @@ const MonthTable = /* @__PURE__ */ vue.defineComponent({
|
|
|
5889
5895
|
|
|
5890
5896
|
/** @jsxImportSource vue */
|
|
5891
5897
|
|
|
5892
|
-
const COMPONENT_NAME$
|
|
5898
|
+
const COMPONENT_NAME$1m = 'vc-quarter-table';
|
|
5893
5899
|
|
|
5894
5900
|
/**
|
|
5895
5901
|
* 获取季度对应的月份范围
|
|
@@ -5923,7 +5929,7 @@ const getQuarterRangeByMonth = value => {
|
|
|
5923
5929
|
}
|
|
5924
5930
|
};
|
|
5925
5931
|
const QuarterTable = /* @__PURE__ */ vue.defineComponent({
|
|
5926
|
-
name: COMPONENT_NAME$
|
|
5932
|
+
name: COMPONENT_NAME$1m,
|
|
5927
5933
|
props: {
|
|
5928
5934
|
value: Array,
|
|
5929
5935
|
panelDate: Date,
|
|
@@ -6046,9 +6052,9 @@ const QuarterTable = /* @__PURE__ */ vue.defineComponent({
|
|
|
6046
6052
|
|
|
6047
6053
|
/** @jsxImportSource vue */
|
|
6048
6054
|
|
|
6049
|
-
const COMPONENT_NAME$
|
|
6055
|
+
const COMPONENT_NAME$1l = 'vc-shortcuts-select';
|
|
6050
6056
|
const ShortcutsSelect = /* @__PURE__ */ vue.defineComponent({
|
|
6051
|
-
name: COMPONENT_NAME$
|
|
6057
|
+
name: COMPONENT_NAME$1l,
|
|
6052
6058
|
props: {
|
|
6053
6059
|
panelDate: Date,
|
|
6054
6060
|
config: Array,
|
|
@@ -6088,9 +6094,9 @@ const ShortcutsSelect = /* @__PURE__ */ vue.defineComponent({
|
|
|
6088
6094
|
|
|
6089
6095
|
/** @jsxImportSource vue */
|
|
6090
6096
|
|
|
6091
|
-
const COMPONENT_NAME$
|
|
6097
|
+
const COMPONENT_NAME$1k = 'vc-time-select';
|
|
6092
6098
|
const TimeSelect = /* @__PURE__ */ vue.defineComponent({
|
|
6093
|
-
name: COMPONENT_NAME$
|
|
6099
|
+
name: COMPONENT_NAME$1k,
|
|
6094
6100
|
props: {
|
|
6095
6101
|
hours: {
|
|
6096
6102
|
type: [Number, String],
|
|
@@ -6369,9 +6375,9 @@ const TimeSelect = /* @__PURE__ */ vue.defineComponent({
|
|
|
6369
6375
|
|
|
6370
6376
|
/** @jsxImportSource vue */
|
|
6371
6377
|
|
|
6372
|
-
const COMPONENT_NAME$
|
|
6378
|
+
const COMPONENT_NAME$1j = 'vc-year-table';
|
|
6373
6379
|
const YearTable = /* @__PURE__ */ vue.defineComponent({
|
|
6374
|
-
name: COMPONENT_NAME$
|
|
6380
|
+
name: COMPONENT_NAME$1j,
|
|
6375
6381
|
props: {
|
|
6376
6382
|
value: Array,
|
|
6377
6383
|
panelDate: Date,
|
|
@@ -6494,9 +6500,9 @@ const getDateIsInRange = (value, type, leftPanelDate, rightPanelDate) => {
|
|
|
6494
6500
|
}
|
|
6495
6501
|
return true;
|
|
6496
6502
|
};
|
|
6497
|
-
const COMPONENT_NAME$
|
|
6503
|
+
const COMPONENT_NAME$1i = 'vc-date-range-panel';
|
|
6498
6504
|
const DateRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
6499
|
-
name: COMPONENT_NAME$
|
|
6505
|
+
name: COMPONENT_NAME$1i,
|
|
6500
6506
|
props: {
|
|
6501
6507
|
...props$V,
|
|
6502
6508
|
confirm: {
|
|
@@ -6875,9 +6881,9 @@ const DateRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
|
6875
6881
|
|
|
6876
6882
|
/** @jsxImportSource vue */
|
|
6877
6883
|
|
|
6878
|
-
const COMPONENT_NAME$
|
|
6884
|
+
const COMPONENT_NAME$1h = 'vc-date-panel';
|
|
6879
6885
|
const DatePanel = /* @__PURE__ */ vue.defineComponent({
|
|
6880
|
-
name: COMPONENT_NAME$
|
|
6886
|
+
name: COMPONENT_NAME$1h,
|
|
6881
6887
|
props: {
|
|
6882
6888
|
...props$V,
|
|
6883
6889
|
type: String,
|
|
@@ -7085,9 +7091,9 @@ const isEqualYear$1 = value => {
|
|
|
7085
7091
|
const endYear = value[1].getFullYear();
|
|
7086
7092
|
return startYear === endYear;
|
|
7087
7093
|
};
|
|
7088
|
-
const COMPONENT_NAME$
|
|
7094
|
+
const COMPONENT_NAME$1g = 'vc-monthrange-panel';
|
|
7089
7095
|
const MonthRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
7090
|
-
name: COMPONENT_NAME$
|
|
7096
|
+
name: COMPONENT_NAME$1g,
|
|
7091
7097
|
props: {
|
|
7092
7098
|
...props$V,
|
|
7093
7099
|
confirm: {
|
|
@@ -7262,9 +7268,9 @@ const isEqualYear = value => {
|
|
|
7262
7268
|
const endYear = value[1].getFullYear();
|
|
7263
7269
|
return startYear === endYear;
|
|
7264
7270
|
};
|
|
7265
|
-
const COMPONENT_NAME$
|
|
7271
|
+
const COMPONENT_NAME$1f = 'vc-quarterrange-panel';
|
|
7266
7272
|
const QuarterRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
7267
|
-
name: COMPONENT_NAME$
|
|
7273
|
+
name: COMPONENT_NAME$1f,
|
|
7268
7274
|
props: {
|
|
7269
7275
|
...props$V,
|
|
7270
7276
|
confirm: {
|
|
@@ -7503,9 +7509,9 @@ const getComparedDate = (leftDate, rightDate) => {
|
|
|
7503
7509
|
seconds
|
|
7504
7510
|
};
|
|
7505
7511
|
};
|
|
7506
|
-
const COMPONENT_NAME$
|
|
7512
|
+
const COMPONENT_NAME$1e = 'vc-timerange-panel';
|
|
7507
7513
|
const TimeRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
7508
|
-
name: COMPONENT_NAME$
|
|
7514
|
+
name: COMPONENT_NAME$1e,
|
|
7509
7515
|
props: props$U,
|
|
7510
7516
|
emits: ['pick', 'clear', 'ok'],
|
|
7511
7517
|
setup(props, {
|
|
@@ -7604,9 +7610,9 @@ const TimeRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
|
7604
7610
|
|
|
7605
7611
|
/** @jsxImportSource vue */
|
|
7606
7612
|
|
|
7607
|
-
const COMPONENT_NAME$
|
|
7613
|
+
const COMPONENT_NAME$1d = 'vc-time-panel';
|
|
7608
7614
|
const TimePanel = /* @__PURE__ */ vue.defineComponent({
|
|
7609
|
-
name: COMPONENT_NAME$
|
|
7615
|
+
name: COMPONENT_NAME$1d,
|
|
7610
7616
|
props: props$U,
|
|
7611
7617
|
emits: ['pick', 'clear', 'ok'],
|
|
7612
7618
|
setup(props, {
|
|
@@ -7661,7 +7667,7 @@ const TimePanel = /* @__PURE__ */ vue.defineComponent({
|
|
|
7661
7667
|
|
|
7662
7668
|
/** @jsxImportSource vue */
|
|
7663
7669
|
|
|
7664
|
-
const COMPONENT_NAME$
|
|
7670
|
+
const COMPONENT_NAME$1c = 'vc-date-picker';
|
|
7665
7671
|
const getPanel$1 = type => {
|
|
7666
7672
|
if (['daterange', 'datetimerange'].includes(type)) {
|
|
7667
7673
|
return DateRangePanel;
|
|
@@ -7672,7 +7678,7 @@ const getPanel$1 = type => {
|
|
|
7672
7678
|
}
|
|
7673
7679
|
return DatePanel;
|
|
7674
7680
|
};
|
|
7675
|
-
const DatePicker = createPicker(COMPONENT_NAME$
|
|
7681
|
+
const DatePicker = createPicker(COMPONENT_NAME$1c, props$10, () => {
|
|
7676
7682
|
const props = vue.getCurrentInstance().props;
|
|
7677
7683
|
const icon = vue.ref('date');
|
|
7678
7684
|
const panel = vue.shallowRef({});
|
|
@@ -7705,9 +7711,9 @@ const props$T = {
|
|
|
7705
7711
|
|
|
7706
7712
|
/** @jsxImportSource vue */
|
|
7707
7713
|
|
|
7708
|
-
const COMPONENT_NAME$
|
|
7714
|
+
const COMPONENT_NAME$1b = 'vc-divider';
|
|
7709
7715
|
const Divider = /* @__PURE__ */ vue.defineComponent({
|
|
7710
|
-
name: COMPONENT_NAME$
|
|
7716
|
+
name: COMPONENT_NAME$1b,
|
|
7711
7717
|
props: props$T,
|
|
7712
7718
|
setup(props, {
|
|
7713
7719
|
slots
|
|
@@ -7862,7 +7868,7 @@ const props$Q = {
|
|
|
7862
7868
|
|
|
7863
7869
|
/** @jsxImportSource vue */
|
|
7864
7870
|
|
|
7865
|
-
const COMPONENT_NAME$
|
|
7871
|
+
const COMPONENT_NAME$1a = 'vc-scroller-track';
|
|
7866
7872
|
const BAR_MAP = {
|
|
7867
7873
|
vertical: {
|
|
7868
7874
|
scroll: 'scrollTop',
|
|
@@ -7882,7 +7888,7 @@ const BAR_MAP = {
|
|
|
7882
7888
|
}
|
|
7883
7889
|
};
|
|
7884
7890
|
const Track = /* @__PURE__ */ vue.defineComponent({
|
|
7885
|
-
name: COMPONENT_NAME$
|
|
7891
|
+
name: COMPONENT_NAME$1a,
|
|
7886
7892
|
props: props$S,
|
|
7887
7893
|
emits: ['change'],
|
|
7888
7894
|
inheritAttrs: false,
|
|
@@ -8072,9 +8078,9 @@ const Track = /* @__PURE__ */ vue.defineComponent({
|
|
|
8072
8078
|
|
|
8073
8079
|
/** @jsxImportSource vue */
|
|
8074
8080
|
|
|
8075
|
-
const COMPONENT_NAME$
|
|
8081
|
+
const COMPONENT_NAME$19 = 'vc-scroller-bar';
|
|
8076
8082
|
const Bar = /* @__PURE__ */ vue.defineComponent({
|
|
8077
|
-
name: COMPONENT_NAME$
|
|
8083
|
+
name: COMPONENT_NAME$19,
|
|
8078
8084
|
props: props$R,
|
|
8079
8085
|
emits: ['change'],
|
|
8080
8086
|
setup(props, {
|
|
@@ -8289,7 +8295,7 @@ const useScroller = (expose) => {
|
|
|
8289
8295
|
|
|
8290
8296
|
/** @jsxImportSource vue */
|
|
8291
8297
|
|
|
8292
|
-
const COMPONENT_NAME$
|
|
8298
|
+
const COMPONENT_NAME$18 = 'vc-scroller';
|
|
8293
8299
|
|
|
8294
8300
|
/**
|
|
8295
8301
|
* 作为备选方案,目前推荐使用ScrollerWheel
|
|
@@ -8300,7 +8306,7 @@ const COMPONENT_NAME$16 = 'vc-scroller';
|
|
|
8300
8306
|
* 2. 增加了一层嵌套
|
|
8301
8307
|
*/
|
|
8302
8308
|
const Scroller = /* @__PURE__ */ vue.defineComponent({
|
|
8303
|
-
name: COMPONENT_NAME$
|
|
8309
|
+
name: COMPONENT_NAME$18,
|
|
8304
8310
|
props: props$Q,
|
|
8305
8311
|
emits: ['scroll'],
|
|
8306
8312
|
setup(props, {
|
|
@@ -8361,7 +8367,7 @@ const Scroller = /* @__PURE__ */ vue.defineComponent({
|
|
|
8361
8367
|
|
|
8362
8368
|
/** @jsxImportSource vue */
|
|
8363
8369
|
|
|
8364
|
-
const COMPONENT_NAME$
|
|
8370
|
+
const COMPONENT_NAME$17 = 'vc-scroller-wheel';
|
|
8365
8371
|
|
|
8366
8372
|
/**
|
|
8367
8373
|
* 为减少一层嵌套,为去除滚动bar的抖动,使用wheel模拟
|
|
@@ -8383,7 +8389,7 @@ const COMPONENT_NAME$15 = 'vc-scroller-wheel';
|
|
|
8383
8389
|
* 设置scrollTop不会reflow和repaint,不需要考虑transfrom来改变content(transform也只在draw完成)
|
|
8384
8390
|
*/
|
|
8385
8391
|
const ScrollerWheel = /* @__PURE__ */ vue.defineComponent({
|
|
8386
|
-
name: COMPONENT_NAME$
|
|
8392
|
+
name: COMPONENT_NAME$17,
|
|
8387
8393
|
props: Object.assign(props$Q, {
|
|
8388
8394
|
stopPropagation: {
|
|
8389
8395
|
type: Boolean,
|
|
@@ -8572,9 +8578,9 @@ const props$P = {
|
|
|
8572
8578
|
|
|
8573
8579
|
/** @jsxImportSource vue */
|
|
8574
8580
|
|
|
8575
|
-
const COMPONENT_NAME$
|
|
8581
|
+
const COMPONENT_NAME$16 = 'vc-drawer';
|
|
8576
8582
|
const DrawerView = /* @__PURE__ */ vue.defineComponent({
|
|
8577
|
-
name: COMPONENT_NAME$
|
|
8583
|
+
name: COMPONENT_NAME$16,
|
|
8578
8584
|
props: props$P,
|
|
8579
8585
|
emits: ['close', 'update:modelValue', 'visible-change'],
|
|
8580
8586
|
setup(props, {
|
|
@@ -8742,30 +8748,178 @@ const MDrawer = Drawer;
|
|
|
8742
8748
|
const MDrawerView = DrawerView;
|
|
8743
8749
|
|
|
8744
8750
|
const props$O = {
|
|
8745
|
-
|
|
8751
|
+
modelValue: {
|
|
8752
|
+
type: Boolean,
|
|
8753
|
+
default: false
|
|
8754
|
+
},
|
|
8755
|
+
portalClass: [String, Object],
|
|
8756
|
+
placement: {
|
|
8746
8757
|
type: String,
|
|
8747
|
-
default: "
|
|
8758
|
+
default: "bottom"
|
|
8759
|
+
},
|
|
8760
|
+
trigger: {
|
|
8761
|
+
type: String,
|
|
8762
|
+
default: "hover"
|
|
8763
|
+
},
|
|
8764
|
+
arrow: {
|
|
8765
|
+
type: Boolean,
|
|
8766
|
+
default: false
|
|
8748
8767
|
}
|
|
8749
8768
|
};
|
|
8750
8769
|
|
|
8751
8770
|
/** @jsxImportSource vue */
|
|
8752
8771
|
|
|
8753
|
-
const COMPONENT_NAME$
|
|
8772
|
+
const COMPONENT_NAME$15 = 'vc-dropdown';
|
|
8754
8773
|
const Dropdown = /* @__PURE__ */ vue.defineComponent({
|
|
8755
|
-
name: COMPONENT_NAME$
|
|
8774
|
+
name: COMPONENT_NAME$15,
|
|
8756
8775
|
props: props$O,
|
|
8776
|
+
inheritAttrs: false,
|
|
8777
|
+
emits: ['update:modelValue', 'ready', 'close', 'visible-change', 'click'],
|
|
8757
8778
|
setup(props, {
|
|
8779
|
+
slots,
|
|
8780
|
+
emit,
|
|
8781
|
+
expose
|
|
8782
|
+
}) {
|
|
8783
|
+
const its = vcHooks.useAttrs({
|
|
8784
|
+
merge: false
|
|
8785
|
+
});
|
|
8786
|
+
const isActive = vue.ref(false);
|
|
8787
|
+
const dropdownId = vue.ref(Utils.getUid('dropdown'));
|
|
8788
|
+
const inherit = vue.computed(() => {
|
|
8789
|
+
return {
|
|
8790
|
+
style: its.value.style,
|
|
8791
|
+
class: its.value.class
|
|
8792
|
+
};
|
|
8793
|
+
});
|
|
8794
|
+
const attrs = vue.computed(() => {
|
|
8795
|
+
return its.value.attrs;
|
|
8796
|
+
});
|
|
8797
|
+
vue.watch(() => props.modelValue, v => {
|
|
8798
|
+
isActive.value = v;
|
|
8799
|
+
}, {
|
|
8800
|
+
immediate: true
|
|
8801
|
+
});
|
|
8802
|
+
|
|
8803
|
+
/**
|
|
8804
|
+
* v-model 同步, 外部的数据改变时不会触发
|
|
8805
|
+
*/
|
|
8806
|
+
const sync = () => {
|
|
8807
|
+
emit('update:modelValue', isActive.value);
|
|
8808
|
+
emit('visible-change', isActive.value);
|
|
8809
|
+
};
|
|
8810
|
+
const handleChange = v => {
|
|
8811
|
+
isActive.value = v;
|
|
8812
|
+
sync();
|
|
8813
|
+
};
|
|
8814
|
+
const close = () => {
|
|
8815
|
+
isActive.value = false;
|
|
8816
|
+
sync();
|
|
8817
|
+
};
|
|
8818
|
+
expose({
|
|
8819
|
+
close,
|
|
8820
|
+
dropdownId
|
|
8821
|
+
});
|
|
8822
|
+
return () => {
|
|
8823
|
+
return vue.createVNode(Popover, vue.mergeProps(attrs.value, {
|
|
8824
|
+
"modelValue": isActive.value,
|
|
8825
|
+
"placement": props.placement,
|
|
8826
|
+
"trigger": props.trigger,
|
|
8827
|
+
"arrow": props.arrow,
|
|
8828
|
+
"portalClass": ['is-padding-none', 'vc-dropdown-wrapper', props.portalClass],
|
|
8829
|
+
"class": ['vc-dropdown', inherit.value.class],
|
|
8830
|
+
"style": inherit.value.style,
|
|
8831
|
+
"onReady": () => emit('ready'),
|
|
8832
|
+
"onClose": () => emit('close'),
|
|
8833
|
+
"onVisibleChange": handleChange
|
|
8834
|
+
}), {
|
|
8835
|
+
default: () => slots?.default?.(),
|
|
8836
|
+
content: () => slots?.content?.()
|
|
8837
|
+
});
|
|
8838
|
+
};
|
|
8839
|
+
}
|
|
8840
|
+
});
|
|
8841
|
+
|
|
8842
|
+
/** @jsxImportSource vue */
|
|
8843
|
+
|
|
8844
|
+
const COMPONENT_NAME$14 = 'vc-dropdown-menu';
|
|
8845
|
+
const DropdownMenu = /* @__PURE__ */ vue.defineComponent({
|
|
8846
|
+
name: COMPONENT_NAME$14,
|
|
8847
|
+
setup(_, {
|
|
8758
8848
|
slots
|
|
8759
8849
|
}) {
|
|
8760
8850
|
return () => {
|
|
8761
|
-
return vue.createVNode("
|
|
8762
|
-
"class": "vc-dropdown"
|
|
8851
|
+
return vue.createVNode("ul", {
|
|
8852
|
+
"class": "vc-dropdown-menu"
|
|
8763
8853
|
}, [slots?.default?.()]);
|
|
8764
8854
|
};
|
|
8765
8855
|
}
|
|
8766
8856
|
});
|
|
8767
8857
|
|
|
8858
|
+
/** @jsxImportSource vue */
|
|
8859
|
+
|
|
8860
|
+
const COMPONENT_NAME$13 = 'vc-dropdown-item';
|
|
8861
|
+
const DropdownItem = /* @__PURE__ */ vue.defineComponent({
|
|
8862
|
+
name: COMPONENT_NAME$13,
|
|
8863
|
+
props: {
|
|
8864
|
+
value: {
|
|
8865
|
+
type: [String, Number],
|
|
8866
|
+
value: undefined
|
|
8867
|
+
},
|
|
8868
|
+
label: {
|
|
8869
|
+
type: [String, Number],
|
|
8870
|
+
value: undefined
|
|
8871
|
+
},
|
|
8872
|
+
disabled: {
|
|
8873
|
+
type: Boolean,
|
|
8874
|
+
default: false
|
|
8875
|
+
},
|
|
8876
|
+
selected: {
|
|
8877
|
+
type: Boolean,
|
|
8878
|
+
default: false
|
|
8879
|
+
},
|
|
8880
|
+
divided: {
|
|
8881
|
+
type: Boolean,
|
|
8882
|
+
default: false
|
|
8883
|
+
},
|
|
8884
|
+
closable: {
|
|
8885
|
+
type: Boolean,
|
|
8886
|
+
default: true
|
|
8887
|
+
}
|
|
8888
|
+
},
|
|
8889
|
+
setup(props, {
|
|
8890
|
+
slots,
|
|
8891
|
+
emit
|
|
8892
|
+
}) {
|
|
8893
|
+
const owner = vcHooks.getInstance('dropdown', 'dropdownId');
|
|
8894
|
+
const currentValue = vue.computed(() => {
|
|
8895
|
+
const v = typeof props.value === 'undefined' || props.value === '' ? props.label : props.value;
|
|
8896
|
+
return v;
|
|
8897
|
+
});
|
|
8898
|
+
const classes = vue.computed(() => {
|
|
8899
|
+
return {
|
|
8900
|
+
'is-selected': props.selected,
|
|
8901
|
+
'is-divided': props.divided,
|
|
8902
|
+
'is-disabled': props.disabled
|
|
8903
|
+
};
|
|
8904
|
+
});
|
|
8905
|
+
const handleClick = e => {
|
|
8906
|
+
if (props.disabled) return;
|
|
8907
|
+
emit('click', currentValue.value, e);
|
|
8908
|
+
owner.emit('click', currentValue.value, e);
|
|
8909
|
+
props.closable && owner.exposed?.close();
|
|
8910
|
+
};
|
|
8911
|
+
return () => {
|
|
8912
|
+
return vue.createVNode("li", {
|
|
8913
|
+
"class": [classes.value, 'vc-dropdown-item'],
|
|
8914
|
+
"onClick": handleClick
|
|
8915
|
+
}, [slots.default ? slots.default?.() : props.label]);
|
|
8916
|
+
};
|
|
8917
|
+
}
|
|
8918
|
+
});
|
|
8919
|
+
|
|
8768
8920
|
const MDropdown = Dropdown;
|
|
8921
|
+
const MDropdownMenu = DropdownMenu;
|
|
8922
|
+
const MDropdownItem = DropdownItem;
|
|
8769
8923
|
|
|
8770
8924
|
const props$N = {
|
|
8771
8925
|
tag: {
|
|
@@ -10452,6 +10606,9 @@ const props$z = {
|
|
|
10452
10606
|
type: Boolean,
|
|
10453
10607
|
default: false
|
|
10454
10608
|
},
|
|
10609
|
+
// draggable为true时有效
|
|
10610
|
+
x: Number,
|
|
10611
|
+
y: Number,
|
|
10455
10612
|
okText: {
|
|
10456
10613
|
type: [String, Boolean],
|
|
10457
10614
|
default: "确定"
|
|
@@ -10509,8 +10666,8 @@ const ModalView = /* @__PURE__ */ vue.defineComponent({
|
|
|
10509
10666
|
const header = vue.shallowRef();
|
|
10510
10667
|
const scroller = vue.shallowRef();
|
|
10511
10668
|
const resizer = vue.shallowRef();
|
|
10512
|
-
const x = vue.ref(
|
|
10513
|
-
const y = vue.ref(
|
|
10669
|
+
const x = vue.ref(props.x);
|
|
10670
|
+
const y = vue.ref(props.y);
|
|
10514
10671
|
const isActive = vue.ref(false);
|
|
10515
10672
|
|
|
10516
10673
|
// 注: 服务端渲染为0, 在客服端激活前,展示端存在问题【高度不定】
|
|
@@ -10552,8 +10709,8 @@ const ModalView = /* @__PURE__ */ vue.defineComponent({
|
|
|
10552
10709
|
});
|
|
10553
10710
|
const draggableStyle = vue.computed(() => {
|
|
10554
10711
|
if (vcShared.IS_SERVER || !props.draggable) return {};
|
|
10555
|
-
const left = x.value
|
|
10556
|
-
const top = y.value
|
|
10712
|
+
const left = typeof x.value === 'undefined' ? window.innerWidth / 2 - defaultSize.value.width / 2 : x.value;
|
|
10713
|
+
const top = typeof y.value === 'undefined' ? window.innerHeight / 2 - defaultSize.value.height / 2 : y.value;
|
|
10557
10714
|
return {
|
|
10558
10715
|
left: `${left}px`,
|
|
10559
10716
|
top: `${top}px`
|
|
@@ -12150,10 +12307,49 @@ const Picker = /* @__PURE__ */ vue.defineComponent({
|
|
|
12150
12307
|
const MPicker = Picker;
|
|
12151
12308
|
|
|
12152
12309
|
const props$p = {
|
|
12153
|
-
|
|
12310
|
+
title: {
|
|
12311
|
+
type: [String, Function],
|
|
12312
|
+
default: ""
|
|
12313
|
+
},
|
|
12314
|
+
content: {
|
|
12315
|
+
type: [String, Function],
|
|
12316
|
+
default: ""
|
|
12317
|
+
},
|
|
12318
|
+
modelValue: {
|
|
12319
|
+
type: Boolean,
|
|
12320
|
+
default: false
|
|
12321
|
+
},
|
|
12322
|
+
placement: {
|
|
12154
12323
|
type: String,
|
|
12155
|
-
default: "
|
|
12156
|
-
}
|
|
12324
|
+
default: "top"
|
|
12325
|
+
},
|
|
12326
|
+
trigger: {
|
|
12327
|
+
type: String,
|
|
12328
|
+
default: "click"
|
|
12329
|
+
},
|
|
12330
|
+
okText: {
|
|
12331
|
+
type: String,
|
|
12332
|
+
default: "确定"
|
|
12333
|
+
},
|
|
12334
|
+
cancelText: {
|
|
12335
|
+
type: String,
|
|
12336
|
+
default: "取消"
|
|
12337
|
+
},
|
|
12338
|
+
okType: {
|
|
12339
|
+
type: String,
|
|
12340
|
+
default: "primary"
|
|
12341
|
+
},
|
|
12342
|
+
cancelType: {
|
|
12343
|
+
type: String,
|
|
12344
|
+
default: "default"
|
|
12345
|
+
},
|
|
12346
|
+
type: {
|
|
12347
|
+
type: String,
|
|
12348
|
+
default: "warning",
|
|
12349
|
+
validator: (v) => /(warning|info|success|error)/.test(v)
|
|
12350
|
+
},
|
|
12351
|
+
width: [String, Number],
|
|
12352
|
+
portalClass: [String, Object]
|
|
12157
12353
|
};
|
|
12158
12354
|
|
|
12159
12355
|
/** @jsxImportSource vue */
|
|
@@ -12162,13 +12358,125 @@ const COMPONENT_NAME$C = 'vc-popconfirm';
|
|
|
12162
12358
|
const Popconfirm = /* @__PURE__ */ vue.defineComponent({
|
|
12163
12359
|
name: COMPONENT_NAME$C,
|
|
12164
12360
|
props: props$p,
|
|
12361
|
+
inheritAttrs: false,
|
|
12362
|
+
emits: ['update:modelValue', 'visible-change', 'ready', 'close', 'cancel', 'ok'],
|
|
12165
12363
|
setup(props, {
|
|
12166
|
-
slots
|
|
12364
|
+
slots,
|
|
12365
|
+
emit
|
|
12167
12366
|
}) {
|
|
12367
|
+
const instance = vue.getCurrentInstance();
|
|
12368
|
+
const its = vcHooks.useAttrs({
|
|
12369
|
+
merge: false
|
|
12370
|
+
});
|
|
12371
|
+
const isActive = vue.ref(false);
|
|
12372
|
+
const contentStyle = vue.computed(() => {
|
|
12373
|
+
return props.content || !!slots.content ? {
|
|
12374
|
+
marginBottom: '15px'
|
|
12375
|
+
} : {};
|
|
12376
|
+
});
|
|
12377
|
+
const inherit = vue.computed(() => {
|
|
12378
|
+
return {
|
|
12379
|
+
style: its.value.style,
|
|
12380
|
+
class: its.value.class
|
|
12381
|
+
};
|
|
12382
|
+
});
|
|
12383
|
+
const attrs = vue.computed(() => {
|
|
12384
|
+
return its.value.attrs;
|
|
12385
|
+
});
|
|
12386
|
+
vue.watch(() => props.modelValue, v => {
|
|
12387
|
+
isActive.value = v;
|
|
12388
|
+
}, {
|
|
12389
|
+
immediate: true
|
|
12390
|
+
});
|
|
12391
|
+
|
|
12392
|
+
/**
|
|
12393
|
+
* v-model 同步, 外部的数据改变时不会触发
|
|
12394
|
+
*/
|
|
12395
|
+
const sync = () => {
|
|
12396
|
+
emit('update:modelValue', isActive.value);
|
|
12397
|
+
emit('visible-change', isActive.value);
|
|
12398
|
+
};
|
|
12399
|
+
const handleBefore = (e, hook) => {
|
|
12400
|
+
e.stopPropagation();
|
|
12401
|
+
e.preventDefault();
|
|
12402
|
+
if (!isActive.value) return;
|
|
12403
|
+
const fn = hook && hook(e);
|
|
12404
|
+
if (fn && fn.then) {
|
|
12405
|
+
return fn.then(res => {
|
|
12406
|
+
isActive.value = false;
|
|
12407
|
+
sync();
|
|
12408
|
+
return res;
|
|
12409
|
+
});
|
|
12410
|
+
} else if (!fn || fn === true) {
|
|
12411
|
+
isActive.value = false;
|
|
12412
|
+
sync();
|
|
12413
|
+
}
|
|
12414
|
+
};
|
|
12415
|
+
const handleOk = (...rest) => {
|
|
12416
|
+
const ok = instance.vnode.props?.onOk || (() => {});
|
|
12417
|
+
return ok(...rest);
|
|
12418
|
+
};
|
|
12419
|
+
const handleCancel = (...rest) => {
|
|
12420
|
+
const cancel = instance.vnode.props?.onCancel || (() => {});
|
|
12421
|
+
return cancel(...rest);
|
|
12422
|
+
};
|
|
12423
|
+
const handleChange = v => {
|
|
12424
|
+
isActive.value = v;
|
|
12425
|
+
sync();
|
|
12426
|
+
};
|
|
12168
12427
|
return () => {
|
|
12169
|
-
return vue.createVNode(
|
|
12170
|
-
"
|
|
12171
|
-
|
|
12428
|
+
return vue.createVNode(Popover, vue.mergeProps(attrs.value, {
|
|
12429
|
+
"modelValue": isActive.value,
|
|
12430
|
+
"placement": props.placement,
|
|
12431
|
+
"trigger": props.trigger,
|
|
12432
|
+
"portalClass": ['is-padding-none', 'vc-popconfirm-wrapper', props.portalClass],
|
|
12433
|
+
"class": ['vc-popconfirm', inherit.value.class],
|
|
12434
|
+
"style": inherit.value.style,
|
|
12435
|
+
"onReady": () => emit('ready'),
|
|
12436
|
+
"onClose": () => emit('close'),
|
|
12437
|
+
"onVisibleChange": handleChange
|
|
12438
|
+
}), {
|
|
12439
|
+
default: () => slots?.default?.(),
|
|
12440
|
+
content: () => {
|
|
12441
|
+
return vue.createVNode("div", {
|
|
12442
|
+
"style": [{
|
|
12443
|
+
width: `${props.width}px`
|
|
12444
|
+
}],
|
|
12445
|
+
"class": "vc-popconfirm__wrapper"
|
|
12446
|
+
}, [vue.createVNode("div", {
|
|
12447
|
+
"class": "vc-popconfirm__title"
|
|
12448
|
+
}, [slots.icon ? slots.icon() : vue.createVNode(Icon, {
|
|
12449
|
+
"type": props.type,
|
|
12450
|
+
"class": [`is-${props.type}`, 'vc-popconfirm__icon']
|
|
12451
|
+
}, null), vue.createVNode("div", null, [slots.title ? slots.title() : typeof props.title === 'string' ? vue.createVNode("div", {
|
|
12452
|
+
"innerHTML": props.title
|
|
12453
|
+
}, null) : typeof props.title === 'function' ? vue.createVNode(Customer, {
|
|
12454
|
+
"render": props.title
|
|
12455
|
+
}, null) : null])]), vue.createVNode("div", {
|
|
12456
|
+
"style": contentStyle.value,
|
|
12457
|
+
"class": "vc-popconfirm__content"
|
|
12458
|
+
}, [slots.content ? slots.content() : typeof props.content === 'string' ? vue.createVNode("div", {
|
|
12459
|
+
"innerHTML": props.content
|
|
12460
|
+
}, null) : typeof props.content === 'function' ? vue.createVNode(Customer, {
|
|
12461
|
+
"render": props.content
|
|
12462
|
+
}, null) : null]), vue.createVNode("div", {
|
|
12463
|
+
"class": "vc-popconfirm__footer"
|
|
12464
|
+
}, [vue.createVNode(Button, {
|
|
12465
|
+
"type": props.cancelType,
|
|
12466
|
+
"style": "margin-right: 8px;",
|
|
12467
|
+
"size": "small",
|
|
12468
|
+
"onClick": e => handleBefore(e, handleCancel)
|
|
12469
|
+
}, {
|
|
12470
|
+
default: () => [props.cancelText]
|
|
12471
|
+
}), vue.createVNode(Button, {
|
|
12472
|
+
"type": props.okType,
|
|
12473
|
+
"size": "small",
|
|
12474
|
+
"onClick": e => handleBefore(e, handleOk)
|
|
12475
|
+
}, {
|
|
12476
|
+
default: () => [props.okText]
|
|
12477
|
+
})])]);
|
|
12478
|
+
}
|
|
12479
|
+
});
|
|
12172
12480
|
};
|
|
12173
12481
|
}
|
|
12174
12482
|
});
|
|
@@ -15086,6 +15394,79 @@ const NormalList = /* @__PURE__ */ vue.defineComponent({
|
|
|
15086
15394
|
}
|
|
15087
15395
|
});
|
|
15088
15396
|
|
|
15397
|
+
const HIDDEN_TEXT_STYLE = `
|
|
15398
|
+
position: absolute!important;
|
|
15399
|
+
word-break: break-all!important;
|
|
15400
|
+
overflow: auto!important;
|
|
15401
|
+
opacity: 0!important;
|
|
15402
|
+
z-index: -1000!important;
|
|
15403
|
+
top: 0!important;
|
|
15404
|
+
right: 0!important;
|
|
15405
|
+
`;
|
|
15406
|
+
const SIZING_STYLE$1 = [
|
|
15407
|
+
"letter-spacing",
|
|
15408
|
+
"line-height",
|
|
15409
|
+
"padding-top",
|
|
15410
|
+
"padding-bottom",
|
|
15411
|
+
"font-family",
|
|
15412
|
+
"font-weight",
|
|
15413
|
+
"font-size",
|
|
15414
|
+
"text-rendering",
|
|
15415
|
+
"text-transform",
|
|
15416
|
+
"width",
|
|
15417
|
+
// 'text-indent', // 需要额外计算
|
|
15418
|
+
"padding-left",
|
|
15419
|
+
"padding-right",
|
|
15420
|
+
"border-width",
|
|
15421
|
+
"box-sizing"
|
|
15422
|
+
];
|
|
15423
|
+
let hiddenEl$1;
|
|
15424
|
+
const getFitIndex = (options = {}) => {
|
|
15425
|
+
const { el, line, value, suffix, indent = 0 } = options;
|
|
15426
|
+
let lineHeight = parseInt($.getStyle(el, "line-height"), 10);
|
|
15427
|
+
if (!hiddenEl$1) {
|
|
15428
|
+
hiddenEl$1 = document.createElement("div");
|
|
15429
|
+
document.body.appendChild(hiddenEl$1);
|
|
15430
|
+
}
|
|
15431
|
+
el.getAttribute("wrap") ? hiddenEl$1.setAttribute("wrap", el.getAttribute("wrap")) : hiddenEl$1.removeAttribute("wrap");
|
|
15432
|
+
const {
|
|
15433
|
+
paddingSize,
|
|
15434
|
+
borderSize,
|
|
15435
|
+
boxSizing,
|
|
15436
|
+
sizingStyle
|
|
15437
|
+
} = vcShared.Utils.getComputedStyle(el, SIZING_STYLE$1);
|
|
15438
|
+
const textIndent = `text-indent: ${parseInt($.getStyle(el, "text-indent"), 10) + indent}px;`;
|
|
15439
|
+
hiddenEl$1.setAttribute("style", `${sizingStyle};${textIndent};${HIDDEN_TEXT_STYLE}`);
|
|
15440
|
+
let sideHeight = paddingSize || 0;
|
|
15441
|
+
boxSizing === "border-box" && (sideHeight += borderSize);
|
|
15442
|
+
if (Number.isNaN(lineHeight)) {
|
|
15443
|
+
hiddenEl$1.innerText = ".";
|
|
15444
|
+
lineHeight = hiddenEl$1.clientHeight - sideHeight;
|
|
15445
|
+
}
|
|
15446
|
+
let endIndex = -1;
|
|
15447
|
+
const strs = (typeof value === "number" ? `${value}` : value || "").split("");
|
|
15448
|
+
let innerText = "";
|
|
15449
|
+
for (let i = 0; i < strs.length; i++) {
|
|
15450
|
+
innerText += strs[i];
|
|
15451
|
+
hiddenEl$1.innerText = innerText;
|
|
15452
|
+
if (endIndex === -1 && hiddenEl$1.clientHeight - sideHeight > lineHeight * line) {
|
|
15453
|
+
endIndex = i;
|
|
15454
|
+
break;
|
|
15455
|
+
}
|
|
15456
|
+
}
|
|
15457
|
+
if (endIndex >= 0 && endIndex <= strs.length - 1) {
|
|
15458
|
+
for (let i = endIndex - 1; i >= 0; i--) {
|
|
15459
|
+
innerText = innerText.substring(0, i);
|
|
15460
|
+
hiddenEl$1.innerText = innerText + suffix;
|
|
15461
|
+
if (hiddenEl$1.clientHeight - sideHeight <= lineHeight * line) {
|
|
15462
|
+
endIndex = i;
|
|
15463
|
+
break;
|
|
15464
|
+
}
|
|
15465
|
+
}
|
|
15466
|
+
}
|
|
15467
|
+
return endIndex;
|
|
15468
|
+
};
|
|
15469
|
+
|
|
15089
15470
|
const TableBody = /* @__PURE__ */ vue.defineComponent({
|
|
15090
15471
|
name: 'vc-table-body',
|
|
15091
15472
|
props: {
|
|
@@ -15194,10 +15575,13 @@ const TableBody = /* @__PURE__ */ vue.defineComponent({
|
|
|
15194
15575
|
column
|
|
15195
15576
|
});
|
|
15196
15577
|
}
|
|
15197
|
-
return
|
|
15578
|
+
return {
|
|
15579
|
+
...cellStyle,
|
|
15580
|
+
...column.style
|
|
15581
|
+
};
|
|
15198
15582
|
};
|
|
15199
15583
|
const getCellClass = (rowIndex, columnIndex, row, column) => {
|
|
15200
|
-
const classes = [column.realAlign, column.
|
|
15584
|
+
const classes = [column.realAlign, column.class];
|
|
15201
15585
|
if (isColumnHidden(columnIndex)) {
|
|
15202
15586
|
classes.push('is-hidden');
|
|
15203
15587
|
}
|
|
@@ -15214,24 +15598,45 @@ const TableBody = /* @__PURE__ */ vue.defineComponent({
|
|
|
15214
15598
|
}
|
|
15215
15599
|
return classes.join(' ');
|
|
15216
15600
|
};
|
|
15217
|
-
|
|
15601
|
+
let poper;
|
|
15602
|
+
const handleCellMouseEnter = (e, row, column) => {
|
|
15218
15603
|
const cell = getCell(e);
|
|
15604
|
+
const hoverState = {
|
|
15605
|
+
cell,
|
|
15606
|
+
column,
|
|
15607
|
+
row
|
|
15608
|
+
};
|
|
15219
15609
|
if (cell) {
|
|
15220
|
-
const column = getColumnByCell(states.columns, cell);
|
|
15221
|
-
const hoverState = {
|
|
15222
|
-
cell,
|
|
15223
|
-
column,
|
|
15224
|
-
row
|
|
15225
|
-
};
|
|
15226
15610
|
table.hoverState.value = hoverState;
|
|
15227
15611
|
table.emit('cell-mouse-enter', hoverState.row, hoverState.column, hoverState.cell, e);
|
|
15228
15612
|
}
|
|
15613
|
+
// 判断是否text-overflow, 如果是就显示tooltip
|
|
15614
|
+
const el = e.target.querySelector('.vc-table__text-line');
|
|
15615
|
+
const line = typeof column.line !== 'undefined' ? column.line : VcInstance.options.TableColumn?.line;
|
|
15616
|
+
if (!el || !line) return;
|
|
15617
|
+
const value = `${row[column.prop]}`;
|
|
15618
|
+
const endIndex = getFitIndex({
|
|
15619
|
+
el,
|
|
15620
|
+
value,
|
|
15621
|
+
line,
|
|
15622
|
+
suffix: '...'
|
|
15623
|
+
});
|
|
15624
|
+
if (endIndex > 0 && endIndex < value.length - 1) {
|
|
15625
|
+
poper && poper.destroy();
|
|
15626
|
+
poper = Popover.open({
|
|
15627
|
+
el: document.body,
|
|
15628
|
+
triggerEl: el,
|
|
15629
|
+
hover: true,
|
|
15630
|
+
alone: true,
|
|
15631
|
+
autoWidth: true,
|
|
15632
|
+
content: value
|
|
15633
|
+
});
|
|
15634
|
+
}
|
|
15229
15635
|
};
|
|
15230
|
-
const handleCellMouseLeave = e => {
|
|
15636
|
+
const handleCellMouseLeave = (e, row, column) => {
|
|
15231
15637
|
const cell = getCell(e);
|
|
15232
15638
|
if (!cell) return;
|
|
15233
|
-
|
|
15234
|
-
table.emit('cell-mouse-leave', oldHoverState.row, oldHoverState.column, oldHoverState.cell, e);
|
|
15639
|
+
table.emit('cell-mouse-leave', row, column, cell, e);
|
|
15235
15640
|
};
|
|
15236
15641
|
const handleMouseEnter = lodashEs.debounce(index => {
|
|
15237
15642
|
table.store.setHoverRow(index);
|
|
@@ -15302,8 +15707,8 @@ const TableBody = /* @__PURE__ */ vue.defineComponent({
|
|
|
15302
15707
|
"key": column.id,
|
|
15303
15708
|
"style": [getCellStyle(rowIndex, columnIndex, row, column), sizeStyle],
|
|
15304
15709
|
"class": [getCellClass(rowIndex, columnIndex, row, column), 'vc-table__td'],
|
|
15305
|
-
"onMouseenter": e => handleCellMouseEnter(e, row),
|
|
15306
|
-
"onMouseleave": e => handleCellMouseLeave(e)
|
|
15710
|
+
"onMouseenter": e => handleCellMouseEnter(e, row, column),
|
|
15711
|
+
"onMouseleave": e => handleCellMouseLeave(e, row, column)
|
|
15307
15712
|
}, [renderCell({
|
|
15308
15713
|
row,
|
|
15309
15714
|
column,
|
|
@@ -15359,7 +15764,11 @@ const TableBody = /* @__PURE__ */ vue.defineComponent({
|
|
|
15359
15764
|
allowRender.value = true;
|
|
15360
15765
|
}
|
|
15361
15766
|
});
|
|
15362
|
-
vue.onBeforeUnmount(() =>
|
|
15767
|
+
vue.onBeforeUnmount(() => {
|
|
15768
|
+
poper && poper.destroy();
|
|
15769
|
+
timer && clearTimeout(timer);
|
|
15770
|
+
allowRender.value = false;
|
|
15771
|
+
});
|
|
15363
15772
|
return () => {
|
|
15364
15773
|
if (!allowRender.value) return;
|
|
15365
15774
|
return vue.createVNode("div", {
|
|
@@ -15486,10 +15895,13 @@ const TableHeader = /* @__PURE__ */ vue.defineComponent({
|
|
|
15486
15895
|
column
|
|
15487
15896
|
});
|
|
15488
15897
|
}
|
|
15489
|
-
return
|
|
15898
|
+
return {
|
|
15899
|
+
...headerCellStyle,
|
|
15900
|
+
...column.style
|
|
15901
|
+
};
|
|
15490
15902
|
};
|
|
15491
15903
|
const getHeaderCellClass = (rowIndex, columnIndex, row, column) => {
|
|
15492
|
-
const classes = [column.id, column.order, column.realHeaderAlign, column.
|
|
15904
|
+
const classes = [column.id, column.order, column.realHeaderAlign, column.class, column.labelClass];
|
|
15493
15905
|
if (rowIndex === 0 && columnsHidden.value[columnIndex]) {
|
|
15494
15906
|
classes.push('is-hidden');
|
|
15495
15907
|
}
|
|
@@ -16424,215 +16836,24 @@ const Table = /* @__PURE__ */ vue.defineComponent({
|
|
|
16424
16836
|
}
|
|
16425
16837
|
});
|
|
16426
16838
|
|
|
16427
|
-
const
|
|
16428
|
-
|
|
16429
|
-
|
|
16430
|
-
default: "div"
|
|
16431
|
-
},
|
|
16432
|
-
value: {
|
|
16433
|
-
type: String,
|
|
16434
|
-
default: ""
|
|
16435
|
-
},
|
|
16436
|
-
line: {
|
|
16437
|
-
type: Number,
|
|
16438
|
-
default: 0
|
|
16439
|
-
},
|
|
16440
|
-
// TODO: 是否改为tail-indent来表示尾部缩进
|
|
16441
|
-
indent: {
|
|
16442
|
-
type: Number,
|
|
16443
|
-
default: 0
|
|
16444
|
-
},
|
|
16445
|
-
resize: {
|
|
16446
|
-
type: [Boolean, Number],
|
|
16447
|
-
default: 100
|
|
16839
|
+
const cellStarts = {
|
|
16840
|
+
default: {
|
|
16841
|
+
order: ''
|
|
16448
16842
|
},
|
|
16449
|
-
|
|
16450
|
-
|
|
16451
|
-
|
|
16843
|
+
selection: {
|
|
16844
|
+
width: 60,
|
|
16845
|
+
minWidth: 60,
|
|
16846
|
+
order: ''
|
|
16452
16847
|
},
|
|
16453
|
-
|
|
16454
|
-
|
|
16455
|
-
|
|
16848
|
+
expand: {
|
|
16849
|
+
width: 60,
|
|
16850
|
+
minWidth: 60,
|
|
16851
|
+
order: ''
|
|
16456
16852
|
},
|
|
16457
|
-
|
|
16458
|
-
|
|
16459
|
-
|
|
16460
|
-
|
|
16461
|
-
default: (props$) => {
|
|
16462
|
-
return props$.value;
|
|
16463
|
-
}
|
|
16464
|
-
}
|
|
16465
|
-
};
|
|
16466
|
-
|
|
16467
|
-
const HIDDEN_TEXT_STYLE = `
|
|
16468
|
-
position: absolute!important;
|
|
16469
|
-
word-break: break-all!important;
|
|
16470
|
-
overflow: auto!important;
|
|
16471
|
-
opacity: 0!important;
|
|
16472
|
-
z-index: -1000!important;
|
|
16473
|
-
top: 0!important;
|
|
16474
|
-
right: 0!important;
|
|
16475
|
-
`;
|
|
16476
|
-
const SIZING_STYLE$1 = [
|
|
16477
|
-
"letter-spacing",
|
|
16478
|
-
"line-height",
|
|
16479
|
-
"padding-top",
|
|
16480
|
-
"padding-bottom",
|
|
16481
|
-
"font-family",
|
|
16482
|
-
"font-weight",
|
|
16483
|
-
"font-size",
|
|
16484
|
-
"text-rendering",
|
|
16485
|
-
"text-transform",
|
|
16486
|
-
"width",
|
|
16487
|
-
// 'text-indent', // 需要额外计算
|
|
16488
|
-
"padding-left",
|
|
16489
|
-
"padding-right",
|
|
16490
|
-
"border-width",
|
|
16491
|
-
"box-sizing"
|
|
16492
|
-
];
|
|
16493
|
-
let hiddenEl$1;
|
|
16494
|
-
const getFitIndex = (options = {}) => {
|
|
16495
|
-
const { el, line, value, suffix, indent } = options;
|
|
16496
|
-
let lineHeight = parseInt($.getStyle(el, "line-height"), 10);
|
|
16497
|
-
if (!hiddenEl$1) {
|
|
16498
|
-
hiddenEl$1 = document.createElement("div");
|
|
16499
|
-
document.body.appendChild(hiddenEl$1);
|
|
16500
|
-
}
|
|
16501
|
-
el.getAttribute("wrap") ? hiddenEl$1.setAttribute("wrap", el.getAttribute("wrap")) : hiddenEl$1.removeAttribute("wrap");
|
|
16502
|
-
const {
|
|
16503
|
-
paddingSize,
|
|
16504
|
-
borderSize,
|
|
16505
|
-
boxSizing,
|
|
16506
|
-
sizingStyle
|
|
16507
|
-
} = vcShared.Utils.getComputedStyle(el, SIZING_STYLE$1);
|
|
16508
|
-
const textIndent = `text-indent: ${parseInt($.getStyle(el, "text-indent"), 10) + indent}px;`;
|
|
16509
|
-
hiddenEl$1.setAttribute("style", `${sizingStyle};${textIndent};${HIDDEN_TEXT_STYLE}`);
|
|
16510
|
-
let sideHeight = paddingSize || 0;
|
|
16511
|
-
boxSizing === "border-box" && (sideHeight += borderSize);
|
|
16512
|
-
if (Number.isNaN(lineHeight)) {
|
|
16513
|
-
hiddenEl$1.innerText = ".";
|
|
16514
|
-
lineHeight = hiddenEl$1.clientHeight - sideHeight;
|
|
16515
|
-
}
|
|
16516
|
-
let endIndex = 0;
|
|
16517
|
-
hiddenEl$1.innerText = suffix;
|
|
16518
|
-
(value || "").split("").forEach((item, i) => {
|
|
16519
|
-
let old = hiddenEl$1.innerText;
|
|
16520
|
-
old = old.substring(0, old.length - suffix.length);
|
|
16521
|
-
hiddenEl$1.innerText = old + item + suffix;
|
|
16522
|
-
if (hiddenEl$1.clientHeight - sideHeight > lineHeight * line && endIndex === 0) {
|
|
16523
|
-
endIndex = i;
|
|
16524
|
-
}
|
|
16525
|
-
});
|
|
16526
|
-
return endIndex;
|
|
16527
|
-
};
|
|
16528
|
-
|
|
16529
|
-
/** @jsxImportSource vue */
|
|
16530
|
-
|
|
16531
|
-
const COMPONENT_NAME$h = 'vc-text';
|
|
16532
|
-
const Text = /* @__PURE__ */ vue.defineComponent({
|
|
16533
|
-
name: COMPONENT_NAME$h,
|
|
16534
|
-
props: props$b,
|
|
16535
|
-
setup(props, {
|
|
16536
|
-
emit
|
|
16537
|
-
}) {
|
|
16538
|
-
const instance = vue.getCurrentInstance();
|
|
16539
|
-
const isActive = vue.ref(false);
|
|
16540
|
-
const endIndex = vue.ref(0);
|
|
16541
|
-
const styles = vue.computed(() => {
|
|
16542
|
-
return {
|
|
16543
|
-
cursor: endIndex.value === 0 ? 'unset' : 'pointer'
|
|
16544
|
-
};
|
|
16545
|
-
});
|
|
16546
|
-
const calcPosition = () => {
|
|
16547
|
-
const {
|
|
16548
|
-
suffix,
|
|
16549
|
-
line,
|
|
16550
|
-
value,
|
|
16551
|
-
indent
|
|
16552
|
-
} = props;
|
|
16553
|
-
if (line === 0) {
|
|
16554
|
-
endIndex.value = 0;
|
|
16555
|
-
isActive.value = true;
|
|
16556
|
-
} else {
|
|
16557
|
-
endIndex.value = getFitIndex({
|
|
16558
|
-
el: instance.vnode.el,
|
|
16559
|
-
line,
|
|
16560
|
-
value,
|
|
16561
|
-
suffix,
|
|
16562
|
-
indent
|
|
16563
|
-
});
|
|
16564
|
-
isActive.value = true;
|
|
16565
|
-
}
|
|
16566
|
-
emit('clip', endIndex.value);
|
|
16567
|
-
};
|
|
16568
|
-
const handleResize = props.resize === true || props.resize === 0 ? calcPosition : lodashEs.debounce(calcPosition, props.resize || 0);
|
|
16569
|
-
let poper;
|
|
16570
|
-
const handleMouseOver = e => {
|
|
16571
|
-
if (endIndex.value > 0) {
|
|
16572
|
-
poper = Popover.open({
|
|
16573
|
-
el: document.body,
|
|
16574
|
-
name: 'vc-text-popover',
|
|
16575
|
-
// 确保不重复创建
|
|
16576
|
-
triggerEl: e.target,
|
|
16577
|
-
hover: true,
|
|
16578
|
-
theme: 'dark',
|
|
16579
|
-
placement: props.placement,
|
|
16580
|
-
portalClass: props.portalClass,
|
|
16581
|
-
portalStyle: [props.portalStyle || `width: ${e.target.clientWidth}px`, 'word-break: break-all'],
|
|
16582
|
-
content: props.value
|
|
16583
|
-
});
|
|
16584
|
-
}
|
|
16585
|
-
};
|
|
16586
|
-
const handleMouseOut = () => {
|
|
16587
|
-
// Do.
|
|
16588
|
-
};
|
|
16589
|
-
['value', 'indent', 'line'].forEach(key => {
|
|
16590
|
-
vue.watch(() => props[key], calcPosition);
|
|
16591
|
-
});
|
|
16592
|
-
vue.onMounted(() => {
|
|
16593
|
-
props.resize !== false && helperResize.Resize.on(instance.vnode.el, handleResize); // 首次会执行一次
|
|
16594
|
-
});
|
|
16595
|
-
vue.onBeforeUnmount(() => {
|
|
16596
|
-
props.resize !== false && helperResize.Resize.off(instance.vnode.el, handleResize);
|
|
16597
|
-
poper?.destroy?.();
|
|
16598
|
-
});
|
|
16599
|
-
const Content = props.tag;
|
|
16600
|
-
return () => {
|
|
16601
|
-
return vue.createVNode(Content, {
|
|
16602
|
-
"class": "vc-text",
|
|
16603
|
-
"style": styles.value,
|
|
16604
|
-
"onMouseover": handleMouseOver,
|
|
16605
|
-
"onMouseout": handleMouseOut
|
|
16606
|
-
}, {
|
|
16607
|
-
default: () => [isActive.value ? vue.createVNode(Customer, {
|
|
16608
|
-
"value": endIndex.value > 0 ? `${props.value.slice(0, endIndex.value)}${props.suffix}` : props.value,
|
|
16609
|
-
"index": endIndex.value,
|
|
16610
|
-
"render": props.renderRow
|
|
16611
|
-
}, null) : null]
|
|
16612
|
-
});
|
|
16613
|
-
};
|
|
16614
|
-
}
|
|
16615
|
-
});
|
|
16616
|
-
|
|
16617
|
-
const cellStarts = {
|
|
16618
|
-
default: {
|
|
16619
|
-
order: ''
|
|
16620
|
-
},
|
|
16621
|
-
selection: {
|
|
16622
|
-
width: 60,
|
|
16623
|
-
minWidth: 60,
|
|
16624
|
-
order: '',
|
|
16625
|
-
className: 'vc-table-column--selection'
|
|
16626
|
-
},
|
|
16627
|
-
expand: {
|
|
16628
|
-
width: 60,
|
|
16629
|
-
minWidth: 60,
|
|
16630
|
-
order: ''
|
|
16631
|
-
},
|
|
16632
|
-
index: {
|
|
16633
|
-
width: 60,
|
|
16634
|
-
minWidth: 60,
|
|
16635
|
-
order: ''
|
|
16853
|
+
index: {
|
|
16854
|
+
width: 60,
|
|
16855
|
+
minWidth: 60,
|
|
16856
|
+
order: ''
|
|
16636
16857
|
}
|
|
16637
16858
|
};
|
|
16638
16859
|
|
|
@@ -16668,7 +16889,8 @@ const cellForced = {
|
|
|
16668
16889
|
}, null), [[vue.vShow, store.states.expandSelectable || level === 0]]);
|
|
16669
16890
|
},
|
|
16670
16891
|
sortable: false,
|
|
16671
|
-
resizable: false
|
|
16892
|
+
resizable: false,
|
|
16893
|
+
class: 'vc-table__selection-column'
|
|
16672
16894
|
},
|
|
16673
16895
|
index: {
|
|
16674
16896
|
renderHeader(h, {
|
|
@@ -16718,7 +16940,7 @@ const cellForced = {
|
|
|
16718
16940
|
},
|
|
16719
16941
|
sortable: false,
|
|
16720
16942
|
resizable: false,
|
|
16721
|
-
|
|
16943
|
+
class: 'vc-table__expand-column'
|
|
16722
16944
|
}
|
|
16723
16945
|
};
|
|
16724
16946
|
|
|
@@ -16736,19 +16958,15 @@ const defaultRenderCell = (rowData = {}) => {
|
|
|
16736
16958
|
if (formatter) {
|
|
16737
16959
|
return column.formatter(rowData);
|
|
16738
16960
|
}
|
|
16739
|
-
const line = column.line
|
|
16961
|
+
const line = typeof column.line !== 'undefined' ? column.line : VcInstance.options.TableColumn?.line;
|
|
16740
16962
|
if (line && value) {
|
|
16741
|
-
const base = rowData.isHead || rowData.isTail ? 36 : 24; // 目前gap是12
|
|
16742
16963
|
const style = {
|
|
16743
|
-
|
|
16744
|
-
// TODO: 含有border还要-1
|
|
16745
|
-
width: (column.realWidth || column.width) - base + 'px'
|
|
16964
|
+
'-webkit-line-clamp': line
|
|
16746
16965
|
};
|
|
16747
|
-
return vue.createVNode(
|
|
16748
|
-
"
|
|
16749
|
-
"
|
|
16750
|
-
|
|
16751
|
-
}, null);
|
|
16966
|
+
return vue.createVNode("div", {
|
|
16967
|
+
"class": "vc-table__text-line",
|
|
16968
|
+
"style": style
|
|
16969
|
+
}, [value]);
|
|
16752
16970
|
}
|
|
16753
16971
|
return value;
|
|
16754
16972
|
};
|
|
@@ -16796,18 +17014,14 @@ const treeCellPrefix = ({
|
|
|
16796
17014
|
|
|
16797
17015
|
const TableColumn = /* @__PURE__ */ vue.defineComponent({
|
|
16798
17016
|
name: 'vc-table-column',
|
|
17017
|
+
inheritAttrs: false,
|
|
16799
17018
|
props: {
|
|
16800
17019
|
type: {
|
|
16801
17020
|
type: String,
|
|
16802
17021
|
default: 'default'
|
|
16803
17022
|
},
|
|
16804
|
-
|
|
16805
|
-
line: {
|
|
16806
|
-
type: Number,
|
|
16807
|
-
default: 0
|
|
16808
|
-
},
|
|
17023
|
+
line: Number,
|
|
16809
17024
|
label: String,
|
|
16810
|
-
customClass: String,
|
|
16811
17025
|
labelClass: String,
|
|
16812
17026
|
prop: String,
|
|
16813
17027
|
width: Number,
|
|
@@ -16844,7 +17058,8 @@ const TableColumn = /* @__PURE__ */ vue.defineComponent({
|
|
|
16844
17058
|
tooltip: [String, Function]
|
|
16845
17059
|
},
|
|
16846
17060
|
setup(props, {
|
|
16847
|
-
slots
|
|
17061
|
+
slots,
|
|
17062
|
+
attrs
|
|
16848
17063
|
}) {
|
|
16849
17064
|
const instance = vue.getCurrentInstance();
|
|
16850
17065
|
const table = vue.inject('vc-table');
|
|
@@ -16894,7 +17109,7 @@ const TableColumn = /* @__PURE__ */ vue.defineComponent({
|
|
|
16894
17109
|
Object.keys(source).forEach(prop => {
|
|
16895
17110
|
const value = source[prop];
|
|
16896
17111
|
if (value !== undefined) {
|
|
16897
|
-
column[prop] = prop === '
|
|
17112
|
+
column[prop] = prop === 'class' ? `${column[prop] ? `${column[prop]} ` : ''}${value}` : value;
|
|
16898
17113
|
}
|
|
16899
17114
|
});
|
|
16900
17115
|
return column;
|
|
@@ -16964,7 +17179,7 @@ const TableColumn = /* @__PURE__ */ vue.defineComponent({
|
|
|
16964
17179
|
// 存在树形数组,且当前行无箭头图标且处于当前展开列,表格对齐
|
|
16965
17180
|
if (!lodashEs.isEmpty(table.store.states.treeData) && !prefix && data.isExpandColumn) {
|
|
16966
17181
|
prefix = vue.createVNode("span", {
|
|
16967
|
-
"class": "vc-
|
|
17182
|
+
"class": "vc-table__unexpand__indent"
|
|
16968
17183
|
}, null);
|
|
16969
17184
|
}
|
|
16970
17185
|
const {
|
|
@@ -16980,6 +17195,8 @@ const TableColumn = /* @__PURE__ */ vue.defineComponent({
|
|
|
16980
17195
|
const defaults = {
|
|
16981
17196
|
colspan: 1,
|
|
16982
17197
|
rowspan: 1,
|
|
17198
|
+
class: attrs.class,
|
|
17199
|
+
style: attrs.style,
|
|
16983
17200
|
...cellStarts[props.type],
|
|
16984
17201
|
id: columnId.value,
|
|
16985
17202
|
realAlign,
|
|
@@ -17066,7 +17283,7 @@ const TableColumn = /* @__PURE__ */ vue.defineComponent({
|
|
|
17066
17283
|
const MTable = Table;
|
|
17067
17284
|
const MTableColumn = TableColumn;
|
|
17068
17285
|
|
|
17069
|
-
const props$
|
|
17286
|
+
const props$b = {
|
|
17070
17287
|
type: {
|
|
17071
17288
|
type: String,
|
|
17072
17289
|
validator: (v) => /^(line|card)$/.test(v),
|
|
@@ -17225,10 +17442,10 @@ const useTabs = (options = {}) => {
|
|
|
17225
17442
|
|
|
17226
17443
|
/** @jsxImportSource vue */
|
|
17227
17444
|
|
|
17228
|
-
const COMPONENT_NAME$
|
|
17445
|
+
const COMPONENT_NAME$h = 'vc-tabs';
|
|
17229
17446
|
const Tabs = /* @__PURE__ */ vue.defineComponent({
|
|
17230
|
-
name: COMPONENT_NAME$
|
|
17231
|
-
props: props$
|
|
17447
|
+
name: COMPONENT_NAME$h,
|
|
17448
|
+
props: props$b,
|
|
17232
17449
|
emits: ['update:modelValue', 'change', 'click'],
|
|
17233
17450
|
setup(props, {
|
|
17234
17451
|
slots
|
|
@@ -17393,7 +17610,7 @@ const Tabs = /* @__PURE__ */ vue.defineComponent({
|
|
|
17393
17610
|
}
|
|
17394
17611
|
});
|
|
17395
17612
|
|
|
17396
|
-
const props$
|
|
17613
|
+
const props$a = {
|
|
17397
17614
|
value: {
|
|
17398
17615
|
type: [String, Number]
|
|
17399
17616
|
},
|
|
@@ -17475,10 +17692,10 @@ const useTabsPane = () => {
|
|
|
17475
17692
|
|
|
17476
17693
|
/** @jsxImportSource vue */
|
|
17477
17694
|
|
|
17478
|
-
const COMPONENT_NAME$
|
|
17695
|
+
const COMPONENT_NAME$g = 'vc-tabs-pane';
|
|
17479
17696
|
const TabsPane = /* @__PURE__ */ vue.defineComponent({
|
|
17480
|
-
name: COMPONENT_NAME$
|
|
17481
|
-
props: props$
|
|
17697
|
+
name: COMPONENT_NAME$g,
|
|
17698
|
+
props: props$a,
|
|
17482
17699
|
setup(_, {
|
|
17483
17700
|
slots
|
|
17484
17701
|
}) {
|
|
@@ -17493,8 +17710,8 @@ const TabsPane = /* @__PURE__ */ vue.defineComponent({
|
|
|
17493
17710
|
}
|
|
17494
17711
|
});
|
|
17495
17712
|
|
|
17496
|
-
const props$
|
|
17497
|
-
...props$
|
|
17713
|
+
const props$9 = {
|
|
17714
|
+
...props$b,
|
|
17498
17715
|
theme: {
|
|
17499
17716
|
type: String,
|
|
17500
17717
|
default: "light",
|
|
@@ -17532,10 +17749,10 @@ const props$8 = {
|
|
|
17532
17749
|
|
|
17533
17750
|
/** @jsxImportSource vue */
|
|
17534
17751
|
|
|
17535
|
-
const COMPONENT_NAME$
|
|
17752
|
+
const COMPONENT_NAME$f = 'vcm-tabs';
|
|
17536
17753
|
const MTabs = /* @__PURE__ */ vue.defineComponent({
|
|
17537
|
-
name: COMPONENT_NAME$
|
|
17538
|
-
props: props$
|
|
17754
|
+
name: COMPONENT_NAME$f,
|
|
17755
|
+
props: props$9,
|
|
17539
17756
|
emits: ['update:modelValue', 'change', 'click'],
|
|
17540
17757
|
setup(props, {
|
|
17541
17758
|
slots
|
|
@@ -17799,10 +18016,10 @@ const MTabs = /* @__PURE__ */ vue.defineComponent({
|
|
|
17799
18016
|
|
|
17800
18017
|
/** @jsxImportSource vue */
|
|
17801
18018
|
|
|
17802
|
-
const COMPONENT_NAME$
|
|
18019
|
+
const COMPONENT_NAME$e = 'vcm-tabs-pane';
|
|
17803
18020
|
const MTabsPane = /* @__PURE__ */ vue.defineComponent({
|
|
17804
|
-
name: COMPONENT_NAME$
|
|
17805
|
-
props: props$
|
|
18021
|
+
name: COMPONENT_NAME$e,
|
|
18022
|
+
props: props$a,
|
|
17806
18023
|
setup(_, {
|
|
17807
18024
|
slots
|
|
17808
18025
|
}) {
|
|
@@ -17819,6 +18036,134 @@ const MTabsPane = /* @__PURE__ */ vue.defineComponent({
|
|
|
17819
18036
|
|
|
17820
18037
|
const MTag = Tag;
|
|
17821
18038
|
|
|
18039
|
+
const props$8 = {
|
|
18040
|
+
tag: {
|
|
18041
|
+
type: String,
|
|
18042
|
+
default: "div"
|
|
18043
|
+
},
|
|
18044
|
+
value: {
|
|
18045
|
+
type: String,
|
|
18046
|
+
default: ""
|
|
18047
|
+
},
|
|
18048
|
+
line: {
|
|
18049
|
+
type: Number,
|
|
18050
|
+
default: 0
|
|
18051
|
+
},
|
|
18052
|
+
// TODO: 是否改为tail-indent来表示尾部缩进
|
|
18053
|
+
indent: {
|
|
18054
|
+
type: Number,
|
|
18055
|
+
default: 0
|
|
18056
|
+
},
|
|
18057
|
+
resize: {
|
|
18058
|
+
type: [Boolean, Number],
|
|
18059
|
+
default: 100
|
|
18060
|
+
},
|
|
18061
|
+
suffix: {
|
|
18062
|
+
type: String,
|
|
18063
|
+
default: "..."
|
|
18064
|
+
},
|
|
18065
|
+
placement: {
|
|
18066
|
+
type: String,
|
|
18067
|
+
default: "top"
|
|
18068
|
+
},
|
|
18069
|
+
portalClass: [Object, String, Array],
|
|
18070
|
+
portalStyle: [Object, String, Array],
|
|
18071
|
+
renderRow: {
|
|
18072
|
+
type: Function,
|
|
18073
|
+
default: (props$) => {
|
|
18074
|
+
return props$.value;
|
|
18075
|
+
}
|
|
18076
|
+
}
|
|
18077
|
+
};
|
|
18078
|
+
|
|
18079
|
+
/** @jsxImportSource vue */
|
|
18080
|
+
|
|
18081
|
+
const COMPONENT_NAME$d = 'vc-text';
|
|
18082
|
+
const Text = /* @__PURE__ */ vue.defineComponent({
|
|
18083
|
+
name: COMPONENT_NAME$d,
|
|
18084
|
+
props: props$8,
|
|
18085
|
+
setup(props, {
|
|
18086
|
+
emit
|
|
18087
|
+
}) {
|
|
18088
|
+
const instance = vue.getCurrentInstance();
|
|
18089
|
+
const isActive = vue.ref(false);
|
|
18090
|
+
const endIndex = vue.ref(-1);
|
|
18091
|
+
const styles = vue.computed(() => {
|
|
18092
|
+
return {
|
|
18093
|
+
cursor: endIndex.value <= 0 ? 'unset' : 'pointer'
|
|
18094
|
+
};
|
|
18095
|
+
});
|
|
18096
|
+
const calcPosition = () => {
|
|
18097
|
+
const {
|
|
18098
|
+
suffix,
|
|
18099
|
+
line,
|
|
18100
|
+
value,
|
|
18101
|
+
indent
|
|
18102
|
+
} = props;
|
|
18103
|
+
if (line === 0) {
|
|
18104
|
+
endIndex.value = -1;
|
|
18105
|
+
isActive.value = true;
|
|
18106
|
+
} else {
|
|
18107
|
+
endIndex.value = getFitIndex({
|
|
18108
|
+
el: instance.vnode.el,
|
|
18109
|
+
line,
|
|
18110
|
+
value,
|
|
18111
|
+
suffix,
|
|
18112
|
+
indent
|
|
18113
|
+
});
|
|
18114
|
+
isActive.value = true;
|
|
18115
|
+
}
|
|
18116
|
+
emit('clip', endIndex.value);
|
|
18117
|
+
};
|
|
18118
|
+
const handleResize = props.resize === true || props.resize === 0 ? calcPosition : lodashEs.debounce(calcPosition, props.resize || 0);
|
|
18119
|
+
let poper;
|
|
18120
|
+
const handleMouseOver = e => {
|
|
18121
|
+
if (endIndex.value > 0) {
|
|
18122
|
+
poper = Popover.open({
|
|
18123
|
+
el: document.body,
|
|
18124
|
+
name: 'vc-text-popover',
|
|
18125
|
+
// 确保不重复创建
|
|
18126
|
+
triggerEl: e.target,
|
|
18127
|
+
hover: true,
|
|
18128
|
+
theme: 'dark',
|
|
18129
|
+
placement: props.placement,
|
|
18130
|
+
portalClass: props.portalClass,
|
|
18131
|
+
portalStyle: [props.portalStyle || `width: ${e.target.clientWidth}px`, 'word-break: break-all'],
|
|
18132
|
+
content: props.value
|
|
18133
|
+
});
|
|
18134
|
+
}
|
|
18135
|
+
};
|
|
18136
|
+
const handleMouseOut = () => {
|
|
18137
|
+
// Do.
|
|
18138
|
+
};
|
|
18139
|
+
['value', 'indent', 'line'].forEach(key => {
|
|
18140
|
+
vue.watch(() => props[key], calcPosition);
|
|
18141
|
+
});
|
|
18142
|
+
vue.onMounted(() => {
|
|
18143
|
+
props.resize !== false && helperResize.Resize.on(instance.vnode.el, handleResize); // 首次会执行一次
|
|
18144
|
+
});
|
|
18145
|
+
vue.onBeforeUnmount(() => {
|
|
18146
|
+
props.resize !== false && helperResize.Resize.off(instance.vnode.el, handleResize);
|
|
18147
|
+
poper?.destroy?.();
|
|
18148
|
+
});
|
|
18149
|
+
const Content = props.tag;
|
|
18150
|
+
return () => {
|
|
18151
|
+
return vue.createVNode(Content, {
|
|
18152
|
+
"class": "vc-text",
|
|
18153
|
+
"style": styles.value,
|
|
18154
|
+
"onMouseover": handleMouseOver,
|
|
18155
|
+
"onMouseout": handleMouseOut
|
|
18156
|
+
}, {
|
|
18157
|
+
default: () => [isActive.value ? vue.createVNode(Customer, {
|
|
18158
|
+
"value": endIndex.value > 0 ? `${props.value.slice(0, endIndex.value)}${props.suffix}` : props.value,
|
|
18159
|
+
"index": endIndex.value,
|
|
18160
|
+
"render": props.renderRow
|
|
18161
|
+
}, null) : null]
|
|
18162
|
+
});
|
|
18163
|
+
};
|
|
18164
|
+
}
|
|
18165
|
+
});
|
|
18166
|
+
|
|
17822
18167
|
const MText = Text;
|
|
17823
18168
|
|
|
17824
18169
|
const HIDDEN_TEXTAREA_STYLE = `
|
|
@@ -19498,6 +19843,8 @@ exports.Divider = Divider;
|
|
|
19498
19843
|
exports.Drawer = Drawer;
|
|
19499
19844
|
exports.DrawerView = DrawerView;
|
|
19500
19845
|
exports.Dropdown = Dropdown;
|
|
19846
|
+
exports.DropdownItem = DropdownItem;
|
|
19847
|
+
exports.DropdownMenu = DropdownMenu;
|
|
19501
19848
|
exports.Editor = Editor;
|
|
19502
19849
|
exports.Expand = Expand$1;
|
|
19503
19850
|
exports.Form = Form;
|
|
@@ -19539,6 +19886,8 @@ exports.MDivider = MDivider;
|
|
|
19539
19886
|
exports.MDrawer = MDrawer;
|
|
19540
19887
|
exports.MDrawerView = MDrawerView;
|
|
19541
19888
|
exports.MDropdown = MDropdown;
|
|
19889
|
+
exports.MDropdownItem = MDropdownItem;
|
|
19890
|
+
exports.MDropdownMenu = MDropdownMenu;
|
|
19542
19891
|
exports.MEditor = MEditor;
|
|
19543
19892
|
exports.MExpand = MExpand;
|
|
19544
19893
|
exports.MForm = MForm;
|