@wfrog/vc-ui 1.1.0 → 1.2.0
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/README.md +3 -3
- package/dist/es/chunk/{OEa4tYPF.mjs → -ga82G_B.mjs} +1 -1
- package/dist/es/chunk/B1BnPYNG.mjs +163 -0
- package/dist/es/chunk/{DFOLES4O.mjs → BA2yoAwy.mjs} +403 -502
- package/dist/es/chunk/{BpqBBo4z.mjs → BDyXj_90.mjs} +2 -2
- package/dist/es/chunk/{BI0vrXwX.mjs → BI-fNJhk.mjs} +6 -3
- package/dist/es/chunk/{BsGCX4td.mjs → BK4T_2ha.mjs} +1 -1
- package/dist/es/chunk/{73YgKz3H.mjs → BLLKi_0v.mjs} +1 -1
- package/dist/es/chunk/{DTLPXrjb.mjs → BTsEMnf_.mjs} +1 -1
- package/dist/es/chunk/{B5UQmWXg.mjs → BUf50Y7Y.mjs} +41 -21
- package/dist/es/chunk/{BzedaLtg.mjs → BYVaz5Or.mjs} +2 -2
- package/dist/es/chunk/BaJ7k5Lg.mjs +209 -0
- package/dist/es/chunk/{Bp9jXKX0.mjs → BambM7zX.mjs} +2 -2
- package/dist/es/chunk/{CizMbf5K.mjs → Bl0WQiki.mjs} +1 -1
- package/dist/es/chunk/{CLbj8G-F.mjs → Bnot0Gwc.mjs} +12 -4
- package/dist/es/chunk/{4eyJqDa9.mjs → BoGGHTrJ.mjs} +4 -2
- package/dist/es/chunk/C7Dgjpd1.mjs +242 -0
- package/dist/es/chunk/{D0LB3gF-.mjs → CKbkzlkO.mjs} +104 -72
- package/dist/es/chunk/{DrgvuOYH.mjs → CL5WTCB3.mjs} +4 -2
- package/dist/es/chunk/{XwSiBVsA.mjs → CM_I1FoA.mjs} +2 -2
- package/dist/es/chunk/{DouIsSPi.mjs → CNILa-hz.mjs} +1 -1
- package/dist/es/chunk/{DRoyW749.mjs → CcKUdl3e.mjs} +12 -6
- package/dist/es/chunk/CidLkmft.mjs +188 -0
- package/dist/es/chunk/{HAog8AWU.mjs → CitH0taR.mjs} +816 -539
- package/dist/es/chunk/{Cu6erWl4.mjs → CzqeSQn4.mjs} +73 -38
- package/dist/es/chunk/{CLCfXfvv.mjs → D7JQbDFE.mjs} +154 -118
- package/dist/es/chunk/{DaCDeO95.mjs → D9iEroQw.mjs} +1 -207
- package/dist/es/chunk/{cPBw23yt.mjs → DEPZhJ0Z.mjs} +21 -16
- package/dist/es/chunk/{CPERtDRX.mjs → DHpbQMGk.mjs} +32 -22
- package/dist/es/chunk/{BHsNc7jl.mjs → DKpRXDRE.mjs} +82 -55
- package/dist/es/chunk/{CLMc8GzD.mjs → DMYHOxhk.mjs} +462 -311
- package/dist/es/chunk/{CBSopeeE.mjs → DQHGjqG5.mjs} +9 -4
- package/dist/es/chunk/DTEM_vYZ.mjs +23 -0
- package/dist/es/chunk/{NQBKROII.mjs → DWcIzeMM.mjs} +1 -1
- package/dist/es/chunk/{FHvLvzEB.mjs → DX38FfmL.mjs} +1088 -697
- package/dist/es/chunk/{DZD-YnCt.mjs → Dcm-lOj8.mjs} +4 -4
- package/dist/es/chunk/{09Ec85_u.mjs → DdmNdV7I.mjs} +398 -278
- package/dist/es/chunk/{f0-vIQGp.mjs → DfHTA5LW.mjs} +3 -3
- package/dist/es/chunk/DgFT6snA.mjs +835 -0
- package/dist/es/chunk/{DwKWIlzw.mjs → DgSzI6Fw.mjs} +106 -71
- package/dist/es/chunk/{BcTuAX8r.mjs → Dsye5ZEp.mjs} +5 -3
- package/dist/es/chunk/{BsLJxiSC.mjs → Dw-yyl2m.mjs} +1 -1
- package/dist/es/chunk/{DXPWe_a5.mjs → U13Qpiki.mjs} +19 -13
- package/dist/es/chunk/{axpwSky6.mjs → _8u_XVHh.mjs} +168 -120
- package/dist/es/chunk/egk9EEzo.mjs +66 -0
- package/dist/es/chunk/{BUEEWLrd.mjs → ezK_XQQd.mjs} +15 -6
- package/dist/es/chunk/{Bl2KlMdP.mjs → oW98L-44.mjs} +8 -3
- package/dist/es/chunk/{Dk6Bx0KT.mjs → plK2vnjp.mjs} +8 -5
- package/dist/es/components/awesome-icon/awesome-icon.mjs +2 -1
- package/dist/es/components/backbottom/backbottom.mjs +2 -2
- package/dist/es/components/button/button.mjs +105 -76
- package/dist/es/components/choice/choice.mjs +2 -2
- package/dist/es/components/config-provider/config-provider.d.ts +1 -0
- package/dist/es/components/config-provider/config-provider.mjs +13 -5
- package/dist/es/components/cropper/cropper.mjs +44 -33
- package/dist/es/components/currency/currency.mjs +5 -5
- package/dist/es/components/daterange-picker/daterange-picker.mjs +2267 -1522
- package/dist/es/components/dialog/dialog.mjs +213 -172
- package/dist/es/components/dialog/index.css +1 -1
- package/dist/es/components/dialog-camera-upload/dialog-camera-upload.mjs +11 -11
- package/dist/es/components/dialog-map-point/dialog-map-point.mjs +5 -4
- package/dist/es/components/dialog-upload-images/dialog-upload-images.mjs +495 -314
- package/dist/es/components/dialog-upload-images/index.css +1 -1
- package/dist/es/components/drag-verify/drag-verify.mjs +3 -3
- package/dist/es/components/drawer/drawer.mjs +136 -94
- package/dist/es/components/drawer/index.css +1 -1
- package/dist/es/components/easy-pagination/easy-pagination.mjs +2 -2
- package/dist/es/components/el-icon/el-icon.mjs +1 -1
- package/dist/es/components/el-icon/index.css +3 -2
- package/dist/es/components/flag/flag.mjs +2 -1
- package/dist/es/components/icon/icon.mjs +10 -31
- package/dist/es/components/icon/icon.vue.d.ts +1 -1
- package/dist/es/components/icon/icon2.mjs +1 -1
- package/dist/es/components/icon/index.mjs +2 -2
- package/dist/es/components/icon-picker/components/collections.vue.d.ts +625 -0
- package/dist/es/components/icon-picker/components/panel.vue.d.ts +9 -0
- package/dist/es/components/icon-picker/icon-picker.d.ts +40 -0
- package/dist/es/components/icon-picker/icon-picker.mjs +1375 -0
- package/dist/es/components/icon-picker/icon-picker.vue.d.ts +9 -0
- package/dist/es/components/icon-picker/index.css +121 -0
- package/dist/es/components/icon-picker/index.d.ts +4 -0
- package/dist/es/components/icon-picker/index.mjs +6 -0
- package/dist/es/components/iconify-icon/iconify-icon.d.ts +5 -0
- package/dist/es/components/iconify-icon/iconify-icon.mjs +1860 -0
- package/dist/es/components/iconify-icon/iconify-icon.vue.d.ts +6 -0
- package/dist/es/components/iconify-icon/index.css +11 -0
- package/dist/es/components/iconify-icon/index.d.ts +4 -0
- package/dist/es/components/iconify-icon/index.mjs +6 -0
- package/dist/es/components/image/image.mjs +5 -5
- package/dist/es/components/input/input.mjs +4 -4
- package/dist/es/components/input/input.vue.d.ts +63 -54
- package/dist/es/components/input-number/input-number.mjs +5 -5
- package/dist/es/components/pca-picker/components/c.vue.d.ts +4 -4
- package/dist/es/components/pca-picker/index.css +1 -1
- package/dist/es/components/pca-picker/pca-picker.mjs +154 -160
- package/dist/es/components/pca-picker/pca-picker.vue.d.ts +12 -11
- package/dist/es/components/qr-code/qr-code.mjs +2 -1
- package/dist/es/components/screenfull/screenfull.mjs +6 -5
- package/dist/es/components/scrollbar/index.css +18 -0
- package/dist/es/components/scrollbar/index.d.ts +4 -0
- package/dist/es/components/scrollbar/index.mjs +6 -0
- package/dist/es/components/scrollbar/scrollbar.d.ts +4 -0
- package/dist/es/components/scrollbar/scrollbar.mjs +65 -0
- package/dist/es/components/scrollbar/scrollbar.vue.d.ts +588 -0
- package/dist/es/components/select/select.mjs +7 -7
- package/dist/es/components/single-player/index.css +1 -1
- package/dist/es/components/single-player/single-player.mjs +265 -166
- package/dist/es/components/svg-icon/index.css +3 -2
- package/dist/es/components/svg-icon/svg-icon.mjs +3 -3
- package/dist/es/components/switch/switch.mjs +2 -2
- package/dist/es/components/sync-scroll-container/sync-scroll-container.mjs +2 -2
- package/dist/es/components/tags/tags.mjs +9 -9
- package/dist/es/components/text-ellipsis/text-ellipsis.mjs +4 -4
- package/dist/es/components/thousand-input/thousand-input.mjs +5 -4
- package/dist/es/components/thousand-input/thousand-input.vue.d.ts +126 -108
- package/dist/es/components/tinymce/index.css +1 -1
- package/dist/es/components/tinymce/tinymce.mjs +9 -8
- package/dist/es/components/tree-picker/components/popover-cascader.vue.d.ts +179 -141
- package/dist/es/components/tree-picker/popover-cascader.css +1 -1
- package/dist/es/components/tree-picker/tree-picker.mjs +10 -10
- package/dist/es/components/tree-picker/tree-picker.vue.d.ts +12 -11
- package/dist/es/components/upload-file/upload-file.mjs +3 -3
- package/dist/es/index.d.ts +3 -0
- package/dist/es/index.mjs +41 -31
- package/dist/global.d.ts +3 -0
- package/dist/index.css +166 -22
- package/package.json +8 -2
- package/dist/es/chunk/BtTIs3tG.mjs +0 -138
- package/dist/es/chunk/C7wQNvSS.mjs +0 -728
- package/dist/es/chunk/Cbhe4I9Z.mjs +0 -16
- package/dist/es/chunk/DihosKp1.mjs +0 -140
- package/dist/es/components/icon/index.css +0 -9
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent, inject, ref, computed, onBeforeUnmount, toRef, createBlock, openBlock, Transition, unref, withCtx, withDirectives, createElementVNode, withModifiers, normalizeClass, normalizeStyle, vShow, createElementBlock, Fragment, createVNode, watch, nextTick, provide, reactive, onActivated, onMounted, onUpdated, createCommentVNode, resolveDynamicComponent, renderSlot } from 'vue';
|
|
2
2
|
import { useEventListener, isClient, useResizeObserver } from '@vueuse/core';
|
|
3
|
-
import { c as buildProps, u as useNamespace, t as throwError, f as isNumber, d as definePropType, e as debugWarn, p as isObject } from './
|
|
4
|
-
import { _ as _export_sfc, w as withInstall } from './
|
|
5
|
-
import { u as useAriaProps } from './
|
|
6
|
-
import { a as addUnit } from './
|
|
3
|
+
import { c as buildProps, u as useNamespace, t as throwError, f as isNumber, d as definePropType, e as debugWarn, p as isObject } from './CcKUdl3e.mjs';
|
|
4
|
+
import { _ as _export_sfc, w as withInstall } from './BTsEMnf_.mjs';
|
|
5
|
+
import { u as useAriaProps } from './BDyXj_90.mjs';
|
|
6
|
+
import { a as addUnit } from './Bl0WQiki.mjs';
|
|
7
7
|
|
|
8
8
|
const GAP = 4;
|
|
9
9
|
const BAR_MAP = {
|
|
@@ -37,7 +37,9 @@ const renderThumbStyle = ({
|
|
|
37
37
|
transform: `translate${bar.axis}(${move}%)`
|
|
38
38
|
});
|
|
39
39
|
|
|
40
|
-
const scrollbarContextKey = Symbol(
|
|
40
|
+
const scrollbarContextKey = Symbol(
|
|
41
|
+
"scrollbarContextKey"
|
|
42
|
+
);
|
|
41
43
|
|
|
42
44
|
const thumbProps = buildProps({
|
|
43
45
|
vertical: Boolean,
|
|
@@ -51,7 +53,7 @@ const thumbProps = buildProps({
|
|
|
51
53
|
});
|
|
52
54
|
|
|
53
55
|
const COMPONENT_NAME$1 = "Thumb";
|
|
54
|
-
const _sfc_main$2 =
|
|
56
|
+
const _sfc_main$2 = defineComponent({
|
|
55
57
|
__name: "thumb",
|
|
56
58
|
props: thumbProps,
|
|
57
59
|
setup(__props) {
|
|
@@ -70,12 +72,16 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
70
72
|
let baseScrollWidth = 0;
|
|
71
73
|
let originalOnSelectStart = isClient ? document.onselectstart : null;
|
|
72
74
|
const bar = computed(() => BAR_MAP[props.vertical ? "vertical" : "horizontal"]);
|
|
73
|
-
const thumbStyle = computed(
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
75
|
+
const thumbStyle = computed(
|
|
76
|
+
() => renderThumbStyle({
|
|
77
|
+
size: props.size,
|
|
78
|
+
move: props.move,
|
|
79
|
+
bar: bar.value
|
|
80
|
+
})
|
|
81
|
+
);
|
|
82
|
+
const offsetRatio = computed(
|
|
83
|
+
() => instance.value[bar.value.offset] ** 2 / scrollbar.wrapElement[bar.value.scrollSize] / props.ratio / thumb.value[bar.value.offset]
|
|
84
|
+
);
|
|
79
85
|
const clickThumbHandler = (e) => {
|
|
80
86
|
var _a;
|
|
81
87
|
e.stopPropagation();
|
|
@@ -91,7 +97,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
91
97
|
const clickTrackHandler = (e) => {
|
|
92
98
|
if (!thumb.value || !instance.value || !scrollbar.wrapElement)
|
|
93
99
|
return;
|
|
94
|
-
const offset = Math.abs(
|
|
100
|
+
const offset = Math.abs(
|
|
101
|
+
e.target.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]
|
|
102
|
+
);
|
|
95
103
|
const thumbHalf = thumb.value[bar.value.offset] / 2;
|
|
96
104
|
const thumbPositionPercentage = (offset - thumbHalf) * 100 * offsetRatio.value / instance.value[bar.value.offset];
|
|
97
105
|
scrollbar.wrapElement[bar.value.scroll] = thumbPositionPercentage * scrollbar.wrapElement[bar.value.scrollSize] / 100;
|
|
@@ -148,30 +156,48 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
148
156
|
if (document.onselectstart !== originalOnSelectStart)
|
|
149
157
|
document.onselectstart = originalOnSelectStart;
|
|
150
158
|
};
|
|
151
|
-
useEventListener(
|
|
152
|
-
|
|
159
|
+
useEventListener(
|
|
160
|
+
toRef(scrollbar, "scrollbarElement"),
|
|
161
|
+
"mousemove",
|
|
162
|
+
mouseMoveScrollbarHandler
|
|
163
|
+
);
|
|
164
|
+
useEventListener(
|
|
165
|
+
toRef(scrollbar, "scrollbarElement"),
|
|
166
|
+
"mouseleave",
|
|
167
|
+
mouseLeaveScrollbarHandler
|
|
168
|
+
);
|
|
153
169
|
return (_ctx, _cache) => {
|
|
154
170
|
return openBlock(), createBlock(Transition, {
|
|
155
171
|
name: unref(ns).b("fade"),
|
|
156
172
|
persisted: ""
|
|
157
173
|
}, {
|
|
158
174
|
default: withCtx(() => [
|
|
159
|
-
withDirectives(createElementVNode(
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
+
withDirectives(createElementVNode(
|
|
176
|
+
"div",
|
|
177
|
+
{
|
|
178
|
+
ref_key: "instance",
|
|
179
|
+
ref: instance,
|
|
180
|
+
class: normalizeClass([unref(ns).e("bar"), unref(ns).is(bar.value.key)]),
|
|
181
|
+
onMousedown: clickTrackHandler,
|
|
182
|
+
onClick: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
183
|
+
}, ["stop"]))
|
|
184
|
+
},
|
|
185
|
+
[
|
|
186
|
+
createElementVNode(
|
|
187
|
+
"div",
|
|
188
|
+
{
|
|
189
|
+
ref_key: "thumb",
|
|
190
|
+
ref: thumb,
|
|
191
|
+
class: normalizeClass(unref(ns).e("thumb")),
|
|
192
|
+
style: normalizeStyle(thumbStyle.value),
|
|
193
|
+
onMousedown: clickThumbHandler
|
|
194
|
+
},
|
|
195
|
+
null,
|
|
196
|
+
38
|
|
197
|
+
)
|
|
198
|
+
],
|
|
199
|
+
34
|
|
200
|
+
), [
|
|
175
201
|
[vShow, _ctx.always || visible.value]
|
|
176
202
|
])
|
|
177
203
|
]),
|
|
@@ -180,7 +206,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
180
206
|
};
|
|
181
207
|
}
|
|
182
208
|
});
|
|
183
|
-
var Thumb = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__file", "thumb.vue"]]);
|
|
209
|
+
var Thumb = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/scrollbar/src/thumb.vue"]]);
|
|
184
210
|
|
|
185
211
|
const barProps = buildProps({
|
|
186
212
|
always: {
|
|
@@ -193,10 +219,10 @@ const barProps = buildProps({
|
|
|
193
219
|
}
|
|
194
220
|
});
|
|
195
221
|
|
|
196
|
-
const _sfc_main$1 =
|
|
222
|
+
const _sfc_main$1 = defineComponent({
|
|
197
223
|
__name: "bar",
|
|
198
224
|
props: barProps,
|
|
199
|
-
setup(__props, { expose }) {
|
|
225
|
+
setup(__props, { expose: __expose }) {
|
|
200
226
|
const props = __props;
|
|
201
227
|
const scrollbar = inject(scrollbarContextKey);
|
|
202
228
|
const moveX = ref(0);
|
|
@@ -228,30 +254,35 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
228
254
|
sizeHeight.value = height + GAP < offsetHeight ? `${height}px` : "";
|
|
229
255
|
sizeWidth.value = width + GAP < offsetWidth ? `${width}px` : "";
|
|
230
256
|
};
|
|
231
|
-
|
|
257
|
+
__expose({
|
|
232
258
|
handleScroll,
|
|
233
259
|
update
|
|
234
260
|
});
|
|
235
261
|
return (_ctx, _cache) => {
|
|
236
|
-
return openBlock(), createElementBlock(
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
ratio
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
262
|
+
return openBlock(), createElementBlock(
|
|
263
|
+
Fragment,
|
|
264
|
+
null,
|
|
265
|
+
[
|
|
266
|
+
createVNode(Thumb, {
|
|
267
|
+
move: moveX.value,
|
|
268
|
+
ratio: ratioX.value,
|
|
269
|
+
size: sizeWidth.value,
|
|
270
|
+
always: _ctx.always
|
|
271
|
+
}, null, 8, ["move", "ratio", "size", "always"]),
|
|
272
|
+
createVNode(Thumb, {
|
|
273
|
+
move: moveY.value,
|
|
274
|
+
ratio: ratioY.value,
|
|
275
|
+
size: sizeHeight.value,
|
|
276
|
+
vertical: "",
|
|
277
|
+
always: _ctx.always
|
|
278
|
+
}, null, 8, ["move", "ratio", "size", "always"])
|
|
279
|
+
],
|
|
280
|
+
64
|
|
281
|
+
);
|
|
251
282
|
};
|
|
252
283
|
}
|
|
253
284
|
});
|
|
254
|
-
var Bar = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "bar.vue"]]);
|
|
285
|
+
var Bar = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/scrollbar/src/bar.vue"]]);
|
|
255
286
|
|
|
256
287
|
const scrollbarProps = buildProps({
|
|
257
288
|
distance: {
|
|
@@ -309,16 +340,18 @@ const scrollbarEmits = {
|
|
|
309
340
|
}) => [scrollTop, scrollLeft].every(isNumber)
|
|
310
341
|
};
|
|
311
342
|
|
|
343
|
+
const _hoisted_1 = ["tabindex"];
|
|
312
344
|
const COMPONENT_NAME = "ElScrollbar";
|
|
313
|
-
const
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
345
|
+
const _sfc_main = defineComponent({
|
|
346
|
+
...{
|
|
347
|
+
name: COMPONENT_NAME
|
|
348
|
+
},
|
|
349
|
+
__name: "scrollbar",
|
|
318
350
|
props: scrollbarProps,
|
|
319
351
|
emits: scrollbarEmits,
|
|
320
|
-
setup(__props, { expose, emit }) {
|
|
352
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
321
353
|
const props = __props;
|
|
354
|
+
const emit = __emit;
|
|
322
355
|
const ns = useNamespace("scrollbar");
|
|
323
356
|
let stopResizeObserver = void 0;
|
|
324
357
|
let stopWrapResizeObserver = void 0;
|
|
@@ -439,31 +472,41 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
439
472
|
(_a = barRef.value) == null ? void 0 : _a.update();
|
|
440
473
|
distanceScrollState[direction] = false;
|
|
441
474
|
};
|
|
442
|
-
watch(
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
475
|
+
watch(
|
|
476
|
+
() => props.noresize,
|
|
477
|
+
(noresize) => {
|
|
478
|
+
if (noresize) {
|
|
479
|
+
stopResizeObserver == null ? void 0 : stopResizeObserver();
|
|
480
|
+
stopWrapResizeObserver == null ? void 0 : stopWrapResizeObserver();
|
|
481
|
+
stopResizeListener == null ? void 0 : stopResizeListener();
|
|
482
|
+
} else {
|
|
483
|
+
({ stop: stopResizeObserver } = useResizeObserver(resizeRef, update));
|
|
484
|
+
({ stop: stopWrapResizeObserver } = useResizeObserver(wrapRef, update));
|
|
485
|
+
stopResizeListener = useEventListener("resize", update);
|
|
486
|
+
}
|
|
487
|
+
},
|
|
488
|
+
{ immediate: true }
|
|
489
|
+
);
|
|
490
|
+
watch(
|
|
491
|
+
() => [props.maxHeight, props.height],
|
|
492
|
+
() => {
|
|
493
|
+
if (!props.native)
|
|
494
|
+
nextTick(() => {
|
|
495
|
+
var _a;
|
|
496
|
+
update();
|
|
497
|
+
if (wrapRef.value) {
|
|
498
|
+
(_a = barRef.value) == null ? void 0 : _a.handleScroll(wrapRef.value);
|
|
499
|
+
}
|
|
500
|
+
});
|
|
451
501
|
}
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
}
|
|
461
|
-
});
|
|
462
|
-
});
|
|
463
|
-
provide(scrollbarContextKey, reactive({
|
|
464
|
-
scrollbarElement: scrollbarRef,
|
|
465
|
-
wrapElement: wrapRef
|
|
466
|
-
}));
|
|
502
|
+
);
|
|
503
|
+
provide(
|
|
504
|
+
scrollbarContextKey,
|
|
505
|
+
reactive({
|
|
506
|
+
scrollbarElement: scrollbarRef,
|
|
507
|
+
wrapElement: wrapRef
|
|
508
|
+
})
|
|
509
|
+
);
|
|
467
510
|
onActivated(() => {
|
|
468
511
|
if (wrapRef.value) {
|
|
469
512
|
wrapRef.value.scrollTop = wrapScrollTop;
|
|
@@ -477,7 +520,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
477
520
|
});
|
|
478
521
|
});
|
|
479
522
|
onUpdated(() => update());
|
|
480
|
-
|
|
523
|
+
__expose({
|
|
481
524
|
wrapRef,
|
|
482
525
|
update,
|
|
483
526
|
scrollTo,
|
|
@@ -486,47 +529,52 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
486
529
|
handleScroll
|
|
487
530
|
});
|
|
488
531
|
return (_ctx, _cache) => {
|
|
489
|
-
return openBlock(), createElementBlock(
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
532
|
+
return openBlock(), createElementBlock(
|
|
533
|
+
"div",
|
|
534
|
+
{
|
|
535
|
+
ref_key: "scrollbarRef",
|
|
536
|
+
ref: scrollbarRef,
|
|
537
|
+
class: normalizeClass(unref(ns).b())
|
|
538
|
+
},
|
|
539
|
+
[
|
|
540
|
+
createElementVNode("div", {
|
|
541
|
+
ref_key: "wrapRef",
|
|
542
|
+
ref: wrapRef,
|
|
543
|
+
class: normalizeClass(wrapKls.value),
|
|
544
|
+
style: normalizeStyle(wrapStyle.value),
|
|
545
|
+
tabindex: _ctx.tabindex,
|
|
546
|
+
onScroll: handleScroll
|
|
547
|
+
}, [
|
|
548
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), {
|
|
549
|
+
id: _ctx.id,
|
|
550
|
+
ref_key: "resizeRef",
|
|
551
|
+
ref: resizeRef,
|
|
552
|
+
class: normalizeClass(resizeKls.value),
|
|
553
|
+
style: normalizeStyle(_ctx.viewStyle),
|
|
554
|
+
role: _ctx.role,
|
|
555
|
+
"aria-label": _ctx.ariaLabel,
|
|
556
|
+
"aria-orientation": _ctx.ariaOrientation
|
|
557
|
+
}, {
|
|
558
|
+
default: withCtx(() => [
|
|
559
|
+
renderSlot(_ctx.$slots, "default")
|
|
560
|
+
]),
|
|
561
|
+
_: 3
|
|
562
|
+
}, 8, ["id", "class", "style", "role", "aria-label", "aria-orientation"]))
|
|
563
|
+
], 46, _hoisted_1),
|
|
564
|
+
!_ctx.native ? (openBlock(), createBlock(Bar, {
|
|
565
|
+
key: 0,
|
|
566
|
+
ref_key: "barRef",
|
|
567
|
+
ref: barRef,
|
|
568
|
+
always: _ctx.always,
|
|
569
|
+
"min-size": _ctx.minSize
|
|
570
|
+
}, null, 8, ["always", "min-size"])) : createCommentVNode("v-if", true)
|
|
571
|
+
],
|
|
572
|
+
2
|
|
573
|
+
);
|
|
526
574
|
};
|
|
527
575
|
}
|
|
528
576
|
});
|
|
529
|
-
var Scrollbar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "scrollbar.vue"]]);
|
|
577
|
+
var Scrollbar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/scrollbar/src/scrollbar.vue"]]);
|
|
530
578
|
|
|
531
579
|
const ElScrollbar = withInstall(Scrollbar);
|
|
532
580
|
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { defineComponent, computed, createElementBlock, openBlock, normalizeStyle, normalizeClass, unref, createCommentVNode, renderSlot } from 'vue';
|
|
2
|
+
import { c as buildProps, d as definePropType, u as useNamespace } from './CcKUdl3e.mjs';
|
|
3
|
+
import { _ as _export_sfc, w as withInstall } from './BTsEMnf_.mjs';
|
|
4
|
+
|
|
5
|
+
const dividerProps = buildProps({
|
|
6
|
+
direction: {
|
|
7
|
+
type: String,
|
|
8
|
+
values: ["horizontal", "vertical"],
|
|
9
|
+
default: "horizontal"
|
|
10
|
+
},
|
|
11
|
+
contentPosition: {
|
|
12
|
+
type: String,
|
|
13
|
+
values: ["left", "center", "right"],
|
|
14
|
+
default: "center"
|
|
15
|
+
},
|
|
16
|
+
borderStyle: {
|
|
17
|
+
type: definePropType(String),
|
|
18
|
+
default: "solid"
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const _sfc_main = defineComponent({
|
|
23
|
+
...{
|
|
24
|
+
name: "ElDivider"
|
|
25
|
+
},
|
|
26
|
+
__name: "divider",
|
|
27
|
+
props: dividerProps,
|
|
28
|
+
setup(__props) {
|
|
29
|
+
const props = __props;
|
|
30
|
+
const ns = useNamespace("divider");
|
|
31
|
+
const dividerStyle = computed(() => {
|
|
32
|
+
return ns.cssVar({
|
|
33
|
+
"border-style": props.borderStyle
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
return (_ctx, _cache) => {
|
|
37
|
+
return openBlock(), createElementBlock(
|
|
38
|
+
"div",
|
|
39
|
+
{
|
|
40
|
+
class: normalizeClass([unref(ns).b(), unref(ns).m(_ctx.direction)]),
|
|
41
|
+
style: normalizeStyle(dividerStyle.value),
|
|
42
|
+
role: "separator"
|
|
43
|
+
},
|
|
44
|
+
[
|
|
45
|
+
_ctx.$slots.default && _ctx.direction !== "vertical" ? (openBlock(), createElementBlock(
|
|
46
|
+
"div",
|
|
47
|
+
{
|
|
48
|
+
key: 0,
|
|
49
|
+
class: normalizeClass([unref(ns).e("text"), unref(ns).is(_ctx.contentPosition)])
|
|
50
|
+
},
|
|
51
|
+
[
|
|
52
|
+
renderSlot(_ctx.$slots, "default")
|
|
53
|
+
],
|
|
54
|
+
2
|
|
55
|
+
)) : createCommentVNode("v-if", true)
|
|
56
|
+
],
|
|
57
|
+
6
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
var Divider = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/divider/src/divider.vue"]]);
|
|
63
|
+
|
|
64
|
+
const ElDivider = withInstall(Divider);
|
|
65
|
+
|
|
66
|
+
export { ElDivider as E };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed, getCurrentInstance } from 'vue';
|
|
2
|
-
import { e as debugWarn, m as fromPairs } from './
|
|
2
|
+
import { e as debugWarn, m as fromPairs } from './CcKUdl3e.mjs';
|
|
3
3
|
|
|
4
4
|
const DEFAULT_EXCLUDE_KEYS = ["class", "style"];
|
|
5
5
|
const LISTENER_PREFIX = /^on[A-Z]/;
|
|
@@ -10,13 +10,22 @@ const useAttrs = (params = {}) => {
|
|
|
10
10
|
});
|
|
11
11
|
const instance = getCurrentInstance();
|
|
12
12
|
if (!instance) {
|
|
13
|
-
debugWarn(
|
|
13
|
+
debugWarn(
|
|
14
|
+
"use-attrs",
|
|
15
|
+
"getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"
|
|
16
|
+
);
|
|
14
17
|
return computed(() => ({}));
|
|
15
18
|
}
|
|
16
|
-
return computed(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
return computed(
|
|
20
|
+
() => {
|
|
21
|
+
var _a;
|
|
22
|
+
return fromPairs(
|
|
23
|
+
Object.entries((_a = instance.proxy) == null ? void 0 : _a.$attrs).filter(
|
|
24
|
+
([key]) => !allExcludeKeys.value.includes(key) && !(excludeListeners && LISTENER_PREFIX.test(key))
|
|
25
|
+
)
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
);
|
|
20
29
|
};
|
|
21
30
|
|
|
22
31
|
export { useAttrs as u };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isClient } from '@vueuse/core';
|
|
2
|
-
import { o as isWindow, j as isFunction } from './
|
|
3
|
-
import { g as getStyle } from './
|
|
2
|
+
import { o as isWindow, j as isFunction } from './CcKUdl3e.mjs';
|
|
3
|
+
import { g as getStyle } from './Bl0WQiki.mjs';
|
|
4
4
|
|
|
5
5
|
function easeInOutCubic(t, b, c, d) {
|
|
6
6
|
const cc = c - b;
|
|
@@ -91,7 +91,12 @@ function animateScrollTo(container, from, to, duration, callback) {
|
|
|
91
91
|
const scroll = () => {
|
|
92
92
|
const timestamp = Date.now();
|
|
93
93
|
const time = timestamp - startTime;
|
|
94
|
-
const nextScrollTop = easeInOutCubic(
|
|
94
|
+
const nextScrollTop = easeInOutCubic(
|
|
95
|
+
time > duration ? duration : time,
|
|
96
|
+
from,
|
|
97
|
+
to,
|
|
98
|
+
duration
|
|
99
|
+
);
|
|
95
100
|
if (isWindow(container)) {
|
|
96
101
|
container.scrollTo(window.pageXOffset, nextScrollTop);
|
|
97
102
|
} else {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { inject, ref, computed, unref, isRef } from 'vue';
|
|
2
|
-
import { d as baseGet } from './
|
|
2
|
+
import { d as baseGet } from './DWcIzeMM.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Gets the value at `path` of `object`. If the resolved value is
|
|
@@ -227,10 +227,13 @@ var English = {
|
|
|
227
227
|
};
|
|
228
228
|
|
|
229
229
|
const buildTranslator = (locale) => (path, option) => translate(path, option, unref(locale));
|
|
230
|
-
const translate = (path, option, locale) => get(locale, path, path).replace(
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
230
|
+
const translate = (path, option, locale) => get(locale, path, path).replace(
|
|
231
|
+
/\{(\w+)\}/g,
|
|
232
|
+
(_, key) => {
|
|
233
|
+
var _a;
|
|
234
|
+
return `${(_a = option == null ? void 0 : option[key]) != null ? _a : `{${key}}`}`;
|
|
235
|
+
}
|
|
236
|
+
);
|
|
234
237
|
const buildLocaleContext = (locale) => {
|
|
235
238
|
const lang = computed(() => unref(locale).name);
|
|
236
239
|
const localeRef = isRef(locale) ? locale : ref(locale);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { defineComponent, computed, onMounted, createElementBlock, openBlock, normalizeStyle, normalizeClass, unref } from 'vue';
|
|
2
|
-
import { i as index } from '../../chunk/
|
|
2
|
+
import { i as index } from '../../chunk/BaJ7k5Lg.mjs';
|
|
3
|
+
import '../../chunk/D9iEroQw.mjs';
|
|
3
4
|
|
|
4
5
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
6
|
__name: "awesome-icon",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, useCssVars, useTemplateRef, ref, computed, onMounted, onBeforeUnmount, createBlock, openBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, renderSlot, createVNode, unref, vShow, Teleport, mergeProps } from 'vue';
|
|
2
|
-
import '../../chunk/
|
|
2
|
+
import '../../chunk/CcKUdl3e.mjs';
|
|
3
3
|
import { CaretBottom } from '@element-plus/icons-vue';
|
|
4
|
-
import { E as ElIcon } from '../../chunk/
|
|
4
|
+
import { E as ElIcon } from '../../chunk/DEPZhJ0Z.mjs';
|
|
5
5
|
import { _ as _export_sfc } from '../../chunk/pcqpp-6-.mjs';
|
|
6
6
|
|
|
7
7
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|