@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.js
CHANGED
|
@@ -5,7 +5,7 @@ import { Utils as Utils$1, IS_SERVER as IS_SERVER$1 } from '@deot/vc-shared';
|
|
|
5
5
|
import * as Utils from '@deot/helper-utils';
|
|
6
6
|
import { getUid, preZero, raf, getPropByPath, throttle as throttle$1, hasOwn } from '@deot/helper-utils';
|
|
7
7
|
import * as $ from '@deot/helper-dom';
|
|
8
|
-
import { composedPath, scrollIntoView, prefixStyle, removeClass, addClass, hasClass
|
|
8
|
+
import { composedPath, scrollIntoView, prefixStyle, getStyle, removeClass, addClass, hasClass } from '@deot/helper-dom';
|
|
9
9
|
import { useAttrs, useScrollbar, getInstance } from '@deot/vc-hooks';
|
|
10
10
|
import { Wheel } from '@deot/helper-wheel';
|
|
11
11
|
import { Validator } from '@deot/helper-validator';
|
|
@@ -81,9 +81,9 @@ const props$1q = {
|
|
|
81
81
|
|
|
82
82
|
/** @jsxImportSource vue */
|
|
83
83
|
|
|
84
|
-
const COMPONENT_NAME$
|
|
84
|
+
const COMPONENT_NAME$22 = 'vc-action-sheet';
|
|
85
85
|
const ActionSheet = /* @__PURE__ */ defineComponent({
|
|
86
|
-
name: COMPONENT_NAME$
|
|
86
|
+
name: COMPONENT_NAME$22,
|
|
87
87
|
props: props$1q,
|
|
88
88
|
setup(props, {
|
|
89
89
|
slots
|
|
@@ -270,9 +270,9 @@ const IconManager = new Manager();
|
|
|
270
270
|
|
|
271
271
|
/** @jsxImportSource vue */
|
|
272
272
|
|
|
273
|
-
const COMPONENT_NAME$
|
|
273
|
+
const COMPONENT_NAME$21 = 'vc-icon';
|
|
274
274
|
const Icon = /* @__PURE__ */ defineComponent({
|
|
275
|
-
name: COMPONENT_NAME$
|
|
275
|
+
name: COMPONENT_NAME$21,
|
|
276
276
|
props: props$1o,
|
|
277
277
|
setup(props) {
|
|
278
278
|
const viewBox = ref('0 0 1024 1024');
|
|
@@ -471,9 +471,9 @@ const useTransition = () => {
|
|
|
471
471
|
};
|
|
472
472
|
};
|
|
473
473
|
|
|
474
|
-
const COMPONENT_NAME$
|
|
474
|
+
const COMPONENT_NAME$20 = "vc-transition";
|
|
475
475
|
const Transition = defineComponent({
|
|
476
|
-
name: COMPONENT_NAME$
|
|
476
|
+
name: COMPONENT_NAME$20,
|
|
477
477
|
props: props$1n,
|
|
478
478
|
// 当不声明emits的情况下,事件存在于attrs中
|
|
479
479
|
inheritAttrs: false,
|
|
@@ -494,9 +494,9 @@ const Transition = defineComponent({
|
|
|
494
494
|
}
|
|
495
495
|
});
|
|
496
496
|
|
|
497
|
-
const COMPONENT_NAME$
|
|
497
|
+
const COMPONENT_NAME$1$ = "vc-transition-collapse";
|
|
498
498
|
const TransitionCollapse = defineComponent({
|
|
499
|
-
name: COMPONENT_NAME$
|
|
499
|
+
name: COMPONENT_NAME$1$,
|
|
500
500
|
props: props$1n,
|
|
501
501
|
// 当不声明emits的情况下,事件存在于attrs中
|
|
502
502
|
inheritAttrs: false,
|
|
@@ -615,9 +615,9 @@ const TransitionCollapse = defineComponent({
|
|
|
615
615
|
}
|
|
616
616
|
});
|
|
617
617
|
|
|
618
|
-
const COMPONENT_NAME$
|
|
618
|
+
const COMPONENT_NAME$1_ = "vc-transition-fade";
|
|
619
619
|
const TransitionFade = defineComponent({
|
|
620
|
-
name: COMPONENT_NAME$
|
|
620
|
+
name: COMPONENT_NAME$1_,
|
|
621
621
|
props: {
|
|
622
622
|
...props$1n,
|
|
623
623
|
// inheritAttrs必须是false
|
|
@@ -652,9 +652,9 @@ const TransitionFade = defineComponent({
|
|
|
652
652
|
}
|
|
653
653
|
});
|
|
654
654
|
|
|
655
|
-
const COMPONENT_NAME$
|
|
655
|
+
const COMPONENT_NAME$1Z = "vc-transition-scale";
|
|
656
656
|
const TransitionScale = defineComponent({
|
|
657
|
-
name: COMPONENT_NAME$
|
|
657
|
+
name: COMPONENT_NAME$1Z,
|
|
658
658
|
props: {
|
|
659
659
|
...props$1n,
|
|
660
660
|
mode: {
|
|
@@ -694,9 +694,9 @@ const TransitionScale = defineComponent({
|
|
|
694
694
|
}
|
|
695
695
|
});
|
|
696
696
|
|
|
697
|
-
const COMPONENT_NAME$
|
|
697
|
+
const COMPONENT_NAME$1Y = "vc-transition-slide";
|
|
698
698
|
const TransitionSlide = defineComponent({
|
|
699
|
-
name: COMPONENT_NAME$
|
|
699
|
+
name: COMPONENT_NAME$1Y,
|
|
700
700
|
props: {
|
|
701
701
|
...props$1n,
|
|
702
702
|
mode: {
|
|
@@ -736,9 +736,9 @@ const TransitionSlide = defineComponent({
|
|
|
736
736
|
}
|
|
737
737
|
});
|
|
738
738
|
|
|
739
|
-
const COMPONENT_NAME$
|
|
739
|
+
const COMPONENT_NAME$1X = "vc-transition-zoom";
|
|
740
740
|
const TransitionZoom = defineComponent({
|
|
741
|
-
name: COMPONENT_NAME$
|
|
741
|
+
name: COMPONENT_NAME$1X,
|
|
742
742
|
props: {
|
|
743
743
|
...props$1n,
|
|
744
744
|
mode: {
|
|
@@ -780,7 +780,7 @@ const TransitionZoom = defineComponent({
|
|
|
780
780
|
|
|
781
781
|
/** @jsxImportSource vue */
|
|
782
782
|
|
|
783
|
-
const COMPONENT_NAME$
|
|
783
|
+
const COMPONENT_NAME$1W = 'vc-alert';
|
|
784
784
|
|
|
785
785
|
// [color, borderColor, backgroundColor], -> CSS
|
|
786
786
|
const THEME_MAP = {
|
|
@@ -790,7 +790,7 @@ const THEME_MAP = {
|
|
|
790
790
|
warning: ['#ffbf00', '#ffe58f', '#fffbe6']
|
|
791
791
|
};
|
|
792
792
|
const Alert = /* @__PURE__ */ defineComponent({
|
|
793
|
-
name: COMPONENT_NAME$
|
|
793
|
+
name: COMPONENT_NAME$1W,
|
|
794
794
|
props: props$1p,
|
|
795
795
|
setup(props, {
|
|
796
796
|
slots,
|
|
@@ -889,9 +889,9 @@ const props$1m = {
|
|
|
889
889
|
|
|
890
890
|
/** @jsxImportSource vue */
|
|
891
891
|
|
|
892
|
-
const COMPONENT_NAME$
|
|
892
|
+
const COMPONENT_NAME$1V = 'vc-artboard';
|
|
893
893
|
const Artboard = /* @__PURE__ */ defineComponent({
|
|
894
|
-
name: COMPONENT_NAME$
|
|
894
|
+
name: COMPONENT_NAME$1V,
|
|
895
895
|
props: props$1m,
|
|
896
896
|
setup(props, {
|
|
897
897
|
slots
|
|
@@ -930,9 +930,9 @@ const props$1l = {
|
|
|
930
930
|
|
|
931
931
|
/** @jsxImportSource vue */
|
|
932
932
|
|
|
933
|
-
const COMPONENT_NAME$
|
|
933
|
+
const COMPONENT_NAME$1U = 'vc-spin';
|
|
934
934
|
const Spin = /* @__PURE__ */ defineComponent({
|
|
935
|
-
name: COMPONENT_NAME$
|
|
935
|
+
name: COMPONENT_NAME$1U,
|
|
936
936
|
props: props$1l,
|
|
937
937
|
setup(props, {
|
|
938
938
|
slots
|
|
@@ -983,9 +983,9 @@ const props$1k = {
|
|
|
983
983
|
exclude: RegExp
|
|
984
984
|
};
|
|
985
985
|
|
|
986
|
-
const COMPONENT_NAME$
|
|
986
|
+
const COMPONENT_NAME$1T = "vc-debounce";
|
|
987
987
|
const Debounce = defineComponent({
|
|
988
|
-
name: COMPONENT_NAME$
|
|
988
|
+
name: COMPONENT_NAME$1T,
|
|
989
989
|
props: props$1k,
|
|
990
990
|
/**
|
|
991
991
|
* 不声明emits使得事件被透传放入attrs中, 这样可以让所有的事件透传
|
|
@@ -1057,9 +1057,9 @@ const props$1j = {
|
|
|
1057
1057
|
|
|
1058
1058
|
/** @jsxImportSource vue */
|
|
1059
1059
|
|
|
1060
|
-
const COMPONENT_NAME$
|
|
1060
|
+
const COMPONENT_NAME$1S = 'vc-button';
|
|
1061
1061
|
const Button = /* @__PURE__ */ defineComponent({
|
|
1062
|
-
name: COMPONENT_NAME$
|
|
1062
|
+
name: COMPONENT_NAME$1S,
|
|
1063
1063
|
emits: ['click'],
|
|
1064
1064
|
props: props$1j,
|
|
1065
1065
|
setup(props, {
|
|
@@ -1141,9 +1141,9 @@ const props$1i = {
|
|
|
1141
1141
|
|
|
1142
1142
|
/** @jsxImportSource vue */
|
|
1143
1143
|
|
|
1144
|
-
const COMPONENT_NAME$
|
|
1144
|
+
const COMPONENT_NAME$1R = 'vc-button-group';
|
|
1145
1145
|
const ButtonGroup = /* @__PURE__ */ defineComponent({
|
|
1146
|
-
name: COMPONENT_NAME$
|
|
1146
|
+
name: COMPONENT_NAME$1R,
|
|
1147
1147
|
props: props$1i,
|
|
1148
1148
|
setup(props, {
|
|
1149
1149
|
slots
|
|
@@ -1177,9 +1177,9 @@ const props$1h = {
|
|
|
1177
1177
|
|
|
1178
1178
|
/** @jsxImportSource vue */
|
|
1179
1179
|
|
|
1180
|
-
const COMPONENT_NAME$
|
|
1180
|
+
const COMPONENT_NAME$1Q = 'vc-calendar';
|
|
1181
1181
|
const Calendar = /* @__PURE__ */ defineComponent({
|
|
1182
|
-
name: COMPONENT_NAME$
|
|
1182
|
+
name: COMPONENT_NAME$1Q,
|
|
1183
1183
|
props: props$1h,
|
|
1184
1184
|
setup(props, {
|
|
1185
1185
|
slots
|
|
@@ -1217,9 +1217,9 @@ const props$1g = {
|
|
|
1217
1217
|
|
|
1218
1218
|
/** @jsxImportSource vue */
|
|
1219
1219
|
|
|
1220
|
-
const COMPONENT_NAME$
|
|
1220
|
+
const COMPONENT_NAME$1P = 'vc-card';
|
|
1221
1221
|
const Card = /* @__PURE__ */ defineComponent({
|
|
1222
|
-
name: COMPONENT_NAME$
|
|
1222
|
+
name: COMPONENT_NAME$1P,
|
|
1223
1223
|
props: props$1g,
|
|
1224
1224
|
setup(props, {
|
|
1225
1225
|
slots
|
|
@@ -1255,9 +1255,9 @@ const props$1f = {
|
|
|
1255
1255
|
|
|
1256
1256
|
/** @jsxImportSource vue */
|
|
1257
1257
|
|
|
1258
|
-
const COMPONENT_NAME$
|
|
1258
|
+
const COMPONENT_NAME$1O = 'vc-carousel';
|
|
1259
1259
|
const Carousel = /* @__PURE__ */ defineComponent({
|
|
1260
|
-
name: COMPONENT_NAME$
|
|
1260
|
+
name: COMPONENT_NAME$1O,
|
|
1261
1261
|
props: props$1f,
|
|
1262
1262
|
setup(props, {
|
|
1263
1263
|
slots
|
|
@@ -1281,9 +1281,9 @@ const props$1e = {
|
|
|
1281
1281
|
|
|
1282
1282
|
/** @jsxImportSource vue */
|
|
1283
1283
|
|
|
1284
|
-
const COMPONENT_NAME$
|
|
1284
|
+
const COMPONENT_NAME$1N = 'vc-cascader';
|
|
1285
1285
|
const Cascader = /* @__PURE__ */ defineComponent({
|
|
1286
|
-
name: COMPONENT_NAME$
|
|
1286
|
+
name: COMPONENT_NAME$1N,
|
|
1287
1287
|
props: props$1e,
|
|
1288
1288
|
setup(props, {
|
|
1289
1289
|
slots
|
|
@@ -1352,9 +1352,9 @@ const props$1d = {
|
|
|
1352
1352
|
|
|
1353
1353
|
/** @jsxImportSource vue */
|
|
1354
1354
|
|
|
1355
|
-
const COMPONENT_NAME$
|
|
1355
|
+
const COMPONENT_NAME$1M = 'vc-chart';
|
|
1356
1356
|
const Chart = /* @__PURE__ */ defineComponent({
|
|
1357
|
-
name: COMPONENT_NAME$
|
|
1357
|
+
name: COMPONENT_NAME$1M,
|
|
1358
1358
|
props: props$1d,
|
|
1359
1359
|
emits: [...EVENTS, 'ready'],
|
|
1360
1360
|
setup(props, {
|
|
@@ -1586,9 +1586,9 @@ const useCheckbox = () => {
|
|
|
1586
1586
|
|
|
1587
1587
|
/** @jsxImportSource vue */
|
|
1588
1588
|
|
|
1589
|
-
const COMPONENT_NAME$
|
|
1589
|
+
const COMPONENT_NAME$1L = 'vc-checkbox';
|
|
1590
1590
|
const Checkbox = /* @__PURE__ */ defineComponent({
|
|
1591
|
-
name: COMPONENT_NAME$
|
|
1591
|
+
name: COMPONENT_NAME$1L,
|
|
1592
1592
|
props: props$1c,
|
|
1593
1593
|
emits: ['update:modelValue', 'change'],
|
|
1594
1594
|
setup(props, {
|
|
@@ -1675,9 +1675,9 @@ const useCheckboxGroup = () => {
|
|
|
1675
1675
|
|
|
1676
1676
|
/** @jsxImportSource vue */
|
|
1677
1677
|
|
|
1678
|
-
const COMPONENT_NAME$
|
|
1678
|
+
const COMPONENT_NAME$1K = 'vc-checkbox-group';
|
|
1679
1679
|
const CheckboxGroup = /* @__PURE__ */ defineComponent({
|
|
1680
|
-
name: COMPONENT_NAME$
|
|
1680
|
+
name: COMPONENT_NAME$1K,
|
|
1681
1681
|
props: props$1b,
|
|
1682
1682
|
emits: ['update:modelValue', 'change'],
|
|
1683
1683
|
setup(props, {
|
|
@@ -1695,9 +1695,9 @@ const CheckboxGroup = /* @__PURE__ */ defineComponent({
|
|
|
1695
1695
|
|
|
1696
1696
|
/** @jsxImportSource vue */
|
|
1697
1697
|
|
|
1698
|
-
const COMPONENT_NAME$
|
|
1698
|
+
const COMPONENT_NAME$1J = 'vcm-checkbox';
|
|
1699
1699
|
const MCheckbox = /* @__PURE__ */ defineComponent({
|
|
1700
|
-
name: COMPONENT_NAME$
|
|
1700
|
+
name: COMPONENT_NAME$1J,
|
|
1701
1701
|
props: props$1c,
|
|
1702
1702
|
emits: ['update:modelValue', 'change'],
|
|
1703
1703
|
setup(props, {
|
|
@@ -1737,9 +1737,9 @@ const MCheckbox = /* @__PURE__ */ defineComponent({
|
|
|
1737
1737
|
|
|
1738
1738
|
/** @jsxImportSource vue */
|
|
1739
1739
|
|
|
1740
|
-
const COMPONENT_NAME$
|
|
1740
|
+
const COMPONENT_NAME$1I = 'vcm-checkbox-group';
|
|
1741
1741
|
const MCheckboxGroup = /* @__PURE__ */ defineComponent({
|
|
1742
|
-
name: COMPONENT_NAME$
|
|
1742
|
+
name: COMPONENT_NAME$1I,
|
|
1743
1743
|
props: props$1b,
|
|
1744
1744
|
emits: ['update:modelValue', 'change'],
|
|
1745
1745
|
setup(props, {
|
|
@@ -1798,9 +1798,9 @@ const props$19 = {
|
|
|
1798
1798
|
}
|
|
1799
1799
|
};
|
|
1800
1800
|
|
|
1801
|
-
const COMPONENT_NAME$
|
|
1801
|
+
const COMPONENT_NAME$1H = "vc-customer";
|
|
1802
1802
|
const Customer = defineComponent({
|
|
1803
|
-
name: COMPONENT_NAME$
|
|
1803
|
+
name: COMPONENT_NAME$1H,
|
|
1804
1804
|
props: props$19,
|
|
1805
1805
|
setup(props, context) {
|
|
1806
1806
|
return () => h(() => {
|
|
@@ -1811,9 +1811,9 @@ const Customer = defineComponent({
|
|
|
1811
1811
|
|
|
1812
1812
|
/** @jsxImportSource vue */
|
|
1813
1813
|
|
|
1814
|
-
const COMPONENT_NAME$
|
|
1814
|
+
const COMPONENT_NAME$1G = 'vc-message';
|
|
1815
1815
|
const MessageView = /* @__PURE__ */ defineComponent({
|
|
1816
|
-
name: COMPONENT_NAME$
|
|
1816
|
+
name: COMPONENT_NAME$1G,
|
|
1817
1817
|
emits: ['before-close', 'close', 'portal-fulfilled'],
|
|
1818
1818
|
props: props$1a,
|
|
1819
1819
|
setup(props, {
|
|
@@ -1960,7 +1960,7 @@ class PortalLeaf {
|
|
|
1960
1960
|
}
|
|
1961
1961
|
}
|
|
1962
1962
|
|
|
1963
|
-
const COMPONENT_NAME$
|
|
1963
|
+
const COMPONENT_NAME$1F = "vc-portal";
|
|
1964
1964
|
class Portal {
|
|
1965
1965
|
/**
|
|
1966
1966
|
* 清理Portals类型组件
|
|
@@ -2012,7 +2012,7 @@ class Portal {
|
|
|
2012
2012
|
this.wrapper = wrapper;
|
|
2013
2013
|
this.globalOptions = {
|
|
2014
2014
|
...options,
|
|
2015
|
-
name: options?.name || wrapper.name || Utils.getUid(COMPONENT_NAME$
|
|
2015
|
+
name: options?.name || wrapper.name || Utils.getUid(COMPONENT_NAME$1F)
|
|
2016
2016
|
};
|
|
2017
2017
|
}
|
|
2018
2018
|
popup(propsData, options) {
|
|
@@ -2111,7 +2111,7 @@ class Portal {
|
|
|
2111
2111
|
...rest
|
|
2112
2112
|
} = options;
|
|
2113
2113
|
let useAllNodes = fragment;
|
|
2114
|
-
const name = multiple ? `${name$}__${Utils.getUid(COMPONENT_NAME$
|
|
2114
|
+
const name = multiple ? `${name$}__${Utils.getUid(COMPONENT_NAME$1F)}` : name$;
|
|
2115
2115
|
const container = document.createElement(tag);
|
|
2116
2116
|
const root = typeof el === "object" ? el : document.querySelector(el || "body");
|
|
2117
2117
|
!alive && Portal.leafs.get(name)?.destroy();
|
|
@@ -2145,7 +2145,7 @@ class Portal {
|
|
|
2145
2145
|
} else {
|
|
2146
2146
|
const wrapper = this.wrapper;
|
|
2147
2147
|
const app = createApp({
|
|
2148
|
-
name: COMPONENT_NAME$
|
|
2148
|
+
name: COMPONENT_NAME$1F,
|
|
2149
2149
|
parent,
|
|
2150
2150
|
setup() {
|
|
2151
2151
|
if (alive) {
|
|
@@ -2257,13 +2257,13 @@ const props$18 = {
|
|
|
2257
2257
|
}
|
|
2258
2258
|
};
|
|
2259
2259
|
|
|
2260
|
-
const COMPONENT_NAME$
|
|
2260
|
+
const COMPONENT_NAME$1E = 'vc-portal-view';
|
|
2261
2261
|
|
|
2262
2262
|
/**
|
|
2263
2263
|
* 写法不同,但与vue@2.x 保持一致
|
|
2264
2264
|
*/
|
|
2265
2265
|
const PortalView = /* @__PURE__ */ defineComponent({
|
|
2266
|
-
name: COMPONENT_NAME$
|
|
2266
|
+
name: COMPONENT_NAME$1E,
|
|
2267
2267
|
props: props$18,
|
|
2268
2268
|
setup(props, {
|
|
2269
2269
|
slots
|
|
@@ -2434,9 +2434,9 @@ const useClipboard = (done) => {
|
|
|
2434
2434
|
return () => h(props.tag, { onClick: handleClick, class: "vc-clipboard" }, slots?.default?.());
|
|
2435
2435
|
};
|
|
2436
2436
|
|
|
2437
|
-
const COMPONENT_NAME$
|
|
2437
|
+
const COMPONENT_NAME$1D = "vc-clipboard";
|
|
2438
2438
|
const Clipboard$1 = defineComponent({
|
|
2439
|
-
name: COMPONENT_NAME$
|
|
2439
|
+
name: COMPONENT_NAME$1D,
|
|
2440
2440
|
props: props$17,
|
|
2441
2441
|
setup() {
|
|
2442
2442
|
return useClipboard((content) => Message.success({ content }));
|
|
@@ -2476,9 +2476,9 @@ const MTransitionZoom = TransitionZoom;
|
|
|
2476
2476
|
|
|
2477
2477
|
/** @jsxImportSource vue */
|
|
2478
2478
|
|
|
2479
|
-
const COMPONENT_NAME$
|
|
2479
|
+
const COMPONENT_NAME$1C = 'vcm-toast';
|
|
2480
2480
|
const MToastView = /* @__PURE__ */ defineComponent({
|
|
2481
|
-
name: COMPONENT_NAME$
|
|
2481
|
+
name: COMPONENT_NAME$1C,
|
|
2482
2482
|
emits: ['close', 'portal-fulfilled'],
|
|
2483
2483
|
props: props$16,
|
|
2484
2484
|
setup(props, {
|
|
@@ -2580,9 +2580,9 @@ const warning$2 = create$3({ mode: "warning" });
|
|
|
2580
2580
|
const error$2 = create$3({ mode: "error" });
|
|
2581
2581
|
const MToast = Object.assign(MToastView, { destroy: destroy$4, info: info$2, success: success$2, loading, warning: warning$2, error: error$2 });
|
|
2582
2582
|
|
|
2583
|
-
const COMPONENT_NAME$
|
|
2583
|
+
const COMPONENT_NAME$1B = "vcm-clipboard";
|
|
2584
2584
|
const MClipboard$1 = defineComponent({
|
|
2585
|
-
name: COMPONENT_NAME$
|
|
2585
|
+
name: COMPONENT_NAME$1B,
|
|
2586
2586
|
props: props$17,
|
|
2587
2587
|
setup() {
|
|
2588
2588
|
return useClipboard((content) => MToast.info({ content }));
|
|
@@ -2614,9 +2614,9 @@ const props$15 = {
|
|
|
2614
2614
|
}
|
|
2615
2615
|
};
|
|
2616
2616
|
|
|
2617
|
-
const COMPONENT_NAME$
|
|
2617
|
+
const COMPONENT_NAME$1A = "vc-collapse";
|
|
2618
2618
|
const Collapse = defineComponent({
|
|
2619
|
-
name: COMPONENT_NAME$
|
|
2619
|
+
name: COMPONENT_NAME$1A,
|
|
2620
2620
|
props: props$15,
|
|
2621
2621
|
emits: ["update:moodelValue", "change"],
|
|
2622
2622
|
setup(props, { slots, emit }) {
|
|
@@ -2730,12 +2730,12 @@ const props$13 = {
|
|
|
2730
2730
|
|
|
2731
2731
|
/** @jsxImportSource vue */
|
|
2732
2732
|
|
|
2733
|
-
function _isSlot$
|
|
2733
|
+
function _isSlot$2(s) {
|
|
2734
2734
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
2735
2735
|
}
|
|
2736
|
-
const COMPONENT_NAME$
|
|
2736
|
+
const COMPONENT_NAME$1z = 'vc-expand';
|
|
2737
2737
|
const Expand$1 = /* @__PURE__ */ defineComponent({
|
|
2738
|
-
name: COMPONENT_NAME$
|
|
2738
|
+
name: COMPONENT_NAME$1z,
|
|
2739
2739
|
props: props$13,
|
|
2740
2740
|
setup(props, {
|
|
2741
2741
|
slots
|
|
@@ -2754,7 +2754,7 @@ const Expand$1 = /* @__PURE__ */ defineComponent({
|
|
|
2754
2754
|
enter: 200,
|
|
2755
2755
|
leave: 200
|
|
2756
2756
|
}
|
|
2757
|
-
}, _isSlot$
|
|
2757
|
+
}, _isSlot$2(_slot = withDirectives(createVNode(Content, null, {
|
|
2758
2758
|
default: () => [(props.alive || !props.alive && isActive.value) && slots.default?.()]
|
|
2759
2759
|
}), [[vShow, isActive.value]])) ? _slot : {
|
|
2760
2760
|
default: () => [_slot]
|
|
@@ -2765,9 +2765,9 @@ const Expand$1 = /* @__PURE__ */ defineComponent({
|
|
|
2765
2765
|
|
|
2766
2766
|
/** @jsxImportSource vue */
|
|
2767
2767
|
|
|
2768
|
-
const COMPONENT_NAME$
|
|
2768
|
+
const COMPONENT_NAME$1y = 'vc-collapse-item';
|
|
2769
2769
|
const CollapseItem = /* @__PURE__ */ defineComponent({
|
|
2770
|
-
name: COMPONENT_NAME$
|
|
2770
|
+
name: COMPONENT_NAME$1y,
|
|
2771
2771
|
props: props$14,
|
|
2772
2772
|
setup(props, {
|
|
2773
2773
|
slots,
|
|
@@ -2842,9 +2842,9 @@ const props$12 = {
|
|
|
2842
2842
|
|
|
2843
2843
|
/** @jsxImportSource vue */
|
|
2844
2844
|
|
|
2845
|
-
const COMPONENT_NAME$
|
|
2845
|
+
const COMPONENT_NAME$1x = 'vc-color-picker';
|
|
2846
2846
|
const ColorPicker = /* @__PURE__ */ defineComponent({
|
|
2847
|
-
name: COMPONENT_NAME$
|
|
2847
|
+
name: COMPONENT_NAME$1x,
|
|
2848
2848
|
props: props$12,
|
|
2849
2849
|
setup(props, {
|
|
2850
2850
|
slots
|
|
@@ -2868,9 +2868,9 @@ const props$11 = {
|
|
|
2868
2868
|
|
|
2869
2869
|
/** @jsxImportSource vue */
|
|
2870
2870
|
|
|
2871
|
-
const COMPONENT_NAME$
|
|
2871
|
+
const COMPONENT_NAME$1w = 'vc-countdown';
|
|
2872
2872
|
const Countdown = /* @__PURE__ */ defineComponent({
|
|
2873
|
-
name: COMPONENT_NAME$
|
|
2873
|
+
name: COMPONENT_NAME$1w,
|
|
2874
2874
|
props: props$11,
|
|
2875
2875
|
setup(props, {
|
|
2876
2876
|
slots
|
|
@@ -3320,9 +3320,9 @@ const useNativeEmitter = (input, expose) => {
|
|
|
3320
3320
|
|
|
3321
3321
|
/** @jsxImportSource vue */
|
|
3322
3322
|
|
|
3323
|
-
const COMPONENT_NAME$
|
|
3323
|
+
const COMPONENT_NAME$1v = 'vc-input';
|
|
3324
3324
|
const Input = /* @__PURE__ */ defineComponent({
|
|
3325
|
-
name: COMPONENT_NAME$
|
|
3325
|
+
name: COMPONENT_NAME$1v,
|
|
3326
3326
|
inheritAttrs: false,
|
|
3327
3327
|
props: {
|
|
3328
3328
|
...props$$,
|
|
@@ -3335,7 +3335,8 @@ const Input = /* @__PURE__ */ defineComponent({
|
|
|
3335
3335
|
emits: ['update:modelValue', 'input', 'change', 'focus', 'blur', 'clear', 'paste', 'keydown', 'keypress', 'keyup', 'enter', 'tip'],
|
|
3336
3336
|
setup(props, {
|
|
3337
3337
|
slots,
|
|
3338
|
-
expose
|
|
3338
|
+
expose,
|
|
3339
|
+
attrs
|
|
3339
3340
|
}) {
|
|
3340
3341
|
const input = ref();
|
|
3341
3342
|
useNativeEmitter(input, expose);
|
|
@@ -3402,9 +3403,9 @@ const Input = /* @__PURE__ */ defineComponent({
|
|
|
3402
3403
|
}, classes.value]
|
|
3403
3404
|
}, [slots.prepend?.() || props.prepend && createVNode(Icon, {
|
|
3404
3405
|
"type": props.prepend
|
|
3405
|
-
}, null)]), createVNode("div", {
|
|
3406
|
+
}, null)]), createVNode("div", mergeProps({
|
|
3406
3407
|
"class": ['vc-input__content', classes.value]
|
|
3407
|
-
}, [slots.content
|
|
3408
|
+
}, slots.content ? it.value.listeners : {}), [slots.content ? slots.content() : renderInput(false)]), !props.disabled && props.clearable && createVNode(TransitionFade, null, {
|
|
3408
3409
|
default: () => [createVNode(Icon, {
|
|
3409
3410
|
"class": "vc-input__icon-clear",
|
|
3410
3411
|
"type": "clear",
|
|
@@ -3656,9 +3657,9 @@ const useInputNumber = () => {
|
|
|
3656
3657
|
|
|
3657
3658
|
/** @jsxImportSource vue */
|
|
3658
3659
|
|
|
3659
|
-
const COMPONENT_NAME$
|
|
3660
|
+
const COMPONENT_NAME$1u = 'vc-input-number';
|
|
3660
3661
|
const InputNumber = /* @__PURE__ */ defineComponent({
|
|
3661
|
-
name: COMPONENT_NAME$
|
|
3662
|
+
name: COMPONENT_NAME$1u,
|
|
3662
3663
|
props: props$X,
|
|
3663
3664
|
inheritAttrs: false,
|
|
3664
3665
|
setup(props, {
|
|
@@ -3722,9 +3723,9 @@ const props$W = {
|
|
|
3722
3723
|
|
|
3723
3724
|
/** @jsxImportSource vue */
|
|
3724
3725
|
|
|
3725
|
-
const COMPONENT_NAME$
|
|
3726
|
+
const COMPONENT_NAME$1t = 'vc-input-search';
|
|
3726
3727
|
const InputSearch = /* @__PURE__ */ defineComponent({
|
|
3727
|
-
name: COMPONENT_NAME$
|
|
3728
|
+
name: COMPONENT_NAME$1t,
|
|
3728
3729
|
props: props$W,
|
|
3729
3730
|
inheritAttrs: false,
|
|
3730
3731
|
setup(props, {
|
|
@@ -4012,12 +4013,9 @@ const usePos = () => {
|
|
|
4012
4013
|
|
|
4013
4014
|
/** @jsxImportSource vue */
|
|
4014
4015
|
|
|
4015
|
-
|
|
4016
|
-
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
4017
|
-
}
|
|
4018
|
-
const COMPONENT_NAME$1q = 'vc-popover-wrapper';
|
|
4016
|
+
const COMPONENT_NAME$1s = 'vc-popover-wrapper';
|
|
4019
4017
|
const PopoverWrapper = /* @__PURE__ */ defineComponent({
|
|
4020
|
-
name: COMPONENT_NAME$
|
|
4018
|
+
name: COMPONENT_NAME$1s,
|
|
4021
4019
|
props: props$_,
|
|
4022
4020
|
emits: ['portal-fulfilled', 'close'],
|
|
4023
4021
|
setup(props, {
|
|
@@ -4079,7 +4077,12 @@ const PopoverWrapper = /* @__PURE__ */ defineComponent({
|
|
|
4079
4077
|
return container;
|
|
4080
4078
|
}
|
|
4081
4079
|
};
|
|
4082
|
-
|
|
4080
|
+
|
|
4081
|
+
/**
|
|
4082
|
+
* 添加debounce解决连续setPopupStyle的情况
|
|
4083
|
+
* 待排查
|
|
4084
|
+
*/
|
|
4085
|
+
const setPopupStyle = debounce(() => {
|
|
4083
4086
|
if (!vnode.el) return;
|
|
4084
4087
|
const triggerEl = getHackContainer();
|
|
4085
4088
|
const {
|
|
@@ -4109,13 +4112,15 @@ const PopoverWrapper = /* @__PURE__ */ defineComponent({
|
|
|
4109
4112
|
fitPos.value = result;
|
|
4110
4113
|
wrapperStyle.value = $wrapperStyle;
|
|
4111
4114
|
arrowStyle.value = $arrowStyle;
|
|
4112
|
-
|
|
4113
4115
|
// 自适应高度
|
|
4114
4116
|
if (props.autoWidth) return;
|
|
4115
4117
|
wrapperW.value = {
|
|
4116
4118
|
width: `${triggerEl.getBoundingClientRect().width}px`
|
|
4117
4119
|
};
|
|
4118
|
-
}
|
|
4120
|
+
}, 50, {
|
|
4121
|
+
leading: true,
|
|
4122
|
+
trailing: false
|
|
4123
|
+
});
|
|
4119
4124
|
let timer;
|
|
4120
4125
|
let isPressMouse = false;
|
|
4121
4126
|
const handleTriggerChange = e => {
|
|
@@ -4170,7 +4175,7 @@ const PopoverWrapper = /* @__PURE__ */ defineComponent({
|
|
|
4170
4175
|
switch (direction[0]) {
|
|
4171
4176
|
case 'top':
|
|
4172
4177
|
case 'bottom':
|
|
4173
|
-
if (left + vnode.el.offsetWidth
|
|
4178
|
+
if (left + vnode.el.offsetWidth > window.innerWidth) {
|
|
4174
4179
|
wrapperStyle.value = {
|
|
4175
4180
|
...wrapperStyle.value,
|
|
4176
4181
|
left: `${window.innerWidth - vnode.el.offsetWidth}px`
|
|
@@ -4230,7 +4235,6 @@ const PopoverWrapper = /* @__PURE__ */ defineComponent({
|
|
|
4230
4235
|
}
|
|
4231
4236
|
});
|
|
4232
4237
|
return () => {
|
|
4233
|
-
let _slot;
|
|
4234
4238
|
return createVNode(TransitionScale, {
|
|
4235
4239
|
"mode": props.animation || 'part',
|
|
4236
4240
|
"duration": {
|
|
@@ -4238,38 +4242,40 @@ const PopoverWrapper = /* @__PURE__ */ defineComponent({
|
|
|
4238
4242
|
leave: 150
|
|
4239
4243
|
},
|
|
4240
4244
|
"onAfterLeave": handleRemove
|
|
4241
|
-
},
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
"
|
|
4253
|
-
|
|
4254
|
-
"
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
"
|
|
4260
|
-
|
|
4261
|
-
|
|
4245
|
+
}, {
|
|
4246
|
+
default: () => [withDirectives(createVNode("div", {
|
|
4247
|
+
"style": [wrapperStyle.value, wrapperW.value, props.portalStyle],
|
|
4248
|
+
"class": [wrapperClasses.value, props.portalClass, 'vc-popover-wrapper'],
|
|
4249
|
+
"onMousedown": () => !props.hover && handleMouseDown(),
|
|
4250
|
+
"onMouseenter": e => props.hover && handleChange(e, {
|
|
4251
|
+
visible: true
|
|
4252
|
+
}),
|
|
4253
|
+
"onMouseleave": e => props.hover && handleChange(e, {
|
|
4254
|
+
visible: false
|
|
4255
|
+
})
|
|
4256
|
+
}, [createVNode("div", {
|
|
4257
|
+
"class": [themeClasses.value, 'vc-popover-wrapper__container']
|
|
4258
|
+
}, [props.arrow && createVNode("div", {
|
|
4259
|
+
"style": arrowStyle.value,
|
|
4260
|
+
"class": [themeClasses.value, posClasses.value, 'vc-popover-wrapper__arrow']
|
|
4261
|
+
}, null), slots.content ? slots.content() : typeof props.content === 'function' ? createVNode(Customer, {
|
|
4262
|
+
"render": props.content
|
|
4263
|
+
}, null) : createVNode("div", {
|
|
4264
|
+
"innerHTML": props.content
|
|
4265
|
+
}, null)])]), [[vShow, isActive.value]])]
|
|
4262
4266
|
});
|
|
4263
4267
|
};
|
|
4264
4268
|
}
|
|
4265
4269
|
});
|
|
4266
|
-
const PopoverPortal = new Portal(PopoverWrapper
|
|
4270
|
+
const PopoverPortal = new Portal(PopoverWrapper, {
|
|
4271
|
+
leaveDelay: 0
|
|
4272
|
+
});
|
|
4267
4273
|
|
|
4268
4274
|
/** @jsxImportSource vue */
|
|
4269
4275
|
|
|
4270
|
-
const COMPONENT_NAME$
|
|
4276
|
+
const COMPONENT_NAME$1r = 'vc-popover';
|
|
4271
4277
|
const Popover$1 = /* @__PURE__ */ defineComponent({
|
|
4272
|
-
name: COMPONENT_NAME$
|
|
4278
|
+
name: COMPONENT_NAME$1r,
|
|
4273
4279
|
props: props$Z,
|
|
4274
4280
|
emits: ['update:modelValue', 'visible-change', 'ready', 'close'],
|
|
4275
4281
|
setup(props, {
|
|
@@ -5370,9 +5376,9 @@ const getTimeType = type => {
|
|
|
5370
5376
|
}
|
|
5371
5377
|
return view;
|
|
5372
5378
|
};
|
|
5373
|
-
const COMPONENT_NAME$
|
|
5379
|
+
const COMPONENT_NAME$1q = 'vc-date-confirm';
|
|
5374
5380
|
const Confirm = /* @__PURE__ */ defineComponent({
|
|
5375
|
-
name: COMPONENT_NAME$
|
|
5381
|
+
name: COMPONENT_NAME$1q,
|
|
5376
5382
|
props: {
|
|
5377
5383
|
showTime: {
|
|
5378
5384
|
type: Boolean,
|
|
@@ -5436,9 +5442,9 @@ const Confirm = /* @__PURE__ */ defineComponent({
|
|
|
5436
5442
|
|
|
5437
5443
|
/** @jsxImportSource vue */
|
|
5438
5444
|
|
|
5439
|
-
const COMPONENT_NAME$
|
|
5445
|
+
const COMPONENT_NAME$1p = 'vc-date-header';
|
|
5440
5446
|
const DateHeader = /* @__PURE__ */ defineComponent({
|
|
5441
|
-
name: COMPONENT_NAME$
|
|
5447
|
+
name: COMPONENT_NAME$1p,
|
|
5442
5448
|
props: {
|
|
5443
5449
|
panelDate: Date,
|
|
5444
5450
|
showNext: {
|
|
@@ -5522,9 +5528,9 @@ const DateHeader = /* @__PURE__ */ defineComponent({
|
|
|
5522
5528
|
|
|
5523
5529
|
/** @jsxImportSource vue */
|
|
5524
5530
|
|
|
5525
|
-
const COMPONENT_NAME$
|
|
5531
|
+
const COMPONENT_NAME$1o = 'vc-date-table';
|
|
5526
5532
|
const DateTable = /* @__PURE__ */ defineComponent({
|
|
5527
|
-
name: COMPONENT_NAME$
|
|
5533
|
+
name: COMPONENT_NAME$1o,
|
|
5528
5534
|
props: {
|
|
5529
5535
|
value: Array,
|
|
5530
5536
|
firstDayOfWeek: {
|
|
@@ -5733,9 +5739,9 @@ const DateTable = /* @__PURE__ */ defineComponent({
|
|
|
5733
5739
|
|
|
5734
5740
|
/** @jsxImportSource vue */
|
|
5735
5741
|
|
|
5736
|
-
const COMPONENT_NAME$
|
|
5742
|
+
const COMPONENT_NAME$1n = 'vc-month-table';
|
|
5737
5743
|
const MonthTable = /* @__PURE__ */ defineComponent({
|
|
5738
|
-
name: COMPONENT_NAME$
|
|
5744
|
+
name: COMPONENT_NAME$1n,
|
|
5739
5745
|
props: {
|
|
5740
5746
|
value: Array,
|
|
5741
5747
|
panelDate: Date,
|
|
@@ -5867,7 +5873,7 @@ const MonthTable = /* @__PURE__ */ defineComponent({
|
|
|
5867
5873
|
|
|
5868
5874
|
/** @jsxImportSource vue */
|
|
5869
5875
|
|
|
5870
|
-
const COMPONENT_NAME$
|
|
5876
|
+
const COMPONENT_NAME$1m = 'vc-quarter-table';
|
|
5871
5877
|
|
|
5872
5878
|
/**
|
|
5873
5879
|
* 获取季度对应的月份范围
|
|
@@ -5901,7 +5907,7 @@ const getQuarterRangeByMonth = value => {
|
|
|
5901
5907
|
}
|
|
5902
5908
|
};
|
|
5903
5909
|
const QuarterTable = /* @__PURE__ */ defineComponent({
|
|
5904
|
-
name: COMPONENT_NAME$
|
|
5910
|
+
name: COMPONENT_NAME$1m,
|
|
5905
5911
|
props: {
|
|
5906
5912
|
value: Array,
|
|
5907
5913
|
panelDate: Date,
|
|
@@ -6024,9 +6030,9 @@ const QuarterTable = /* @__PURE__ */ defineComponent({
|
|
|
6024
6030
|
|
|
6025
6031
|
/** @jsxImportSource vue */
|
|
6026
6032
|
|
|
6027
|
-
const COMPONENT_NAME$
|
|
6033
|
+
const COMPONENT_NAME$1l = 'vc-shortcuts-select';
|
|
6028
6034
|
const ShortcutsSelect = /* @__PURE__ */ defineComponent({
|
|
6029
|
-
name: COMPONENT_NAME$
|
|
6035
|
+
name: COMPONENT_NAME$1l,
|
|
6030
6036
|
props: {
|
|
6031
6037
|
panelDate: Date,
|
|
6032
6038
|
config: Array,
|
|
@@ -6066,9 +6072,9 @@ const ShortcutsSelect = /* @__PURE__ */ defineComponent({
|
|
|
6066
6072
|
|
|
6067
6073
|
/** @jsxImportSource vue */
|
|
6068
6074
|
|
|
6069
|
-
const COMPONENT_NAME$
|
|
6075
|
+
const COMPONENT_NAME$1k = 'vc-time-select';
|
|
6070
6076
|
const TimeSelect = /* @__PURE__ */ defineComponent({
|
|
6071
|
-
name: COMPONENT_NAME$
|
|
6077
|
+
name: COMPONENT_NAME$1k,
|
|
6072
6078
|
props: {
|
|
6073
6079
|
hours: {
|
|
6074
6080
|
type: [Number, String],
|
|
@@ -6347,9 +6353,9 @@ const TimeSelect = /* @__PURE__ */ defineComponent({
|
|
|
6347
6353
|
|
|
6348
6354
|
/** @jsxImportSource vue */
|
|
6349
6355
|
|
|
6350
|
-
const COMPONENT_NAME$
|
|
6356
|
+
const COMPONENT_NAME$1j = 'vc-year-table';
|
|
6351
6357
|
const YearTable = /* @__PURE__ */ defineComponent({
|
|
6352
|
-
name: COMPONENT_NAME$
|
|
6358
|
+
name: COMPONENT_NAME$1j,
|
|
6353
6359
|
props: {
|
|
6354
6360
|
value: Array,
|
|
6355
6361
|
panelDate: Date,
|
|
@@ -6472,9 +6478,9 @@ const getDateIsInRange = (value, type, leftPanelDate, rightPanelDate) => {
|
|
|
6472
6478
|
}
|
|
6473
6479
|
return true;
|
|
6474
6480
|
};
|
|
6475
|
-
const COMPONENT_NAME$
|
|
6481
|
+
const COMPONENT_NAME$1i = 'vc-date-range-panel';
|
|
6476
6482
|
const DateRangePanel = /* @__PURE__ */ defineComponent({
|
|
6477
|
-
name: COMPONENT_NAME$
|
|
6483
|
+
name: COMPONENT_NAME$1i,
|
|
6478
6484
|
props: {
|
|
6479
6485
|
...props$V,
|
|
6480
6486
|
confirm: {
|
|
@@ -6853,9 +6859,9 @@ const DateRangePanel = /* @__PURE__ */ defineComponent({
|
|
|
6853
6859
|
|
|
6854
6860
|
/** @jsxImportSource vue */
|
|
6855
6861
|
|
|
6856
|
-
const COMPONENT_NAME$
|
|
6862
|
+
const COMPONENT_NAME$1h = 'vc-date-panel';
|
|
6857
6863
|
const DatePanel = /* @__PURE__ */ defineComponent({
|
|
6858
|
-
name: COMPONENT_NAME$
|
|
6864
|
+
name: COMPONENT_NAME$1h,
|
|
6859
6865
|
props: {
|
|
6860
6866
|
...props$V,
|
|
6861
6867
|
type: String,
|
|
@@ -7063,9 +7069,9 @@ const isEqualYear$1 = value => {
|
|
|
7063
7069
|
const endYear = value[1].getFullYear();
|
|
7064
7070
|
return startYear === endYear;
|
|
7065
7071
|
};
|
|
7066
|
-
const COMPONENT_NAME$
|
|
7072
|
+
const COMPONENT_NAME$1g = 'vc-monthrange-panel';
|
|
7067
7073
|
const MonthRangePanel = /* @__PURE__ */ defineComponent({
|
|
7068
|
-
name: COMPONENT_NAME$
|
|
7074
|
+
name: COMPONENT_NAME$1g,
|
|
7069
7075
|
props: {
|
|
7070
7076
|
...props$V,
|
|
7071
7077
|
confirm: {
|
|
@@ -7240,9 +7246,9 @@ const isEqualYear = value => {
|
|
|
7240
7246
|
const endYear = value[1].getFullYear();
|
|
7241
7247
|
return startYear === endYear;
|
|
7242
7248
|
};
|
|
7243
|
-
const COMPONENT_NAME$
|
|
7249
|
+
const COMPONENT_NAME$1f = 'vc-quarterrange-panel';
|
|
7244
7250
|
const QuarterRangePanel = /* @__PURE__ */ defineComponent({
|
|
7245
|
-
name: COMPONENT_NAME$
|
|
7251
|
+
name: COMPONENT_NAME$1f,
|
|
7246
7252
|
props: {
|
|
7247
7253
|
...props$V,
|
|
7248
7254
|
confirm: {
|
|
@@ -7481,9 +7487,9 @@ const getComparedDate = (leftDate, rightDate) => {
|
|
|
7481
7487
|
seconds
|
|
7482
7488
|
};
|
|
7483
7489
|
};
|
|
7484
|
-
const COMPONENT_NAME$
|
|
7490
|
+
const COMPONENT_NAME$1e = 'vc-timerange-panel';
|
|
7485
7491
|
const TimeRangePanel = /* @__PURE__ */ defineComponent({
|
|
7486
|
-
name: COMPONENT_NAME$
|
|
7492
|
+
name: COMPONENT_NAME$1e,
|
|
7487
7493
|
props: props$U,
|
|
7488
7494
|
emits: ['pick', 'clear', 'ok'],
|
|
7489
7495
|
setup(props, {
|
|
@@ -7582,9 +7588,9 @@ const TimeRangePanel = /* @__PURE__ */ defineComponent({
|
|
|
7582
7588
|
|
|
7583
7589
|
/** @jsxImportSource vue */
|
|
7584
7590
|
|
|
7585
|
-
const COMPONENT_NAME$
|
|
7591
|
+
const COMPONENT_NAME$1d = 'vc-time-panel';
|
|
7586
7592
|
const TimePanel = /* @__PURE__ */ defineComponent({
|
|
7587
|
-
name: COMPONENT_NAME$
|
|
7593
|
+
name: COMPONENT_NAME$1d,
|
|
7588
7594
|
props: props$U,
|
|
7589
7595
|
emits: ['pick', 'clear', 'ok'],
|
|
7590
7596
|
setup(props, {
|
|
@@ -7639,7 +7645,7 @@ const TimePanel = /* @__PURE__ */ defineComponent({
|
|
|
7639
7645
|
|
|
7640
7646
|
/** @jsxImportSource vue */
|
|
7641
7647
|
|
|
7642
|
-
const COMPONENT_NAME$
|
|
7648
|
+
const COMPONENT_NAME$1c = 'vc-date-picker';
|
|
7643
7649
|
const getPanel$1 = type => {
|
|
7644
7650
|
if (['daterange', 'datetimerange'].includes(type)) {
|
|
7645
7651
|
return DateRangePanel;
|
|
@@ -7650,7 +7656,7 @@ const getPanel$1 = type => {
|
|
|
7650
7656
|
}
|
|
7651
7657
|
return DatePanel;
|
|
7652
7658
|
};
|
|
7653
|
-
const DatePicker = createPicker(COMPONENT_NAME$
|
|
7659
|
+
const DatePicker = createPicker(COMPONENT_NAME$1c, props$10, () => {
|
|
7654
7660
|
const props = getCurrentInstance().props;
|
|
7655
7661
|
const icon = ref('date');
|
|
7656
7662
|
const panel = shallowRef({});
|
|
@@ -7683,9 +7689,9 @@ const props$T = {
|
|
|
7683
7689
|
|
|
7684
7690
|
/** @jsxImportSource vue */
|
|
7685
7691
|
|
|
7686
|
-
const COMPONENT_NAME$
|
|
7692
|
+
const COMPONENT_NAME$1b = 'vc-divider';
|
|
7687
7693
|
const Divider = /* @__PURE__ */ defineComponent({
|
|
7688
|
-
name: COMPONENT_NAME$
|
|
7694
|
+
name: COMPONENT_NAME$1b,
|
|
7689
7695
|
props: props$T,
|
|
7690
7696
|
setup(props, {
|
|
7691
7697
|
slots
|
|
@@ -7840,7 +7846,7 @@ const props$Q = {
|
|
|
7840
7846
|
|
|
7841
7847
|
/** @jsxImportSource vue */
|
|
7842
7848
|
|
|
7843
|
-
const COMPONENT_NAME$
|
|
7849
|
+
const COMPONENT_NAME$1a = 'vc-scroller-track';
|
|
7844
7850
|
const BAR_MAP = {
|
|
7845
7851
|
vertical: {
|
|
7846
7852
|
scroll: 'scrollTop',
|
|
@@ -7860,7 +7866,7 @@ const BAR_MAP = {
|
|
|
7860
7866
|
}
|
|
7861
7867
|
};
|
|
7862
7868
|
const Track = /* @__PURE__ */ defineComponent({
|
|
7863
|
-
name: COMPONENT_NAME$
|
|
7869
|
+
name: COMPONENT_NAME$1a,
|
|
7864
7870
|
props: props$S,
|
|
7865
7871
|
emits: ['change'],
|
|
7866
7872
|
inheritAttrs: false,
|
|
@@ -8050,9 +8056,9 @@ const Track = /* @__PURE__ */ defineComponent({
|
|
|
8050
8056
|
|
|
8051
8057
|
/** @jsxImportSource vue */
|
|
8052
8058
|
|
|
8053
|
-
const COMPONENT_NAME$
|
|
8059
|
+
const COMPONENT_NAME$19 = 'vc-scroller-bar';
|
|
8054
8060
|
const Bar = /* @__PURE__ */ defineComponent({
|
|
8055
|
-
name: COMPONENT_NAME$
|
|
8061
|
+
name: COMPONENT_NAME$19,
|
|
8056
8062
|
props: props$R,
|
|
8057
8063
|
emits: ['change'],
|
|
8058
8064
|
setup(props, {
|
|
@@ -8267,7 +8273,7 @@ const useScroller = (expose) => {
|
|
|
8267
8273
|
|
|
8268
8274
|
/** @jsxImportSource vue */
|
|
8269
8275
|
|
|
8270
|
-
const COMPONENT_NAME$
|
|
8276
|
+
const COMPONENT_NAME$18 = 'vc-scroller';
|
|
8271
8277
|
|
|
8272
8278
|
/**
|
|
8273
8279
|
* 作为备选方案,目前推荐使用ScrollerWheel
|
|
@@ -8278,7 +8284,7 @@ const COMPONENT_NAME$16 = 'vc-scroller';
|
|
|
8278
8284
|
* 2. 增加了一层嵌套
|
|
8279
8285
|
*/
|
|
8280
8286
|
const Scroller = /* @__PURE__ */ defineComponent({
|
|
8281
|
-
name: COMPONENT_NAME$
|
|
8287
|
+
name: COMPONENT_NAME$18,
|
|
8282
8288
|
props: props$Q,
|
|
8283
8289
|
emits: ['scroll'],
|
|
8284
8290
|
setup(props, {
|
|
@@ -8339,7 +8345,7 @@ const Scroller = /* @__PURE__ */ defineComponent({
|
|
|
8339
8345
|
|
|
8340
8346
|
/** @jsxImportSource vue */
|
|
8341
8347
|
|
|
8342
|
-
const COMPONENT_NAME$
|
|
8348
|
+
const COMPONENT_NAME$17 = 'vc-scroller-wheel';
|
|
8343
8349
|
|
|
8344
8350
|
/**
|
|
8345
8351
|
* 为减少一层嵌套,为去除滚动bar的抖动,使用wheel模拟
|
|
@@ -8361,7 +8367,7 @@ const COMPONENT_NAME$15 = 'vc-scroller-wheel';
|
|
|
8361
8367
|
* 设置scrollTop不会reflow和repaint,不需要考虑transfrom来改变content(transform也只在draw完成)
|
|
8362
8368
|
*/
|
|
8363
8369
|
const ScrollerWheel = /* @__PURE__ */ defineComponent({
|
|
8364
|
-
name: COMPONENT_NAME$
|
|
8370
|
+
name: COMPONENT_NAME$17,
|
|
8365
8371
|
props: Object.assign(props$Q, {
|
|
8366
8372
|
stopPropagation: {
|
|
8367
8373
|
type: Boolean,
|
|
@@ -8550,9 +8556,9 @@ const props$P = {
|
|
|
8550
8556
|
|
|
8551
8557
|
/** @jsxImportSource vue */
|
|
8552
8558
|
|
|
8553
|
-
const COMPONENT_NAME$
|
|
8559
|
+
const COMPONENT_NAME$16 = 'vc-drawer';
|
|
8554
8560
|
const DrawerView = /* @__PURE__ */ defineComponent({
|
|
8555
|
-
name: COMPONENT_NAME$
|
|
8561
|
+
name: COMPONENT_NAME$16,
|
|
8556
8562
|
props: props$P,
|
|
8557
8563
|
emits: ['close', 'update:modelValue', 'visible-change'],
|
|
8558
8564
|
setup(props, {
|
|
@@ -8720,30 +8726,178 @@ const MDrawer = Drawer;
|
|
|
8720
8726
|
const MDrawerView = DrawerView;
|
|
8721
8727
|
|
|
8722
8728
|
const props$O = {
|
|
8723
|
-
|
|
8729
|
+
modelValue: {
|
|
8730
|
+
type: Boolean,
|
|
8731
|
+
default: false
|
|
8732
|
+
},
|
|
8733
|
+
portalClass: [String, Object],
|
|
8734
|
+
placement: {
|
|
8724
8735
|
type: String,
|
|
8725
|
-
default: "
|
|
8736
|
+
default: "bottom"
|
|
8737
|
+
},
|
|
8738
|
+
trigger: {
|
|
8739
|
+
type: String,
|
|
8740
|
+
default: "hover"
|
|
8741
|
+
},
|
|
8742
|
+
arrow: {
|
|
8743
|
+
type: Boolean,
|
|
8744
|
+
default: false
|
|
8726
8745
|
}
|
|
8727
8746
|
};
|
|
8728
8747
|
|
|
8729
8748
|
/** @jsxImportSource vue */
|
|
8730
8749
|
|
|
8731
|
-
const COMPONENT_NAME$
|
|
8750
|
+
const COMPONENT_NAME$15 = 'vc-dropdown';
|
|
8732
8751
|
const Dropdown = /* @__PURE__ */ defineComponent({
|
|
8733
|
-
name: COMPONENT_NAME$
|
|
8752
|
+
name: COMPONENT_NAME$15,
|
|
8734
8753
|
props: props$O,
|
|
8754
|
+
inheritAttrs: false,
|
|
8755
|
+
emits: ['update:modelValue', 'ready', 'close', 'visible-change', 'click'],
|
|
8735
8756
|
setup(props, {
|
|
8757
|
+
slots,
|
|
8758
|
+
emit,
|
|
8759
|
+
expose
|
|
8760
|
+
}) {
|
|
8761
|
+
const its = useAttrs({
|
|
8762
|
+
merge: false
|
|
8763
|
+
});
|
|
8764
|
+
const isActive = ref(false);
|
|
8765
|
+
const dropdownId = ref(getUid('dropdown'));
|
|
8766
|
+
const inherit = computed(() => {
|
|
8767
|
+
return {
|
|
8768
|
+
style: its.value.style,
|
|
8769
|
+
class: its.value.class
|
|
8770
|
+
};
|
|
8771
|
+
});
|
|
8772
|
+
const attrs = computed(() => {
|
|
8773
|
+
return its.value.attrs;
|
|
8774
|
+
});
|
|
8775
|
+
watch(() => props.modelValue, v => {
|
|
8776
|
+
isActive.value = v;
|
|
8777
|
+
}, {
|
|
8778
|
+
immediate: true
|
|
8779
|
+
});
|
|
8780
|
+
|
|
8781
|
+
/**
|
|
8782
|
+
* v-model 同步, 外部的数据改变时不会触发
|
|
8783
|
+
*/
|
|
8784
|
+
const sync = () => {
|
|
8785
|
+
emit('update:modelValue', isActive.value);
|
|
8786
|
+
emit('visible-change', isActive.value);
|
|
8787
|
+
};
|
|
8788
|
+
const handleChange = v => {
|
|
8789
|
+
isActive.value = v;
|
|
8790
|
+
sync();
|
|
8791
|
+
};
|
|
8792
|
+
const close = () => {
|
|
8793
|
+
isActive.value = false;
|
|
8794
|
+
sync();
|
|
8795
|
+
};
|
|
8796
|
+
expose({
|
|
8797
|
+
close,
|
|
8798
|
+
dropdownId
|
|
8799
|
+
});
|
|
8800
|
+
return () => {
|
|
8801
|
+
return createVNode(Popover, mergeProps(attrs.value, {
|
|
8802
|
+
"modelValue": isActive.value,
|
|
8803
|
+
"placement": props.placement,
|
|
8804
|
+
"trigger": props.trigger,
|
|
8805
|
+
"arrow": props.arrow,
|
|
8806
|
+
"portalClass": ['is-padding-none', 'vc-dropdown-wrapper', props.portalClass],
|
|
8807
|
+
"class": ['vc-dropdown', inherit.value.class],
|
|
8808
|
+
"style": inherit.value.style,
|
|
8809
|
+
"onReady": () => emit('ready'),
|
|
8810
|
+
"onClose": () => emit('close'),
|
|
8811
|
+
"onVisibleChange": handleChange
|
|
8812
|
+
}), {
|
|
8813
|
+
default: () => slots?.default?.(),
|
|
8814
|
+
content: () => slots?.content?.()
|
|
8815
|
+
});
|
|
8816
|
+
};
|
|
8817
|
+
}
|
|
8818
|
+
});
|
|
8819
|
+
|
|
8820
|
+
/** @jsxImportSource vue */
|
|
8821
|
+
|
|
8822
|
+
const COMPONENT_NAME$14 = 'vc-dropdown-menu';
|
|
8823
|
+
const DropdownMenu = /* @__PURE__ */ defineComponent({
|
|
8824
|
+
name: COMPONENT_NAME$14,
|
|
8825
|
+
setup(_, {
|
|
8736
8826
|
slots
|
|
8737
8827
|
}) {
|
|
8738
8828
|
return () => {
|
|
8739
|
-
return createVNode("
|
|
8740
|
-
"class": "vc-dropdown"
|
|
8829
|
+
return createVNode("ul", {
|
|
8830
|
+
"class": "vc-dropdown-menu"
|
|
8741
8831
|
}, [slots?.default?.()]);
|
|
8742
8832
|
};
|
|
8743
8833
|
}
|
|
8744
8834
|
});
|
|
8745
8835
|
|
|
8836
|
+
/** @jsxImportSource vue */
|
|
8837
|
+
|
|
8838
|
+
const COMPONENT_NAME$13 = 'vc-dropdown-item';
|
|
8839
|
+
const DropdownItem = /* @__PURE__ */ defineComponent({
|
|
8840
|
+
name: COMPONENT_NAME$13,
|
|
8841
|
+
props: {
|
|
8842
|
+
value: {
|
|
8843
|
+
type: [String, Number],
|
|
8844
|
+
value: undefined
|
|
8845
|
+
},
|
|
8846
|
+
label: {
|
|
8847
|
+
type: [String, Number],
|
|
8848
|
+
value: undefined
|
|
8849
|
+
},
|
|
8850
|
+
disabled: {
|
|
8851
|
+
type: Boolean,
|
|
8852
|
+
default: false
|
|
8853
|
+
},
|
|
8854
|
+
selected: {
|
|
8855
|
+
type: Boolean,
|
|
8856
|
+
default: false
|
|
8857
|
+
},
|
|
8858
|
+
divided: {
|
|
8859
|
+
type: Boolean,
|
|
8860
|
+
default: false
|
|
8861
|
+
},
|
|
8862
|
+
closable: {
|
|
8863
|
+
type: Boolean,
|
|
8864
|
+
default: true
|
|
8865
|
+
}
|
|
8866
|
+
},
|
|
8867
|
+
setup(props, {
|
|
8868
|
+
slots,
|
|
8869
|
+
emit
|
|
8870
|
+
}) {
|
|
8871
|
+
const owner = getInstance('dropdown', 'dropdownId');
|
|
8872
|
+
const currentValue = computed(() => {
|
|
8873
|
+
const v = typeof props.value === 'undefined' || props.value === '' ? props.label : props.value;
|
|
8874
|
+
return v;
|
|
8875
|
+
});
|
|
8876
|
+
const classes = computed(() => {
|
|
8877
|
+
return {
|
|
8878
|
+
'is-selected': props.selected,
|
|
8879
|
+
'is-divided': props.divided,
|
|
8880
|
+
'is-disabled': props.disabled
|
|
8881
|
+
};
|
|
8882
|
+
});
|
|
8883
|
+
const handleClick = e => {
|
|
8884
|
+
if (props.disabled) return;
|
|
8885
|
+
emit('click', currentValue.value, e);
|
|
8886
|
+
owner.emit('click', currentValue.value, e);
|
|
8887
|
+
props.closable && owner.exposed?.close();
|
|
8888
|
+
};
|
|
8889
|
+
return () => {
|
|
8890
|
+
return createVNode("li", {
|
|
8891
|
+
"class": [classes.value, 'vc-dropdown-item'],
|
|
8892
|
+
"onClick": handleClick
|
|
8893
|
+
}, [slots.default ? slots.default?.() : props.label]);
|
|
8894
|
+
};
|
|
8895
|
+
}
|
|
8896
|
+
});
|
|
8897
|
+
|
|
8746
8898
|
const MDropdown = Dropdown;
|
|
8899
|
+
const MDropdownMenu = DropdownMenu;
|
|
8900
|
+
const MDropdownItem = DropdownItem;
|
|
8747
8901
|
|
|
8748
8902
|
const props$N = {
|
|
8749
8903
|
tag: {
|
|
@@ -10430,6 +10584,9 @@ const props$z = {
|
|
|
10430
10584
|
type: Boolean,
|
|
10431
10585
|
default: false
|
|
10432
10586
|
},
|
|
10587
|
+
// draggable为true时有效
|
|
10588
|
+
x: Number,
|
|
10589
|
+
y: Number,
|
|
10433
10590
|
okText: {
|
|
10434
10591
|
type: [String, Boolean],
|
|
10435
10592
|
default: "确定"
|
|
@@ -10487,8 +10644,8 @@ const ModalView = /* @__PURE__ */ defineComponent({
|
|
|
10487
10644
|
const header = shallowRef();
|
|
10488
10645
|
const scroller = shallowRef();
|
|
10489
10646
|
const resizer = shallowRef();
|
|
10490
|
-
const x = ref(
|
|
10491
|
-
const y = ref(
|
|
10647
|
+
const x = ref(props.x);
|
|
10648
|
+
const y = ref(props.y);
|
|
10492
10649
|
const isActive = ref(false);
|
|
10493
10650
|
|
|
10494
10651
|
// 注: 服务端渲染为0, 在客服端激活前,展示端存在问题【高度不定】
|
|
@@ -10530,8 +10687,8 @@ const ModalView = /* @__PURE__ */ defineComponent({
|
|
|
10530
10687
|
});
|
|
10531
10688
|
const draggableStyle = computed(() => {
|
|
10532
10689
|
if (IS_SERVER$1 || !props.draggable) return {};
|
|
10533
|
-
const left = x.value
|
|
10534
|
-
const top = y.value
|
|
10690
|
+
const left = typeof x.value === 'undefined' ? window.innerWidth / 2 - defaultSize.value.width / 2 : x.value;
|
|
10691
|
+
const top = typeof y.value === 'undefined' ? window.innerHeight / 2 - defaultSize.value.height / 2 : y.value;
|
|
10535
10692
|
return {
|
|
10536
10693
|
left: `${left}px`,
|
|
10537
10694
|
top: `${top}px`
|
|
@@ -12128,10 +12285,49 @@ const Picker = /* @__PURE__ */ defineComponent({
|
|
|
12128
12285
|
const MPicker = Picker;
|
|
12129
12286
|
|
|
12130
12287
|
const props$p = {
|
|
12131
|
-
|
|
12288
|
+
title: {
|
|
12289
|
+
type: [String, Function],
|
|
12290
|
+
default: ""
|
|
12291
|
+
},
|
|
12292
|
+
content: {
|
|
12293
|
+
type: [String, Function],
|
|
12294
|
+
default: ""
|
|
12295
|
+
},
|
|
12296
|
+
modelValue: {
|
|
12297
|
+
type: Boolean,
|
|
12298
|
+
default: false
|
|
12299
|
+
},
|
|
12300
|
+
placement: {
|
|
12132
12301
|
type: String,
|
|
12133
|
-
default: "
|
|
12134
|
-
}
|
|
12302
|
+
default: "top"
|
|
12303
|
+
},
|
|
12304
|
+
trigger: {
|
|
12305
|
+
type: String,
|
|
12306
|
+
default: "click"
|
|
12307
|
+
},
|
|
12308
|
+
okText: {
|
|
12309
|
+
type: String,
|
|
12310
|
+
default: "确定"
|
|
12311
|
+
},
|
|
12312
|
+
cancelText: {
|
|
12313
|
+
type: String,
|
|
12314
|
+
default: "取消"
|
|
12315
|
+
},
|
|
12316
|
+
okType: {
|
|
12317
|
+
type: String,
|
|
12318
|
+
default: "primary"
|
|
12319
|
+
},
|
|
12320
|
+
cancelType: {
|
|
12321
|
+
type: String,
|
|
12322
|
+
default: "default"
|
|
12323
|
+
},
|
|
12324
|
+
type: {
|
|
12325
|
+
type: String,
|
|
12326
|
+
default: "warning",
|
|
12327
|
+
validator: (v) => /(warning|info|success|error)/.test(v)
|
|
12328
|
+
},
|
|
12329
|
+
width: [String, Number],
|
|
12330
|
+
portalClass: [String, Object]
|
|
12135
12331
|
};
|
|
12136
12332
|
|
|
12137
12333
|
/** @jsxImportSource vue */
|
|
@@ -12140,13 +12336,125 @@ const COMPONENT_NAME$C = 'vc-popconfirm';
|
|
|
12140
12336
|
const Popconfirm = /* @__PURE__ */ defineComponent({
|
|
12141
12337
|
name: COMPONENT_NAME$C,
|
|
12142
12338
|
props: props$p,
|
|
12339
|
+
inheritAttrs: false,
|
|
12340
|
+
emits: ['update:modelValue', 'visible-change', 'ready', 'close', 'cancel', 'ok'],
|
|
12143
12341
|
setup(props, {
|
|
12144
|
-
slots
|
|
12342
|
+
slots,
|
|
12343
|
+
emit
|
|
12145
12344
|
}) {
|
|
12345
|
+
const instance = getCurrentInstance();
|
|
12346
|
+
const its = useAttrs({
|
|
12347
|
+
merge: false
|
|
12348
|
+
});
|
|
12349
|
+
const isActive = ref(false);
|
|
12350
|
+
const contentStyle = computed(() => {
|
|
12351
|
+
return props.content || !!slots.content ? {
|
|
12352
|
+
marginBottom: '15px'
|
|
12353
|
+
} : {};
|
|
12354
|
+
});
|
|
12355
|
+
const inherit = computed(() => {
|
|
12356
|
+
return {
|
|
12357
|
+
style: its.value.style,
|
|
12358
|
+
class: its.value.class
|
|
12359
|
+
};
|
|
12360
|
+
});
|
|
12361
|
+
const attrs = computed(() => {
|
|
12362
|
+
return its.value.attrs;
|
|
12363
|
+
});
|
|
12364
|
+
watch(() => props.modelValue, v => {
|
|
12365
|
+
isActive.value = v;
|
|
12366
|
+
}, {
|
|
12367
|
+
immediate: true
|
|
12368
|
+
});
|
|
12369
|
+
|
|
12370
|
+
/**
|
|
12371
|
+
* v-model 同步, 外部的数据改变时不会触发
|
|
12372
|
+
*/
|
|
12373
|
+
const sync = () => {
|
|
12374
|
+
emit('update:modelValue', isActive.value);
|
|
12375
|
+
emit('visible-change', isActive.value);
|
|
12376
|
+
};
|
|
12377
|
+
const handleBefore = (e, hook) => {
|
|
12378
|
+
e.stopPropagation();
|
|
12379
|
+
e.preventDefault();
|
|
12380
|
+
if (!isActive.value) return;
|
|
12381
|
+
const fn = hook && hook(e);
|
|
12382
|
+
if (fn && fn.then) {
|
|
12383
|
+
return fn.then(res => {
|
|
12384
|
+
isActive.value = false;
|
|
12385
|
+
sync();
|
|
12386
|
+
return res;
|
|
12387
|
+
});
|
|
12388
|
+
} else if (!fn || fn === true) {
|
|
12389
|
+
isActive.value = false;
|
|
12390
|
+
sync();
|
|
12391
|
+
}
|
|
12392
|
+
};
|
|
12393
|
+
const handleOk = (...rest) => {
|
|
12394
|
+
const ok = instance.vnode.props?.onOk || (() => {});
|
|
12395
|
+
return ok(...rest);
|
|
12396
|
+
};
|
|
12397
|
+
const handleCancel = (...rest) => {
|
|
12398
|
+
const cancel = instance.vnode.props?.onCancel || (() => {});
|
|
12399
|
+
return cancel(...rest);
|
|
12400
|
+
};
|
|
12401
|
+
const handleChange = v => {
|
|
12402
|
+
isActive.value = v;
|
|
12403
|
+
sync();
|
|
12404
|
+
};
|
|
12146
12405
|
return () => {
|
|
12147
|
-
return createVNode(
|
|
12148
|
-
"
|
|
12149
|
-
|
|
12406
|
+
return createVNode(Popover, mergeProps(attrs.value, {
|
|
12407
|
+
"modelValue": isActive.value,
|
|
12408
|
+
"placement": props.placement,
|
|
12409
|
+
"trigger": props.trigger,
|
|
12410
|
+
"portalClass": ['is-padding-none', 'vc-popconfirm-wrapper', props.portalClass],
|
|
12411
|
+
"class": ['vc-popconfirm', inherit.value.class],
|
|
12412
|
+
"style": inherit.value.style,
|
|
12413
|
+
"onReady": () => emit('ready'),
|
|
12414
|
+
"onClose": () => emit('close'),
|
|
12415
|
+
"onVisibleChange": handleChange
|
|
12416
|
+
}), {
|
|
12417
|
+
default: () => slots?.default?.(),
|
|
12418
|
+
content: () => {
|
|
12419
|
+
return createVNode("div", {
|
|
12420
|
+
"style": [{
|
|
12421
|
+
width: `${props.width}px`
|
|
12422
|
+
}],
|
|
12423
|
+
"class": "vc-popconfirm__wrapper"
|
|
12424
|
+
}, [createVNode("div", {
|
|
12425
|
+
"class": "vc-popconfirm__title"
|
|
12426
|
+
}, [slots.icon ? slots.icon() : createVNode(Icon, {
|
|
12427
|
+
"type": props.type,
|
|
12428
|
+
"class": [`is-${props.type}`, 'vc-popconfirm__icon']
|
|
12429
|
+
}, null), createVNode("div", null, [slots.title ? slots.title() : typeof props.title === 'string' ? createVNode("div", {
|
|
12430
|
+
"innerHTML": props.title
|
|
12431
|
+
}, null) : typeof props.title === 'function' ? createVNode(Customer, {
|
|
12432
|
+
"render": props.title
|
|
12433
|
+
}, null) : null])]), createVNode("div", {
|
|
12434
|
+
"style": contentStyle.value,
|
|
12435
|
+
"class": "vc-popconfirm__content"
|
|
12436
|
+
}, [slots.content ? slots.content() : typeof props.content === 'string' ? createVNode("div", {
|
|
12437
|
+
"innerHTML": props.content
|
|
12438
|
+
}, null) : typeof props.content === 'function' ? createVNode(Customer, {
|
|
12439
|
+
"render": props.content
|
|
12440
|
+
}, null) : null]), createVNode("div", {
|
|
12441
|
+
"class": "vc-popconfirm__footer"
|
|
12442
|
+
}, [createVNode(Button, {
|
|
12443
|
+
"type": props.cancelType,
|
|
12444
|
+
"style": "margin-right: 8px;",
|
|
12445
|
+
"size": "small",
|
|
12446
|
+
"onClick": e => handleBefore(e, handleCancel)
|
|
12447
|
+
}, {
|
|
12448
|
+
default: () => [props.cancelText]
|
|
12449
|
+
}), createVNode(Button, {
|
|
12450
|
+
"type": props.okType,
|
|
12451
|
+
"size": "small",
|
|
12452
|
+
"onClick": e => handleBefore(e, handleOk)
|
|
12453
|
+
}, {
|
|
12454
|
+
default: () => [props.okText]
|
|
12455
|
+
})])]);
|
|
12456
|
+
}
|
|
12457
|
+
});
|
|
12150
12458
|
};
|
|
12151
12459
|
}
|
|
12152
12460
|
});
|
|
@@ -15064,6 +15372,79 @@ const NormalList = /* @__PURE__ */ defineComponent({
|
|
|
15064
15372
|
}
|
|
15065
15373
|
});
|
|
15066
15374
|
|
|
15375
|
+
const HIDDEN_TEXT_STYLE = `
|
|
15376
|
+
position: absolute!important;
|
|
15377
|
+
word-break: break-all!important;
|
|
15378
|
+
overflow: auto!important;
|
|
15379
|
+
opacity: 0!important;
|
|
15380
|
+
z-index: -1000!important;
|
|
15381
|
+
top: 0!important;
|
|
15382
|
+
right: 0!important;
|
|
15383
|
+
`;
|
|
15384
|
+
const SIZING_STYLE$1 = [
|
|
15385
|
+
"letter-spacing",
|
|
15386
|
+
"line-height",
|
|
15387
|
+
"padding-top",
|
|
15388
|
+
"padding-bottom",
|
|
15389
|
+
"font-family",
|
|
15390
|
+
"font-weight",
|
|
15391
|
+
"font-size",
|
|
15392
|
+
"text-rendering",
|
|
15393
|
+
"text-transform",
|
|
15394
|
+
"width",
|
|
15395
|
+
// 'text-indent', // 需要额外计算
|
|
15396
|
+
"padding-left",
|
|
15397
|
+
"padding-right",
|
|
15398
|
+
"border-width",
|
|
15399
|
+
"box-sizing"
|
|
15400
|
+
];
|
|
15401
|
+
let hiddenEl$1;
|
|
15402
|
+
const getFitIndex = (options = {}) => {
|
|
15403
|
+
const { el, line, value, suffix, indent = 0 } = options;
|
|
15404
|
+
let lineHeight = parseInt(getStyle(el, "line-height"), 10);
|
|
15405
|
+
if (!hiddenEl$1) {
|
|
15406
|
+
hiddenEl$1 = document.createElement("div");
|
|
15407
|
+
document.body.appendChild(hiddenEl$1);
|
|
15408
|
+
}
|
|
15409
|
+
el.getAttribute("wrap") ? hiddenEl$1.setAttribute("wrap", el.getAttribute("wrap")) : hiddenEl$1.removeAttribute("wrap");
|
|
15410
|
+
const {
|
|
15411
|
+
paddingSize,
|
|
15412
|
+
borderSize,
|
|
15413
|
+
boxSizing,
|
|
15414
|
+
sizingStyle
|
|
15415
|
+
} = Utils$1.getComputedStyle(el, SIZING_STYLE$1);
|
|
15416
|
+
const textIndent = `text-indent: ${parseInt(getStyle(el, "text-indent"), 10) + indent}px;`;
|
|
15417
|
+
hiddenEl$1.setAttribute("style", `${sizingStyle};${textIndent};${HIDDEN_TEXT_STYLE}`);
|
|
15418
|
+
let sideHeight = paddingSize || 0;
|
|
15419
|
+
boxSizing === "border-box" && (sideHeight += borderSize);
|
|
15420
|
+
if (Number.isNaN(lineHeight)) {
|
|
15421
|
+
hiddenEl$1.innerText = ".";
|
|
15422
|
+
lineHeight = hiddenEl$1.clientHeight - sideHeight;
|
|
15423
|
+
}
|
|
15424
|
+
let endIndex = -1;
|
|
15425
|
+
const strs = (typeof value === "number" ? `${value}` : value || "").split("");
|
|
15426
|
+
let innerText = "";
|
|
15427
|
+
for (let i = 0; i < strs.length; i++) {
|
|
15428
|
+
innerText += strs[i];
|
|
15429
|
+
hiddenEl$1.innerText = innerText;
|
|
15430
|
+
if (endIndex === -1 && hiddenEl$1.clientHeight - sideHeight > lineHeight * line) {
|
|
15431
|
+
endIndex = i;
|
|
15432
|
+
break;
|
|
15433
|
+
}
|
|
15434
|
+
}
|
|
15435
|
+
if (endIndex >= 0 && endIndex <= strs.length - 1) {
|
|
15436
|
+
for (let i = endIndex - 1; i >= 0; i--) {
|
|
15437
|
+
innerText = innerText.substring(0, i);
|
|
15438
|
+
hiddenEl$1.innerText = innerText + suffix;
|
|
15439
|
+
if (hiddenEl$1.clientHeight - sideHeight <= lineHeight * line) {
|
|
15440
|
+
endIndex = i;
|
|
15441
|
+
break;
|
|
15442
|
+
}
|
|
15443
|
+
}
|
|
15444
|
+
}
|
|
15445
|
+
return endIndex;
|
|
15446
|
+
};
|
|
15447
|
+
|
|
15067
15448
|
const TableBody = /* @__PURE__ */ defineComponent({
|
|
15068
15449
|
name: 'vc-table-body',
|
|
15069
15450
|
props: {
|
|
@@ -15172,10 +15553,13 @@ const TableBody = /* @__PURE__ */ defineComponent({
|
|
|
15172
15553
|
column
|
|
15173
15554
|
});
|
|
15174
15555
|
}
|
|
15175
|
-
return
|
|
15556
|
+
return {
|
|
15557
|
+
...cellStyle,
|
|
15558
|
+
...column.style
|
|
15559
|
+
};
|
|
15176
15560
|
};
|
|
15177
15561
|
const getCellClass = (rowIndex, columnIndex, row, column) => {
|
|
15178
|
-
const classes = [column.realAlign, column.
|
|
15562
|
+
const classes = [column.realAlign, column.class];
|
|
15179
15563
|
if (isColumnHidden(columnIndex)) {
|
|
15180
15564
|
classes.push('is-hidden');
|
|
15181
15565
|
}
|
|
@@ -15192,24 +15576,45 @@ const TableBody = /* @__PURE__ */ defineComponent({
|
|
|
15192
15576
|
}
|
|
15193
15577
|
return classes.join(' ');
|
|
15194
15578
|
};
|
|
15195
|
-
|
|
15579
|
+
let poper;
|
|
15580
|
+
const handleCellMouseEnter = (e, row, column) => {
|
|
15196
15581
|
const cell = getCell(e);
|
|
15582
|
+
const hoverState = {
|
|
15583
|
+
cell,
|
|
15584
|
+
column,
|
|
15585
|
+
row
|
|
15586
|
+
};
|
|
15197
15587
|
if (cell) {
|
|
15198
|
-
const column = getColumnByCell(states.columns, cell);
|
|
15199
|
-
const hoverState = {
|
|
15200
|
-
cell,
|
|
15201
|
-
column,
|
|
15202
|
-
row
|
|
15203
|
-
};
|
|
15204
15588
|
table.hoverState.value = hoverState;
|
|
15205
15589
|
table.emit('cell-mouse-enter', hoverState.row, hoverState.column, hoverState.cell, e);
|
|
15206
15590
|
}
|
|
15591
|
+
// 判断是否text-overflow, 如果是就显示tooltip
|
|
15592
|
+
const el = e.target.querySelector('.vc-table__text-line');
|
|
15593
|
+
const line = typeof column.line !== 'undefined' ? column.line : VcInstance.options.TableColumn?.line;
|
|
15594
|
+
if (!el || !line) return;
|
|
15595
|
+
const value = `${row[column.prop]}`;
|
|
15596
|
+
const endIndex = getFitIndex({
|
|
15597
|
+
el,
|
|
15598
|
+
value,
|
|
15599
|
+
line,
|
|
15600
|
+
suffix: '...'
|
|
15601
|
+
});
|
|
15602
|
+
if (endIndex > 0 && endIndex < value.length - 1) {
|
|
15603
|
+
poper && poper.destroy();
|
|
15604
|
+
poper = Popover.open({
|
|
15605
|
+
el: document.body,
|
|
15606
|
+
triggerEl: el,
|
|
15607
|
+
hover: true,
|
|
15608
|
+
alone: true,
|
|
15609
|
+
autoWidth: true,
|
|
15610
|
+
content: value
|
|
15611
|
+
});
|
|
15612
|
+
}
|
|
15207
15613
|
};
|
|
15208
|
-
const handleCellMouseLeave = e => {
|
|
15614
|
+
const handleCellMouseLeave = (e, row, column) => {
|
|
15209
15615
|
const cell = getCell(e);
|
|
15210
15616
|
if (!cell) return;
|
|
15211
|
-
|
|
15212
|
-
table.emit('cell-mouse-leave', oldHoverState.row, oldHoverState.column, oldHoverState.cell, e);
|
|
15617
|
+
table.emit('cell-mouse-leave', row, column, cell, e);
|
|
15213
15618
|
};
|
|
15214
15619
|
const handleMouseEnter = debounce(index => {
|
|
15215
15620
|
table.store.setHoverRow(index);
|
|
@@ -15280,8 +15685,8 @@ const TableBody = /* @__PURE__ */ defineComponent({
|
|
|
15280
15685
|
"key": column.id,
|
|
15281
15686
|
"style": [getCellStyle(rowIndex, columnIndex, row, column), sizeStyle],
|
|
15282
15687
|
"class": [getCellClass(rowIndex, columnIndex, row, column), 'vc-table__td'],
|
|
15283
|
-
"onMouseenter": e => handleCellMouseEnter(e, row),
|
|
15284
|
-
"onMouseleave": e => handleCellMouseLeave(e)
|
|
15688
|
+
"onMouseenter": e => handleCellMouseEnter(e, row, column),
|
|
15689
|
+
"onMouseleave": e => handleCellMouseLeave(e, row, column)
|
|
15285
15690
|
}, [renderCell({
|
|
15286
15691
|
row,
|
|
15287
15692
|
column,
|
|
@@ -15337,7 +15742,11 @@ const TableBody = /* @__PURE__ */ defineComponent({
|
|
|
15337
15742
|
allowRender.value = true;
|
|
15338
15743
|
}
|
|
15339
15744
|
});
|
|
15340
|
-
onBeforeUnmount(() =>
|
|
15745
|
+
onBeforeUnmount(() => {
|
|
15746
|
+
poper && poper.destroy();
|
|
15747
|
+
timer && clearTimeout(timer);
|
|
15748
|
+
allowRender.value = false;
|
|
15749
|
+
});
|
|
15341
15750
|
return () => {
|
|
15342
15751
|
if (!allowRender.value) return;
|
|
15343
15752
|
return createVNode("div", {
|
|
@@ -15464,10 +15873,13 @@ const TableHeader = /* @__PURE__ */ defineComponent({
|
|
|
15464
15873
|
column
|
|
15465
15874
|
});
|
|
15466
15875
|
}
|
|
15467
|
-
return
|
|
15876
|
+
return {
|
|
15877
|
+
...headerCellStyle,
|
|
15878
|
+
...column.style
|
|
15879
|
+
};
|
|
15468
15880
|
};
|
|
15469
15881
|
const getHeaderCellClass = (rowIndex, columnIndex, row, column) => {
|
|
15470
|
-
const classes = [column.id, column.order, column.realHeaderAlign, column.
|
|
15882
|
+
const classes = [column.id, column.order, column.realHeaderAlign, column.class, column.labelClass];
|
|
15471
15883
|
if (rowIndex === 0 && columnsHidden.value[columnIndex]) {
|
|
15472
15884
|
classes.push('is-hidden');
|
|
15473
15885
|
}
|
|
@@ -16402,215 +16814,24 @@ const Table = /* @__PURE__ */ defineComponent({
|
|
|
16402
16814
|
}
|
|
16403
16815
|
});
|
|
16404
16816
|
|
|
16405
|
-
const
|
|
16406
|
-
|
|
16407
|
-
|
|
16408
|
-
default: "div"
|
|
16409
|
-
},
|
|
16410
|
-
value: {
|
|
16411
|
-
type: String,
|
|
16412
|
-
default: ""
|
|
16413
|
-
},
|
|
16414
|
-
line: {
|
|
16415
|
-
type: Number,
|
|
16416
|
-
default: 0
|
|
16417
|
-
},
|
|
16418
|
-
// TODO: 是否改为tail-indent来表示尾部缩进
|
|
16419
|
-
indent: {
|
|
16420
|
-
type: Number,
|
|
16421
|
-
default: 0
|
|
16422
|
-
},
|
|
16423
|
-
resize: {
|
|
16424
|
-
type: [Boolean, Number],
|
|
16425
|
-
default: 100
|
|
16817
|
+
const cellStarts = {
|
|
16818
|
+
default: {
|
|
16819
|
+
order: ''
|
|
16426
16820
|
},
|
|
16427
|
-
|
|
16428
|
-
|
|
16429
|
-
|
|
16821
|
+
selection: {
|
|
16822
|
+
width: 60,
|
|
16823
|
+
minWidth: 60,
|
|
16824
|
+
order: ''
|
|
16430
16825
|
},
|
|
16431
|
-
|
|
16432
|
-
|
|
16433
|
-
|
|
16826
|
+
expand: {
|
|
16827
|
+
width: 60,
|
|
16828
|
+
minWidth: 60,
|
|
16829
|
+
order: ''
|
|
16434
16830
|
},
|
|
16435
|
-
|
|
16436
|
-
|
|
16437
|
-
|
|
16438
|
-
|
|
16439
|
-
default: (props$) => {
|
|
16440
|
-
return props$.value;
|
|
16441
|
-
}
|
|
16442
|
-
}
|
|
16443
|
-
};
|
|
16444
|
-
|
|
16445
|
-
const HIDDEN_TEXT_STYLE = `
|
|
16446
|
-
position: absolute!important;
|
|
16447
|
-
word-break: break-all!important;
|
|
16448
|
-
overflow: auto!important;
|
|
16449
|
-
opacity: 0!important;
|
|
16450
|
-
z-index: -1000!important;
|
|
16451
|
-
top: 0!important;
|
|
16452
|
-
right: 0!important;
|
|
16453
|
-
`;
|
|
16454
|
-
const SIZING_STYLE$1 = [
|
|
16455
|
-
"letter-spacing",
|
|
16456
|
-
"line-height",
|
|
16457
|
-
"padding-top",
|
|
16458
|
-
"padding-bottom",
|
|
16459
|
-
"font-family",
|
|
16460
|
-
"font-weight",
|
|
16461
|
-
"font-size",
|
|
16462
|
-
"text-rendering",
|
|
16463
|
-
"text-transform",
|
|
16464
|
-
"width",
|
|
16465
|
-
// 'text-indent', // 需要额外计算
|
|
16466
|
-
"padding-left",
|
|
16467
|
-
"padding-right",
|
|
16468
|
-
"border-width",
|
|
16469
|
-
"box-sizing"
|
|
16470
|
-
];
|
|
16471
|
-
let hiddenEl$1;
|
|
16472
|
-
const getFitIndex = (options = {}) => {
|
|
16473
|
-
const { el, line, value, suffix, indent } = options;
|
|
16474
|
-
let lineHeight = parseInt(getStyle(el, "line-height"), 10);
|
|
16475
|
-
if (!hiddenEl$1) {
|
|
16476
|
-
hiddenEl$1 = document.createElement("div");
|
|
16477
|
-
document.body.appendChild(hiddenEl$1);
|
|
16478
|
-
}
|
|
16479
|
-
el.getAttribute("wrap") ? hiddenEl$1.setAttribute("wrap", el.getAttribute("wrap")) : hiddenEl$1.removeAttribute("wrap");
|
|
16480
|
-
const {
|
|
16481
|
-
paddingSize,
|
|
16482
|
-
borderSize,
|
|
16483
|
-
boxSizing,
|
|
16484
|
-
sizingStyle
|
|
16485
|
-
} = Utils$1.getComputedStyle(el, SIZING_STYLE$1);
|
|
16486
|
-
const textIndent = `text-indent: ${parseInt(getStyle(el, "text-indent"), 10) + indent}px;`;
|
|
16487
|
-
hiddenEl$1.setAttribute("style", `${sizingStyle};${textIndent};${HIDDEN_TEXT_STYLE}`);
|
|
16488
|
-
let sideHeight = paddingSize || 0;
|
|
16489
|
-
boxSizing === "border-box" && (sideHeight += borderSize);
|
|
16490
|
-
if (Number.isNaN(lineHeight)) {
|
|
16491
|
-
hiddenEl$1.innerText = ".";
|
|
16492
|
-
lineHeight = hiddenEl$1.clientHeight - sideHeight;
|
|
16493
|
-
}
|
|
16494
|
-
let endIndex = 0;
|
|
16495
|
-
hiddenEl$1.innerText = suffix;
|
|
16496
|
-
(value || "").split("").forEach((item, i) => {
|
|
16497
|
-
let old = hiddenEl$1.innerText;
|
|
16498
|
-
old = old.substring(0, old.length - suffix.length);
|
|
16499
|
-
hiddenEl$1.innerText = old + item + suffix;
|
|
16500
|
-
if (hiddenEl$1.clientHeight - sideHeight > lineHeight * line && endIndex === 0) {
|
|
16501
|
-
endIndex = i;
|
|
16502
|
-
}
|
|
16503
|
-
});
|
|
16504
|
-
return endIndex;
|
|
16505
|
-
};
|
|
16506
|
-
|
|
16507
|
-
/** @jsxImportSource vue */
|
|
16508
|
-
|
|
16509
|
-
const COMPONENT_NAME$h = 'vc-text';
|
|
16510
|
-
const Text = /* @__PURE__ */ defineComponent({
|
|
16511
|
-
name: COMPONENT_NAME$h,
|
|
16512
|
-
props: props$b,
|
|
16513
|
-
setup(props, {
|
|
16514
|
-
emit
|
|
16515
|
-
}) {
|
|
16516
|
-
const instance = getCurrentInstance();
|
|
16517
|
-
const isActive = ref(false);
|
|
16518
|
-
const endIndex = ref(0);
|
|
16519
|
-
const styles = computed(() => {
|
|
16520
|
-
return {
|
|
16521
|
-
cursor: endIndex.value === 0 ? 'unset' : 'pointer'
|
|
16522
|
-
};
|
|
16523
|
-
});
|
|
16524
|
-
const calcPosition = () => {
|
|
16525
|
-
const {
|
|
16526
|
-
suffix,
|
|
16527
|
-
line,
|
|
16528
|
-
value,
|
|
16529
|
-
indent
|
|
16530
|
-
} = props;
|
|
16531
|
-
if (line === 0) {
|
|
16532
|
-
endIndex.value = 0;
|
|
16533
|
-
isActive.value = true;
|
|
16534
|
-
} else {
|
|
16535
|
-
endIndex.value = getFitIndex({
|
|
16536
|
-
el: instance.vnode.el,
|
|
16537
|
-
line,
|
|
16538
|
-
value,
|
|
16539
|
-
suffix,
|
|
16540
|
-
indent
|
|
16541
|
-
});
|
|
16542
|
-
isActive.value = true;
|
|
16543
|
-
}
|
|
16544
|
-
emit('clip', endIndex.value);
|
|
16545
|
-
};
|
|
16546
|
-
const handleResize = props.resize === true || props.resize === 0 ? calcPosition : debounce(calcPosition, props.resize || 0);
|
|
16547
|
-
let poper;
|
|
16548
|
-
const handleMouseOver = e => {
|
|
16549
|
-
if (endIndex.value > 0) {
|
|
16550
|
-
poper = Popover.open({
|
|
16551
|
-
el: document.body,
|
|
16552
|
-
name: 'vc-text-popover',
|
|
16553
|
-
// 确保不重复创建
|
|
16554
|
-
triggerEl: e.target,
|
|
16555
|
-
hover: true,
|
|
16556
|
-
theme: 'dark',
|
|
16557
|
-
placement: props.placement,
|
|
16558
|
-
portalClass: props.portalClass,
|
|
16559
|
-
portalStyle: [props.portalStyle || `width: ${e.target.clientWidth}px`, 'word-break: break-all'],
|
|
16560
|
-
content: props.value
|
|
16561
|
-
});
|
|
16562
|
-
}
|
|
16563
|
-
};
|
|
16564
|
-
const handleMouseOut = () => {
|
|
16565
|
-
// Do.
|
|
16566
|
-
};
|
|
16567
|
-
['value', 'indent', 'line'].forEach(key => {
|
|
16568
|
-
watch(() => props[key], calcPosition);
|
|
16569
|
-
});
|
|
16570
|
-
onMounted(() => {
|
|
16571
|
-
props.resize !== false && Resize.on(instance.vnode.el, handleResize); // 首次会执行一次
|
|
16572
|
-
});
|
|
16573
|
-
onBeforeUnmount(() => {
|
|
16574
|
-
props.resize !== false && Resize.off(instance.vnode.el, handleResize);
|
|
16575
|
-
poper?.destroy?.();
|
|
16576
|
-
});
|
|
16577
|
-
const Content = props.tag;
|
|
16578
|
-
return () => {
|
|
16579
|
-
return createVNode(Content, {
|
|
16580
|
-
"class": "vc-text",
|
|
16581
|
-
"style": styles.value,
|
|
16582
|
-
"onMouseover": handleMouseOver,
|
|
16583
|
-
"onMouseout": handleMouseOut
|
|
16584
|
-
}, {
|
|
16585
|
-
default: () => [isActive.value ? createVNode(Customer, {
|
|
16586
|
-
"value": endIndex.value > 0 ? `${props.value.slice(0, endIndex.value)}${props.suffix}` : props.value,
|
|
16587
|
-
"index": endIndex.value,
|
|
16588
|
-
"render": props.renderRow
|
|
16589
|
-
}, null) : null]
|
|
16590
|
-
});
|
|
16591
|
-
};
|
|
16592
|
-
}
|
|
16593
|
-
});
|
|
16594
|
-
|
|
16595
|
-
const cellStarts = {
|
|
16596
|
-
default: {
|
|
16597
|
-
order: ''
|
|
16598
|
-
},
|
|
16599
|
-
selection: {
|
|
16600
|
-
width: 60,
|
|
16601
|
-
minWidth: 60,
|
|
16602
|
-
order: '',
|
|
16603
|
-
className: 'vc-table-column--selection'
|
|
16604
|
-
},
|
|
16605
|
-
expand: {
|
|
16606
|
-
width: 60,
|
|
16607
|
-
minWidth: 60,
|
|
16608
|
-
order: ''
|
|
16609
|
-
},
|
|
16610
|
-
index: {
|
|
16611
|
-
width: 60,
|
|
16612
|
-
minWidth: 60,
|
|
16613
|
-
order: ''
|
|
16831
|
+
index: {
|
|
16832
|
+
width: 60,
|
|
16833
|
+
minWidth: 60,
|
|
16834
|
+
order: ''
|
|
16614
16835
|
}
|
|
16615
16836
|
};
|
|
16616
16837
|
|
|
@@ -16646,7 +16867,8 @@ const cellForced = {
|
|
|
16646
16867
|
}, null), [[vShow, store.states.expandSelectable || level === 0]]);
|
|
16647
16868
|
},
|
|
16648
16869
|
sortable: false,
|
|
16649
|
-
resizable: false
|
|
16870
|
+
resizable: false,
|
|
16871
|
+
class: 'vc-table__selection-column'
|
|
16650
16872
|
},
|
|
16651
16873
|
index: {
|
|
16652
16874
|
renderHeader(h, {
|
|
@@ -16696,7 +16918,7 @@ const cellForced = {
|
|
|
16696
16918
|
},
|
|
16697
16919
|
sortable: false,
|
|
16698
16920
|
resizable: false,
|
|
16699
|
-
|
|
16921
|
+
class: 'vc-table__expand-column'
|
|
16700
16922
|
}
|
|
16701
16923
|
};
|
|
16702
16924
|
|
|
@@ -16714,19 +16936,15 @@ const defaultRenderCell = (rowData = {}) => {
|
|
|
16714
16936
|
if (formatter) {
|
|
16715
16937
|
return column.formatter(rowData);
|
|
16716
16938
|
}
|
|
16717
|
-
const line = column.line
|
|
16939
|
+
const line = typeof column.line !== 'undefined' ? column.line : VcInstance.options.TableColumn?.line;
|
|
16718
16940
|
if (line && value) {
|
|
16719
|
-
const base = rowData.isHead || rowData.isTail ? 36 : 24; // 目前gap是12
|
|
16720
16941
|
const style = {
|
|
16721
|
-
|
|
16722
|
-
// TODO: 含有border还要-1
|
|
16723
|
-
width: (column.realWidth || column.width) - base + 'px'
|
|
16942
|
+
'-webkit-line-clamp': line
|
|
16724
16943
|
};
|
|
16725
|
-
return createVNode(
|
|
16726
|
-
"
|
|
16727
|
-
"
|
|
16728
|
-
|
|
16729
|
-
}, null);
|
|
16944
|
+
return createVNode("div", {
|
|
16945
|
+
"class": "vc-table__text-line",
|
|
16946
|
+
"style": style
|
|
16947
|
+
}, [value]);
|
|
16730
16948
|
}
|
|
16731
16949
|
return value;
|
|
16732
16950
|
};
|
|
@@ -16774,18 +16992,14 @@ const treeCellPrefix = ({
|
|
|
16774
16992
|
|
|
16775
16993
|
const TableColumn = /* @__PURE__ */ defineComponent({
|
|
16776
16994
|
name: 'vc-table-column',
|
|
16995
|
+
inheritAttrs: false,
|
|
16777
16996
|
props: {
|
|
16778
16997
|
type: {
|
|
16779
16998
|
type: String,
|
|
16780
16999
|
default: 'default'
|
|
16781
17000
|
},
|
|
16782
|
-
|
|
16783
|
-
line: {
|
|
16784
|
-
type: Number,
|
|
16785
|
-
default: 0
|
|
16786
|
-
},
|
|
17001
|
+
line: Number,
|
|
16787
17002
|
label: String,
|
|
16788
|
-
customClass: String,
|
|
16789
17003
|
labelClass: String,
|
|
16790
17004
|
prop: String,
|
|
16791
17005
|
width: Number,
|
|
@@ -16822,7 +17036,8 @@ const TableColumn = /* @__PURE__ */ defineComponent({
|
|
|
16822
17036
|
tooltip: [String, Function]
|
|
16823
17037
|
},
|
|
16824
17038
|
setup(props, {
|
|
16825
|
-
slots
|
|
17039
|
+
slots,
|
|
17040
|
+
attrs
|
|
16826
17041
|
}) {
|
|
16827
17042
|
const instance = getCurrentInstance();
|
|
16828
17043
|
const table = inject('vc-table');
|
|
@@ -16872,7 +17087,7 @@ const TableColumn = /* @__PURE__ */ defineComponent({
|
|
|
16872
17087
|
Object.keys(source).forEach(prop => {
|
|
16873
17088
|
const value = source[prop];
|
|
16874
17089
|
if (value !== undefined) {
|
|
16875
|
-
column[prop] = prop === '
|
|
17090
|
+
column[prop] = prop === 'class' ? `${column[prop] ? `${column[prop]} ` : ''}${value}` : value;
|
|
16876
17091
|
}
|
|
16877
17092
|
});
|
|
16878
17093
|
return column;
|
|
@@ -16942,7 +17157,7 @@ const TableColumn = /* @__PURE__ */ defineComponent({
|
|
|
16942
17157
|
// 存在树形数组,且当前行无箭头图标且处于当前展开列,表格对齐
|
|
16943
17158
|
if (!isEmpty$1(table.store.states.treeData) && !prefix && data.isExpandColumn) {
|
|
16944
17159
|
prefix = createVNode("span", {
|
|
16945
|
-
"class": "vc-
|
|
17160
|
+
"class": "vc-table__unexpand__indent"
|
|
16946
17161
|
}, null);
|
|
16947
17162
|
}
|
|
16948
17163
|
const {
|
|
@@ -16958,6 +17173,8 @@ const TableColumn = /* @__PURE__ */ defineComponent({
|
|
|
16958
17173
|
const defaults = {
|
|
16959
17174
|
colspan: 1,
|
|
16960
17175
|
rowspan: 1,
|
|
17176
|
+
class: attrs.class,
|
|
17177
|
+
style: attrs.style,
|
|
16961
17178
|
...cellStarts[props.type],
|
|
16962
17179
|
id: columnId.value,
|
|
16963
17180
|
realAlign,
|
|
@@ -17044,7 +17261,7 @@ const TableColumn = /* @__PURE__ */ defineComponent({
|
|
|
17044
17261
|
const MTable = Table;
|
|
17045
17262
|
const MTableColumn = TableColumn;
|
|
17046
17263
|
|
|
17047
|
-
const props$
|
|
17264
|
+
const props$b = {
|
|
17048
17265
|
type: {
|
|
17049
17266
|
type: String,
|
|
17050
17267
|
validator: (v) => /^(line|card)$/.test(v),
|
|
@@ -17203,10 +17420,10 @@ const useTabs = (options = {}) => {
|
|
|
17203
17420
|
|
|
17204
17421
|
/** @jsxImportSource vue */
|
|
17205
17422
|
|
|
17206
|
-
const COMPONENT_NAME$
|
|
17423
|
+
const COMPONENT_NAME$h = 'vc-tabs';
|
|
17207
17424
|
const Tabs = /* @__PURE__ */ defineComponent({
|
|
17208
|
-
name: COMPONENT_NAME$
|
|
17209
|
-
props: props$
|
|
17425
|
+
name: COMPONENT_NAME$h,
|
|
17426
|
+
props: props$b,
|
|
17210
17427
|
emits: ['update:modelValue', 'change', 'click'],
|
|
17211
17428
|
setup(props, {
|
|
17212
17429
|
slots
|
|
@@ -17371,7 +17588,7 @@ const Tabs = /* @__PURE__ */ defineComponent({
|
|
|
17371
17588
|
}
|
|
17372
17589
|
});
|
|
17373
17590
|
|
|
17374
|
-
const props$
|
|
17591
|
+
const props$a = {
|
|
17375
17592
|
value: {
|
|
17376
17593
|
type: [String, Number]
|
|
17377
17594
|
},
|
|
@@ -17453,10 +17670,10 @@ const useTabsPane = () => {
|
|
|
17453
17670
|
|
|
17454
17671
|
/** @jsxImportSource vue */
|
|
17455
17672
|
|
|
17456
|
-
const COMPONENT_NAME$
|
|
17673
|
+
const COMPONENT_NAME$g = 'vc-tabs-pane';
|
|
17457
17674
|
const TabsPane = /* @__PURE__ */ defineComponent({
|
|
17458
|
-
name: COMPONENT_NAME$
|
|
17459
|
-
props: props$
|
|
17675
|
+
name: COMPONENT_NAME$g,
|
|
17676
|
+
props: props$a,
|
|
17460
17677
|
setup(_, {
|
|
17461
17678
|
slots
|
|
17462
17679
|
}) {
|
|
@@ -17471,8 +17688,8 @@ const TabsPane = /* @__PURE__ */ defineComponent({
|
|
|
17471
17688
|
}
|
|
17472
17689
|
});
|
|
17473
17690
|
|
|
17474
|
-
const props$
|
|
17475
|
-
...props$
|
|
17691
|
+
const props$9 = {
|
|
17692
|
+
...props$b,
|
|
17476
17693
|
theme: {
|
|
17477
17694
|
type: String,
|
|
17478
17695
|
default: "light",
|
|
@@ -17510,10 +17727,10 @@ const props$8 = {
|
|
|
17510
17727
|
|
|
17511
17728
|
/** @jsxImportSource vue */
|
|
17512
17729
|
|
|
17513
|
-
const COMPONENT_NAME$
|
|
17730
|
+
const COMPONENT_NAME$f = 'vcm-tabs';
|
|
17514
17731
|
const MTabs = /* @__PURE__ */ defineComponent({
|
|
17515
|
-
name: COMPONENT_NAME$
|
|
17516
|
-
props: props$
|
|
17732
|
+
name: COMPONENT_NAME$f,
|
|
17733
|
+
props: props$9,
|
|
17517
17734
|
emits: ['update:modelValue', 'change', 'click'],
|
|
17518
17735
|
setup(props, {
|
|
17519
17736
|
slots
|
|
@@ -17777,10 +17994,10 @@ const MTabs = /* @__PURE__ */ defineComponent({
|
|
|
17777
17994
|
|
|
17778
17995
|
/** @jsxImportSource vue */
|
|
17779
17996
|
|
|
17780
|
-
const COMPONENT_NAME$
|
|
17997
|
+
const COMPONENT_NAME$e = 'vcm-tabs-pane';
|
|
17781
17998
|
const MTabsPane = /* @__PURE__ */ defineComponent({
|
|
17782
|
-
name: COMPONENT_NAME$
|
|
17783
|
-
props: props$
|
|
17999
|
+
name: COMPONENT_NAME$e,
|
|
18000
|
+
props: props$a,
|
|
17784
18001
|
setup(_, {
|
|
17785
18002
|
slots
|
|
17786
18003
|
}) {
|
|
@@ -17797,6 +18014,134 @@ const MTabsPane = /* @__PURE__ */ defineComponent({
|
|
|
17797
18014
|
|
|
17798
18015
|
const MTag = Tag;
|
|
17799
18016
|
|
|
18017
|
+
const props$8 = {
|
|
18018
|
+
tag: {
|
|
18019
|
+
type: String,
|
|
18020
|
+
default: "div"
|
|
18021
|
+
},
|
|
18022
|
+
value: {
|
|
18023
|
+
type: String,
|
|
18024
|
+
default: ""
|
|
18025
|
+
},
|
|
18026
|
+
line: {
|
|
18027
|
+
type: Number,
|
|
18028
|
+
default: 0
|
|
18029
|
+
},
|
|
18030
|
+
// TODO: 是否改为tail-indent来表示尾部缩进
|
|
18031
|
+
indent: {
|
|
18032
|
+
type: Number,
|
|
18033
|
+
default: 0
|
|
18034
|
+
},
|
|
18035
|
+
resize: {
|
|
18036
|
+
type: [Boolean, Number],
|
|
18037
|
+
default: 100
|
|
18038
|
+
},
|
|
18039
|
+
suffix: {
|
|
18040
|
+
type: String,
|
|
18041
|
+
default: "..."
|
|
18042
|
+
},
|
|
18043
|
+
placement: {
|
|
18044
|
+
type: String,
|
|
18045
|
+
default: "top"
|
|
18046
|
+
},
|
|
18047
|
+
portalClass: [Object, String, Array],
|
|
18048
|
+
portalStyle: [Object, String, Array],
|
|
18049
|
+
renderRow: {
|
|
18050
|
+
type: Function,
|
|
18051
|
+
default: (props$) => {
|
|
18052
|
+
return props$.value;
|
|
18053
|
+
}
|
|
18054
|
+
}
|
|
18055
|
+
};
|
|
18056
|
+
|
|
18057
|
+
/** @jsxImportSource vue */
|
|
18058
|
+
|
|
18059
|
+
const COMPONENT_NAME$d = 'vc-text';
|
|
18060
|
+
const Text = /* @__PURE__ */ defineComponent({
|
|
18061
|
+
name: COMPONENT_NAME$d,
|
|
18062
|
+
props: props$8,
|
|
18063
|
+
setup(props, {
|
|
18064
|
+
emit
|
|
18065
|
+
}) {
|
|
18066
|
+
const instance = getCurrentInstance();
|
|
18067
|
+
const isActive = ref(false);
|
|
18068
|
+
const endIndex = ref(-1);
|
|
18069
|
+
const styles = computed(() => {
|
|
18070
|
+
return {
|
|
18071
|
+
cursor: endIndex.value <= 0 ? 'unset' : 'pointer'
|
|
18072
|
+
};
|
|
18073
|
+
});
|
|
18074
|
+
const calcPosition = () => {
|
|
18075
|
+
const {
|
|
18076
|
+
suffix,
|
|
18077
|
+
line,
|
|
18078
|
+
value,
|
|
18079
|
+
indent
|
|
18080
|
+
} = props;
|
|
18081
|
+
if (line === 0) {
|
|
18082
|
+
endIndex.value = -1;
|
|
18083
|
+
isActive.value = true;
|
|
18084
|
+
} else {
|
|
18085
|
+
endIndex.value = getFitIndex({
|
|
18086
|
+
el: instance.vnode.el,
|
|
18087
|
+
line,
|
|
18088
|
+
value,
|
|
18089
|
+
suffix,
|
|
18090
|
+
indent
|
|
18091
|
+
});
|
|
18092
|
+
isActive.value = true;
|
|
18093
|
+
}
|
|
18094
|
+
emit('clip', endIndex.value);
|
|
18095
|
+
};
|
|
18096
|
+
const handleResize = props.resize === true || props.resize === 0 ? calcPosition : debounce(calcPosition, props.resize || 0);
|
|
18097
|
+
let poper;
|
|
18098
|
+
const handleMouseOver = e => {
|
|
18099
|
+
if (endIndex.value > 0) {
|
|
18100
|
+
poper = Popover.open({
|
|
18101
|
+
el: document.body,
|
|
18102
|
+
name: 'vc-text-popover',
|
|
18103
|
+
// 确保不重复创建
|
|
18104
|
+
triggerEl: e.target,
|
|
18105
|
+
hover: true,
|
|
18106
|
+
theme: 'dark',
|
|
18107
|
+
placement: props.placement,
|
|
18108
|
+
portalClass: props.portalClass,
|
|
18109
|
+
portalStyle: [props.portalStyle || `width: ${e.target.clientWidth}px`, 'word-break: break-all'],
|
|
18110
|
+
content: props.value
|
|
18111
|
+
});
|
|
18112
|
+
}
|
|
18113
|
+
};
|
|
18114
|
+
const handleMouseOut = () => {
|
|
18115
|
+
// Do.
|
|
18116
|
+
};
|
|
18117
|
+
['value', 'indent', 'line'].forEach(key => {
|
|
18118
|
+
watch(() => props[key], calcPosition);
|
|
18119
|
+
});
|
|
18120
|
+
onMounted(() => {
|
|
18121
|
+
props.resize !== false && Resize.on(instance.vnode.el, handleResize); // 首次会执行一次
|
|
18122
|
+
});
|
|
18123
|
+
onBeforeUnmount(() => {
|
|
18124
|
+
props.resize !== false && Resize.off(instance.vnode.el, handleResize);
|
|
18125
|
+
poper?.destroy?.();
|
|
18126
|
+
});
|
|
18127
|
+
const Content = props.tag;
|
|
18128
|
+
return () => {
|
|
18129
|
+
return createVNode(Content, {
|
|
18130
|
+
"class": "vc-text",
|
|
18131
|
+
"style": styles.value,
|
|
18132
|
+
"onMouseover": handleMouseOver,
|
|
18133
|
+
"onMouseout": handleMouseOut
|
|
18134
|
+
}, {
|
|
18135
|
+
default: () => [isActive.value ? createVNode(Customer, {
|
|
18136
|
+
"value": endIndex.value > 0 ? `${props.value.slice(0, endIndex.value)}${props.suffix}` : props.value,
|
|
18137
|
+
"index": endIndex.value,
|
|
18138
|
+
"render": props.renderRow
|
|
18139
|
+
}, null) : null]
|
|
18140
|
+
});
|
|
18141
|
+
};
|
|
18142
|
+
}
|
|
18143
|
+
});
|
|
18144
|
+
|
|
17800
18145
|
const MText = Text;
|
|
17801
18146
|
|
|
17802
18147
|
const HIDDEN_TEXTAREA_STYLE = `
|
|
@@ -19452,4 +19797,4 @@ const UploadPicker = /* @__PURE__ */ defineComponent({
|
|
|
19452
19797
|
|
|
19453
19798
|
const MUploadPicker = UploadPicker;
|
|
19454
19799
|
|
|
19455
|
-
export { ActionSheet, Alert, Artboard, Button, ButtonGroup, Calendar, Card, Carousel, Cascader, Chart, Checkbox, CheckboxGroup, Clipboard, Collapse, CollapseItem, ColorPicker, Countdown, Customer, DatePicker, Debounce, Divider, Drawer, DrawerView, Dropdown, Editor, Expand$1 as Expand, Form, FormItem, Fragment, HTMLToImage, Icon, IconManager, Image$1 as Image, ImageCrop, ImagePreview, ImageProcessing, Input, InputNumber, InputSearch, MList as List, MListItem as ListItem, MActionSheet, MAlert, MArtboard, MButton, MButtonGroup, MCalendar, MCard, MCarousel, MCascader, MChart, MCheckbox, MCheckboxGroup, MClipboard, MCollapse, MCollapseItem, MColorPicker, MCountdown, MCustomer, MDatePicker, Debounce as MDebounce, MDivider, MDrawer, MDrawerView, MDropdown, MEditor, MExpand, MForm, MFormItem, MFragment, MHTMLToImage, MIcon, MImage, MImageCrop, MImagePreview, MImageProcessing, MInput, MInputNumber, MInputSearch, MList, MListItem, MMarquee, MMessage, modal as MModal, MModalView, MNotice, MOption, MPagination, MPicker, MPopconfirm, MPopover, MPopup, MPortal, MPrint, MProgress, MRadio, MRadioGroup, MRate, MRecycleList, MResizer, MScroller, MSelect, MSlider, MSortList, MSpin, MSteps, MSwitch, MTable, MTableColumn, MTabs, MTabsPane, MTag, MText, MTextarea, MTimePicker, MTimeline, MToast, MToastView, MTouch, MTransition, MTransitionCollapse, MTransitionFade, MTransitionScale, MTransitionSlide, MTransitionZoom, MTree, MUpload, MUploadPicker, Marquee, Message, MessageView, Modal, ModalView, Notice, NoticeView, Option$1 as Option, Pagination, Picker, Popconfirm, Popover, Popup, Portal, PortalView, Print, Progress, Radio, RadioGroup, Rate, RecycleList, Resizer, Scroller, ScrollerWheel, Select, Slider, SortList, Spin, Steps, Switch, Table, TableColumn, Tabs, TabsPane, Tag, Text, Textarea, Theme, ThemeImage, ThemeText, ThemeView, TimePicker, Timeline, Toast, ToastView, Touch, Transition, TransitionCollapse, TransitionFade, TransitionScale, TransitionSlide, TransitionZoom, Tree, Upload, UploadPicker, VcError, VcInstance };
|
|
19800
|
+
export { ActionSheet, Alert, Artboard, Button, ButtonGroup, Calendar, Card, Carousel, Cascader, Chart, Checkbox, CheckboxGroup, Clipboard, Collapse, CollapseItem, ColorPicker, Countdown, Customer, DatePicker, Debounce, Divider, Drawer, DrawerView, Dropdown, DropdownItem, DropdownMenu, Editor, Expand$1 as Expand, Form, FormItem, Fragment, HTMLToImage, Icon, IconManager, Image$1 as Image, ImageCrop, ImagePreview, ImageProcessing, Input, InputNumber, InputSearch, MList as List, MListItem as ListItem, MActionSheet, MAlert, MArtboard, MButton, MButtonGroup, MCalendar, MCard, MCarousel, MCascader, MChart, MCheckbox, MCheckboxGroup, MClipboard, MCollapse, MCollapseItem, MColorPicker, MCountdown, MCustomer, MDatePicker, Debounce as MDebounce, MDivider, MDrawer, MDrawerView, MDropdown, MDropdownItem, MDropdownMenu, MEditor, MExpand, MForm, MFormItem, MFragment, MHTMLToImage, MIcon, MImage, MImageCrop, MImagePreview, MImageProcessing, MInput, MInputNumber, MInputSearch, MList, MListItem, MMarquee, MMessage, modal as MModal, MModalView, MNotice, MOption, MPagination, MPicker, MPopconfirm, MPopover, MPopup, MPortal, MPrint, MProgress, MRadio, MRadioGroup, MRate, MRecycleList, MResizer, MScroller, MSelect, MSlider, MSortList, MSpin, MSteps, MSwitch, MTable, MTableColumn, MTabs, MTabsPane, MTag, MText, MTextarea, MTimePicker, MTimeline, MToast, MToastView, MTouch, MTransition, MTransitionCollapse, MTransitionFade, MTransitionScale, MTransitionSlide, MTransitionZoom, MTree, MUpload, MUploadPicker, Marquee, Message, MessageView, Modal, ModalView, Notice, NoticeView, Option$1 as Option, Pagination, Picker, Popconfirm, Popover, Popup, Portal, PortalView, Print, Progress, Radio, RadioGroup, Rate, RecycleList, Resizer, Scroller, ScrollerWheel, Select, Slider, SortList, Spin, Steps, Switch, Table, TableColumn, Tabs, TabsPane, Tag, Text, Textarea, Theme, ThemeImage, ThemeText, ThemeView, TimePicker, Timeline, Toast, ToastView, Touch, Transition, TransitionCollapse, TransitionFade, TransitionScale, TransitionSlide, TransitionZoom, Tree, Upload, UploadPicker, VcError, VcInstance };
|