@deot/vc-components 1.0.16 → 1.0.18
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 +824 -480
- package/dist/index.d.ts +238 -38
- package/dist/index.iife.js +822 -478
- package/dist/index.js +825 -481
- package/dist/index.style.css +1 -1
- package/dist/index.umd.cjs +822 -478
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { reactive, defineComponent, createVNode, ref, watch, getCurrentInstance, computed, TransitionGroup, Transition as Transition$1, h, inject, onMounted, provide, shallowRef, onUnmounted, withDirectives, vShow, createApp, onBeforeUnmount, Fragment as Fragment$1, Teleport, withModifiers, nextTick, isVNode, onBeforeMount, mergeProps, createTextVNode, toRaw, onUpdated } from 'vue';
|
|
1
|
+
import { reactive, defineComponent, createVNode, ref, watch, getCurrentInstance, computed, TransitionGroup, Transition as Transition$1, h, inject, onMounted, provide, shallowRef, onUnmounted, withDirectives, vShow, createApp, onBeforeUnmount, Fragment as Fragment$1, Teleport, withModifiers, nextTick, isVNode, onBeforeMount, mergeProps, createTextVNode, toRaw, onUpdated, useAttrs as useAttrs$1 } from 'vue';
|
|
2
2
|
import { debounce, isEqualWith, pick, startCase, throttle, cloneDeep, max, merge as merge$1, isEmpty as isEmpty$1, kebabCase } from 'lodash-es';
|
|
3
3
|
import { Resize } from '@deot/helper-resize';
|
|
4
4
|
import { Utils as Utils$1, IS_SERVER as IS_SERVER$1 } from '@deot/vc-shared';
|
|
@@ -32,6 +32,17 @@ const VARIABLES = {};
|
|
|
32
32
|
const defaults$1 = {
|
|
33
33
|
Theme: {
|
|
34
34
|
variables: VARIABLES
|
|
35
|
+
},
|
|
36
|
+
Portal: {
|
|
37
|
+
install: void 0
|
|
38
|
+
},
|
|
39
|
+
Upload: {
|
|
40
|
+
onRequest: void 0,
|
|
41
|
+
onResponse: void 0,
|
|
42
|
+
onMessage: void 0
|
|
43
|
+
},
|
|
44
|
+
TableColumn: {
|
|
45
|
+
line: void 0
|
|
35
46
|
}
|
|
36
47
|
};
|
|
37
48
|
|
|
@@ -69,9 +80,9 @@ const props$1q = {
|
|
|
69
80
|
|
|
70
81
|
/** @jsxImportSource vue */
|
|
71
82
|
|
|
72
|
-
const COMPONENT_NAME$
|
|
83
|
+
const COMPONENT_NAME$1$ = 'vc-action-sheet';
|
|
73
84
|
const ActionSheet = /* @__PURE__ */ defineComponent({
|
|
74
|
-
name: COMPONENT_NAME$
|
|
85
|
+
name: COMPONENT_NAME$1$,
|
|
75
86
|
props: props$1q,
|
|
76
87
|
setup(props, {
|
|
77
88
|
slots
|
|
@@ -258,9 +269,9 @@ const IconManager = new Manager();
|
|
|
258
269
|
|
|
259
270
|
/** @jsxImportSource vue */
|
|
260
271
|
|
|
261
|
-
const COMPONENT_NAME$
|
|
272
|
+
const COMPONENT_NAME$1_ = 'vc-icon';
|
|
262
273
|
const Icon = /* @__PURE__ */ defineComponent({
|
|
263
|
-
name: COMPONENT_NAME$
|
|
274
|
+
name: COMPONENT_NAME$1_,
|
|
264
275
|
props: props$1o,
|
|
265
276
|
setup(props) {
|
|
266
277
|
const viewBox = ref('0 0 1024 1024');
|
|
@@ -459,9 +470,9 @@ const useTransition = () => {
|
|
|
459
470
|
};
|
|
460
471
|
};
|
|
461
472
|
|
|
462
|
-
const COMPONENT_NAME$
|
|
473
|
+
const COMPONENT_NAME$1Z = "vc-transition";
|
|
463
474
|
const Transition = defineComponent({
|
|
464
|
-
name: COMPONENT_NAME$
|
|
475
|
+
name: COMPONENT_NAME$1Z,
|
|
465
476
|
props: props$1n,
|
|
466
477
|
// 当不声明emits的情况下,事件存在于attrs中
|
|
467
478
|
inheritAttrs: false,
|
|
@@ -482,9 +493,9 @@ const Transition = defineComponent({
|
|
|
482
493
|
}
|
|
483
494
|
});
|
|
484
495
|
|
|
485
|
-
const COMPONENT_NAME$
|
|
496
|
+
const COMPONENT_NAME$1Y = "vc-transition-collapse";
|
|
486
497
|
const TransitionCollapse = defineComponent({
|
|
487
|
-
name: COMPONENT_NAME$
|
|
498
|
+
name: COMPONENT_NAME$1Y,
|
|
488
499
|
props: props$1n,
|
|
489
500
|
// 当不声明emits的情况下,事件存在于attrs中
|
|
490
501
|
inheritAttrs: false,
|
|
@@ -603,9 +614,9 @@ const TransitionCollapse = defineComponent({
|
|
|
603
614
|
}
|
|
604
615
|
});
|
|
605
616
|
|
|
606
|
-
const COMPONENT_NAME$
|
|
617
|
+
const COMPONENT_NAME$1X = "vc-transition-fade";
|
|
607
618
|
const TransitionFade = defineComponent({
|
|
608
|
-
name: COMPONENT_NAME$
|
|
619
|
+
name: COMPONENT_NAME$1X,
|
|
609
620
|
props: {
|
|
610
621
|
...props$1n,
|
|
611
622
|
// inheritAttrs必须是false
|
|
@@ -640,9 +651,9 @@ const TransitionFade = defineComponent({
|
|
|
640
651
|
}
|
|
641
652
|
});
|
|
642
653
|
|
|
643
|
-
const COMPONENT_NAME$
|
|
654
|
+
const COMPONENT_NAME$1W = "vc-transition-scale";
|
|
644
655
|
const TransitionScale = defineComponent({
|
|
645
|
-
name: COMPONENT_NAME$
|
|
656
|
+
name: COMPONENT_NAME$1W,
|
|
646
657
|
props: {
|
|
647
658
|
...props$1n,
|
|
648
659
|
mode: {
|
|
@@ -682,9 +693,9 @@ const TransitionScale = defineComponent({
|
|
|
682
693
|
}
|
|
683
694
|
});
|
|
684
695
|
|
|
685
|
-
const COMPONENT_NAME$
|
|
696
|
+
const COMPONENT_NAME$1V = "vc-transition-slide";
|
|
686
697
|
const TransitionSlide = defineComponent({
|
|
687
|
-
name: COMPONENT_NAME$
|
|
698
|
+
name: COMPONENT_NAME$1V,
|
|
688
699
|
props: {
|
|
689
700
|
...props$1n,
|
|
690
701
|
mode: {
|
|
@@ -724,9 +735,9 @@ const TransitionSlide = defineComponent({
|
|
|
724
735
|
}
|
|
725
736
|
});
|
|
726
737
|
|
|
727
|
-
const COMPONENT_NAME$
|
|
738
|
+
const COMPONENT_NAME$1U = "vc-transition-zoom";
|
|
728
739
|
const TransitionZoom = defineComponent({
|
|
729
|
-
name: COMPONENT_NAME$
|
|
740
|
+
name: COMPONENT_NAME$1U,
|
|
730
741
|
props: {
|
|
731
742
|
...props$1n,
|
|
732
743
|
mode: {
|
|
@@ -768,7 +779,7 @@ const TransitionZoom = defineComponent({
|
|
|
768
779
|
|
|
769
780
|
/** @jsxImportSource vue */
|
|
770
781
|
|
|
771
|
-
const COMPONENT_NAME$
|
|
782
|
+
const COMPONENT_NAME$1T = 'vc-alert';
|
|
772
783
|
|
|
773
784
|
// [color, borderColor, backgroundColor], -> CSS
|
|
774
785
|
const THEME_MAP = {
|
|
@@ -778,7 +789,7 @@ const THEME_MAP = {
|
|
|
778
789
|
warning: ['#ffbf00', '#ffe58f', '#fffbe6']
|
|
779
790
|
};
|
|
780
791
|
const Alert = /* @__PURE__ */ defineComponent({
|
|
781
|
-
name: COMPONENT_NAME$
|
|
792
|
+
name: COMPONENT_NAME$1T,
|
|
782
793
|
props: props$1p,
|
|
783
794
|
setup(props, {
|
|
784
795
|
slots,
|
|
@@ -877,9 +888,9 @@ const props$1m = {
|
|
|
877
888
|
|
|
878
889
|
/** @jsxImportSource vue */
|
|
879
890
|
|
|
880
|
-
const COMPONENT_NAME$
|
|
891
|
+
const COMPONENT_NAME$1S = 'vc-artboard';
|
|
881
892
|
const Artboard = /* @__PURE__ */ defineComponent({
|
|
882
|
-
name: COMPONENT_NAME$
|
|
893
|
+
name: COMPONENT_NAME$1S,
|
|
883
894
|
props: props$1m,
|
|
884
895
|
setup(props, {
|
|
885
896
|
slots
|
|
@@ -918,9 +929,9 @@ const props$1l = {
|
|
|
918
929
|
|
|
919
930
|
/** @jsxImportSource vue */
|
|
920
931
|
|
|
921
|
-
const COMPONENT_NAME$
|
|
932
|
+
const COMPONENT_NAME$1R = 'vc-spin';
|
|
922
933
|
const Spin = /* @__PURE__ */ defineComponent({
|
|
923
|
-
name: COMPONENT_NAME$
|
|
934
|
+
name: COMPONENT_NAME$1R,
|
|
924
935
|
props: props$1l,
|
|
925
936
|
setup(props, {
|
|
926
937
|
slots
|
|
@@ -971,9 +982,9 @@ const props$1k = {
|
|
|
971
982
|
exclude: RegExp
|
|
972
983
|
};
|
|
973
984
|
|
|
974
|
-
const COMPONENT_NAME$
|
|
985
|
+
const COMPONENT_NAME$1Q = "vc-debounce";
|
|
975
986
|
const Debounce = defineComponent({
|
|
976
|
-
name: COMPONENT_NAME$
|
|
987
|
+
name: COMPONENT_NAME$1Q,
|
|
977
988
|
props: props$1k,
|
|
978
989
|
/**
|
|
979
990
|
* 不声明emits使得事件被透传放入attrs中, 这样可以让所有的事件透传
|
|
@@ -1045,9 +1056,9 @@ const props$1j = {
|
|
|
1045
1056
|
|
|
1046
1057
|
/** @jsxImportSource vue */
|
|
1047
1058
|
|
|
1048
|
-
const COMPONENT_NAME$
|
|
1059
|
+
const COMPONENT_NAME$1P = 'vc-button';
|
|
1049
1060
|
const Button = /* @__PURE__ */ defineComponent({
|
|
1050
|
-
name: COMPONENT_NAME$
|
|
1061
|
+
name: COMPONENT_NAME$1P,
|
|
1051
1062
|
emits: ['click'],
|
|
1052
1063
|
props: props$1j,
|
|
1053
1064
|
setup(props, {
|
|
@@ -1127,9 +1138,9 @@ const props$1i = {
|
|
|
1127
1138
|
|
|
1128
1139
|
/** @jsxImportSource vue */
|
|
1129
1140
|
|
|
1130
|
-
const COMPONENT_NAME$
|
|
1141
|
+
const COMPONENT_NAME$1O = 'vc-button-group';
|
|
1131
1142
|
const ButtonGroup = /* @__PURE__ */ defineComponent({
|
|
1132
|
-
name: COMPONENT_NAME$
|
|
1143
|
+
name: COMPONENT_NAME$1O,
|
|
1133
1144
|
props: props$1i,
|
|
1134
1145
|
setup(props, {
|
|
1135
1146
|
slots
|
|
@@ -1163,9 +1174,9 @@ const props$1h = {
|
|
|
1163
1174
|
|
|
1164
1175
|
/** @jsxImportSource vue */
|
|
1165
1176
|
|
|
1166
|
-
const COMPONENT_NAME$
|
|
1177
|
+
const COMPONENT_NAME$1N = 'vc-calendar';
|
|
1167
1178
|
const Calendar = /* @__PURE__ */ defineComponent({
|
|
1168
|
-
name: COMPONENT_NAME$
|
|
1179
|
+
name: COMPONENT_NAME$1N,
|
|
1169
1180
|
props: props$1h,
|
|
1170
1181
|
setup(props, {
|
|
1171
1182
|
slots
|
|
@@ -1203,9 +1214,9 @@ const props$1g = {
|
|
|
1203
1214
|
|
|
1204
1215
|
/** @jsxImportSource vue */
|
|
1205
1216
|
|
|
1206
|
-
const COMPONENT_NAME$
|
|
1217
|
+
const COMPONENT_NAME$1M = 'vc-card';
|
|
1207
1218
|
const Card = /* @__PURE__ */ defineComponent({
|
|
1208
|
-
name: COMPONENT_NAME$
|
|
1219
|
+
name: COMPONENT_NAME$1M,
|
|
1209
1220
|
props: props$1g,
|
|
1210
1221
|
setup(props, {
|
|
1211
1222
|
slots
|
|
@@ -1241,9 +1252,9 @@ const props$1f = {
|
|
|
1241
1252
|
|
|
1242
1253
|
/** @jsxImportSource vue */
|
|
1243
1254
|
|
|
1244
|
-
const COMPONENT_NAME$
|
|
1255
|
+
const COMPONENT_NAME$1L = 'vc-carousel';
|
|
1245
1256
|
const Carousel = /* @__PURE__ */ defineComponent({
|
|
1246
|
-
name: COMPONENT_NAME$
|
|
1257
|
+
name: COMPONENT_NAME$1L,
|
|
1247
1258
|
props: props$1f,
|
|
1248
1259
|
setup(props, {
|
|
1249
1260
|
slots
|
|
@@ -1267,9 +1278,9 @@ const props$1e = {
|
|
|
1267
1278
|
|
|
1268
1279
|
/** @jsxImportSource vue */
|
|
1269
1280
|
|
|
1270
|
-
const COMPONENT_NAME$
|
|
1281
|
+
const COMPONENT_NAME$1K = 'vc-cascader';
|
|
1271
1282
|
const Cascader = /* @__PURE__ */ defineComponent({
|
|
1272
|
-
name: COMPONENT_NAME$
|
|
1283
|
+
name: COMPONENT_NAME$1K,
|
|
1273
1284
|
props: props$1e,
|
|
1274
1285
|
setup(props, {
|
|
1275
1286
|
slots
|
|
@@ -1338,9 +1349,9 @@ const props$1d = {
|
|
|
1338
1349
|
|
|
1339
1350
|
/** @jsxImportSource vue */
|
|
1340
1351
|
|
|
1341
|
-
const COMPONENT_NAME$
|
|
1352
|
+
const COMPONENT_NAME$1J = 'vc-chart';
|
|
1342
1353
|
const Chart = /* @__PURE__ */ defineComponent({
|
|
1343
|
-
name: COMPONENT_NAME$
|
|
1354
|
+
name: COMPONENT_NAME$1J,
|
|
1344
1355
|
props: props$1d,
|
|
1345
1356
|
emits: [...EVENTS, 'ready'],
|
|
1346
1357
|
setup(props, {
|
|
@@ -1571,9 +1582,9 @@ const useCheckbox = () => {
|
|
|
1571
1582
|
|
|
1572
1583
|
/** @jsxImportSource vue */
|
|
1573
1584
|
|
|
1574
|
-
const COMPONENT_NAME$
|
|
1585
|
+
const COMPONENT_NAME$1I = 'vc-checkbox';
|
|
1575
1586
|
const Checkbox = /* @__PURE__ */ defineComponent({
|
|
1576
|
-
name: COMPONENT_NAME$
|
|
1587
|
+
name: COMPONENT_NAME$1I,
|
|
1577
1588
|
props: props$1c,
|
|
1578
1589
|
emits: ['update:modelValue', 'change'],
|
|
1579
1590
|
setup(props, {
|
|
@@ -1660,9 +1671,9 @@ const useCheckboxGroup = () => {
|
|
|
1660
1671
|
|
|
1661
1672
|
/** @jsxImportSource vue */
|
|
1662
1673
|
|
|
1663
|
-
const COMPONENT_NAME$
|
|
1674
|
+
const COMPONENT_NAME$1H = 'vc-checkbox-group';
|
|
1664
1675
|
const CheckboxGroup = /* @__PURE__ */ defineComponent({
|
|
1665
|
-
name: COMPONENT_NAME$
|
|
1676
|
+
name: COMPONENT_NAME$1H,
|
|
1666
1677
|
props: props$1b,
|
|
1667
1678
|
emits: ['update:modelValue', 'change'],
|
|
1668
1679
|
setup(props, {
|
|
@@ -1680,9 +1691,9 @@ const CheckboxGroup = /* @__PURE__ */ defineComponent({
|
|
|
1680
1691
|
|
|
1681
1692
|
/** @jsxImportSource vue */
|
|
1682
1693
|
|
|
1683
|
-
const COMPONENT_NAME$
|
|
1694
|
+
const COMPONENT_NAME$1G = 'vcm-checkbox';
|
|
1684
1695
|
const MCheckbox = /* @__PURE__ */ defineComponent({
|
|
1685
|
-
name: COMPONENT_NAME$
|
|
1696
|
+
name: COMPONENT_NAME$1G,
|
|
1686
1697
|
props: props$1c,
|
|
1687
1698
|
emits: ['update:modelValue', 'change'],
|
|
1688
1699
|
setup(props, {
|
|
@@ -1722,9 +1733,9 @@ const MCheckbox = /* @__PURE__ */ defineComponent({
|
|
|
1722
1733
|
|
|
1723
1734
|
/** @jsxImportSource vue */
|
|
1724
1735
|
|
|
1725
|
-
const COMPONENT_NAME$
|
|
1736
|
+
const COMPONENT_NAME$1F = 'vcm-checkbox-group';
|
|
1726
1737
|
const MCheckboxGroup = /* @__PURE__ */ defineComponent({
|
|
1727
|
-
name: COMPONENT_NAME$
|
|
1738
|
+
name: COMPONENT_NAME$1F,
|
|
1728
1739
|
props: props$1b,
|
|
1729
1740
|
emits: ['update:modelValue', 'change'],
|
|
1730
1741
|
setup(props, {
|
|
@@ -1783,9 +1794,9 @@ const props$19 = {
|
|
|
1783
1794
|
}
|
|
1784
1795
|
};
|
|
1785
1796
|
|
|
1786
|
-
const COMPONENT_NAME$
|
|
1797
|
+
const COMPONENT_NAME$1E = "vc-customer";
|
|
1787
1798
|
const Customer = defineComponent({
|
|
1788
|
-
name: COMPONENT_NAME$
|
|
1799
|
+
name: COMPONENT_NAME$1E,
|
|
1789
1800
|
props: props$19,
|
|
1790
1801
|
setup(props, context) {
|
|
1791
1802
|
return () => h(() => {
|
|
@@ -1796,9 +1807,9 @@ const Customer = defineComponent({
|
|
|
1796
1807
|
|
|
1797
1808
|
/** @jsxImportSource vue */
|
|
1798
1809
|
|
|
1799
|
-
const COMPONENT_NAME$
|
|
1810
|
+
const COMPONENT_NAME$1D = 'vc-message';
|
|
1800
1811
|
const MessageView = /* @__PURE__ */ defineComponent({
|
|
1801
|
-
name: COMPONENT_NAME$
|
|
1812
|
+
name: COMPONENT_NAME$1D,
|
|
1802
1813
|
emits: ['before-close', 'close', 'portal-fulfilled'],
|
|
1803
1814
|
props: props$1a,
|
|
1804
1815
|
setup(props, {
|
|
@@ -1945,7 +1956,7 @@ class PortalLeaf {
|
|
|
1945
1956
|
}
|
|
1946
1957
|
}
|
|
1947
1958
|
|
|
1948
|
-
const COMPONENT_NAME$
|
|
1959
|
+
const COMPONENT_NAME$1C = "vc-portal";
|
|
1949
1960
|
class Portal {
|
|
1950
1961
|
/**
|
|
1951
1962
|
* 清理Portals类型组件
|
|
@@ -1997,7 +2008,7 @@ class Portal {
|
|
|
1997
2008
|
this.wrapper = wrapper;
|
|
1998
2009
|
this.globalOptions = {
|
|
1999
2010
|
...options,
|
|
2000
|
-
name: options?.name || wrapper.name || Utils.getUid(COMPONENT_NAME$
|
|
2011
|
+
name: options?.name || wrapper.name || Utils.getUid(COMPONENT_NAME$1C)
|
|
2001
2012
|
};
|
|
2002
2013
|
}
|
|
2003
2014
|
popup(propsData, options) {
|
|
@@ -2096,7 +2107,7 @@ class Portal {
|
|
|
2096
2107
|
...rest
|
|
2097
2108
|
} = options;
|
|
2098
2109
|
let useAllNodes = fragment;
|
|
2099
|
-
const name = multiple ? `${name$}__${Utils.getUid(COMPONENT_NAME$
|
|
2110
|
+
const name = multiple ? `${name$}__${Utils.getUid(COMPONENT_NAME$1C)}` : name$;
|
|
2100
2111
|
const container = document.createElement(tag);
|
|
2101
2112
|
const root = typeof el === "object" ? el : document.querySelector(el || "body");
|
|
2102
2113
|
!alive && Portal.leafs.get(name)?.destroy();
|
|
@@ -2130,7 +2141,7 @@ class Portal {
|
|
|
2130
2141
|
} else {
|
|
2131
2142
|
const wrapper = this.wrapper;
|
|
2132
2143
|
const app = createApp({
|
|
2133
|
-
name: COMPONENT_NAME$
|
|
2144
|
+
name: COMPONENT_NAME$1C,
|
|
2134
2145
|
parent,
|
|
2135
2146
|
setup() {
|
|
2136
2147
|
if (alive) {
|
|
@@ -2242,13 +2253,13 @@ const props$18 = {
|
|
|
2242
2253
|
}
|
|
2243
2254
|
};
|
|
2244
2255
|
|
|
2245
|
-
const COMPONENT_NAME$
|
|
2256
|
+
const COMPONENT_NAME$1B = 'vc-portal-view';
|
|
2246
2257
|
|
|
2247
2258
|
/**
|
|
2248
2259
|
* 写法不同,但与vue@2.x 保持一致
|
|
2249
2260
|
*/
|
|
2250
2261
|
const PortalView = /* @__PURE__ */ defineComponent({
|
|
2251
|
-
name: COMPONENT_NAME$
|
|
2262
|
+
name: COMPONENT_NAME$1B,
|
|
2252
2263
|
props: props$18,
|
|
2253
2264
|
setup(props, {
|
|
2254
2265
|
slots
|
|
@@ -2419,9 +2430,9 @@ const useClipboard = (done) => {
|
|
|
2419
2430
|
return () => h(props.tag, { onClick: handleClick, class: "vc-clipboard" }, slots?.default?.());
|
|
2420
2431
|
};
|
|
2421
2432
|
|
|
2422
|
-
const COMPONENT_NAME$
|
|
2433
|
+
const COMPONENT_NAME$1A = "vc-clipboard";
|
|
2423
2434
|
const Clipboard$1 = defineComponent({
|
|
2424
|
-
name: COMPONENT_NAME$
|
|
2435
|
+
name: COMPONENT_NAME$1A,
|
|
2425
2436
|
props: props$17,
|
|
2426
2437
|
setup() {
|
|
2427
2438
|
return useClipboard((content) => Message.success({ content }));
|
|
@@ -2461,9 +2472,9 @@ const MTransitionZoom = TransitionZoom;
|
|
|
2461
2472
|
|
|
2462
2473
|
/** @jsxImportSource vue */
|
|
2463
2474
|
|
|
2464
|
-
const COMPONENT_NAME$
|
|
2475
|
+
const COMPONENT_NAME$1z = 'vcm-toast';
|
|
2465
2476
|
const MToastView = /* @__PURE__ */ defineComponent({
|
|
2466
|
-
name: COMPONENT_NAME$
|
|
2477
|
+
name: COMPONENT_NAME$1z,
|
|
2467
2478
|
emits: ['close', 'portal-fulfilled'],
|
|
2468
2479
|
props: props$16,
|
|
2469
2480
|
setup(props, {
|
|
@@ -2565,9 +2576,9 @@ const warning$2 = create$3({ mode: "warning" });
|
|
|
2565
2576
|
const error$2 = create$3({ mode: "error" });
|
|
2566
2577
|
const MToast = Object.assign(MToastView, { destroy: destroy$4, info: info$2, success: success$2, loading, warning: warning$2, error: error$2 });
|
|
2567
2578
|
|
|
2568
|
-
const COMPONENT_NAME$
|
|
2579
|
+
const COMPONENT_NAME$1y = "vcm-clipboard";
|
|
2569
2580
|
const MClipboard$1 = defineComponent({
|
|
2570
|
-
name: COMPONENT_NAME$
|
|
2581
|
+
name: COMPONENT_NAME$1y,
|
|
2571
2582
|
props: props$17,
|
|
2572
2583
|
setup() {
|
|
2573
2584
|
return useClipboard((content) => MToast.info({ content }));
|
|
@@ -2599,9 +2610,9 @@ const props$15 = {
|
|
|
2599
2610
|
}
|
|
2600
2611
|
};
|
|
2601
2612
|
|
|
2602
|
-
const COMPONENT_NAME$
|
|
2613
|
+
const COMPONENT_NAME$1x = "vc-collapse";
|
|
2603
2614
|
const Collapse = defineComponent({
|
|
2604
|
-
name: COMPONENT_NAME$
|
|
2615
|
+
name: COMPONENT_NAME$1x,
|
|
2605
2616
|
props: props$15,
|
|
2606
2617
|
emits: ["update:moodelValue", "change"],
|
|
2607
2618
|
setup(props, { slots, emit }) {
|
|
@@ -2718,9 +2729,9 @@ const props$13 = {
|
|
|
2718
2729
|
function _isSlot$3(s) {
|
|
2719
2730
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
2720
2731
|
}
|
|
2721
|
-
const COMPONENT_NAME$
|
|
2732
|
+
const COMPONENT_NAME$1w = 'vc-expand';
|
|
2722
2733
|
const Expand$1 = /* @__PURE__ */ defineComponent({
|
|
2723
|
-
name: COMPONENT_NAME$
|
|
2734
|
+
name: COMPONENT_NAME$1w,
|
|
2724
2735
|
props: props$13,
|
|
2725
2736
|
setup(props, {
|
|
2726
2737
|
slots
|
|
@@ -2750,9 +2761,9 @@ const Expand$1 = /* @__PURE__ */ defineComponent({
|
|
|
2750
2761
|
|
|
2751
2762
|
/** @jsxImportSource vue */
|
|
2752
2763
|
|
|
2753
|
-
const COMPONENT_NAME$
|
|
2764
|
+
const COMPONENT_NAME$1v = 'vc-collapse-item';
|
|
2754
2765
|
const CollapseItem = /* @__PURE__ */ defineComponent({
|
|
2755
|
-
name: COMPONENT_NAME$
|
|
2766
|
+
name: COMPONENT_NAME$1v,
|
|
2756
2767
|
props: props$14,
|
|
2757
2768
|
setup(props, {
|
|
2758
2769
|
slots,
|
|
@@ -2827,9 +2838,9 @@ const props$12 = {
|
|
|
2827
2838
|
|
|
2828
2839
|
/** @jsxImportSource vue */
|
|
2829
2840
|
|
|
2830
|
-
const COMPONENT_NAME$
|
|
2841
|
+
const COMPONENT_NAME$1u = 'vc-color-picker';
|
|
2831
2842
|
const ColorPicker = /* @__PURE__ */ defineComponent({
|
|
2832
|
-
name: COMPONENT_NAME$
|
|
2843
|
+
name: COMPONENT_NAME$1u,
|
|
2833
2844
|
props: props$12,
|
|
2834
2845
|
setup(props, {
|
|
2835
2846
|
slots
|
|
@@ -2853,9 +2864,9 @@ const props$11 = {
|
|
|
2853
2864
|
|
|
2854
2865
|
/** @jsxImportSource vue */
|
|
2855
2866
|
|
|
2856
|
-
const COMPONENT_NAME$
|
|
2867
|
+
const COMPONENT_NAME$1t = 'vc-countdown';
|
|
2857
2868
|
const Countdown = /* @__PURE__ */ defineComponent({
|
|
2858
|
-
name: COMPONENT_NAME$
|
|
2869
|
+
name: COMPONENT_NAME$1t,
|
|
2859
2870
|
props: props$11,
|
|
2860
2871
|
setup(props, {
|
|
2861
2872
|
slots
|
|
@@ -3008,7 +3019,7 @@ const props$_ = {
|
|
|
3008
3019
|
hover: Boolean,
|
|
3009
3020
|
always: Boolean,
|
|
3010
3021
|
portalClass: [Object, String, Array],
|
|
3011
|
-
portalStyle: Object
|
|
3022
|
+
portalStyle: [Object, String]
|
|
3012
3023
|
};
|
|
3013
3024
|
|
|
3014
3025
|
const wrapperKeys = [
|
|
@@ -3046,7 +3057,7 @@ const props$Z = {
|
|
|
3046
3057
|
...pick(props$_, wrapperKeys)
|
|
3047
3058
|
};
|
|
3048
3059
|
|
|
3049
|
-
const inputKeys$
|
|
3060
|
+
const inputKeys$2 = [
|
|
3050
3061
|
"id",
|
|
3051
3062
|
"disabled"
|
|
3052
3063
|
];
|
|
@@ -3056,7 +3067,7 @@ const popoverKeys$1 = [
|
|
|
3056
3067
|
];
|
|
3057
3068
|
const props$Y = {
|
|
3058
3069
|
...pick(props$Z, popoverKeys$1),
|
|
3059
|
-
...pick(props$$, inputKeys$
|
|
3070
|
+
...pick(props$$, inputKeys$2),
|
|
3060
3071
|
type: String,
|
|
3061
3072
|
placeholder: String,
|
|
3062
3073
|
clearable: {
|
|
@@ -3304,9 +3315,9 @@ const useNativeEmitter = (input, expose) => {
|
|
|
3304
3315
|
|
|
3305
3316
|
/** @jsxImportSource vue */
|
|
3306
3317
|
|
|
3307
|
-
const COMPONENT_NAME$
|
|
3318
|
+
const COMPONENT_NAME$1s = 'vc-input';
|
|
3308
3319
|
const Input = /* @__PURE__ */ defineComponent({
|
|
3309
|
-
name: COMPONENT_NAME$
|
|
3320
|
+
name: COMPONENT_NAME$1s,
|
|
3310
3321
|
inheritAttrs: false,
|
|
3311
3322
|
props: {
|
|
3312
3323
|
...props$$,
|
|
@@ -3640,9 +3651,9 @@ const useInputNumber = () => {
|
|
|
3640
3651
|
|
|
3641
3652
|
/** @jsxImportSource vue */
|
|
3642
3653
|
|
|
3643
|
-
const COMPONENT_NAME$
|
|
3654
|
+
const COMPONENT_NAME$1r = 'vc-input-number';
|
|
3644
3655
|
const InputNumber = /* @__PURE__ */ defineComponent({
|
|
3645
|
-
name: COMPONENT_NAME$
|
|
3656
|
+
name: COMPONENT_NAME$1r,
|
|
3646
3657
|
props: props$X,
|
|
3647
3658
|
inheritAttrs: false,
|
|
3648
3659
|
setup(props, {
|
|
@@ -3706,9 +3717,9 @@ const props$W = {
|
|
|
3706
3717
|
|
|
3707
3718
|
/** @jsxImportSource vue */
|
|
3708
3719
|
|
|
3709
|
-
const COMPONENT_NAME$
|
|
3720
|
+
const COMPONENT_NAME$1q = 'vc-input-search';
|
|
3710
3721
|
const InputSearch = /* @__PURE__ */ defineComponent({
|
|
3711
|
-
name: COMPONENT_NAME$
|
|
3722
|
+
name: COMPONENT_NAME$1q,
|
|
3712
3723
|
props: props$W,
|
|
3713
3724
|
inheritAttrs: false,
|
|
3714
3725
|
setup(props, {
|
|
@@ -3999,9 +4010,9 @@ const usePos = () => {
|
|
|
3999
4010
|
function _isSlot$2(s) {
|
|
4000
4011
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
4001
4012
|
}
|
|
4002
|
-
const COMPONENT_NAME$
|
|
4013
|
+
const COMPONENT_NAME$1p = 'vc-popover-wrapper';
|
|
4003
4014
|
const PopoverWrapper = /* @__PURE__ */ defineComponent({
|
|
4004
|
-
name: COMPONENT_NAME$
|
|
4015
|
+
name: COMPONENT_NAME$1p,
|
|
4005
4016
|
props: props$_,
|
|
4006
4017
|
emits: ['portal-fulfilled', 'close'],
|
|
4007
4018
|
setup(props, {
|
|
@@ -4253,9 +4264,9 @@ const PopoverPortal = new Portal(PopoverWrapper);
|
|
|
4253
4264
|
|
|
4254
4265
|
/** @jsxImportSource vue */
|
|
4255
4266
|
|
|
4256
|
-
const COMPONENT_NAME$
|
|
4267
|
+
const COMPONENT_NAME$1o = 'vc-popover';
|
|
4257
4268
|
const Popover$1 = /* @__PURE__ */ defineComponent({
|
|
4258
|
-
name: COMPONENT_NAME$
|
|
4269
|
+
name: COMPONENT_NAME$1o,
|
|
4259
4270
|
props: props$Z,
|
|
4260
4271
|
emits: ['update:modelValue', 'visible-change', 'ready', 'close'],
|
|
4261
4272
|
setup(props, {
|
|
@@ -5356,9 +5367,9 @@ const getTimeType = type => {
|
|
|
5356
5367
|
}
|
|
5357
5368
|
return view;
|
|
5358
5369
|
};
|
|
5359
|
-
const COMPONENT_NAME$
|
|
5370
|
+
const COMPONENT_NAME$1n = 'vc-date-confirm';
|
|
5360
5371
|
const Confirm = /* @__PURE__ */ defineComponent({
|
|
5361
|
-
name: COMPONENT_NAME$
|
|
5372
|
+
name: COMPONENT_NAME$1n,
|
|
5362
5373
|
props: {
|
|
5363
5374
|
showTime: {
|
|
5364
5375
|
type: Boolean,
|
|
@@ -5422,9 +5433,9 @@ const Confirm = /* @__PURE__ */ defineComponent({
|
|
|
5422
5433
|
|
|
5423
5434
|
/** @jsxImportSource vue */
|
|
5424
5435
|
|
|
5425
|
-
const COMPONENT_NAME$
|
|
5436
|
+
const COMPONENT_NAME$1m = 'vc-date-header';
|
|
5426
5437
|
const DateHeader = /* @__PURE__ */ defineComponent({
|
|
5427
|
-
name: COMPONENT_NAME$
|
|
5438
|
+
name: COMPONENT_NAME$1m,
|
|
5428
5439
|
props: {
|
|
5429
5440
|
panelDate: Date,
|
|
5430
5441
|
showNext: {
|
|
@@ -5508,9 +5519,9 @@ const DateHeader = /* @__PURE__ */ defineComponent({
|
|
|
5508
5519
|
|
|
5509
5520
|
/** @jsxImportSource vue */
|
|
5510
5521
|
|
|
5511
|
-
const COMPONENT_NAME$
|
|
5522
|
+
const COMPONENT_NAME$1l = 'vc-date-table';
|
|
5512
5523
|
const DateTable = /* @__PURE__ */ defineComponent({
|
|
5513
|
-
name: COMPONENT_NAME$
|
|
5524
|
+
name: COMPONENT_NAME$1l,
|
|
5514
5525
|
props: {
|
|
5515
5526
|
value: Array,
|
|
5516
5527
|
firstDayOfWeek: {
|
|
@@ -5719,9 +5730,9 @@ const DateTable = /* @__PURE__ */ defineComponent({
|
|
|
5719
5730
|
|
|
5720
5731
|
/** @jsxImportSource vue */
|
|
5721
5732
|
|
|
5722
|
-
const COMPONENT_NAME$
|
|
5733
|
+
const COMPONENT_NAME$1k = 'vc-month-table';
|
|
5723
5734
|
const MonthTable = /* @__PURE__ */ defineComponent({
|
|
5724
|
-
name: COMPONENT_NAME$
|
|
5735
|
+
name: COMPONENT_NAME$1k,
|
|
5725
5736
|
props: {
|
|
5726
5737
|
value: Array,
|
|
5727
5738
|
panelDate: Date,
|
|
@@ -5853,7 +5864,7 @@ const MonthTable = /* @__PURE__ */ defineComponent({
|
|
|
5853
5864
|
|
|
5854
5865
|
/** @jsxImportSource vue */
|
|
5855
5866
|
|
|
5856
|
-
const COMPONENT_NAME$
|
|
5867
|
+
const COMPONENT_NAME$1j = 'vc-quarter-table';
|
|
5857
5868
|
|
|
5858
5869
|
/**
|
|
5859
5870
|
* 获取季度对应的月份范围
|
|
@@ -5887,7 +5898,7 @@ const getQuarterRangeByMonth = value => {
|
|
|
5887
5898
|
}
|
|
5888
5899
|
};
|
|
5889
5900
|
const QuarterTable = /* @__PURE__ */ defineComponent({
|
|
5890
|
-
name: COMPONENT_NAME$
|
|
5901
|
+
name: COMPONENT_NAME$1j,
|
|
5891
5902
|
props: {
|
|
5892
5903
|
value: Array,
|
|
5893
5904
|
panelDate: Date,
|
|
@@ -6010,9 +6021,9 @@ const QuarterTable = /* @__PURE__ */ defineComponent({
|
|
|
6010
6021
|
|
|
6011
6022
|
/** @jsxImportSource vue */
|
|
6012
6023
|
|
|
6013
|
-
const COMPONENT_NAME$
|
|
6024
|
+
const COMPONENT_NAME$1i = 'vc-shortcuts-select';
|
|
6014
6025
|
const ShortcutsSelect = /* @__PURE__ */ defineComponent({
|
|
6015
|
-
name: COMPONENT_NAME$
|
|
6026
|
+
name: COMPONENT_NAME$1i,
|
|
6016
6027
|
props: {
|
|
6017
6028
|
panelDate: Date,
|
|
6018
6029
|
config: Array,
|
|
@@ -6052,9 +6063,9 @@ const ShortcutsSelect = /* @__PURE__ */ defineComponent({
|
|
|
6052
6063
|
|
|
6053
6064
|
/** @jsxImportSource vue */
|
|
6054
6065
|
|
|
6055
|
-
const COMPONENT_NAME$
|
|
6066
|
+
const COMPONENT_NAME$1h = 'vc-time-select';
|
|
6056
6067
|
const TimeSelect = /* @__PURE__ */ defineComponent({
|
|
6057
|
-
name: COMPONENT_NAME$
|
|
6068
|
+
name: COMPONENT_NAME$1h,
|
|
6058
6069
|
props: {
|
|
6059
6070
|
hours: {
|
|
6060
6071
|
type: [Number, String],
|
|
@@ -6333,9 +6344,9 @@ const TimeSelect = /* @__PURE__ */ defineComponent({
|
|
|
6333
6344
|
|
|
6334
6345
|
/** @jsxImportSource vue */
|
|
6335
6346
|
|
|
6336
|
-
const COMPONENT_NAME$
|
|
6347
|
+
const COMPONENT_NAME$1g = 'vc-year-table';
|
|
6337
6348
|
const YearTable = /* @__PURE__ */ defineComponent({
|
|
6338
|
-
name: COMPONENT_NAME$
|
|
6349
|
+
name: COMPONENT_NAME$1g,
|
|
6339
6350
|
props: {
|
|
6340
6351
|
value: Array,
|
|
6341
6352
|
panelDate: Date,
|
|
@@ -6458,9 +6469,9 @@ const getDateIsInRange = (value, type, leftPanelDate, rightPanelDate) => {
|
|
|
6458
6469
|
}
|
|
6459
6470
|
return true;
|
|
6460
6471
|
};
|
|
6461
|
-
const COMPONENT_NAME$
|
|
6472
|
+
const COMPONENT_NAME$1f = 'vc-date-range-panel';
|
|
6462
6473
|
const DateRangePanel = /* @__PURE__ */ defineComponent({
|
|
6463
|
-
name: COMPONENT_NAME$
|
|
6474
|
+
name: COMPONENT_NAME$1f,
|
|
6464
6475
|
props: {
|
|
6465
6476
|
...props$V,
|
|
6466
6477
|
confirm: {
|
|
@@ -6839,9 +6850,9 @@ const DateRangePanel = /* @__PURE__ */ defineComponent({
|
|
|
6839
6850
|
|
|
6840
6851
|
/** @jsxImportSource vue */
|
|
6841
6852
|
|
|
6842
|
-
const COMPONENT_NAME$
|
|
6853
|
+
const COMPONENT_NAME$1e = 'vc-date-panel';
|
|
6843
6854
|
const DatePanel = /* @__PURE__ */ defineComponent({
|
|
6844
|
-
name: COMPONENT_NAME$
|
|
6855
|
+
name: COMPONENT_NAME$1e,
|
|
6845
6856
|
props: {
|
|
6846
6857
|
...props$V,
|
|
6847
6858
|
type: String,
|
|
@@ -7049,9 +7060,9 @@ const isEqualYear$1 = value => {
|
|
|
7049
7060
|
const endYear = value[1].getFullYear();
|
|
7050
7061
|
return startYear === endYear;
|
|
7051
7062
|
};
|
|
7052
|
-
const COMPONENT_NAME$
|
|
7063
|
+
const COMPONENT_NAME$1d = 'vc-monthrange-panel';
|
|
7053
7064
|
const MonthRangePanel = /* @__PURE__ */ defineComponent({
|
|
7054
|
-
name: COMPONENT_NAME$
|
|
7065
|
+
name: COMPONENT_NAME$1d,
|
|
7055
7066
|
props: {
|
|
7056
7067
|
...props$V,
|
|
7057
7068
|
confirm: {
|
|
@@ -7226,9 +7237,9 @@ const isEqualYear = value => {
|
|
|
7226
7237
|
const endYear = value[1].getFullYear();
|
|
7227
7238
|
return startYear === endYear;
|
|
7228
7239
|
};
|
|
7229
|
-
const COMPONENT_NAME$
|
|
7240
|
+
const COMPONENT_NAME$1c = 'vc-quarterrange-panel';
|
|
7230
7241
|
const QuarterRangePanel = /* @__PURE__ */ defineComponent({
|
|
7231
|
-
name: COMPONENT_NAME$
|
|
7242
|
+
name: COMPONENT_NAME$1c,
|
|
7232
7243
|
props: {
|
|
7233
7244
|
...props$V,
|
|
7234
7245
|
confirm: {
|
|
@@ -7467,9 +7478,9 @@ const getComparedDate = (leftDate, rightDate) => {
|
|
|
7467
7478
|
seconds
|
|
7468
7479
|
};
|
|
7469
7480
|
};
|
|
7470
|
-
const COMPONENT_NAME$
|
|
7481
|
+
const COMPONENT_NAME$1b = 'vc-timerange-panel';
|
|
7471
7482
|
const TimeRangePanel = /* @__PURE__ */ defineComponent({
|
|
7472
|
-
name: COMPONENT_NAME$
|
|
7483
|
+
name: COMPONENT_NAME$1b,
|
|
7473
7484
|
props: props$U,
|
|
7474
7485
|
emits: ['pick', 'clear', 'ok'],
|
|
7475
7486
|
setup(props, {
|
|
@@ -7568,9 +7579,9 @@ const TimeRangePanel = /* @__PURE__ */ defineComponent({
|
|
|
7568
7579
|
|
|
7569
7580
|
/** @jsxImportSource vue */
|
|
7570
7581
|
|
|
7571
|
-
const COMPONENT_NAME$
|
|
7582
|
+
const COMPONENT_NAME$1a = 'vc-time-panel';
|
|
7572
7583
|
const TimePanel = /* @__PURE__ */ defineComponent({
|
|
7573
|
-
name: COMPONENT_NAME$
|
|
7584
|
+
name: COMPONENT_NAME$1a,
|
|
7574
7585
|
props: props$U,
|
|
7575
7586
|
emits: ['pick', 'clear', 'ok'],
|
|
7576
7587
|
setup(props, {
|
|
@@ -7625,7 +7636,7 @@ const TimePanel = /* @__PURE__ */ defineComponent({
|
|
|
7625
7636
|
|
|
7626
7637
|
/** @jsxImportSource vue */
|
|
7627
7638
|
|
|
7628
|
-
const COMPONENT_NAME$
|
|
7639
|
+
const COMPONENT_NAME$19 = 'vc-date-picker';
|
|
7629
7640
|
const getPanel$1 = type => {
|
|
7630
7641
|
if (['daterange', 'datetimerange'].includes(type)) {
|
|
7631
7642
|
return DateRangePanel;
|
|
@@ -7636,7 +7647,7 @@ const getPanel$1 = type => {
|
|
|
7636
7647
|
}
|
|
7637
7648
|
return DatePanel;
|
|
7638
7649
|
};
|
|
7639
|
-
const DatePicker = createPicker(COMPONENT_NAME$
|
|
7650
|
+
const DatePicker = createPicker(COMPONENT_NAME$19, props$10, () => {
|
|
7640
7651
|
const props = getCurrentInstance().props;
|
|
7641
7652
|
const icon = ref('date');
|
|
7642
7653
|
const panel = shallowRef({});
|
|
@@ -7669,9 +7680,9 @@ const props$T = {
|
|
|
7669
7680
|
|
|
7670
7681
|
/** @jsxImportSource vue */
|
|
7671
7682
|
|
|
7672
|
-
const COMPONENT_NAME$
|
|
7683
|
+
const COMPONENT_NAME$18 = 'vc-divider';
|
|
7673
7684
|
const Divider = /* @__PURE__ */ defineComponent({
|
|
7674
|
-
name: COMPONENT_NAME$
|
|
7685
|
+
name: COMPONENT_NAME$18,
|
|
7675
7686
|
props: props$T,
|
|
7676
7687
|
setup(props, {
|
|
7677
7688
|
slots
|
|
@@ -7826,7 +7837,7 @@ const props$Q = {
|
|
|
7826
7837
|
|
|
7827
7838
|
/** @jsxImportSource vue */
|
|
7828
7839
|
|
|
7829
|
-
const COMPONENT_NAME$
|
|
7840
|
+
const COMPONENT_NAME$17 = 'vc-scroller-track';
|
|
7830
7841
|
const BAR_MAP = {
|
|
7831
7842
|
vertical: {
|
|
7832
7843
|
scroll: 'scrollTop',
|
|
@@ -7846,7 +7857,7 @@ const BAR_MAP = {
|
|
|
7846
7857
|
}
|
|
7847
7858
|
};
|
|
7848
7859
|
const Track = /* @__PURE__ */ defineComponent({
|
|
7849
|
-
name: COMPONENT_NAME$
|
|
7860
|
+
name: COMPONENT_NAME$17,
|
|
7850
7861
|
props: props$S,
|
|
7851
7862
|
emits: ['change'],
|
|
7852
7863
|
inheritAttrs: false,
|
|
@@ -8036,9 +8047,9 @@ const Track = /* @__PURE__ */ defineComponent({
|
|
|
8036
8047
|
|
|
8037
8048
|
/** @jsxImportSource vue */
|
|
8038
8049
|
|
|
8039
|
-
const COMPONENT_NAME$
|
|
8050
|
+
const COMPONENT_NAME$16 = 'vc-scroller-bar';
|
|
8040
8051
|
const Bar = /* @__PURE__ */ defineComponent({
|
|
8041
|
-
name: COMPONENT_NAME$
|
|
8052
|
+
name: COMPONENT_NAME$16,
|
|
8042
8053
|
props: props$R,
|
|
8043
8054
|
emits: ['change'],
|
|
8044
8055
|
setup(props, {
|
|
@@ -8253,7 +8264,7 @@ const useScroller = (expose) => {
|
|
|
8253
8264
|
|
|
8254
8265
|
/** @jsxImportSource vue */
|
|
8255
8266
|
|
|
8256
|
-
const COMPONENT_NAME$
|
|
8267
|
+
const COMPONENT_NAME$15 = 'vc-scroller';
|
|
8257
8268
|
|
|
8258
8269
|
/**
|
|
8259
8270
|
* 作为备选方案,目前推荐使用ScrollerWheel
|
|
@@ -8264,7 +8275,7 @@ const COMPONENT_NAME$14 = 'vc-scroller';
|
|
|
8264
8275
|
* 2. 增加了一层嵌套
|
|
8265
8276
|
*/
|
|
8266
8277
|
const Scroller = /* @__PURE__ */ defineComponent({
|
|
8267
|
-
name: COMPONENT_NAME$
|
|
8278
|
+
name: COMPONENT_NAME$15,
|
|
8268
8279
|
props: props$Q,
|
|
8269
8280
|
emits: ['scroll'],
|
|
8270
8281
|
setup(props, {
|
|
@@ -8325,7 +8336,7 @@ const Scroller = /* @__PURE__ */ defineComponent({
|
|
|
8325
8336
|
|
|
8326
8337
|
/** @jsxImportSource vue */
|
|
8327
8338
|
|
|
8328
|
-
const COMPONENT_NAME$
|
|
8339
|
+
const COMPONENT_NAME$14 = 'vc-scroller-wheel';
|
|
8329
8340
|
|
|
8330
8341
|
/**
|
|
8331
8342
|
* 为减少一层嵌套,为去除滚动bar的抖动,使用wheel模拟
|
|
@@ -8347,7 +8358,7 @@ const COMPONENT_NAME$13 = 'vc-scroller-wheel';
|
|
|
8347
8358
|
* 设置scrollTop不会reflow和repaint,不需要考虑transfrom来改变content(transform也只在draw完成)
|
|
8348
8359
|
*/
|
|
8349
8360
|
const ScrollerWheel = /* @__PURE__ */ defineComponent({
|
|
8350
|
-
name: COMPONENT_NAME$
|
|
8361
|
+
name: COMPONENT_NAME$14,
|
|
8351
8362
|
props: Object.assign(props$Q, {
|
|
8352
8363
|
stopPropagation: {
|
|
8353
8364
|
type: Boolean,
|
|
@@ -8526,9 +8537,9 @@ const props$P = {
|
|
|
8526
8537
|
|
|
8527
8538
|
/** @jsxImportSource vue */
|
|
8528
8539
|
|
|
8529
|
-
const COMPONENT_NAME$
|
|
8540
|
+
const COMPONENT_NAME$13 = 'vc-drawer';
|
|
8530
8541
|
const DrawerView = /* @__PURE__ */ defineComponent({
|
|
8531
|
-
name: COMPONENT_NAME$
|
|
8542
|
+
name: COMPONENT_NAME$13,
|
|
8532
8543
|
props: props$P,
|
|
8533
8544
|
emits: ['close', 'update:modelValue', 'visible-change'],
|
|
8534
8545
|
setup(props, {
|
|
@@ -8701,9 +8712,9 @@ const props$O = {
|
|
|
8701
8712
|
|
|
8702
8713
|
/** @jsxImportSource vue */
|
|
8703
8714
|
|
|
8704
|
-
const COMPONENT_NAME$
|
|
8715
|
+
const COMPONENT_NAME$12 = 'vc-dropdown';
|
|
8705
8716
|
const Dropdown = /* @__PURE__ */ defineComponent({
|
|
8706
|
-
name: COMPONENT_NAME$
|
|
8717
|
+
name: COMPONENT_NAME$12,
|
|
8707
8718
|
props: props$O,
|
|
8708
8719
|
setup(props, {
|
|
8709
8720
|
slots
|
|
@@ -8727,9 +8738,9 @@ const props$N = {
|
|
|
8727
8738
|
|
|
8728
8739
|
/** @jsxImportSource vue */
|
|
8729
8740
|
|
|
8730
|
-
const COMPONENT_NAME$
|
|
8741
|
+
const COMPONENT_NAME$11 = 'vc-editor';
|
|
8731
8742
|
const Editor = /* @__PURE__ */ defineComponent({
|
|
8732
|
-
name: COMPONENT_NAME$
|
|
8743
|
+
name: COMPONENT_NAME$11,
|
|
8733
8744
|
props: props$N,
|
|
8734
8745
|
setup(props, {
|
|
8735
8746
|
slots
|
|
@@ -8873,9 +8884,9 @@ const useForm = (expose, options = {}) => {
|
|
|
8873
8884
|
});
|
|
8874
8885
|
};
|
|
8875
8886
|
|
|
8876
|
-
const COMPONENT_NAME
|
|
8887
|
+
const COMPONENT_NAME$10 = "vc-form";
|
|
8877
8888
|
const Form = defineComponent({
|
|
8878
|
-
name: COMPONENT_NAME
|
|
8889
|
+
name: COMPONENT_NAME$10,
|
|
8879
8890
|
props: props$M,
|
|
8880
8891
|
setup(props, { slots, expose }) {
|
|
8881
8892
|
useForm(expose);
|
|
@@ -9195,9 +9206,9 @@ const useFormItem = (expose) => {
|
|
|
9195
9206
|
|
|
9196
9207
|
/** @jsxImportSource vue */
|
|
9197
9208
|
|
|
9198
|
-
const COMPONENT_NAME
|
|
9209
|
+
const COMPONENT_NAME$$ = 'vc-form-item';
|
|
9199
9210
|
const FormItem = /* @__PURE__ */ defineComponent({
|
|
9200
|
-
name: COMPONENT_NAME
|
|
9211
|
+
name: COMPONENT_NAME$$,
|
|
9201
9212
|
props: props$L,
|
|
9202
9213
|
setup(props, {
|
|
9203
9214
|
slots,
|
|
@@ -9262,9 +9273,9 @@ const props$K = {
|
|
|
9262
9273
|
}
|
|
9263
9274
|
};
|
|
9264
9275
|
|
|
9265
|
-
const COMPONENT_NAME$
|
|
9276
|
+
const COMPONENT_NAME$_ = "vcm-form";
|
|
9266
9277
|
const MForm = defineComponent({
|
|
9267
|
-
name: COMPONENT_NAME$
|
|
9278
|
+
name: COMPONENT_NAME$_,
|
|
9268
9279
|
props: props$K,
|
|
9269
9280
|
setup(props, { slots, expose }) {
|
|
9270
9281
|
useForm(expose, {
|
|
@@ -9295,9 +9306,9 @@ const props$J = {
|
|
|
9295
9306
|
|
|
9296
9307
|
/** @jsxImportSource vue */
|
|
9297
9308
|
|
|
9298
|
-
const COMPONENT_NAME$
|
|
9309
|
+
const COMPONENT_NAME$Z = 'vcm-form-item';
|
|
9299
9310
|
const MFormItem = /* @__PURE__ */ defineComponent({
|
|
9300
|
-
name: COMPONENT_NAME$
|
|
9311
|
+
name: COMPONENT_NAME$Z,
|
|
9301
9312
|
props: props$J,
|
|
9302
9313
|
setup(props, {
|
|
9303
9314
|
slots,
|
|
@@ -9351,9 +9362,9 @@ const MFormItem = /* @__PURE__ */ defineComponent({
|
|
|
9351
9362
|
}
|
|
9352
9363
|
});
|
|
9353
9364
|
|
|
9354
|
-
const COMPONENT_NAME$
|
|
9365
|
+
const COMPONENT_NAME$Y = "vc-fragment";
|
|
9355
9366
|
const Fragment = defineComponent({
|
|
9356
|
-
name: COMPONENT_NAME$
|
|
9367
|
+
name: COMPONENT_NAME$Y,
|
|
9357
9368
|
setup(_, { slots }) {
|
|
9358
9369
|
return () => h(Fragment$1, slots.default?.());
|
|
9359
9370
|
}
|
|
@@ -9370,9 +9381,9 @@ const props$I = {
|
|
|
9370
9381
|
|
|
9371
9382
|
/** @jsxImportSource vue */
|
|
9372
9383
|
|
|
9373
|
-
const COMPONENT_NAME$
|
|
9384
|
+
const COMPONENT_NAME$X = 'vc-html-to-image';
|
|
9374
9385
|
const HTMLToImage = /* @__PURE__ */ defineComponent({
|
|
9375
|
-
name: COMPONENT_NAME$
|
|
9386
|
+
name: COMPONENT_NAME$X,
|
|
9376
9387
|
props: props$I,
|
|
9377
9388
|
setup(props, {
|
|
9378
9389
|
slots
|
|
@@ -9448,7 +9459,7 @@ const IMGStore$1 = new IMGStore();
|
|
|
9448
9459
|
|
|
9449
9460
|
/** @jsxImportSource vue */
|
|
9450
9461
|
|
|
9451
|
-
const COMPONENT_NAME$
|
|
9462
|
+
const COMPONENT_NAME$W = 'vc-image';
|
|
9452
9463
|
let isSupportObjectFit = false;
|
|
9453
9464
|
window.addEventListener('DOMContentLoaded', () => {
|
|
9454
9465
|
isSupportObjectFit = !IS_SERVER$1 && document.documentElement.style.objectFit !== undefined;
|
|
@@ -9461,7 +9472,7 @@ const ObjectFit = {
|
|
|
9461
9472
|
SCALE_DOWN: 'scale-down'
|
|
9462
9473
|
};
|
|
9463
9474
|
const Image = /* @__PURE__ */ defineComponent({
|
|
9464
|
-
name: COMPONENT_NAME$
|
|
9475
|
+
name: COMPONENT_NAME$W,
|
|
9465
9476
|
inheritAttrs: false,
|
|
9466
9477
|
props: props$H,
|
|
9467
9478
|
setup(props, {
|
|
@@ -9666,9 +9677,9 @@ const props$G = {
|
|
|
9666
9677
|
|
|
9667
9678
|
/** @jsxImportSource vue */
|
|
9668
9679
|
|
|
9669
|
-
const COMPONENT_NAME$
|
|
9680
|
+
const COMPONENT_NAME$V = 'vc-image-crop';
|
|
9670
9681
|
const ImageCrop = /* @__PURE__ */ defineComponent({
|
|
9671
|
-
name: COMPONENT_NAME$
|
|
9682
|
+
name: COMPONENT_NAME$V,
|
|
9672
9683
|
props: props$G,
|
|
9673
9684
|
setup(props, {
|
|
9674
9685
|
slots
|
|
@@ -9692,9 +9703,9 @@ const props$F = {
|
|
|
9692
9703
|
|
|
9693
9704
|
/** @jsxImportSource vue */
|
|
9694
9705
|
|
|
9695
|
-
const COMPONENT_NAME$
|
|
9706
|
+
const COMPONENT_NAME$U = 'vc-image-preview';
|
|
9696
9707
|
const ImagePreview = /* @__PURE__ */ defineComponent({
|
|
9697
|
-
name: COMPONENT_NAME$
|
|
9708
|
+
name: COMPONENT_NAME$U,
|
|
9698
9709
|
props: props$F,
|
|
9699
9710
|
setup(props, {
|
|
9700
9711
|
slots
|
|
@@ -9718,9 +9729,9 @@ const props$E = {
|
|
|
9718
9729
|
|
|
9719
9730
|
/** @jsxImportSource vue */
|
|
9720
9731
|
|
|
9721
|
-
const COMPONENT_NAME$
|
|
9732
|
+
const COMPONENT_NAME$T = 'vc-image-processing';
|
|
9722
9733
|
const ImageProcessing = /* @__PURE__ */ defineComponent({
|
|
9723
|
-
name: COMPONENT_NAME$
|
|
9734
|
+
name: COMPONENT_NAME$T,
|
|
9724
9735
|
props: props$E,
|
|
9725
9736
|
setup(props, {
|
|
9726
9737
|
slots
|
|
@@ -9737,9 +9748,9 @@ const MImageProcessing = ImageProcessing;
|
|
|
9737
9748
|
|
|
9738
9749
|
/** @jsxImportSource vue */
|
|
9739
9750
|
|
|
9740
|
-
const COMPONENT_NAME$
|
|
9751
|
+
const COMPONENT_NAME$S = 'vcm-input';
|
|
9741
9752
|
const MInput = /* @__PURE__ */ defineComponent({
|
|
9742
|
-
name: COMPONENT_NAME$
|
|
9753
|
+
name: COMPONENT_NAME$S,
|
|
9743
9754
|
inheritAttrs: false,
|
|
9744
9755
|
props: {
|
|
9745
9756
|
...props$$,
|
|
@@ -9828,9 +9839,9 @@ const MInput = /* @__PURE__ */ defineComponent({
|
|
|
9828
9839
|
|
|
9829
9840
|
/** @jsxImportSource vue */
|
|
9830
9841
|
|
|
9831
|
-
const COMPONENT_NAME$
|
|
9842
|
+
const COMPONENT_NAME$R = 'vcm-input-number';
|
|
9832
9843
|
const MInputNumber = /* @__PURE__ */ defineComponent({
|
|
9833
|
-
name: COMPONENT_NAME$
|
|
9844
|
+
name: COMPONENT_NAME$R,
|
|
9834
9845
|
props: props$X,
|
|
9835
9846
|
inheritAttrs: false,
|
|
9836
9847
|
setup(props, {
|
|
@@ -9879,9 +9890,9 @@ const MInputNumber = /* @__PURE__ */ defineComponent({
|
|
|
9879
9890
|
|
|
9880
9891
|
/** @jsxImportSource vue */
|
|
9881
9892
|
|
|
9882
|
-
const COMPONENT_NAME$
|
|
9893
|
+
const COMPONENT_NAME$Q = 'vcm-input-search';
|
|
9883
9894
|
const MInputSearch = /* @__PURE__ */ defineComponent({
|
|
9884
|
-
name: COMPONENT_NAME$
|
|
9895
|
+
name: COMPONENT_NAME$Q,
|
|
9885
9896
|
props: {
|
|
9886
9897
|
...props$W,
|
|
9887
9898
|
cancelText: {
|
|
@@ -9958,9 +9969,9 @@ const props$D = {
|
|
|
9958
9969
|
}
|
|
9959
9970
|
};
|
|
9960
9971
|
|
|
9961
|
-
const COMPONENT_NAME$
|
|
9972
|
+
const COMPONENT_NAME$P = "vcm-list";
|
|
9962
9973
|
const MList = defineComponent({
|
|
9963
|
-
name: COMPONENT_NAME$
|
|
9974
|
+
name: COMPONENT_NAME$P,
|
|
9964
9975
|
props: props$D,
|
|
9965
9976
|
setup(props, { slots }) {
|
|
9966
9977
|
provide("vc-list", { props });
|
|
@@ -10015,10 +10026,10 @@ const props$C = {
|
|
|
10015
10026
|
|
|
10016
10027
|
/** @jsxImportSource vue */
|
|
10017
10028
|
|
|
10018
|
-
const COMPONENT_NAME$
|
|
10029
|
+
const COMPONENT_NAME$O = 'vcm-list-item';
|
|
10019
10030
|
const HTTP_REGEX = /[a-zA-z]+:\/\/[^\s]*/;
|
|
10020
10031
|
const MListItem = /* @__PURE__ */ defineComponent({
|
|
10021
|
-
name: COMPONENT_NAME$
|
|
10032
|
+
name: COMPONENT_NAME$O,
|
|
10022
10033
|
props: props$C,
|
|
10023
10034
|
emits: ['click'],
|
|
10024
10035
|
setup(props, {
|
|
@@ -10112,11 +10123,11 @@ const props$B = {
|
|
|
10112
10123
|
|
|
10113
10124
|
/** @jsxImportSource vue */
|
|
10114
10125
|
|
|
10115
|
-
const COMPONENT_NAME$
|
|
10126
|
+
const COMPONENT_NAME$N = 'vc-marquee';
|
|
10116
10127
|
const ANIMATION = prefixStyle('animation').camel;
|
|
10117
10128
|
const TRANSFORM_KEBAB = prefixStyle('transform').kebab;
|
|
10118
10129
|
const Marquee = /* @__PURE__ */ defineComponent({
|
|
10119
|
-
name: COMPONENT_NAME$
|
|
10130
|
+
name: COMPONENT_NAME$N,
|
|
10120
10131
|
props: props$B,
|
|
10121
10132
|
setup(props, {
|
|
10122
10133
|
slots
|
|
@@ -10184,9 +10195,9 @@ const props$A = {
|
|
|
10184
10195
|
}
|
|
10185
10196
|
};
|
|
10186
10197
|
|
|
10187
|
-
const COMPONENT_NAME$
|
|
10198
|
+
const COMPONENT_NAME$M = "vc-resizer";
|
|
10188
10199
|
const Resizer = defineComponent({
|
|
10189
|
-
name: COMPONENT_NAME$
|
|
10200
|
+
name: COMPONENT_NAME$M,
|
|
10190
10201
|
props: props$A,
|
|
10191
10202
|
emit: ["resize", "change"],
|
|
10192
10203
|
setup(props, { emit, slots, expose }) {
|
|
@@ -10333,10 +10344,10 @@ const props$z = {
|
|
|
10333
10344
|
|
|
10334
10345
|
/** @jsxImportSource vue */
|
|
10335
10346
|
|
|
10336
|
-
const COMPONENT_NAME$
|
|
10347
|
+
const COMPONENT_NAME$L = 'vc-modal';
|
|
10337
10348
|
let zIndexNumber = 1002;
|
|
10338
10349
|
const ModalView = /* @__PURE__ */ defineComponent({
|
|
10339
|
-
name: COMPONENT_NAME$
|
|
10350
|
+
name: COMPONENT_NAME$L,
|
|
10340
10351
|
emits: ['update:modelValue', 'close', 'portal-fulfilled', 'visible-change', 'ok', 'cancel'],
|
|
10341
10352
|
props: props$z,
|
|
10342
10353
|
setup(props, {
|
|
@@ -10763,9 +10774,9 @@ const props$y = {
|
|
|
10763
10774
|
|
|
10764
10775
|
/** @jsxImportSource vue */
|
|
10765
10776
|
|
|
10766
|
-
const COMPONENT_NAME$
|
|
10777
|
+
const COMPONENT_NAME$K = 'vc-modal';
|
|
10767
10778
|
const MModalView = /* @__PURE__ */ defineComponent({
|
|
10768
|
-
name: COMPONENT_NAME$
|
|
10779
|
+
name: COMPONENT_NAME$K,
|
|
10769
10780
|
emits: ['update:modelValue', 'portal-fulfilled', 'close', 'ok', 'cancel'],
|
|
10770
10781
|
props: props$y,
|
|
10771
10782
|
setup(props, {
|
|
@@ -10977,9 +10988,9 @@ const props$x = {
|
|
|
10977
10988
|
|
|
10978
10989
|
/** @jsxImportSource vue */
|
|
10979
10990
|
|
|
10980
|
-
const COMPONENT_NAME$
|
|
10991
|
+
const COMPONENT_NAME$J = 'vc-notice';
|
|
10981
10992
|
const NoticeView = /* @__PURE__ */ defineComponent({
|
|
10982
|
-
name: COMPONENT_NAME$
|
|
10993
|
+
name: COMPONENT_NAME$J,
|
|
10983
10994
|
props: props$x,
|
|
10984
10995
|
emits: ['portal-fulfilled', 'close', 'before-close'],
|
|
10985
10996
|
setup(props, {
|
|
@@ -11152,9 +11163,9 @@ const props$w = {
|
|
|
11152
11163
|
|
|
11153
11164
|
/** @jsxImportSource vue */
|
|
11154
11165
|
|
|
11155
|
-
const COMPONENT_NAME$
|
|
11166
|
+
const COMPONENT_NAME$I = 'vc-option';
|
|
11156
11167
|
const Option$1 = /* @__PURE__ */ defineComponent({
|
|
11157
|
-
name: COMPONENT_NAME$
|
|
11168
|
+
name: COMPONENT_NAME$I,
|
|
11158
11169
|
props: props$w,
|
|
11159
11170
|
setup(props, {
|
|
11160
11171
|
slots
|
|
@@ -11267,9 +11278,9 @@ const props$u = {
|
|
|
11267
11278
|
|
|
11268
11279
|
/** @jsxImportSource vue */
|
|
11269
11280
|
|
|
11270
|
-
const COMPONENT_NAME$
|
|
11281
|
+
const COMPONENT_NAME$H = 'vc-tag';
|
|
11271
11282
|
const Tag = /* @__PURE__ */ defineComponent({
|
|
11272
|
-
name: COMPONENT_NAME$
|
|
11283
|
+
name: COMPONENT_NAME$H,
|
|
11273
11284
|
props: props$u,
|
|
11274
11285
|
emits: ['close', 'change'],
|
|
11275
11286
|
setup(props, {
|
|
@@ -11338,9 +11349,9 @@ const props$t = {
|
|
|
11338
11349
|
|
|
11339
11350
|
/** @jsxImportSource vue */
|
|
11340
11351
|
|
|
11341
|
-
const COMPONENT_NAME$
|
|
11352
|
+
const COMPONENT_NAME$G = 'vc-select-option';
|
|
11342
11353
|
const Option = /* @__PURE__ */ defineComponent({
|
|
11343
|
-
name: COMPONENT_NAME$
|
|
11354
|
+
name: COMPONENT_NAME$G,
|
|
11344
11355
|
props: props$t,
|
|
11345
11356
|
setup(props, {
|
|
11346
11357
|
slots
|
|
@@ -11413,9 +11424,9 @@ const props$s = {
|
|
|
11413
11424
|
|
|
11414
11425
|
/** @jsxImportSource vue */
|
|
11415
11426
|
|
|
11416
|
-
const COMPONENT_NAME$
|
|
11427
|
+
const COMPONENT_NAME$F = 'vc-select-option-group';
|
|
11417
11428
|
const OptionGroup = /* @__PURE__ */ defineComponent({
|
|
11418
|
-
name: COMPONENT_NAME$
|
|
11429
|
+
name: COMPONENT_NAME$F,
|
|
11419
11430
|
props: props$s,
|
|
11420
11431
|
setup(props, {
|
|
11421
11432
|
slots
|
|
@@ -11434,7 +11445,7 @@ const OptionGroup = /* @__PURE__ */ defineComponent({
|
|
|
11434
11445
|
}
|
|
11435
11446
|
});
|
|
11436
11447
|
|
|
11437
|
-
const inputKeys = [
|
|
11448
|
+
const inputKeys$1 = [
|
|
11438
11449
|
"id",
|
|
11439
11450
|
"disabled",
|
|
11440
11451
|
"modelValue",
|
|
@@ -11446,7 +11457,7 @@ const popoverKeys = [
|
|
|
11446
11457
|
];
|
|
11447
11458
|
const props$r = {
|
|
11448
11459
|
...pick(props$Z, popoverKeys),
|
|
11449
|
-
...pick(props$$, inputKeys),
|
|
11460
|
+
...pick(props$$, inputKeys$1),
|
|
11450
11461
|
data: {
|
|
11451
11462
|
type: Array,
|
|
11452
11463
|
default: () => []
|
|
@@ -11513,9 +11524,9 @@ const props$r = {
|
|
|
11513
11524
|
function _isSlot$1(s) {
|
|
11514
11525
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
11515
11526
|
}
|
|
11516
|
-
const COMPONENT_NAME$
|
|
11527
|
+
const COMPONENT_NAME$E = 'vc-select';
|
|
11517
11528
|
const Select = /* @__PURE__ */ defineComponent({
|
|
11518
|
-
name: COMPONENT_NAME$
|
|
11529
|
+
name: COMPONENT_NAME$E,
|
|
11519
11530
|
props: props$r,
|
|
11520
11531
|
emits: ['ready', 'close', 'visible-change', 'clear', 'change', 'update:modelValue'],
|
|
11521
11532
|
setup(props, {
|
|
@@ -11759,9 +11770,9 @@ const Select = /* @__PURE__ */ defineComponent({
|
|
|
11759
11770
|
|
|
11760
11771
|
/** @jsxImportSource vue */
|
|
11761
11772
|
|
|
11762
|
-
const COMPONENT_NAME$
|
|
11773
|
+
const COMPONENT_NAME$D = 'vc-pagination';
|
|
11763
11774
|
const Pagination = /* @__PURE__ */ defineComponent({
|
|
11764
|
-
name: COMPONENT_NAME$
|
|
11775
|
+
name: COMPONENT_NAME$D,
|
|
11765
11776
|
props: props$v,
|
|
11766
11777
|
emits: ['update:current', 'change', 'page-size-change'],
|
|
11767
11778
|
setup(props, {
|
|
@@ -11959,9 +11970,9 @@ const props$q = {
|
|
|
11959
11970
|
|
|
11960
11971
|
/** @jsxImportSource vue */
|
|
11961
11972
|
|
|
11962
|
-
const COMPONENT_NAME$
|
|
11973
|
+
const COMPONENT_NAME$C = 'vc-picker';
|
|
11963
11974
|
const Picker = /* @__PURE__ */ defineComponent({
|
|
11964
|
-
name: COMPONENT_NAME$
|
|
11975
|
+
name: COMPONENT_NAME$C,
|
|
11965
11976
|
props: props$q,
|
|
11966
11977
|
setup(props, {
|
|
11967
11978
|
slots
|
|
@@ -11985,9 +11996,9 @@ const props$p = {
|
|
|
11985
11996
|
|
|
11986
11997
|
/** @jsxImportSource vue */
|
|
11987
11998
|
|
|
11988
|
-
const COMPONENT_NAME$
|
|
11999
|
+
const COMPONENT_NAME$B = 'vc-popconfirm';
|
|
11989
12000
|
const Popconfirm = /* @__PURE__ */ defineComponent({
|
|
11990
|
-
name: COMPONENT_NAME$
|
|
12001
|
+
name: COMPONENT_NAME$B,
|
|
11991
12002
|
props: props$p,
|
|
11992
12003
|
setup(props, {
|
|
11993
12004
|
slots
|
|
@@ -12013,9 +12024,9 @@ const props$o = {
|
|
|
12013
12024
|
|
|
12014
12025
|
/** @jsxImportSource vue */
|
|
12015
12026
|
|
|
12016
|
-
const COMPONENT_NAME$
|
|
12027
|
+
const COMPONENT_NAME$A = 'vc-popup';
|
|
12017
12028
|
const Popup = /* @__PURE__ */ defineComponent({
|
|
12018
|
-
name: COMPONENT_NAME$
|
|
12029
|
+
name: COMPONENT_NAME$A,
|
|
12019
12030
|
props: props$o,
|
|
12020
12031
|
setup(props, {
|
|
12021
12032
|
slots
|
|
@@ -12042,9 +12053,9 @@ const props$n = {
|
|
|
12042
12053
|
|
|
12043
12054
|
/** @jsxImportSource vue */
|
|
12044
12055
|
|
|
12045
|
-
const COMPONENT_NAME$
|
|
12056
|
+
const COMPONENT_NAME$z = 'vc-print';
|
|
12046
12057
|
const Print = /* @__PURE__ */ defineComponent({
|
|
12047
|
-
name: COMPONENT_NAME$
|
|
12058
|
+
name: COMPONENT_NAME$z,
|
|
12048
12059
|
props: props$n,
|
|
12049
12060
|
setup(props, {
|
|
12050
12061
|
expose,
|
|
@@ -12146,9 +12157,9 @@ const props$m = {
|
|
|
12146
12157
|
|
|
12147
12158
|
/** @jsxImportSource vue */
|
|
12148
12159
|
|
|
12149
|
-
const COMPONENT_NAME$
|
|
12160
|
+
const COMPONENT_NAME$y = 'vc-progress-circle';
|
|
12150
12161
|
const Circle = /* @__PURE__ */ defineComponent({
|
|
12151
|
-
name: COMPONENT_NAME$
|
|
12162
|
+
name: COMPONENT_NAME$y,
|
|
12152
12163
|
props: props$m,
|
|
12153
12164
|
setup(props, {
|
|
12154
12165
|
slots
|
|
@@ -12208,9 +12219,9 @@ const Circle = /* @__PURE__ */ defineComponent({
|
|
|
12208
12219
|
|
|
12209
12220
|
/** @jsxImportSource vue */
|
|
12210
12221
|
|
|
12211
|
-
const COMPONENT_NAME$
|
|
12222
|
+
const COMPONENT_NAME$x = 'vc-progress-line';
|
|
12212
12223
|
const Line = /* @__PURE__ */ defineComponent({
|
|
12213
|
-
name: COMPONENT_NAME$
|
|
12224
|
+
name: COMPONENT_NAME$x,
|
|
12214
12225
|
props: props$m,
|
|
12215
12226
|
setup(props) {
|
|
12216
12227
|
const colorStyle = computed(() => {
|
|
@@ -12257,9 +12268,9 @@ const Line = /* @__PURE__ */ defineComponent({
|
|
|
12257
12268
|
function _isSlot(s) {
|
|
12258
12269
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
12259
12270
|
}
|
|
12260
|
-
const COMPONENT_NAME$
|
|
12271
|
+
const COMPONENT_NAME$w = 'vc-progress';
|
|
12261
12272
|
const Progress = /* @__PURE__ */ defineComponent({
|
|
12262
|
-
name: COMPONENT_NAME$
|
|
12273
|
+
name: COMPONENT_NAME$w,
|
|
12263
12274
|
props: props$m,
|
|
12264
12275
|
setup(props, {
|
|
12265
12276
|
slots
|
|
@@ -12411,9 +12422,9 @@ const useRadio = () => {
|
|
|
12411
12422
|
|
|
12412
12423
|
/** @jsxImportSource vue */
|
|
12413
12424
|
|
|
12414
|
-
const COMPONENT_NAME$
|
|
12425
|
+
const COMPONENT_NAME$v = 'vc-radio';
|
|
12415
12426
|
const Radio = /* @__PURE__ */ defineComponent({
|
|
12416
|
-
name: COMPONENT_NAME$
|
|
12427
|
+
name: COMPONENT_NAME$v,
|
|
12417
12428
|
props: props$l,
|
|
12418
12429
|
emits: ['update:modelValue', 'change'],
|
|
12419
12430
|
setup(props, {
|
|
@@ -12524,9 +12535,9 @@ const useRadioGroup = () => {
|
|
|
12524
12535
|
|
|
12525
12536
|
/** @jsxImportSource vue */
|
|
12526
12537
|
|
|
12527
|
-
const COMPONENT_NAME$
|
|
12538
|
+
const COMPONENT_NAME$u = 'vc-radio-group';
|
|
12528
12539
|
const RadioGroup = /* @__PURE__ */ defineComponent({
|
|
12529
|
-
name: COMPONENT_NAME$
|
|
12540
|
+
name: COMPONENT_NAME$u,
|
|
12530
12541
|
props: props$k,
|
|
12531
12542
|
emits: ['update:modelValue', 'change'],
|
|
12532
12543
|
setup(props, {
|
|
@@ -12548,9 +12559,9 @@ const RadioGroup = /* @__PURE__ */ defineComponent({
|
|
|
12548
12559
|
|
|
12549
12560
|
/** @jsxImportSource vue */
|
|
12550
12561
|
|
|
12551
|
-
const COMPONENT_NAME$
|
|
12562
|
+
const COMPONENT_NAME$t = 'vcm-radio';
|
|
12552
12563
|
const MRadio = /* @__PURE__ */ defineComponent({
|
|
12553
|
-
name: COMPONENT_NAME$
|
|
12564
|
+
name: COMPONENT_NAME$t,
|
|
12554
12565
|
props: props$l,
|
|
12555
12566
|
emits: ['update:modelValue', 'change'],
|
|
12556
12567
|
setup(props, {
|
|
@@ -12591,9 +12602,9 @@ const MRadio = /* @__PURE__ */ defineComponent({
|
|
|
12591
12602
|
|
|
12592
12603
|
/** @jsxImportSource vue */
|
|
12593
12604
|
|
|
12594
|
-
const COMPONENT_NAME$
|
|
12605
|
+
const COMPONENT_NAME$s = 'vcm-radio-group';
|
|
12595
12606
|
const MRadioGroup = /* @__PURE__ */ defineComponent({
|
|
12596
|
-
name: COMPONENT_NAME$
|
|
12607
|
+
name: COMPONENT_NAME$s,
|
|
12597
12608
|
props: props$k,
|
|
12598
12609
|
emits: ['update:modelValue', 'change'],
|
|
12599
12610
|
setup(props, {
|
|
@@ -12622,9 +12633,9 @@ const props$j = {
|
|
|
12622
12633
|
|
|
12623
12634
|
/** @jsxImportSource vue */
|
|
12624
12635
|
|
|
12625
|
-
const COMPONENT_NAME$
|
|
12636
|
+
const COMPONENT_NAME$r = 'vc-rate';
|
|
12626
12637
|
const Rate = /* @__PURE__ */ defineComponent({
|
|
12627
|
-
name: COMPONENT_NAME$
|
|
12638
|
+
name: COMPONENT_NAME$r,
|
|
12628
12639
|
props: props$j,
|
|
12629
12640
|
setup(props, {
|
|
12630
12641
|
slots
|
|
@@ -12692,9 +12703,9 @@ const props$i = {
|
|
|
12692
12703
|
|
|
12693
12704
|
/** @jsxImportSource vue */
|
|
12694
12705
|
|
|
12695
|
-
const COMPONENT_NAME$
|
|
12706
|
+
const COMPONENT_NAME$q = 'vc-recycle-list-scroll-state';
|
|
12696
12707
|
const ScrollState = /* @__PURE__ */ defineComponent({
|
|
12697
|
-
name: COMPONENT_NAME$
|
|
12708
|
+
name: COMPONENT_NAME$q,
|
|
12698
12709
|
setup(_, {
|
|
12699
12710
|
slots
|
|
12700
12711
|
}) {
|
|
@@ -12824,12 +12835,12 @@ const useDirectionKeys = () => {
|
|
|
12824
12835
|
|
|
12825
12836
|
/** @jsxImportSource vue */
|
|
12826
12837
|
|
|
12827
|
-
const COMPONENT_NAME$
|
|
12838
|
+
const COMPONENT_NAME$p = 'vc-recycle-list-container';
|
|
12828
12839
|
|
|
12829
12840
|
// TODO: 抽离
|
|
12830
12841
|
const transformKey = $.prefixStyle('transform').camel;
|
|
12831
12842
|
const Container = /* @__PURE__ */ defineComponent({
|
|
12832
|
-
name: COMPONENT_NAME$
|
|
12843
|
+
name: COMPONENT_NAME$p,
|
|
12833
12844
|
props: props$h,
|
|
12834
12845
|
emits: ['refresh'],
|
|
12835
12846
|
setup(props, {
|
|
@@ -12927,9 +12938,9 @@ const Container = /* @__PURE__ */ defineComponent({
|
|
|
12927
12938
|
|
|
12928
12939
|
/** @jsxImportSource vue */
|
|
12929
12940
|
|
|
12930
|
-
const COMPONENT_NAME$
|
|
12941
|
+
const COMPONENT_NAME$o = 'vc-recycle-list';
|
|
12931
12942
|
const RecycleList = /* @__PURE__ */ defineComponent({
|
|
12932
|
-
name: COMPONENT_NAME$
|
|
12943
|
+
name: COMPONENT_NAME$o,
|
|
12933
12944
|
props: props$i,
|
|
12934
12945
|
emits: ['scroll', 'row-resize'],
|
|
12935
12946
|
setup(props, {
|
|
@@ -13076,21 +13087,12 @@ const RecycleList = /* @__PURE__ */ defineComponent({
|
|
|
13076
13087
|
const current = props.inverted ? rebuildData.value[rebuildDataIndexMap.value[index]] : rebuildData.value[index];
|
|
13077
13088
|
if (!current) return; // 受到`removeUnusedPlaceholders`影响,无效的会被回收
|
|
13078
13089
|
|
|
13079
|
-
const oldSize = current.size;
|
|
13080
13090
|
const dom = preloads.value[index] || curloads.value[props.inverted ? index : index - firstItemIndex.value];
|
|
13081
13091
|
if (dom) {
|
|
13082
13092
|
current.size = dom[K.offsetSize] || placeholderSize.value;
|
|
13083
13093
|
} else if (current) {
|
|
13084
13094
|
current.size = placeholderSize.value;
|
|
13085
13095
|
}
|
|
13086
|
-
|
|
13087
|
-
// 这样的考虑欠佳,待优化
|
|
13088
|
-
if (oldSize !== current.size) {
|
|
13089
|
-
emit('row-resize', {
|
|
13090
|
-
index: current.id,
|
|
13091
|
-
size: current.size
|
|
13092
|
-
});
|
|
13093
|
-
}
|
|
13094
13096
|
};
|
|
13095
13097
|
const refreshItemPosition = () => {
|
|
13096
13098
|
const sizes = Array.from({
|
|
@@ -13320,6 +13322,13 @@ const RecycleList = /* @__PURE__ */ defineComponent({
|
|
|
13320
13322
|
leading: false,
|
|
13321
13323
|
trailing: true
|
|
13322
13324
|
});
|
|
13325
|
+
const handleRowChange = (e, row) => {
|
|
13326
|
+
emit('row-resize', {
|
|
13327
|
+
index: row.id,
|
|
13328
|
+
height: e.height,
|
|
13329
|
+
width: e.width
|
|
13330
|
+
});
|
|
13331
|
+
};
|
|
13323
13332
|
|
|
13324
13333
|
// 设置初始数据
|
|
13325
13334
|
const setDataSource = async (v, oldV) => {
|
|
@@ -13450,7 +13459,8 @@ const RecycleList = /* @__PURE__ */ defineComponent({
|
|
|
13450
13459
|
"data-column": item.column,
|
|
13451
13460
|
"data-size": item.size,
|
|
13452
13461
|
"data-position": item.position,
|
|
13453
|
-
"onResize": handleResize
|
|
13462
|
+
"onResize": handleResize,
|
|
13463
|
+
"onChange": e => handleRowChange(e, item)
|
|
13454
13464
|
}, {
|
|
13455
13465
|
default: () => [slots.default?.({
|
|
13456
13466
|
row: item.data || {},
|
|
@@ -13501,9 +13511,9 @@ const props$g = {
|
|
|
13501
13511
|
|
|
13502
13512
|
/** @jsxImportSource vue */
|
|
13503
13513
|
|
|
13504
|
-
const COMPONENT_NAME$
|
|
13514
|
+
const COMPONENT_NAME$n = 'vc-slider';
|
|
13505
13515
|
const Slider = /* @__PURE__ */ defineComponent({
|
|
13506
|
-
name: COMPONENT_NAME$
|
|
13516
|
+
name: COMPONENT_NAME$n,
|
|
13507
13517
|
props: props$g,
|
|
13508
13518
|
setup(props, {
|
|
13509
13519
|
slots
|
|
@@ -13527,9 +13537,9 @@ const props$f = {
|
|
|
13527
13537
|
|
|
13528
13538
|
/** @jsxImportSource vue */
|
|
13529
13539
|
|
|
13530
|
-
const COMPONENT_NAME$
|
|
13540
|
+
const COMPONENT_NAME$m = 'vc-sort-list';
|
|
13531
13541
|
const SortList = /* @__PURE__ */ defineComponent({
|
|
13532
|
-
name: COMPONENT_NAME$
|
|
13542
|
+
name: COMPONENT_NAME$m,
|
|
13533
13543
|
props: props$f,
|
|
13534
13544
|
setup(props, {
|
|
13535
13545
|
slots
|
|
@@ -13553,9 +13563,9 @@ const props$e = {
|
|
|
13553
13563
|
|
|
13554
13564
|
/** @jsxImportSource vue */
|
|
13555
13565
|
|
|
13556
|
-
const COMPONENT_NAME$
|
|
13566
|
+
const COMPONENT_NAME$l = 'vc-steps';
|
|
13557
13567
|
const Steps = /* @__PURE__ */ defineComponent({
|
|
13558
|
-
name: COMPONENT_NAME$
|
|
13568
|
+
name: COMPONENT_NAME$l,
|
|
13559
13569
|
props: props$e,
|
|
13560
13570
|
setup(props, {
|
|
13561
13571
|
slots
|
|
@@ -13668,9 +13678,9 @@ const useSwitch = (expose) => {
|
|
|
13668
13678
|
|
|
13669
13679
|
/** @jsxImportSource vue */
|
|
13670
13680
|
|
|
13671
|
-
const COMPONENT_NAME$
|
|
13681
|
+
const COMPONENT_NAME$k = 'vc-switch';
|
|
13672
13682
|
const Switch = /* @__PURE__ */ defineComponent({
|
|
13673
|
-
name: COMPONENT_NAME$
|
|
13683
|
+
name: COMPONENT_NAME$k,
|
|
13674
13684
|
props: props$d,
|
|
13675
13685
|
// click -> onClick要被拦截,此处不能放置
|
|
13676
13686
|
emits: ['update:modelValue', 'change', 'click'],
|
|
@@ -13707,9 +13717,9 @@ const Switch = /* @__PURE__ */ defineComponent({
|
|
|
13707
13717
|
|
|
13708
13718
|
/** @jsxImportSource vue */
|
|
13709
13719
|
|
|
13710
|
-
const COMPONENT_NAME$
|
|
13720
|
+
const COMPONENT_NAME$j = 'vcm-switch';
|
|
13711
13721
|
const MSwitch = /* @__PURE__ */ defineComponent({
|
|
13712
|
-
name: COMPONENT_NAME$
|
|
13722
|
+
name: COMPONENT_NAME$j,
|
|
13713
13723
|
props: props$d,
|
|
13714
13724
|
// click -> onClick要被拦截,此处不能放置
|
|
13715
13725
|
emits: ['update:modelValue', 'change', 'click'],
|
|
@@ -14481,6 +14491,7 @@ class Store extends BaseWatcher {
|
|
|
14481
14491
|
});
|
|
14482
14492
|
}
|
|
14483
14493
|
setData(data) {
|
|
14494
|
+
const { primaryKey } = this.table.props;
|
|
14484
14495
|
const dataInstanceChanged = this.states._data !== data;
|
|
14485
14496
|
this.states._data = data;
|
|
14486
14497
|
this.states.data = data;
|
|
@@ -14492,19 +14503,22 @@ class Store extends BaseWatcher {
|
|
|
14492
14503
|
});
|
|
14493
14504
|
this.states.list = data.reduce((pre, row, index) => {
|
|
14494
14505
|
const cache = caches.get(row) || { heightMap: {} };
|
|
14495
|
-
|
|
14496
|
-
|
|
14497
|
-
|
|
14498
|
-
|
|
14499
|
-
|
|
14500
|
-
|
|
14501
|
-
|
|
14502
|
-
|
|
14503
|
-
|
|
14504
|
-
right: cache.heightMap.right || ""
|
|
14505
|
-
}
|
|
14506
|
+
const rows = [
|
|
14507
|
+
{
|
|
14508
|
+
index,
|
|
14509
|
+
data: row,
|
|
14510
|
+
height: cache.height || "",
|
|
14511
|
+
heightMap: {
|
|
14512
|
+
left: cache.heightMap.left || "",
|
|
14513
|
+
main: cache.heightMap.main || "",
|
|
14514
|
+
right: cache.heightMap.right || ""
|
|
14506
14515
|
}
|
|
14507
|
-
|
|
14516
|
+
}
|
|
14517
|
+
];
|
|
14518
|
+
const id = primaryKey ? rows.map((rowData) => getRowValue(rowData.data, primaryKey)).join(",") : index;
|
|
14519
|
+
pre.push({
|
|
14520
|
+
id: typeof id === "undefined" ? index : id,
|
|
14521
|
+
rows,
|
|
14508
14522
|
expand: false
|
|
14509
14523
|
});
|
|
14510
14524
|
return pre;
|
|
@@ -14818,9 +14832,9 @@ const useStates = (mapper, $store) => {
|
|
|
14818
14832
|
|
|
14819
14833
|
/** @jsxImportSource vue */
|
|
14820
14834
|
|
|
14821
|
-
const COMPONENT_NAME$
|
|
14835
|
+
const COMPONENT_NAME$i = 'vc-table-normal-list';
|
|
14822
14836
|
const NormalList = /* @__PURE__ */ defineComponent({
|
|
14823
|
-
name: COMPONENT_NAME$
|
|
14837
|
+
name: COMPONENT_NAME$i,
|
|
14824
14838
|
props: {
|
|
14825
14839
|
data: {
|
|
14826
14840
|
type: Array,
|
|
@@ -14835,17 +14849,19 @@ const NormalList = /* @__PURE__ */ defineComponent({
|
|
|
14835
14849
|
const handleResize = (e, index) => {
|
|
14836
14850
|
emit('row-resize', {
|
|
14837
14851
|
index,
|
|
14838
|
-
|
|
14852
|
+
height: e.height,
|
|
14853
|
+
width: e.width
|
|
14839
14854
|
});
|
|
14840
14855
|
};
|
|
14841
14856
|
return () => {
|
|
14842
|
-
return props.data.map((
|
|
14857
|
+
return props.data.map((mergeData, index) => {
|
|
14843
14858
|
return createVNode(Resizer, {
|
|
14859
|
+
"key": mergeData.id,
|
|
14844
14860
|
"fill": false,
|
|
14845
14861
|
"onChange": e => handleResize(e, index)
|
|
14846
14862
|
}, {
|
|
14847
14863
|
default: () => [slots.default?.({
|
|
14848
|
-
row,
|
|
14864
|
+
row: mergeData,
|
|
14849
14865
|
index
|
|
14850
14866
|
})]
|
|
14851
14867
|
});
|
|
@@ -14994,32 +15010,6 @@ const TableBody = /* @__PURE__ */ defineComponent({
|
|
|
14994
15010
|
table.hoverState.value = hoverState;
|
|
14995
15011
|
table.emit('cell-mouse-enter', hoverState.row, hoverState.column, hoverState.cell, e);
|
|
14996
15012
|
}
|
|
14997
|
-
|
|
14998
|
-
// 判断是否text-overflow, 如果是就显示tooltip
|
|
14999
|
-
const cellChild = e.target.querySelector('.vc-table__cell');
|
|
15000
|
-
if (!(hasClass(cellChild, 'vc-popover') && cellChild.childNodes.length)) {
|
|
15001
|
-
return;
|
|
15002
|
-
}
|
|
15003
|
-
// 使用范围宽度而不是滚动宽度来确定文本是否溢出,以解决潜在的FireFox bug
|
|
15004
|
-
// https://bugzilla.mozilla.org/show_bug.cgi?id=1074543#c3
|
|
15005
|
-
const range = document.createRange();
|
|
15006
|
-
range.setStart(cellChild, 0);
|
|
15007
|
-
range.setEnd(cellChild, cellChild.childNodes.length);
|
|
15008
|
-
const rangeWidth = range.getBoundingClientRect().width;
|
|
15009
|
-
const padding = (parseInt(cellChild.style.paddingLeft, 10) || 0) + (parseInt(cellChild.style.paddingRight, 10) || 0);
|
|
15010
|
-
if (rangeWidth + padding > cellChild.offsetWidth || cellChild.scrollWidth > cellChild.offsetWidth) {
|
|
15011
|
-
Popover.open({
|
|
15012
|
-
el: document.body,
|
|
15013
|
-
name: 'vc-table-popover',
|
|
15014
|
-
// 确保不重复创建
|
|
15015
|
-
triggerEl: cell,
|
|
15016
|
-
hover: true,
|
|
15017
|
-
theme: 'dark',
|
|
15018
|
-
placement: 'top',
|
|
15019
|
-
content: cell.innerText || cell.textContent,
|
|
15020
|
-
alone: true
|
|
15021
|
-
});
|
|
15022
|
-
}
|
|
15023
15013
|
};
|
|
15024
15014
|
const handleCellMouseLeave = e => {
|
|
15025
15015
|
const cell = getCell(e);
|
|
@@ -15107,13 +15097,14 @@ const TableBody = /* @__PURE__ */ defineComponent({
|
|
|
15107
15097
|
})]);
|
|
15108
15098
|
})]);
|
|
15109
15099
|
};
|
|
15110
|
-
const renderMergeRow =
|
|
15100
|
+
const renderMergeRow = mergeData => {
|
|
15111
15101
|
const {
|
|
15112
|
-
rows
|
|
15102
|
+
rows,
|
|
15103
|
+
id
|
|
15113
15104
|
} = mergeData;
|
|
15114
15105
|
return createVNode("div", {
|
|
15115
15106
|
"class": "vc-table__merge-row",
|
|
15116
|
-
"key":
|
|
15107
|
+
"key": id
|
|
15117
15108
|
}, [rows.map(row => {
|
|
15118
15109
|
return renderRow(row, row.index);
|
|
15119
15110
|
})]);
|
|
@@ -15121,7 +15112,7 @@ const TableBody = /* @__PURE__ */ defineComponent({
|
|
|
15121
15112
|
const handleMergeRowResize = v => {
|
|
15122
15113
|
if (table.props.rowHeight) return;
|
|
15123
15114
|
states.list[v.index].rows.forEach(row => {
|
|
15124
|
-
row.heightMap[props.fixed || 'main'] = v.
|
|
15115
|
+
row.heightMap[props.fixed || 'main'] = v.height;
|
|
15125
15116
|
const heights = [row.heightMap.main];
|
|
15126
15117
|
if (states.leftFixedCount) {
|
|
15127
15118
|
heights.push(row.heightMap.left);
|
|
@@ -15173,17 +15164,15 @@ const TableBody = /* @__PURE__ */ defineComponent({
|
|
|
15173
15164
|
"style": props.heightStyle
|
|
15174
15165
|
}, {
|
|
15175
15166
|
default: ({
|
|
15176
|
-
row
|
|
15177
|
-
|
|
15178
|
-
}) => renderMergeRow(row, index)
|
|
15167
|
+
row
|
|
15168
|
+
}) => renderMergeRow(row)
|
|
15179
15169
|
}) : createVNode(NormalList, {
|
|
15180
15170
|
"data": states.list,
|
|
15181
15171
|
"onRowResize": handleMergeRowResize
|
|
15182
15172
|
}, {
|
|
15183
15173
|
default: ({
|
|
15184
|
-
row
|
|
15185
|
-
|
|
15186
|
-
}) => renderMergeRow(row, index)
|
|
15174
|
+
row
|
|
15175
|
+
}) => renderMergeRow(row)
|
|
15187
15176
|
})]);
|
|
15188
15177
|
};
|
|
15189
15178
|
}
|
|
@@ -15677,9 +15666,9 @@ const props$c = {
|
|
|
15677
15666
|
|
|
15678
15667
|
/** @jsxImportSource vue */
|
|
15679
15668
|
|
|
15680
|
-
const COMPONENT_NAME$
|
|
15669
|
+
const COMPONENT_NAME$h = 'vc-table';
|
|
15681
15670
|
const Table = /* @__PURE__ */ defineComponent({
|
|
15682
|
-
name: COMPONENT_NAME$
|
|
15671
|
+
name: COMPONENT_NAME$h,
|
|
15683
15672
|
props: props$c,
|
|
15684
15673
|
emits: ['select', 'select-all', 'selection-change', 'cell-mouse-enter', 'cell-mouse-leave', 'cell-click', 'cell-dblclick', 'row-click', 'row-contextmenu', 'row-dblclick', 'header-click', 'header-contextmenu', 'current-change', 'header-dragend ', 'expand-change', 'sort-change'],
|
|
15685
15674
|
setup(props, {
|
|
@@ -16209,8 +16198,196 @@ const Table = /* @__PURE__ */ defineComponent({
|
|
|
16209
16198
|
}
|
|
16210
16199
|
});
|
|
16211
16200
|
|
|
16212
|
-
const
|
|
16213
|
-
|
|
16201
|
+
const props$b = {
|
|
16202
|
+
tag: {
|
|
16203
|
+
type: String,
|
|
16204
|
+
default: "div"
|
|
16205
|
+
},
|
|
16206
|
+
value: {
|
|
16207
|
+
type: String,
|
|
16208
|
+
default: ""
|
|
16209
|
+
},
|
|
16210
|
+
line: {
|
|
16211
|
+
type: Number,
|
|
16212
|
+
default: 0
|
|
16213
|
+
},
|
|
16214
|
+
// TODO: 是否改为tail-indent来表示尾部缩进
|
|
16215
|
+
indent: {
|
|
16216
|
+
type: Number,
|
|
16217
|
+
default: 0
|
|
16218
|
+
},
|
|
16219
|
+
resize: {
|
|
16220
|
+
type: [Boolean, Number],
|
|
16221
|
+
default: 100
|
|
16222
|
+
},
|
|
16223
|
+
suffix: {
|
|
16224
|
+
type: String,
|
|
16225
|
+
default: "..."
|
|
16226
|
+
},
|
|
16227
|
+
placement: {
|
|
16228
|
+
type: String,
|
|
16229
|
+
default: "top"
|
|
16230
|
+
},
|
|
16231
|
+
portalClass: [Object, String, Array],
|
|
16232
|
+
portalStyle: [Object, String, Array],
|
|
16233
|
+
renderRow: {
|
|
16234
|
+
type: Function,
|
|
16235
|
+
default: (props$) => {
|
|
16236
|
+
return props$.value;
|
|
16237
|
+
}
|
|
16238
|
+
}
|
|
16239
|
+
};
|
|
16240
|
+
|
|
16241
|
+
const HIDDEN_TEXT_STYLE = `
|
|
16242
|
+
position: absolute!important;
|
|
16243
|
+
word-break: break-all!important;
|
|
16244
|
+
overflow: auto!important;
|
|
16245
|
+
opacity: 0!important;
|
|
16246
|
+
z-index: -1000!important;
|
|
16247
|
+
top: 0!important;
|
|
16248
|
+
right: 0!important;
|
|
16249
|
+
`;
|
|
16250
|
+
const SIZING_STYLE$1 = [
|
|
16251
|
+
"letter-spacing",
|
|
16252
|
+
"line-height",
|
|
16253
|
+
"padding-top",
|
|
16254
|
+
"padding-bottom",
|
|
16255
|
+
"font-family",
|
|
16256
|
+
"font-weight",
|
|
16257
|
+
"font-size",
|
|
16258
|
+
"text-rendering",
|
|
16259
|
+
"text-transform",
|
|
16260
|
+
"width",
|
|
16261
|
+
// 'text-indent', // 需要额外计算
|
|
16262
|
+
"padding-left",
|
|
16263
|
+
"padding-right",
|
|
16264
|
+
"border-width",
|
|
16265
|
+
"box-sizing"
|
|
16266
|
+
];
|
|
16267
|
+
let hiddenEl$1;
|
|
16268
|
+
const getFitIndex = (options = {}) => {
|
|
16269
|
+
const { el, line, value, suffix, indent } = options;
|
|
16270
|
+
let lineHeight = parseInt(getStyle(el, "line-height"), 10);
|
|
16271
|
+
if (!hiddenEl$1) {
|
|
16272
|
+
hiddenEl$1 = document.createElement("div");
|
|
16273
|
+
document.body.appendChild(hiddenEl$1);
|
|
16274
|
+
}
|
|
16275
|
+
el.getAttribute("wrap") ? hiddenEl$1.setAttribute("wrap", el.getAttribute("wrap")) : hiddenEl$1.removeAttribute("wrap");
|
|
16276
|
+
const {
|
|
16277
|
+
paddingSize,
|
|
16278
|
+
borderSize,
|
|
16279
|
+
boxSizing,
|
|
16280
|
+
sizingStyle
|
|
16281
|
+
} = Utils$1.getComputedStyle(el, SIZING_STYLE$1);
|
|
16282
|
+
const textIndent = `text-indent: ${parseInt(getStyle(el, "text-indent"), 10) + indent}px;`;
|
|
16283
|
+
hiddenEl$1.setAttribute("style", `${sizingStyle};${textIndent};${HIDDEN_TEXT_STYLE}`);
|
|
16284
|
+
let sideHeight = paddingSize || 0;
|
|
16285
|
+
boxSizing === "border-box" && (sideHeight += borderSize);
|
|
16286
|
+
if (Number.isNaN(lineHeight)) {
|
|
16287
|
+
hiddenEl$1.innerText = ".";
|
|
16288
|
+
lineHeight = hiddenEl$1.clientHeight - sideHeight;
|
|
16289
|
+
}
|
|
16290
|
+
let endIndex = 0;
|
|
16291
|
+
hiddenEl$1.innerText = suffix;
|
|
16292
|
+
value.split("").forEach((item, i) => {
|
|
16293
|
+
let old = hiddenEl$1.innerText;
|
|
16294
|
+
old = old.substring(0, old.length - suffix.length);
|
|
16295
|
+
hiddenEl$1.innerText = old + item + suffix;
|
|
16296
|
+
if (hiddenEl$1.clientHeight - sideHeight > lineHeight * line && endIndex === 0) {
|
|
16297
|
+
endIndex = i;
|
|
16298
|
+
}
|
|
16299
|
+
});
|
|
16300
|
+
return endIndex;
|
|
16301
|
+
};
|
|
16302
|
+
|
|
16303
|
+
/** @jsxImportSource vue */
|
|
16304
|
+
|
|
16305
|
+
const COMPONENT_NAME$g = 'vc-text';
|
|
16306
|
+
const Text = /* @__PURE__ */ defineComponent({
|
|
16307
|
+
name: COMPONENT_NAME$g,
|
|
16308
|
+
props: props$b,
|
|
16309
|
+
setup(props, {
|
|
16310
|
+
emit
|
|
16311
|
+
}) {
|
|
16312
|
+
const instance = getCurrentInstance();
|
|
16313
|
+
const isActive = ref(false);
|
|
16314
|
+
const endIndex = ref(0);
|
|
16315
|
+
const styles = computed(() => {
|
|
16316
|
+
return {
|
|
16317
|
+
cursor: endIndex.value === 0 ? 'unset' : 'pointer'
|
|
16318
|
+
};
|
|
16319
|
+
});
|
|
16320
|
+
const calcPosition = () => {
|
|
16321
|
+
const {
|
|
16322
|
+
suffix,
|
|
16323
|
+
line,
|
|
16324
|
+
value,
|
|
16325
|
+
indent
|
|
16326
|
+
} = props;
|
|
16327
|
+
if (line === 0) {
|
|
16328
|
+
endIndex.value = 0;
|
|
16329
|
+
isActive.value = true;
|
|
16330
|
+
} else {
|
|
16331
|
+
endIndex.value = getFitIndex({
|
|
16332
|
+
el: instance.vnode.el,
|
|
16333
|
+
line,
|
|
16334
|
+
value,
|
|
16335
|
+
suffix,
|
|
16336
|
+
indent
|
|
16337
|
+
});
|
|
16338
|
+
isActive.value = true;
|
|
16339
|
+
}
|
|
16340
|
+
emit('clip', endIndex.value);
|
|
16341
|
+
};
|
|
16342
|
+
const handleResize = props.resize === true || props.resize === 0 ? calcPosition : debounce(calcPosition, props.resize || 0);
|
|
16343
|
+
const handleMouseOver = e => {
|
|
16344
|
+
if (endIndex.value > 0) {
|
|
16345
|
+
Popover.open({
|
|
16346
|
+
el: document.body,
|
|
16347
|
+
name: 'vc-text-popover',
|
|
16348
|
+
// 确保不重复创建
|
|
16349
|
+
triggerEl: e.target,
|
|
16350
|
+
hover: true,
|
|
16351
|
+
theme: 'dark',
|
|
16352
|
+
placement: props.placement,
|
|
16353
|
+
portalClass: props.portalClass,
|
|
16354
|
+
portalStyle: [props.portalStyle || `width: ${e.target.clientWidth}px`, 'word-break: break-all'],
|
|
16355
|
+
content: props.value
|
|
16356
|
+
});
|
|
16357
|
+
}
|
|
16358
|
+
};
|
|
16359
|
+
const handleMouseOut = () => {
|
|
16360
|
+
// Do.
|
|
16361
|
+
};
|
|
16362
|
+
['value', 'indent', 'line'].forEach(key => {
|
|
16363
|
+
watch(() => props[key], calcPosition);
|
|
16364
|
+
});
|
|
16365
|
+
onMounted(() => {
|
|
16366
|
+
props.resize !== false && Resize.on(instance.vnode.el, handleResize); // 首次会执行一次
|
|
16367
|
+
});
|
|
16368
|
+
onBeforeUnmount(() => {
|
|
16369
|
+
props.resize !== false && Resize.off(instance.vnode.el, handleResize);
|
|
16370
|
+
});
|
|
16371
|
+
const Content = props.tag;
|
|
16372
|
+
return () => {
|
|
16373
|
+
return createVNode(Content, {
|
|
16374
|
+
"class": "vc-text",
|
|
16375
|
+
"style": styles.value,
|
|
16376
|
+
"onMouseover": handleMouseOver,
|
|
16377
|
+
"onMouseout": handleMouseOut
|
|
16378
|
+
}, {
|
|
16379
|
+
default: () => [isActive.value ? createVNode(Customer, {
|
|
16380
|
+
"value": endIndex.value > 0 ? `${props.value.slice(0, endIndex.value)}${props.suffix}` : props.value,
|
|
16381
|
+
"index": endIndex.value,
|
|
16382
|
+
"render": props.renderRow
|
|
16383
|
+
}, null) : null]
|
|
16384
|
+
});
|
|
16385
|
+
};
|
|
16386
|
+
}
|
|
16387
|
+
});
|
|
16388
|
+
|
|
16389
|
+
const cellStarts = {
|
|
16390
|
+
default: {
|
|
16214
16391
|
order: ''
|
|
16215
16392
|
},
|
|
16216
16393
|
selection: {
|
|
@@ -16318,26 +16495,31 @@ const cellForced = {
|
|
|
16318
16495
|
};
|
|
16319
16496
|
|
|
16320
16497
|
// Cell默认渲染value 或 formatter
|
|
16321
|
-
const defaultRenderCell = ({
|
|
16322
|
-
|
|
16323
|
-
column = {},
|
|
16324
|
-
rowIndex
|
|
16325
|
-
}) => {
|
|
16498
|
+
const defaultRenderCell = (rowData = {}) => {
|
|
16499
|
+
const column = rowData.column;
|
|
16326
16500
|
const {
|
|
16327
16501
|
prop,
|
|
16328
16502
|
formatter
|
|
16329
16503
|
} = column;
|
|
16330
16504
|
let value;
|
|
16331
16505
|
if (prop) {
|
|
16332
|
-
value = getPropByPath(row, prop).v;
|
|
16506
|
+
value = getPropByPath(rowData.row, prop).v;
|
|
16333
16507
|
}
|
|
16334
16508
|
if (formatter) {
|
|
16335
|
-
return column.formatter(
|
|
16336
|
-
|
|
16337
|
-
|
|
16338
|
-
|
|
16339
|
-
|
|
16340
|
-
|
|
16509
|
+
return column.formatter(rowData);
|
|
16510
|
+
}
|
|
16511
|
+
const line = column.line || VcInstance.options.TableColumn?.line;
|
|
16512
|
+
if (line) {
|
|
16513
|
+
const style = {
|
|
16514
|
+
// 目前左右pading为10
|
|
16515
|
+
// TODO: 含有border还要-1
|
|
16516
|
+
width: (column.realWidth || column.width) - 20 + 'px'
|
|
16517
|
+
};
|
|
16518
|
+
return createVNode(Text, {
|
|
16519
|
+
"style": style,
|
|
16520
|
+
"line": line,
|
|
16521
|
+
"value": value
|
|
16522
|
+
}, null);
|
|
16341
16523
|
}
|
|
16342
16524
|
return value;
|
|
16343
16525
|
};
|
|
@@ -16390,6 +16572,11 @@ const TableColumn = /* @__PURE__ */ defineComponent({
|
|
|
16390
16572
|
type: String,
|
|
16391
16573
|
default: 'default'
|
|
16392
16574
|
},
|
|
16575
|
+
// 默认只展示一行
|
|
16576
|
+
line: {
|
|
16577
|
+
type: Number,
|
|
16578
|
+
default: 0
|
|
16579
|
+
},
|
|
16393
16580
|
label: String,
|
|
16394
16581
|
customClass: String,
|
|
16395
16582
|
labelClass: String,
|
|
@@ -16404,7 +16591,6 @@ const TableColumn = /* @__PURE__ */ defineComponent({
|
|
|
16404
16591
|
columnKey: String,
|
|
16405
16592
|
align: String,
|
|
16406
16593
|
headerAlign: String,
|
|
16407
|
-
showPopover: Boolean,
|
|
16408
16594
|
fixed: [Boolean, String],
|
|
16409
16595
|
formatter: Function,
|
|
16410
16596
|
selectable: Function,
|
|
@@ -16552,12 +16738,6 @@ const TableColumn = /* @__PURE__ */ defineComponent({
|
|
|
16552
16738
|
"class": "vc-table-un-expand__indent"
|
|
16553
16739
|
}, null);
|
|
16554
16740
|
}
|
|
16555
|
-
if (data.column.showPopover) {
|
|
16556
|
-
$props.class += ' vc-popover';
|
|
16557
|
-
$props.style = {
|
|
16558
|
-
width: (data.column.realWidth || data.column.width) - 1 + 'px'
|
|
16559
|
-
};
|
|
16560
|
-
}
|
|
16561
16741
|
const {
|
|
16562
16742
|
placeholder
|
|
16563
16743
|
} = table.props;
|
|
@@ -16657,7 +16837,7 @@ const TableColumn = /* @__PURE__ */ defineComponent({
|
|
|
16657
16837
|
const MTable = Table;
|
|
16658
16838
|
const MTableColumn = TableColumn;
|
|
16659
16839
|
|
|
16660
|
-
const props$
|
|
16840
|
+
const props$a = {
|
|
16661
16841
|
type: {
|
|
16662
16842
|
type: String,
|
|
16663
16843
|
validator: (v) => /^(line|card)$/.test(v),
|
|
@@ -16815,7 +16995,7 @@ const useTabs = (options = {}) => {
|
|
|
16815
16995
|
const COMPONENT_NAME$f = 'vc-tabs';
|
|
16816
16996
|
const Tabs = /* @__PURE__ */ defineComponent({
|
|
16817
16997
|
name: COMPONENT_NAME$f,
|
|
16818
|
-
props: props$
|
|
16998
|
+
props: props$a,
|
|
16819
16999
|
emits: ['update:modelValue', 'change', 'click'],
|
|
16820
17000
|
setup(props, {
|
|
16821
17001
|
slots
|
|
@@ -16980,7 +17160,7 @@ const Tabs = /* @__PURE__ */ defineComponent({
|
|
|
16980
17160
|
}
|
|
16981
17161
|
});
|
|
16982
17162
|
|
|
16983
|
-
const props$
|
|
17163
|
+
const props$9 = {
|
|
16984
17164
|
value: {
|
|
16985
17165
|
type: [String, Number]
|
|
16986
17166
|
},
|
|
@@ -17065,7 +17245,7 @@ const useTabsPane = () => {
|
|
|
17065
17245
|
const COMPONENT_NAME$e = 'vc-tabs-pane';
|
|
17066
17246
|
const TabsPane = /* @__PURE__ */ defineComponent({
|
|
17067
17247
|
name: COMPONENT_NAME$e,
|
|
17068
|
-
props: props$
|
|
17248
|
+
props: props$9,
|
|
17069
17249
|
setup(_, {
|
|
17070
17250
|
slots
|
|
17071
17251
|
}) {
|
|
@@ -17080,8 +17260,8 @@ const TabsPane = /* @__PURE__ */ defineComponent({
|
|
|
17080
17260
|
}
|
|
17081
17261
|
});
|
|
17082
17262
|
|
|
17083
|
-
const props$
|
|
17084
|
-
...props$
|
|
17263
|
+
const props$8 = {
|
|
17264
|
+
...props$a,
|
|
17085
17265
|
theme: {
|
|
17086
17266
|
type: String,
|
|
17087
17267
|
default: "light",
|
|
@@ -17122,7 +17302,7 @@ const props$9 = {
|
|
|
17122
17302
|
const COMPONENT_NAME$d = 'vcm-tabs';
|
|
17123
17303
|
const MTabs = /* @__PURE__ */ defineComponent({
|
|
17124
17304
|
name: COMPONENT_NAME$d,
|
|
17125
|
-
props: props$
|
|
17305
|
+
props: props$8,
|
|
17126
17306
|
emits: ['update:modelValue', 'change', 'click'],
|
|
17127
17307
|
setup(props, {
|
|
17128
17308
|
slots
|
|
@@ -17389,7 +17569,7 @@ const MTabs = /* @__PURE__ */ defineComponent({
|
|
|
17389
17569
|
const COMPONENT_NAME$c = 'vcm-tabs-pane';
|
|
17390
17570
|
const MTabsPane = /* @__PURE__ */ defineComponent({
|
|
17391
17571
|
name: COMPONENT_NAME$c,
|
|
17392
|
-
props: props$
|
|
17572
|
+
props: props$9,
|
|
17393
17573
|
setup(_, {
|
|
17394
17574
|
slots
|
|
17395
17575
|
}) {
|
|
@@ -17406,56 +17586,18 @@ const MTabsPane = /* @__PURE__ */ defineComponent({
|
|
|
17406
17586
|
|
|
17407
17587
|
const MTag = Tag;
|
|
17408
17588
|
|
|
17409
|
-
const
|
|
17410
|
-
tag: {
|
|
17411
|
-
type: String,
|
|
17412
|
-
default: "div"
|
|
17413
|
-
},
|
|
17414
|
-
value: {
|
|
17415
|
-
type: String,
|
|
17416
|
-
default: ""
|
|
17417
|
-
},
|
|
17418
|
-
line: {
|
|
17419
|
-
type: Number,
|
|
17420
|
-
default: 0
|
|
17421
|
-
},
|
|
17422
|
-
// TODO: 是否改为tail-indent来表示尾部缩进
|
|
17423
|
-
indent: {
|
|
17424
|
-
type: Number,
|
|
17425
|
-
default: 0
|
|
17426
|
-
},
|
|
17427
|
-
resize: {
|
|
17428
|
-
type: [Boolean, Number],
|
|
17429
|
-
default: 100
|
|
17430
|
-
},
|
|
17431
|
-
suffix: {
|
|
17432
|
-
type: String,
|
|
17433
|
-
default: "..."
|
|
17434
|
-
},
|
|
17435
|
-
placement: {
|
|
17436
|
-
type: String,
|
|
17437
|
-
default: "top"
|
|
17438
|
-
},
|
|
17439
|
-
portalClassName: [Object, String, Array],
|
|
17440
|
-
portalStyle: [Object, String, Array],
|
|
17441
|
-
renderRow: {
|
|
17442
|
-
type: Function,
|
|
17443
|
-
// 函数式可以用于高亮显示
|
|
17444
|
-
default: (props$) => {
|
|
17445
|
-
const { value } = props$;
|
|
17446
|
-
return h("span", {}, value);
|
|
17447
|
-
}
|
|
17448
|
-
}
|
|
17449
|
-
};
|
|
17589
|
+
const MText = Text;
|
|
17450
17590
|
|
|
17451
|
-
const
|
|
17452
|
-
|
|
17453
|
-
|
|
17454
|
-
|
|
17455
|
-
|
|
17456
|
-
|
|
17457
|
-
|
|
17458
|
-
|
|
17591
|
+
const HIDDEN_TEXTAREA_STYLE = `
|
|
17592
|
+
min-height:0 !important;
|
|
17593
|
+
max-height:none !important;
|
|
17594
|
+
height:0 !important;
|
|
17595
|
+
visibility:hidden !important;
|
|
17596
|
+
overflow:hidden !important;
|
|
17597
|
+
position:absolute !important;
|
|
17598
|
+
z-index:-1000 !important;
|
|
17599
|
+
top:0 !important;
|
|
17600
|
+
right:0 !important
|
|
17459
17601
|
`;
|
|
17460
17602
|
const SIZING_STYLE = [
|
|
17461
17603
|
"letter-spacing",
|
|
@@ -17468,18 +17610,18 @@ const SIZING_STYLE = [
|
|
|
17468
17610
|
"text-rendering",
|
|
17469
17611
|
"text-transform",
|
|
17470
17612
|
"width",
|
|
17471
|
-
|
|
17613
|
+
"text-indent",
|
|
17472
17614
|
"padding-left",
|
|
17473
17615
|
"padding-right",
|
|
17474
17616
|
"border-width",
|
|
17475
17617
|
"box-sizing"
|
|
17476
17618
|
];
|
|
17477
17619
|
let hiddenEl;
|
|
17478
|
-
const
|
|
17479
|
-
|
|
17480
|
-
|
|
17620
|
+
const getComputedHeight = (options = {}) => {
|
|
17621
|
+
if (IS_SERVER$1) return {};
|
|
17622
|
+
const { el, minRows = null, maxRows = null } = options;
|
|
17481
17623
|
if (!hiddenEl) {
|
|
17482
|
-
hiddenEl = document.createElement("
|
|
17624
|
+
hiddenEl = document.createElement("textarea");
|
|
17483
17625
|
document.body.appendChild(hiddenEl);
|
|
17484
17626
|
}
|
|
17485
17627
|
el.getAttribute("wrap") ? hiddenEl.setAttribute("wrap", el.getAttribute("wrap")) : hiddenEl.removeAttribute("wrap");
|
|
@@ -17489,141 +17631,343 @@ const getFitIndex = (options = {}) => {
|
|
|
17489
17631
|
boxSizing,
|
|
17490
17632
|
sizingStyle
|
|
17491
17633
|
} = Utils$1.getComputedStyle(el, SIZING_STYLE);
|
|
17492
|
-
|
|
17493
|
-
hiddenEl.
|
|
17494
|
-
let
|
|
17495
|
-
|
|
17496
|
-
|
|
17497
|
-
|
|
17498
|
-
|
|
17634
|
+
hiddenEl.setAttribute("style", `${sizingStyle};${HIDDEN_TEXTAREA_STYLE}`);
|
|
17635
|
+
hiddenEl.value = el.value || el.placeholder || "";
|
|
17636
|
+
let minHeight = Number.MIN_SAFE_INTEGER;
|
|
17637
|
+
let maxHeight = Number.MAX_SAFE_INTEGER;
|
|
17638
|
+
let height = hiddenEl.scrollHeight;
|
|
17639
|
+
let overflowY;
|
|
17640
|
+
if (boxSizing === "border-box") {
|
|
17641
|
+
height += borderSize;
|
|
17642
|
+
} else if (boxSizing === "content-box") {
|
|
17643
|
+
height -= paddingSize;
|
|
17644
|
+
}
|
|
17645
|
+
if (minRows !== null || maxRows !== null) {
|
|
17646
|
+
hiddenEl.value = " ";
|
|
17647
|
+
const singleRowHeight = hiddenEl.scrollHeight - paddingSize;
|
|
17648
|
+
if (minRows !== null) {
|
|
17649
|
+
minHeight = singleRowHeight * minRows;
|
|
17650
|
+
if (boxSizing === "border-box") {
|
|
17651
|
+
minHeight = minHeight + paddingSize + borderSize;
|
|
17652
|
+
}
|
|
17653
|
+
height = Math.max(minHeight, height);
|
|
17654
|
+
}
|
|
17655
|
+
if (maxRows !== null) {
|
|
17656
|
+
maxHeight = singleRowHeight * maxRows;
|
|
17657
|
+
if (boxSizing === "border-box") {
|
|
17658
|
+
maxHeight = maxHeight + paddingSize + borderSize;
|
|
17659
|
+
}
|
|
17660
|
+
overflowY = height > maxHeight ? "" : "hidden";
|
|
17661
|
+
height = Math.min(maxHeight, height);
|
|
17662
|
+
}
|
|
17499
17663
|
}
|
|
17500
|
-
|
|
17501
|
-
|
|
17502
|
-
|
|
17503
|
-
|
|
17504
|
-
|
|
17505
|
-
|
|
17506
|
-
|
|
17507
|
-
|
|
17664
|
+
if (!maxRows) {
|
|
17665
|
+
overflowY = "hidden";
|
|
17666
|
+
}
|
|
17667
|
+
return {
|
|
17668
|
+
height: `${height}px`,
|
|
17669
|
+
minHeight: `${minHeight}px`,
|
|
17670
|
+
maxHeight: `${maxHeight}px`,
|
|
17671
|
+
overflowY
|
|
17672
|
+
};
|
|
17673
|
+
};
|
|
17674
|
+
|
|
17675
|
+
const useTextarea = (textarea, expose) => {
|
|
17676
|
+
const attrs = useAttrs$1();
|
|
17677
|
+
const instance = getCurrentInstance();
|
|
17678
|
+
const props = instance.props;
|
|
17679
|
+
const { emit } = instance;
|
|
17680
|
+
const formItem = inject("vc-form-item", {});
|
|
17681
|
+
const currentValue = ref(null);
|
|
17682
|
+
const isOnComposition = ref(false);
|
|
17683
|
+
const isFocus = ref(false);
|
|
17684
|
+
const calcTextareaStyle = ref({});
|
|
17685
|
+
const contentStyle = ref({});
|
|
17686
|
+
const currentMaxlength = computed(() => {
|
|
17687
|
+
const value = currentValue.value;
|
|
17688
|
+
const { maxlength, bytes } = props;
|
|
17689
|
+
return Array.isArray(value) || !maxlength || !bytes ? maxlength : getFitMaxLength(value, maxlength);
|
|
17690
|
+
});
|
|
17691
|
+
const sync = (v, e, force) => {
|
|
17692
|
+
if (!force && v === currentValue.value) return;
|
|
17693
|
+
if (!props.controllable) {
|
|
17694
|
+
currentValue.value = v;
|
|
17508
17695
|
}
|
|
17696
|
+
emit("update:modelValue", v, e);
|
|
17697
|
+
emit("input", v, e);
|
|
17698
|
+
emit("change", v, e);
|
|
17699
|
+
props.allowDispatch && formItem?.change?.(v);
|
|
17700
|
+
};
|
|
17701
|
+
const forceUpdate = () => {
|
|
17702
|
+
instance.proxy?.$forceUpdate?.();
|
|
17703
|
+
};
|
|
17704
|
+
const refresh = () => {
|
|
17705
|
+
if (!props.autosize) return;
|
|
17706
|
+
const { minRows, maxRows } = props.autosize;
|
|
17707
|
+
nextTick(() => {
|
|
17708
|
+
calcTextareaStyle.value = getComputedHeight({
|
|
17709
|
+
el: textarea.value,
|
|
17710
|
+
minRows,
|
|
17711
|
+
maxRows
|
|
17712
|
+
});
|
|
17713
|
+
});
|
|
17714
|
+
};
|
|
17715
|
+
const handleKeydown = (e) => {
|
|
17716
|
+
emit("keydown", e);
|
|
17717
|
+
};
|
|
17718
|
+
const handleKeypress = (e) => {
|
|
17719
|
+
emit("keypress", e);
|
|
17720
|
+
};
|
|
17721
|
+
const handleKeyup = (e) => {
|
|
17722
|
+
if (e.keyCode == 13) {
|
|
17723
|
+
emit("enter", e);
|
|
17724
|
+
}
|
|
17725
|
+
emit("keyup", e);
|
|
17726
|
+
};
|
|
17727
|
+
const handleFocus = (e) => {
|
|
17728
|
+
isFocus.value = true;
|
|
17729
|
+
emit("focus", e);
|
|
17730
|
+
};
|
|
17731
|
+
const handleBlur = (e) => {
|
|
17732
|
+
isFocus.value = false;
|
|
17733
|
+
emit("blur", e);
|
|
17734
|
+
props.allowDispatch && formItem?.blur?.(currentValue.value);
|
|
17735
|
+
};
|
|
17736
|
+
const handleChange = (e) => {
|
|
17737
|
+
emit("change", e);
|
|
17738
|
+
};
|
|
17739
|
+
const handleInput = (e) => {
|
|
17740
|
+
if (isOnComposition.value) return;
|
|
17741
|
+
let value = textarea.value.value;
|
|
17742
|
+
if (typeof props.maxlength !== "undefined" && props.bytes && e.inputType !== "deleteContentBackward") {
|
|
17743
|
+
const fitValue = getFitValue(value, props.maxlength);
|
|
17744
|
+
if (value !== fitValue) {
|
|
17745
|
+
value = fitValue;
|
|
17746
|
+
}
|
|
17747
|
+
}
|
|
17748
|
+
sync(value, e, e.inputType === "insertFromPaste");
|
|
17749
|
+
forceUpdate();
|
|
17750
|
+
};
|
|
17751
|
+
const handleComposition = (e) => {
|
|
17752
|
+
if (e.type === "compositionstart") {
|
|
17753
|
+
isOnComposition.value = true;
|
|
17754
|
+
}
|
|
17755
|
+
if (e.type === "compositionend") {
|
|
17756
|
+
isOnComposition.value = false;
|
|
17757
|
+
handleInput(e);
|
|
17758
|
+
}
|
|
17759
|
+
};
|
|
17760
|
+
const handleResize = (e) => {
|
|
17761
|
+
contentStyle.value = {
|
|
17762
|
+
height: `${textarea.value ? textarea.value.offsetHeight : 0}px`
|
|
17763
|
+
};
|
|
17764
|
+
emit("resize", e);
|
|
17765
|
+
};
|
|
17766
|
+
const handlePaste = (e) => {
|
|
17767
|
+
emit("paste", e, e.clipboardData.getData("text"));
|
|
17768
|
+
};
|
|
17769
|
+
const classes = computed(() => {
|
|
17770
|
+
return {
|
|
17771
|
+
"is-focus": isFocus.value,
|
|
17772
|
+
"is-disabled": props.disabled
|
|
17773
|
+
};
|
|
17509
17774
|
});
|
|
17510
|
-
|
|
17775
|
+
const listeners = computed(() => {
|
|
17776
|
+
return {
|
|
17777
|
+
onKeyup: handleKeyup,
|
|
17778
|
+
onKeypress: handleKeypress,
|
|
17779
|
+
onKeydown: handleKeydown,
|
|
17780
|
+
onFocus: handleFocus,
|
|
17781
|
+
onBlur: handleBlur,
|
|
17782
|
+
onCompositionstart: handleComposition,
|
|
17783
|
+
onCompositionupdate: handleComposition,
|
|
17784
|
+
onCompositionend: handleComposition,
|
|
17785
|
+
onInput: handleInput,
|
|
17786
|
+
onChange: handleChange,
|
|
17787
|
+
onPaste: handlePaste
|
|
17788
|
+
};
|
|
17789
|
+
});
|
|
17790
|
+
const binds = computed(() => {
|
|
17791
|
+
return {
|
|
17792
|
+
id: props.id,
|
|
17793
|
+
autocomplete: attrs.autocomplete,
|
|
17794
|
+
spellcheck: attrs.spellcheck,
|
|
17795
|
+
placeholder: attrs.placeholder,
|
|
17796
|
+
readonly: attrs.readonly,
|
|
17797
|
+
name: attrs.name,
|
|
17798
|
+
autofocus: attrs.autofocus,
|
|
17799
|
+
disabled: props.disabled,
|
|
17800
|
+
maxlength: props.maxlength,
|
|
17801
|
+
rows: props.rows,
|
|
17802
|
+
wrap: props.wrap
|
|
17803
|
+
};
|
|
17804
|
+
});
|
|
17805
|
+
watch(
|
|
17806
|
+
() => props.modelValue,
|
|
17807
|
+
(v) => {
|
|
17808
|
+
if (props.controllable || v !== currentValue.value) {
|
|
17809
|
+
currentValue.value = v;
|
|
17810
|
+
refresh();
|
|
17811
|
+
}
|
|
17812
|
+
},
|
|
17813
|
+
{ immediate: true }
|
|
17814
|
+
);
|
|
17815
|
+
onMounted(() => {
|
|
17816
|
+
Resize.on(textarea.value, handleResize);
|
|
17817
|
+
refresh();
|
|
17818
|
+
});
|
|
17819
|
+
onBeforeUnmount(() => {
|
|
17820
|
+
Resize.off(textarea.value, handleResize);
|
|
17821
|
+
});
|
|
17822
|
+
const exposed = useNativeEmitter(textarea);
|
|
17823
|
+
expose?.({
|
|
17824
|
+
...exposed,
|
|
17825
|
+
refresh
|
|
17826
|
+
});
|
|
17827
|
+
return {
|
|
17828
|
+
currentValue,
|
|
17829
|
+
isOnComposition,
|
|
17830
|
+
isFocus,
|
|
17831
|
+
calcTextareaStyle,
|
|
17832
|
+
contentStyle,
|
|
17833
|
+
classes,
|
|
17834
|
+
listeners,
|
|
17835
|
+
binds,
|
|
17836
|
+
currentMaxlength
|
|
17837
|
+
};
|
|
17838
|
+
};
|
|
17839
|
+
|
|
17840
|
+
const inputKeys = [
|
|
17841
|
+
"id",
|
|
17842
|
+
"disabled",
|
|
17843
|
+
"maxlength",
|
|
17844
|
+
"allowDispatch",
|
|
17845
|
+
"modelValue",
|
|
17846
|
+
"bytes",
|
|
17847
|
+
"controllable"
|
|
17848
|
+
];
|
|
17849
|
+
const props$7 = {
|
|
17850
|
+
...pick(props$$, inputKeys),
|
|
17851
|
+
wrap: {
|
|
17852
|
+
type: String,
|
|
17853
|
+
validator: (v) => /(soft|hard)/.test(v),
|
|
17854
|
+
default: "soft"
|
|
17855
|
+
},
|
|
17856
|
+
rows: {
|
|
17857
|
+
type: Number,
|
|
17858
|
+
default: 2
|
|
17859
|
+
},
|
|
17860
|
+
autosize: {
|
|
17861
|
+
type: [Boolean, Object],
|
|
17862
|
+
default: false
|
|
17863
|
+
},
|
|
17864
|
+
textareaStyle: {
|
|
17865
|
+
type: [Object, Array]
|
|
17866
|
+
}
|
|
17511
17867
|
};
|
|
17512
17868
|
|
|
17513
17869
|
/** @jsxImportSource vue */
|
|
17514
17870
|
|
|
17515
|
-
const COMPONENT_NAME$b = 'vc-
|
|
17516
|
-
const
|
|
17871
|
+
const COMPONENT_NAME$b = 'vc-textarea';
|
|
17872
|
+
const Textarea = /* @__PURE__ */ defineComponent({
|
|
17517
17873
|
name: COMPONENT_NAME$b,
|
|
17518
|
-
props: props$
|
|
17874
|
+
props: Object.assign(props$7, {
|
|
17875
|
+
indicator: {
|
|
17876
|
+
type: [Boolean, Object],
|
|
17877
|
+
default: false
|
|
17878
|
+
},
|
|
17879
|
+
indicateClass: String
|
|
17880
|
+
}),
|
|
17881
|
+
emits: ['update:modelValue', 'input', 'change', 'focus', 'blur', 'clear', 'paste', 'keydown', 'keypress', 'keyup', 'enter', 'cancel', 'resize'],
|
|
17519
17882
|
setup(props, {
|
|
17520
|
-
|
|
17883
|
+
expose
|
|
17521
17884
|
}) {
|
|
17522
|
-
const
|
|
17523
|
-
const
|
|
17524
|
-
|
|
17525
|
-
|
|
17526
|
-
|
|
17527
|
-
|
|
17528
|
-
|
|
17529
|
-
|
|
17530
|
-
|
|
17531
|
-
|
|
17532
|
-
|
|
17533
|
-
|
|
17534
|
-
|
|
17535
|
-
|
|
17536
|
-
}
|
|
17537
|
-
if (line === 0) {
|
|
17538
|
-
endIndex.value = 0;
|
|
17539
|
-
isActive.value = true;
|
|
17540
|
-
} else {
|
|
17541
|
-
endIndex.value = getFitIndex({
|
|
17542
|
-
el: instance.vnode.el,
|
|
17543
|
-
line,
|
|
17544
|
-
value,
|
|
17545
|
-
suffix,
|
|
17546
|
-
indent
|
|
17547
|
-
});
|
|
17548
|
-
isActive.value = true;
|
|
17549
|
-
}
|
|
17550
|
-
emit('clip', endIndex.value);
|
|
17551
|
-
};
|
|
17552
|
-
const handleResize = props.resize === true || props.resize === 0 ? calcPosition : debounce(calcPosition, props.resize || 0);
|
|
17553
|
-
const handleMouseOver = e => {
|
|
17554
|
-
if (endIndex.value > 0) {
|
|
17555
|
-
Popover.open({
|
|
17556
|
-
el: document.body,
|
|
17557
|
-
name: 'vc-text-popover',
|
|
17558
|
-
// 确保不重复创建
|
|
17559
|
-
triggerEl: e.target,
|
|
17560
|
-
hover: true,
|
|
17561
|
-
theme: 'dark',
|
|
17562
|
-
placement: props.placement,
|
|
17563
|
-
portalClassName: props.portalClassName,
|
|
17564
|
-
portalStyle: props.portalStyle || `width: ${e.target.clientWidth}px`,
|
|
17565
|
-
content: props.value
|
|
17566
|
-
});
|
|
17567
|
-
}
|
|
17568
|
-
};
|
|
17569
|
-
const handleMouseOut = () => {
|
|
17570
|
-
// Do.
|
|
17571
|
-
};
|
|
17572
|
-
['value', 'indent', 'line'].forEach(key => {
|
|
17573
|
-
watch(() => props[key], calcPosition);
|
|
17885
|
+
const textarea = ref();
|
|
17886
|
+
const {
|
|
17887
|
+
currentValue,
|
|
17888
|
+
classes,
|
|
17889
|
+
contentStyle,
|
|
17890
|
+
listeners,
|
|
17891
|
+
binds,
|
|
17892
|
+
calcTextareaStyle,
|
|
17893
|
+
currentMaxlength
|
|
17894
|
+
} = useTextarea(textarea, expose);
|
|
17895
|
+
const indicatorNum = computed(() => {
|
|
17896
|
+
const currentLength = (String(props.modelValue) || '').length;
|
|
17897
|
+
const extraLength = props.bytes ? getBytesSize(props.modelValue) || 0 : 0;
|
|
17898
|
+
const length = props.indicator && props.indicator.inverted ? props.maxlength + extraLength - currentLength : currentLength - extraLength;
|
|
17899
|
+
return `${length}/${props.maxlength}`;
|
|
17574
17900
|
});
|
|
17575
|
-
|
|
17576
|
-
props.
|
|
17901
|
+
const indicateInline = computed(() => {
|
|
17902
|
+
return props.indicator && props.indicator.inline;
|
|
17577
17903
|
});
|
|
17578
|
-
onBeforeUnmount(() => {
|
|
17579
|
-
props.resize !== false && Resize.off(instance.vnode.el, handleResize);
|
|
17580
|
-
});
|
|
17581
|
-
const Content = props.tag;
|
|
17582
17904
|
return () => {
|
|
17583
|
-
return createVNode(
|
|
17584
|
-
"class":
|
|
17585
|
-
|
|
17586
|
-
"
|
|
17587
|
-
|
|
17588
|
-
|
|
17589
|
-
|
|
17590
|
-
|
|
17591
|
-
|
|
17592
|
-
|
|
17593
|
-
|
|
17594
|
-
|
|
17905
|
+
return createVNode("div", {
|
|
17906
|
+
"class": [classes.value, 'vc-textarea']
|
|
17907
|
+
}, [createVNode("div", {
|
|
17908
|
+
"class": "vc-textarea__wrapper"
|
|
17909
|
+
}, [createVNode("div", {
|
|
17910
|
+
"style": contentStyle.value,
|
|
17911
|
+
"class": ['vc-textarea__content']
|
|
17912
|
+
}, [createVNode("textarea", mergeProps({
|
|
17913
|
+
"ref": textarea
|
|
17914
|
+
}, binds.value, listeners.value, {
|
|
17915
|
+
"value": currentValue.value,
|
|
17916
|
+
"maxlength": currentMaxlength.value,
|
|
17917
|
+
"style": [props.textareaStyle, calcTextareaStyle.value]
|
|
17918
|
+
}), null)]), props.indicator && createVNode("div", {
|
|
17919
|
+
"class": [props.indicateClass, {
|
|
17920
|
+
'is-inline': indicateInline.value
|
|
17921
|
+
}, 'vc-textarea__indicator']
|
|
17922
|
+
}, [indicatorNum.value])])]);
|
|
17595
17923
|
};
|
|
17596
17924
|
}
|
|
17597
17925
|
});
|
|
17598
17926
|
|
|
17599
|
-
const MText = Text;
|
|
17600
|
-
|
|
17601
|
-
const props$7 = {
|
|
17602
|
-
tag: {
|
|
17603
|
-
type: String,
|
|
17604
|
-
default: "div"
|
|
17605
|
-
}
|
|
17606
|
-
};
|
|
17607
|
-
|
|
17608
17927
|
/** @jsxImportSource vue */
|
|
17609
17928
|
|
|
17610
|
-
const COMPONENT_NAME$a = '
|
|
17611
|
-
const
|
|
17929
|
+
const COMPONENT_NAME$a = 'vcm-textarea';
|
|
17930
|
+
const MTextarea = /* @__PURE__ */ defineComponent({
|
|
17612
17931
|
name: COMPONENT_NAME$a,
|
|
17613
|
-
props: props$7,
|
|
17932
|
+
props: Object.assign(props$7, {
|
|
17933
|
+
align: {
|
|
17934
|
+
type: String,
|
|
17935
|
+
default: 'left'
|
|
17936
|
+
}
|
|
17937
|
+
}),
|
|
17938
|
+
emits: ['update:modelValue', 'input', 'change', 'focus', 'blur', 'clear', 'paste', 'keydown', 'keypress', 'keyup', 'enter', 'cancel', 'resize'],
|
|
17614
17939
|
setup(props, {
|
|
17615
|
-
|
|
17940
|
+
expose
|
|
17616
17941
|
}) {
|
|
17942
|
+
const textarea = ref();
|
|
17943
|
+
const {
|
|
17944
|
+
currentValue,
|
|
17945
|
+
classes,
|
|
17946
|
+
contentStyle,
|
|
17947
|
+
listeners,
|
|
17948
|
+
binds,
|
|
17949
|
+
calcTextareaStyle,
|
|
17950
|
+
currentMaxlength
|
|
17951
|
+
} = useTextarea(textarea, expose);
|
|
17617
17952
|
return () => {
|
|
17618
17953
|
return createVNode("div", {
|
|
17619
|
-
"class":
|
|
17620
|
-
}, [
|
|
17954
|
+
"class": [classes.value, 'vcm-textarea']
|
|
17955
|
+
}, [createVNode("div", {
|
|
17956
|
+
"class": "vcm-textarea__wrapper"
|
|
17957
|
+
}, [createVNode("div", {
|
|
17958
|
+
"style": contentStyle.value,
|
|
17959
|
+
"class": ['vcm-textarea__content']
|
|
17960
|
+
}, [createVNode("textarea", mergeProps({
|
|
17961
|
+
"ref": textarea
|
|
17962
|
+
}, binds.value, listeners.value, {
|
|
17963
|
+
"value": currentValue.value,
|
|
17964
|
+
"maxlength": currentMaxlength.value,
|
|
17965
|
+
"style": [props.textareaStyle, calcTextareaStyle.value]
|
|
17966
|
+
}), null)])])]);
|
|
17621
17967
|
};
|
|
17622
17968
|
}
|
|
17623
17969
|
});
|
|
17624
17970
|
|
|
17625
|
-
const MTextarea = Textarea;
|
|
17626
|
-
|
|
17627
17971
|
const props$6 = {
|
|
17628
17972
|
tag: {
|
|
17629
17973
|
type: String,
|