@deot/vc-components 1.0.42 → 1.0.44
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 +249 -26
- package/dist/index.d.ts +316 -196
- package/dist/index.iife.js +486 -275
- package/dist/index.js +249 -28
- package/dist/index.style.css +2 -2
- package/dist/index.umd.cjs +486 -275
- package/package.json +2 -2
package/dist/index.umd.cjs
CHANGED
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
}
|
|
67
67
|
const VcInstance = new Instance();
|
|
68
68
|
|
|
69
|
-
const props$
|
|
69
|
+
const props$1t = {
|
|
70
70
|
tag: {
|
|
71
71
|
type: String,
|
|
72
72
|
default: "div"
|
|
@@ -75,10 +75,10 @@
|
|
|
75
75
|
|
|
76
76
|
/** @jsxImportSource vue */
|
|
77
77
|
|
|
78
|
-
const COMPONENT_NAME$
|
|
78
|
+
const COMPONENT_NAME$28 = 'vc-action-sheet';
|
|
79
79
|
const ActionSheet = /* @__PURE__ */ vue.defineComponent({
|
|
80
|
-
name: COMPONENT_NAME$
|
|
81
|
-
props: props$
|
|
80
|
+
name: COMPONENT_NAME$28,
|
|
81
|
+
props: props$1t,
|
|
82
82
|
setup(props, {
|
|
83
83
|
slots
|
|
84
84
|
}) {
|
|
@@ -92,6 +92,398 @@
|
|
|
92
92
|
|
|
93
93
|
const MActionSheet = ActionSheet;
|
|
94
94
|
|
|
95
|
+
const IS_SERVER$3 = typeof window === "undefined";
|
|
96
|
+
|
|
97
|
+
const hasClass = (el, cls) => {
|
|
98
|
+
if (IS_SERVER$3 || !cls) return false;
|
|
99
|
+
if (cls.includes(" ")) {
|
|
100
|
+
throw new Error("[@deot/helper-dom]: 类名不应该包含空格");
|
|
101
|
+
}
|
|
102
|
+
if (el.classList) {
|
|
103
|
+
return el.classList.contains(cls);
|
|
104
|
+
} else {
|
|
105
|
+
return (" " + el.className + " ").indexOf(" " + cls + " ") > -1;
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
const addClass = (el, cls) => {
|
|
110
|
+
if (IS_SERVER$3 || !cls) return;
|
|
111
|
+
let curClass = el.className;
|
|
112
|
+
const classes = cls.split(" ");
|
|
113
|
+
for (let i = 0, j = classes.length; i < j; i++) {
|
|
114
|
+
const clsName = classes[i];
|
|
115
|
+
if (clsName) {
|
|
116
|
+
if (el.classList) {
|
|
117
|
+
el.classList.add(clsName);
|
|
118
|
+
} else if (!hasClass(el, clsName)) {
|
|
119
|
+
curClass += " " + clsName;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
if (!el.classList) {
|
|
124
|
+
el.className = curClass;
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
const composedPath = (e) => {
|
|
129
|
+
const path = e.composedPath && e.composedPath() || [];
|
|
130
|
+
if (path.length) return path;
|
|
131
|
+
let parent = e.target?.parentNode;
|
|
132
|
+
/* istanbul ignore next -- @preserve */
|
|
133
|
+
while (parent) {
|
|
134
|
+
path.push(parent);
|
|
135
|
+
parent = parent.parentNode;
|
|
136
|
+
}
|
|
137
|
+
return path;
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
const contains$1 = (el, child) => {
|
|
141
|
+
if (IS_SERVER$3 || !child) return false;
|
|
142
|
+
const childRect = child.getBoundingClientRect();
|
|
143
|
+
let elRect;
|
|
144
|
+
if (!el || [window, document, document.documentElement].includes(el)) {
|
|
145
|
+
elRect = {
|
|
146
|
+
top: 0,
|
|
147
|
+
right: window.innerWidth,
|
|
148
|
+
bottom: window.innerHeight,
|
|
149
|
+
left: 0
|
|
150
|
+
};
|
|
151
|
+
} else {
|
|
152
|
+
elRect = el.getBoundingClientRect();
|
|
153
|
+
}
|
|
154
|
+
return childRect.top < elRect.bottom && childRect.bottom > elRect.top && childRect.right > elRect.left && childRect.left < elRect.right;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
const el$1 = (v) => {
|
|
158
|
+
if (IS_SERVER$3) return null;
|
|
159
|
+
let target;
|
|
160
|
+
if (typeof v === "object") {
|
|
161
|
+
target = v;
|
|
162
|
+
} else {
|
|
163
|
+
target = document.querySelector(v);
|
|
164
|
+
}
|
|
165
|
+
if (!target) {
|
|
166
|
+
throw new Error("[@deot/helper-dom]: el缺失");
|
|
167
|
+
}
|
|
168
|
+
return target;
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
const getStyle$1 = (el, name) => {
|
|
172
|
+
if (IS_SERVER$3 || !name) return "";
|
|
173
|
+
if (name === "float") {
|
|
174
|
+
name = "cssFloat";
|
|
175
|
+
}
|
|
176
|
+
try {
|
|
177
|
+
const computed = document.defaultView.getComputedStyle(el, "");
|
|
178
|
+
return el.style[name] || (computed?.[name] || "");
|
|
179
|
+
} catch (e) {
|
|
180
|
+
return el.style[name] || "";
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
const isScroller = (el, options) => {
|
|
185
|
+
if (IS_SERVER$3 || !el) return false;
|
|
186
|
+
const { className, direction } = options || {};
|
|
187
|
+
let overflow = getStyle$1(el, `overflow-${direction ? "y" : "x"}`);
|
|
188
|
+
overflow = overflow || getStyle$1(el, "overflow");
|
|
189
|
+
return !!(overflow.match(/(scroll|auto)/) || className?.test(el.className));
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
const getScroller = (el, options) => {
|
|
193
|
+
if (IS_SERVER$3 || !el) return null;
|
|
194
|
+
let parent = el;
|
|
195
|
+
while (parent) {
|
|
196
|
+
if ([window, document, document.documentElement].includes(parent)) {
|
|
197
|
+
return window;
|
|
198
|
+
}
|
|
199
|
+
if (isScroller(parent, options)) {
|
|
200
|
+
return parent;
|
|
201
|
+
}
|
|
202
|
+
parent = parent?.parentNode;
|
|
203
|
+
}
|
|
204
|
+
return parent;
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
const off = (el, event, handler, options) => {
|
|
208
|
+
if (IS_SERVER$3) return;
|
|
209
|
+
el.removeEventListener(event, handler, false);
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
const on = (el, event, handler, options) => {
|
|
213
|
+
if (IS_SERVER$3) return () => {
|
|
214
|
+
};
|
|
215
|
+
el.addEventListener(event, handler, false);
|
|
216
|
+
return () => {
|
|
217
|
+
el.removeEventListener(event, handler, false);
|
|
218
|
+
};
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
const $target = IS_SERVER$3 ? {} : document.createElement("div").style;
|
|
222
|
+
const prefix$1 = (() => {
|
|
223
|
+
const keys = {
|
|
224
|
+
webkit: "webkitTransform",
|
|
225
|
+
Moz: "MozTransform",
|
|
226
|
+
O: "OTransform",
|
|
227
|
+
ms: "msTransform",
|
|
228
|
+
standard: "transform"
|
|
229
|
+
};
|
|
230
|
+
const values = {
|
|
231
|
+
webkit: "-webkit-",
|
|
232
|
+
Moz: "-moz-",
|
|
233
|
+
O: "-o-",
|
|
234
|
+
ms: "-ms-",
|
|
235
|
+
standard: ""
|
|
236
|
+
};
|
|
237
|
+
for (const key in keys) {
|
|
238
|
+
if ($target[keys[key]] !== void 0) {
|
|
239
|
+
return {
|
|
240
|
+
camel: key,
|
|
241
|
+
kebab: values[key]
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
return false;
|
|
246
|
+
})();
|
|
247
|
+
const prefixStyle = (v) => {
|
|
248
|
+
if (IS_SERVER$3 || prefix$1 === false) {
|
|
249
|
+
return {
|
|
250
|
+
camel: v,
|
|
251
|
+
kebab: v
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
return {
|
|
255
|
+
camel: prefix$1.camel + v.charAt(0).toUpperCase() + v.substr(1),
|
|
256
|
+
kebab: prefix$1.kebab + v
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
const removeClass = (el, cls) => {
|
|
261
|
+
if (IS_SERVER$3 || !cls) return;
|
|
262
|
+
const classes = cls.split(" ");
|
|
263
|
+
let curClass = " " + el.className + " ";
|
|
264
|
+
for (let i = 0, j = classes.length; i < j; i++) {
|
|
265
|
+
const clsName = classes[i];
|
|
266
|
+
if (clsName) {
|
|
267
|
+
if (el.classList) {
|
|
268
|
+
el.classList.remove(clsName);
|
|
269
|
+
continue;
|
|
270
|
+
}
|
|
271
|
+
/* istanbul ignore next -- @preserve */
|
|
272
|
+
if (hasClass(el, clsName)) {
|
|
273
|
+
curClass = curClass.replace(" " + clsName + " ", " ");
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
if (!el.classList) {
|
|
278
|
+
el.className = curClass.trim();
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
|
|
282
|
+
const scrollIntoView = async (el, options) => {
|
|
283
|
+
if (IS_SERVER$3) return;
|
|
284
|
+
const { from = 0, to = 0, duration = 300 } = options || {};
|
|
285
|
+
const difference = Math.abs(from - to);
|
|
286
|
+
const step = Math.ceil(difference / duration * 50);
|
|
287
|
+
let onResolve;
|
|
288
|
+
const target = new Promise((resolve) => {
|
|
289
|
+
onResolve = resolve;
|
|
290
|
+
});
|
|
291
|
+
const scroll = (start, end) => {
|
|
292
|
+
if (start === end) {
|
|
293
|
+
onResolve();
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
let d = start + step > end ? end : start + step;
|
|
297
|
+
if (start > end) {
|
|
298
|
+
d = start - step < end ? end : start - step;
|
|
299
|
+
}
|
|
300
|
+
if (el === window) {
|
|
301
|
+
window.scrollTo(d, d);
|
|
302
|
+
} else {
|
|
303
|
+
el.scrollTop = d;
|
|
304
|
+
}
|
|
305
|
+
window.requestAnimationFrame(() => scroll(d, end));
|
|
306
|
+
};
|
|
307
|
+
scroll(from, to);
|
|
308
|
+
return target;
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
const props$1s = {
|
|
312
|
+
zIndex: {
|
|
313
|
+
type: [Number, String],
|
|
314
|
+
default: 1
|
|
315
|
+
},
|
|
316
|
+
// TODO: left/right
|
|
317
|
+
placement: {
|
|
318
|
+
type: String,
|
|
319
|
+
default: "top"
|
|
320
|
+
},
|
|
321
|
+
disabled: {
|
|
322
|
+
type: Boolean,
|
|
323
|
+
default: false
|
|
324
|
+
},
|
|
325
|
+
fixed: {
|
|
326
|
+
type: Boolean,
|
|
327
|
+
default: true
|
|
328
|
+
},
|
|
329
|
+
offset: {
|
|
330
|
+
type: Number,
|
|
331
|
+
default: 0
|
|
332
|
+
},
|
|
333
|
+
// -> 固钉始终保持在容器内, 超过范围则隐藏(请注意容器避免出现滚动条) 仅fixed为true有效
|
|
334
|
+
target: {
|
|
335
|
+
type: String
|
|
336
|
+
}
|
|
337
|
+
};
|
|
338
|
+
|
|
339
|
+
/** @jsxImportSource vue */
|
|
340
|
+
|
|
341
|
+
const COMPONENT_NAME$27 = 'vc-affix';
|
|
342
|
+
const SCROLLER_WHEEL_REG = /vc-scroller-wheel/;
|
|
343
|
+
const Affix = /* @__PURE__ */ vue.defineComponent({
|
|
344
|
+
name: COMPONENT_NAME$27,
|
|
345
|
+
props: props$1s,
|
|
346
|
+
setup(props, {
|
|
347
|
+
slots,
|
|
348
|
+
expose
|
|
349
|
+
}) {
|
|
350
|
+
const scrollerInstance = vue.inject('vc-scroller', null);
|
|
351
|
+
const scroller = vue.shallowRef(); // 当前元素所在的滚动容器
|
|
352
|
+
const base = vue.shallowRef(); // 当前元素(props.tagret)的参考容器
|
|
353
|
+
const current = vue.shallowRef(); // 当前元素
|
|
354
|
+
|
|
355
|
+
const currentRect = vue.reactive({
|
|
356
|
+
top: 0,
|
|
357
|
+
bottom: 0,
|
|
358
|
+
width: 0,
|
|
359
|
+
height: 0
|
|
360
|
+
});
|
|
361
|
+
const isActive = vue.ref(false);
|
|
362
|
+
const transformY = vue.ref(0);
|
|
363
|
+
const windowHeight = vue.ref(window.innerHeight);
|
|
364
|
+
const isVcScrollerWheel = vue.computed(() => {
|
|
365
|
+
return SCROLLER_WHEEL_REG.test(scroller.value?.className || '');
|
|
366
|
+
});
|
|
367
|
+
const currentStyle = vue.computed(() => {
|
|
368
|
+
if (!isActive.value) return {};
|
|
369
|
+
return {
|
|
370
|
+
height: `${currentRect.height}px`,
|
|
371
|
+
width: `${currentRect.width}px`
|
|
372
|
+
};
|
|
373
|
+
});
|
|
374
|
+
const contentStyle = vue.computed(() => {
|
|
375
|
+
if (!isActive.value) return {};
|
|
376
|
+
const offset = `${props.offset}px`;
|
|
377
|
+
return {
|
|
378
|
+
height: `${currentRect.height}px`,
|
|
379
|
+
width: `${currentRect.width}px`,
|
|
380
|
+
top: props.placement === 'top' ? offset : '',
|
|
381
|
+
bottom: props.placement === 'bottom' ? offset : '',
|
|
382
|
+
zIndex: props.zIndex,
|
|
383
|
+
transform: transformY.value ? `translateY(${transformY.value}px)` : ''
|
|
384
|
+
};
|
|
385
|
+
});
|
|
386
|
+
const setCurrentRect = () => {
|
|
387
|
+
const rect = current.value.getBoundingClientRect();
|
|
388
|
+
Object.assign(currentRect, {
|
|
389
|
+
top: rect.top,
|
|
390
|
+
bottom: rect.bottom,
|
|
391
|
+
width: rect.width,
|
|
392
|
+
height: rect.height
|
|
393
|
+
});
|
|
394
|
+
};
|
|
395
|
+
const setAbsoluteStatus = () => {
|
|
396
|
+
const {
|
|
397
|
+
placement,
|
|
398
|
+
offset
|
|
399
|
+
} = props;
|
|
400
|
+
const currentHeightOffset = offset + currentRect.height;
|
|
401
|
+
const containerRect = scroller.value.getBoundingClientRect();
|
|
402
|
+
let transformOffsetY = 0;
|
|
403
|
+
|
|
404
|
+
// scroller-wheel滚动条偏移
|
|
405
|
+
if (scrollerInstance && isVcScrollerWheel.value) {
|
|
406
|
+
const maxMoveY = scrollerInstance.scrollHeight - scrollerInstance.clientHeight;
|
|
407
|
+
transformOffsetY = scrollerInstance.scrollTop >= maxMoveY ? maxMoveY : scrollerInstance.scrollTop;
|
|
408
|
+
}
|
|
409
|
+
if (placement === 'top') {
|
|
410
|
+
isActive.value = currentRect.top - containerRect.top <= props.offset;
|
|
411
|
+
transformY.value = Math.min(containerRect.bottom - currentHeightOffset, 0) + transformOffsetY;
|
|
412
|
+
} else {
|
|
413
|
+
isActive.value = currentRect.bottom - containerRect.top >= containerRect.height - props.offset;
|
|
414
|
+
transformY.value = Math.max(containerRect.height - containerRect.top - currentHeightOffset, 0) + transformOffsetY;
|
|
415
|
+
}
|
|
416
|
+
};
|
|
417
|
+
const setFixedStatus = () => {
|
|
418
|
+
const {
|
|
419
|
+
placement,
|
|
420
|
+
target,
|
|
421
|
+
offset
|
|
422
|
+
} = props;
|
|
423
|
+
const currentHeightOffset = offset + currentRect.height;
|
|
424
|
+
const containerRect = target && base.value.getBoundingClientRect();
|
|
425
|
+
if (placement === 'top') {
|
|
426
|
+
if (target) {
|
|
427
|
+
isActive.value = offset > currentRect.top && containerRect.bottom > 0;
|
|
428
|
+
transformY.value = Math.min(containerRect.bottom - currentHeightOffset, 0);
|
|
429
|
+
} else {
|
|
430
|
+
isActive.value = offset > currentRect.top;
|
|
431
|
+
}
|
|
432
|
+
} else {
|
|
433
|
+
if (target) {
|
|
434
|
+
isActive.value = windowHeight.value - offset < currentRect.bottom && windowHeight.value > containerRect.top;
|
|
435
|
+
transformY.value = -Math.min(windowHeight.value - containerRect.top - currentHeightOffset, 0);
|
|
436
|
+
} else {
|
|
437
|
+
isActive.value = windowHeight.value - offset < currentRect.bottom;
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
};
|
|
441
|
+
const refresh = () => {
|
|
442
|
+
setCurrentRect();
|
|
443
|
+
scroller.value instanceof Window || props.fixed ? setFixedStatus() : setAbsoluteStatus();
|
|
444
|
+
};
|
|
445
|
+
vue.onMounted(() => {
|
|
446
|
+
if (typeof props.target === 'string') {
|
|
447
|
+
base.value = document.querySelector(props.target) ?? void 0;
|
|
448
|
+
}
|
|
449
|
+
!base.value && (base.value = document.documentElement);
|
|
450
|
+
scroller.value = getScroller(current.value, {
|
|
451
|
+
className: SCROLLER_WHEEL_REG
|
|
452
|
+
});
|
|
453
|
+
if (isVcScrollerWheel.value) {
|
|
454
|
+
scrollerInstance?.on(refresh);
|
|
455
|
+
} else {
|
|
456
|
+
scroller.value?.addEventListener('scroll', refresh);
|
|
457
|
+
}
|
|
458
|
+
refresh();
|
|
459
|
+
});
|
|
460
|
+
vue.onBeforeUnmount(() => {
|
|
461
|
+
if (isVcScrollerWheel.value) {
|
|
462
|
+
scrollerInstance?.off(refresh);
|
|
463
|
+
} else {
|
|
464
|
+
scroller.value?.removeEventListener('scroll', refresh);
|
|
465
|
+
}
|
|
466
|
+
});
|
|
467
|
+
expose({
|
|
468
|
+
refresh
|
|
469
|
+
});
|
|
470
|
+
return () => {
|
|
471
|
+
return vue.createVNode("div", {
|
|
472
|
+
"ref": current,
|
|
473
|
+
"class": "vc-affix",
|
|
474
|
+
"style": currentStyle.value
|
|
475
|
+
}, [vue.createVNode("div", {
|
|
476
|
+
"class": {
|
|
477
|
+
[`vc-affix__${props.fixed ? 'fixed' : 'absolute'}`]: isActive.value
|
|
478
|
+
},
|
|
479
|
+
"style": contentStyle.value
|
|
480
|
+
}, [slots?.default?.()])]);
|
|
481
|
+
};
|
|
482
|
+
}
|
|
483
|
+
});
|
|
484
|
+
|
|
485
|
+
const MAffix = Affix;
|
|
486
|
+
|
|
95
487
|
const props$1r = {
|
|
96
488
|
modelValue: {
|
|
97
489
|
type: Boolean,
|
|
@@ -134,9 +526,9 @@
|
|
|
134
526
|
const dReg = /.*d="([^"]+).*/g;
|
|
135
527
|
const fillReg = /.*fill="([^"]+).*/g;
|
|
136
528
|
const basicUrl = "//at.alicdn.com/t/font_1119857_u0f4525o6sd.js";
|
|
137
|
-
const prefix
|
|
529
|
+
const prefix = "@deot/vc-icon:";
|
|
138
530
|
const IS_DEV = false;
|
|
139
|
-
const IS_SERVER$
|
|
531
|
+
const IS_SERVER$2 = typeof document === "undefined";
|
|
140
532
|
class Manager {
|
|
141
533
|
icons = {};
|
|
142
534
|
events = {};
|
|
@@ -151,10 +543,10 @@
|
|
|
151
543
|
this.sourceStatus[url] = this.sourceStatus[url] || new Promise((resolve, reject) => {
|
|
152
544
|
(async () => {
|
|
153
545
|
try {
|
|
154
|
-
if (IS_SERVER$
|
|
546
|
+
if (IS_SERVER$2 || !/.js$/.test(url)) {
|
|
155
547
|
return reject(new VcError("icon", "invaild url"));
|
|
156
548
|
}
|
|
157
|
-
const key = `${prefix
|
|
549
|
+
const key = `${prefix}${url}`;
|
|
158
550
|
const cache = window.localStorage.getItem(key);
|
|
159
551
|
let icons = JSON.parse(cache || '""');
|
|
160
552
|
/* istanbul ignore next -- @preserve */
|
|
@@ -236,7 +628,7 @@
|
|
|
236
628
|
if (this.events[type].length >= 100) {
|
|
237
629
|
delete this.events[type];
|
|
238
630
|
/* istanbul ignore else -- @preserve */
|
|
239
|
-
if (!IS_SERVER$
|
|
631
|
+
if (!IS_SERVER$2) {
|
|
240
632
|
throw new VcError("icon", `${type} nonexistent`);
|
|
241
633
|
}
|
|
242
634
|
}
|
|
@@ -253,8 +645,8 @@
|
|
|
253
645
|
clearResource() {
|
|
254
646
|
const needs = Object.keys(this.sourceStatus);
|
|
255
647
|
Object.keys(window.localStorage).forEach((item) => {
|
|
256
|
-
if (item.includes(prefix
|
|
257
|
-
const key = item.split(prefix
|
|
648
|
+
if (item.includes(prefix)) {
|
|
649
|
+
const key = item.split(prefix).pop();
|
|
258
650
|
key && !needs.includes(key) && window.localStorage.removeItem(item);
|
|
259
651
|
}
|
|
260
652
|
});
|
|
@@ -778,7 +1170,7 @@
|
|
|
778
1170
|
|
|
779
1171
|
// [color, borderColor, backgroundColor], -> CSS
|
|
780
1172
|
const THEME_MAP = {
|
|
781
|
-
info: ['#
|
|
1173
|
+
info: ['#456CF6', '#91d5ff', '#e6f7ff'],
|
|
782
1174
|
success: ['#52c41a', '#b7eb8f', '#f6ffed'],
|
|
783
1175
|
error: ['#ed4014', '#ffb08f', '#fbe9e9'],
|
|
784
1176
|
warning: ['#ffbf00', '#ffe58f', '#fffbe6']
|
|
@@ -969,7 +1361,7 @@
|
|
|
969
1361
|
);
|
|
970
1362
|
};
|
|
971
1363
|
|
|
972
|
-
const flatten$1 = (value, parser) => {
|
|
1364
|
+
const flatten$1 = (value, parser, exit) => {
|
|
973
1365
|
let need = true;
|
|
974
1366
|
let safeCount = 1;
|
|
975
1367
|
let parseValue = value;
|
|
@@ -979,7 +1371,7 @@
|
|
|
979
1371
|
}
|
|
980
1372
|
try {
|
|
981
1373
|
const next = (parser || decodeURIComponent)(parseValue);
|
|
982
|
-
if (parseValue === next) {
|
|
1374
|
+
if (parseValue === next || typeof exit === "function" && exit(next)) {
|
|
983
1375
|
need = false;
|
|
984
1376
|
}
|
|
985
1377
|
parseValue = next;
|
|
@@ -992,8 +1384,7 @@
|
|
|
992
1384
|
};
|
|
993
1385
|
|
|
994
1386
|
const flattenJSONParse = (value) => {
|
|
995
|
-
if (value === null)
|
|
996
|
-
return null;
|
|
1387
|
+
if (value === null) return null;
|
|
997
1388
|
const regex = /^\d+$/;
|
|
998
1389
|
if (regex.test(value) && value.length >= 16 && +value > Number.MAX_SAFE_INTEGER) {
|
|
999
1390
|
return value;
|
|
@@ -3621,7 +4012,7 @@
|
|
|
3621
4012
|
function castSlice(array, start, end) {
|
|
3622
4013
|
var length = array.length;
|
|
3623
4014
|
end = end === undefined ? length : end;
|
|
3624
|
-
return (
|
|
4015
|
+
return (!start && end >= length) ? array : baseSlice(array, start, end);
|
|
3625
4016
|
}
|
|
3626
4017
|
|
|
3627
4018
|
/** Used to compose unicode character classes. */
|
|
@@ -6695,233 +7086,6 @@
|
|
|
6695
7086
|
return parent;
|
|
6696
7087
|
};
|
|
6697
7088
|
|
|
6698
|
-
const IS_SERVER$2 = typeof window === "undefined";
|
|
6699
|
-
|
|
6700
|
-
const hasClass = (el, cls) => {
|
|
6701
|
-
if (IS_SERVER$2 || !cls)
|
|
6702
|
-
return false;
|
|
6703
|
-
if (cls.includes(" ")) {
|
|
6704
|
-
throw new Error("[@deot/helper-dom]: 类名不应该包含空格");
|
|
6705
|
-
}
|
|
6706
|
-
if (el.classList) {
|
|
6707
|
-
return el.classList.contains(cls);
|
|
6708
|
-
} else {
|
|
6709
|
-
return (" " + el.className + " ").indexOf(" " + cls + " ") > -1;
|
|
6710
|
-
}
|
|
6711
|
-
};
|
|
6712
|
-
|
|
6713
|
-
const addClass = (el, cls) => {
|
|
6714
|
-
if (IS_SERVER$2 || !cls)
|
|
6715
|
-
return;
|
|
6716
|
-
let curClass = el.className;
|
|
6717
|
-
let classes = cls.split(" ");
|
|
6718
|
-
for (let i = 0, j = classes.length; i < j; i++) {
|
|
6719
|
-
let clsName = classes[i];
|
|
6720
|
-
if (clsName) {
|
|
6721
|
-
if (el.classList) {
|
|
6722
|
-
el.classList.add(clsName);
|
|
6723
|
-
} else if (!hasClass(el, clsName)) {
|
|
6724
|
-
curClass += " " + clsName;
|
|
6725
|
-
}
|
|
6726
|
-
}
|
|
6727
|
-
}
|
|
6728
|
-
if (!el.classList) {
|
|
6729
|
-
el.className = curClass;
|
|
6730
|
-
}
|
|
6731
|
-
};
|
|
6732
|
-
|
|
6733
|
-
const composedPath = (e) => {
|
|
6734
|
-
let path = e.composedPath && e.composedPath() || [];
|
|
6735
|
-
if (path.length)
|
|
6736
|
-
return path;
|
|
6737
|
-
let parent = e.target?.parentNode;
|
|
6738
|
-
/* istanbul ignore next -- @preserve */
|
|
6739
|
-
while (parent) {
|
|
6740
|
-
path.push(parent);
|
|
6741
|
-
parent = parent.parentNode;
|
|
6742
|
-
}
|
|
6743
|
-
return path;
|
|
6744
|
-
};
|
|
6745
|
-
|
|
6746
|
-
const contains$1 = (el, child) => {
|
|
6747
|
-
if (IS_SERVER$2 || !child)
|
|
6748
|
-
return false;
|
|
6749
|
-
let childRect = child.getBoundingClientRect();
|
|
6750
|
-
let elRect;
|
|
6751
|
-
if (!el || [window, document, document.documentElement].includes(el)) {
|
|
6752
|
-
elRect = {
|
|
6753
|
-
top: 0,
|
|
6754
|
-
right: window.innerWidth,
|
|
6755
|
-
bottom: window.innerHeight,
|
|
6756
|
-
left: 0
|
|
6757
|
-
};
|
|
6758
|
-
} else {
|
|
6759
|
-
elRect = el.getBoundingClientRect();
|
|
6760
|
-
}
|
|
6761
|
-
return childRect.top < elRect.bottom && childRect.bottom > elRect.top && childRect.right > elRect.left && childRect.left < elRect.right;
|
|
6762
|
-
};
|
|
6763
|
-
|
|
6764
|
-
const el$1 = (v) => {
|
|
6765
|
-
if (IS_SERVER$2)
|
|
6766
|
-
return null;
|
|
6767
|
-
let target;
|
|
6768
|
-
if (typeof v === "object") {
|
|
6769
|
-
target = v;
|
|
6770
|
-
} else {
|
|
6771
|
-
target = document.querySelector(v);
|
|
6772
|
-
}
|
|
6773
|
-
if (!target) {
|
|
6774
|
-
throw new Error("[@deot/helper-dom]: el缺失");
|
|
6775
|
-
}
|
|
6776
|
-
return target;
|
|
6777
|
-
};
|
|
6778
|
-
|
|
6779
|
-
const getStyle$1 = (el, name) => {
|
|
6780
|
-
if (IS_SERVER$2 || !name)
|
|
6781
|
-
return "";
|
|
6782
|
-
if (name === "float") {
|
|
6783
|
-
name = "cssFloat";
|
|
6784
|
-
}
|
|
6785
|
-
try {
|
|
6786
|
-
let computed = document.defaultView.getComputedStyle(el, "");
|
|
6787
|
-
return el.style[name] || (computed?.[name] || "");
|
|
6788
|
-
} catch (e) {
|
|
6789
|
-
return el.style[name] || "";
|
|
6790
|
-
}
|
|
6791
|
-
};
|
|
6792
|
-
|
|
6793
|
-
const isScroll = (el, direction) => {
|
|
6794
|
-
if (IS_SERVER$2 || !el)
|
|
6795
|
-
return false;
|
|
6796
|
-
let overflow = getStyle$1(el, `overflow-${"x"}`);
|
|
6797
|
-
overflow = overflow || getStyle$1(el, "overflow");
|
|
6798
|
-
return !!overflow.match(/(scroll|auto)/);
|
|
6799
|
-
};
|
|
6800
|
-
|
|
6801
|
-
const getScroller = (el, direction) => {
|
|
6802
|
-
if (IS_SERVER$2 || !el)
|
|
6803
|
-
return null;
|
|
6804
|
-
let parent = el;
|
|
6805
|
-
while (parent) {
|
|
6806
|
-
if ([window, document, document.documentElement].includes(parent)) {
|
|
6807
|
-
return window;
|
|
6808
|
-
}
|
|
6809
|
-
if (isScroll(parent)) {
|
|
6810
|
-
return parent;
|
|
6811
|
-
}
|
|
6812
|
-
parent = parent?.parentNode;
|
|
6813
|
-
}
|
|
6814
|
-
return parent;
|
|
6815
|
-
};
|
|
6816
|
-
|
|
6817
|
-
const off = (el, event, handler, options) => {
|
|
6818
|
-
if (IS_SERVER$2)
|
|
6819
|
-
return;
|
|
6820
|
-
el.removeEventListener(event, handler, false);
|
|
6821
|
-
};
|
|
6822
|
-
|
|
6823
|
-
const on = (el, event, handler, options) => {
|
|
6824
|
-
if (IS_SERVER$2)
|
|
6825
|
-
return () => {
|
|
6826
|
-
};
|
|
6827
|
-
el.addEventListener(event, handler, false);
|
|
6828
|
-
return () => {
|
|
6829
|
-
el.removeEventListener(event, handler, false);
|
|
6830
|
-
};
|
|
6831
|
-
};
|
|
6832
|
-
|
|
6833
|
-
const $target = IS_SERVER$2 ? {} : document.createElement("div").style;
|
|
6834
|
-
const prefix = (() => {
|
|
6835
|
-
let keys = {
|
|
6836
|
-
webkit: "webkitTransform",
|
|
6837
|
-
Moz: "MozTransform",
|
|
6838
|
-
O: "OTransform",
|
|
6839
|
-
ms: "msTransform",
|
|
6840
|
-
standard: "transform"
|
|
6841
|
-
};
|
|
6842
|
-
let values = {
|
|
6843
|
-
webkit: "-webkit-",
|
|
6844
|
-
Moz: "-moz-",
|
|
6845
|
-
O: "-o-",
|
|
6846
|
-
ms: "-ms-",
|
|
6847
|
-
standard: ""
|
|
6848
|
-
};
|
|
6849
|
-
for (let key in keys) {
|
|
6850
|
-
if ($target[keys[key]] !== void 0) {
|
|
6851
|
-
return {
|
|
6852
|
-
camel: key,
|
|
6853
|
-
kebab: values[key]
|
|
6854
|
-
};
|
|
6855
|
-
}
|
|
6856
|
-
}
|
|
6857
|
-
return false;
|
|
6858
|
-
})();
|
|
6859
|
-
const prefixStyle = (v) => {
|
|
6860
|
-
if (IS_SERVER$2 || prefix === false) {
|
|
6861
|
-
return {
|
|
6862
|
-
camel: v,
|
|
6863
|
-
kebab: v
|
|
6864
|
-
};
|
|
6865
|
-
}
|
|
6866
|
-
return {
|
|
6867
|
-
camel: prefix.camel + v.charAt(0).toUpperCase() + v.substr(1),
|
|
6868
|
-
kebab: prefix.kebab + v
|
|
6869
|
-
};
|
|
6870
|
-
};
|
|
6871
|
-
|
|
6872
|
-
const removeClass = (el, cls) => {
|
|
6873
|
-
if (IS_SERVER$2 || !cls)
|
|
6874
|
-
return;
|
|
6875
|
-
let classes = cls.split(" ");
|
|
6876
|
-
let curClass = " " + el.className + " ";
|
|
6877
|
-
for (let i = 0, j = classes.length; i < j; i++) {
|
|
6878
|
-
let clsName = classes[i];
|
|
6879
|
-
if (clsName) {
|
|
6880
|
-
if (el.classList) {
|
|
6881
|
-
el.classList.remove(clsName);
|
|
6882
|
-
continue;
|
|
6883
|
-
}
|
|
6884
|
-
/* istanbul ignore next -- @preserve */
|
|
6885
|
-
if (hasClass(el, clsName)) {
|
|
6886
|
-
curClass = curClass.replace(" " + clsName + " ", " ");
|
|
6887
|
-
}
|
|
6888
|
-
}
|
|
6889
|
-
}
|
|
6890
|
-
if (!el.classList) {
|
|
6891
|
-
el.className = curClass.trim();
|
|
6892
|
-
}
|
|
6893
|
-
};
|
|
6894
|
-
|
|
6895
|
-
const scrollIntoView = async (el, options) => {
|
|
6896
|
-
if (IS_SERVER$2)
|
|
6897
|
-
return;
|
|
6898
|
-
let { from = 0, to = 0, duration = 300 } = options || {};
|
|
6899
|
-
let difference = Math.abs(from - to);
|
|
6900
|
-
let step = Math.ceil(difference / duration * 50);
|
|
6901
|
-
let onResolve;
|
|
6902
|
-
let target = new Promise((resolve) => {
|
|
6903
|
-
onResolve = resolve;
|
|
6904
|
-
});
|
|
6905
|
-
const scroll = (start, end) => {
|
|
6906
|
-
if (start === end) {
|
|
6907
|
-
onResolve();
|
|
6908
|
-
return;
|
|
6909
|
-
}
|
|
6910
|
-
let d = start + step > end ? end : start + step;
|
|
6911
|
-
if (start > end) {
|
|
6912
|
-
d = start - step < end ? end : start - step;
|
|
6913
|
-
}
|
|
6914
|
-
if (el === window) {
|
|
6915
|
-
window.scrollTo(d, d);
|
|
6916
|
-
} else {
|
|
6917
|
-
el.scrollTop = d;
|
|
6918
|
-
}
|
|
6919
|
-
window.requestAnimationFrame(() => scroll(d, end));
|
|
6920
|
-
};
|
|
6921
|
-
scroll(from, to);
|
|
6922
|
-
return target;
|
|
6923
|
-
};
|
|
6924
|
-
|
|
6925
7089
|
const getSelectedData = (value = [], source = []) => {
|
|
6926
7090
|
const label = [];
|
|
6927
7091
|
const data = [];
|
|
@@ -14693,6 +14857,7 @@
|
|
|
14693
14857
|
refreshSize();
|
|
14694
14858
|
refreshPosition(options);
|
|
14695
14859
|
};
|
|
14860
|
+
const listeners = [];
|
|
14696
14861
|
const triggerScrollDelegate = (options) => {
|
|
14697
14862
|
const delegates = {
|
|
14698
14863
|
scrollLeft: (options && options.x) ?? scrollX.value,
|
|
@@ -14700,12 +14865,15 @@
|
|
|
14700
14865
|
clientWidth: wrapperW.value,
|
|
14701
14866
|
clientHeight: wrapperH.value,
|
|
14702
14867
|
scrollWidth: contentW.value,
|
|
14703
|
-
scrollHeight: contentH.value
|
|
14868
|
+
scrollHeight: contentH.value,
|
|
14869
|
+
getBoundingClientRect: () => wrapper.value?.getBoundingClientRect()
|
|
14704
14870
|
};
|
|
14705
|
-
|
|
14871
|
+
const e = {
|
|
14706
14872
|
target: delegates,
|
|
14707
14873
|
currentTarget: delegates
|
|
14708
|
-
}
|
|
14874
|
+
};
|
|
14875
|
+
instance.emit("scroll", e);
|
|
14876
|
+
listeners.forEach((listener) => listener(e));
|
|
14709
14877
|
};
|
|
14710
14878
|
const scrollTo = (options) => {
|
|
14711
14879
|
refreshPosition(options);
|
|
@@ -14732,8 +14900,9 @@
|
|
|
14732
14900
|
Resize.off(wrapper.value, refresh);
|
|
14733
14901
|
Resize.off(content.value, refresh);
|
|
14734
14902
|
}
|
|
14903
|
+
listeners.splice(0, listeners.length);
|
|
14735
14904
|
});
|
|
14736
|
-
|
|
14905
|
+
const exposed = {
|
|
14737
14906
|
wrapper,
|
|
14738
14907
|
content,
|
|
14739
14908
|
scrollTo,
|
|
@@ -14749,8 +14918,16 @@
|
|
|
14749
14918
|
},
|
|
14750
14919
|
setScrollLeft: (value) => {
|
|
14751
14920
|
scrollTo({ x: value });
|
|
14921
|
+
},
|
|
14922
|
+
on: (listener) => {
|
|
14923
|
+
listeners.push(listener);
|
|
14924
|
+
},
|
|
14925
|
+
off: (listener) => {
|
|
14926
|
+
listeners.splice(listeners.indexOf(listener), 1);
|
|
14752
14927
|
}
|
|
14753
|
-
}
|
|
14928
|
+
};
|
|
14929
|
+
expose(exposed);
|
|
14930
|
+
vue.provide("vc-scroller", vue.reactive(exposed));
|
|
14754
14931
|
return {
|
|
14755
14932
|
bar,
|
|
14756
14933
|
wrapper,
|
|
@@ -23796,7 +23973,7 @@
|
|
|
23796
23973
|
color: {
|
|
23797
23974
|
type: [Object, String],
|
|
23798
23975
|
default: () => ({
|
|
23799
|
-
normal: "#
|
|
23976
|
+
normal: "#456CF6",
|
|
23800
23977
|
success: "#52c41a",
|
|
23801
23978
|
error: "#f5222d"
|
|
23802
23979
|
})
|
|
@@ -27271,10 +27448,38 @@
|
|
|
27271
27448
|
}
|
|
27272
27449
|
});
|
|
27273
27450
|
|
|
27274
|
-
|
|
27451
|
+
const TableSort = /* @__PURE__ */ vue.defineComponent({
|
|
27452
|
+
name: 'vc-table-sort',
|
|
27453
|
+
props: {
|
|
27454
|
+
order: String
|
|
27455
|
+
},
|
|
27456
|
+
emits: ['click'],
|
|
27457
|
+
setup(props, {
|
|
27458
|
+
emit
|
|
27459
|
+
}) {
|
|
27460
|
+
const handleClick = v => {
|
|
27461
|
+
emit('click', props.order !== v ? v : '');
|
|
27462
|
+
};
|
|
27463
|
+
return () => {
|
|
27464
|
+
return vue.createVNode("span", {
|
|
27465
|
+
"class": "vc-table-sort"
|
|
27466
|
+
}, [vue.createVNode("span", {
|
|
27467
|
+
"class": [{
|
|
27468
|
+
'is-ascending': props.order === 'ascending'
|
|
27469
|
+
}, 'vc-table-sort__icon vc-table-sort__icon--ascending'],
|
|
27470
|
+
"onClick": vue.withModifiers(() => handleClick('ascending'), ['stop'])
|
|
27471
|
+
}, null), vue.createVNode("span", {
|
|
27472
|
+
"class": [{
|
|
27473
|
+
'is-descending': props.order === 'descending'
|
|
27474
|
+
}, 'vc-table-sort__icon vc-table-sort__icon--descending'],
|
|
27475
|
+
"onClick": vue.withModifiers(() => handleClick('descending'), ['stop'])
|
|
27476
|
+
}, null)]);
|
|
27477
|
+
};
|
|
27478
|
+
}
|
|
27479
|
+
});
|
|
27480
|
+
|
|
27275
27481
|
// import TableFilter from './table-filter';
|
|
27276
27482
|
|
|
27277
|
-
const TableSort = 'div';
|
|
27278
27483
|
const TableFilter = 'div';
|
|
27279
27484
|
const TableHeader = /* @__PURE__ */ vue.defineComponent({
|
|
27280
27485
|
name: 'vc-table-header',
|
|
@@ -27282,7 +27487,7 @@
|
|
|
27282
27487
|
fixed: [Boolean, String],
|
|
27283
27488
|
border: Boolean,
|
|
27284
27489
|
// 排序全部交给外部处理,内部不处理数据,只做交互
|
|
27285
|
-
|
|
27490
|
+
sort: {
|
|
27286
27491
|
type: Object,
|
|
27287
27492
|
default: () => ({})
|
|
27288
27493
|
}
|
|
@@ -27480,10 +27685,12 @@
|
|
|
27480
27685
|
document.body.style.cursor = '';
|
|
27481
27686
|
};
|
|
27482
27687
|
const handleSort = (prop, order) => {
|
|
27483
|
-
|
|
27688
|
+
const v = {
|
|
27484
27689
|
prop,
|
|
27485
27690
|
order
|
|
27486
|
-
}
|
|
27691
|
+
};
|
|
27692
|
+
table.emit('update:sort', v);
|
|
27693
|
+
table.emit('sort-change', v);
|
|
27487
27694
|
};
|
|
27488
27695
|
const handleFilter = (column, value) => {
|
|
27489
27696
|
const {
|
|
@@ -27539,9 +27746,10 @@
|
|
|
27539
27746
|
store: table.store
|
|
27540
27747
|
}) : column.label, column.tooltip ? vue.createVNode(Icon, {
|
|
27541
27748
|
"type": "o-info",
|
|
27749
|
+
"class": "vc-table__tooltip",
|
|
27542
27750
|
"onMouseenter": e => handleCellMouseEnter(e, column)
|
|
27543
27751
|
}, null) : null, column.sortable ? vue.createVNode(TableSort, {
|
|
27544
|
-
"order": column.prop === props.
|
|
27752
|
+
"order": column.prop === props.sort.prop ? props.sort.order : '',
|
|
27545
27753
|
"onClick": order => handleSort(column.prop, order)
|
|
27546
27754
|
}, null) : null, column.filters ? vue.createVNode(TableFilter, {
|
|
27547
27755
|
"data": column.filters,
|
|
@@ -27756,7 +27964,7 @@
|
|
|
27756
27964
|
* 排序全部交给外部处理,内部不处理数据,只做交互
|
|
27757
27965
|
* 列与列之间互斥
|
|
27758
27966
|
*/
|
|
27759
|
-
|
|
27967
|
+
sort: {
|
|
27760
27968
|
type: Object,
|
|
27761
27969
|
default: () => ({})
|
|
27762
27970
|
},
|
|
@@ -27770,7 +27978,7 @@
|
|
|
27770
27978
|
const Table$1 = /* @__PURE__ */ vue.defineComponent({
|
|
27771
27979
|
name: COMPONENT_NAME$j,
|
|
27772
27980
|
props: props$d,
|
|
27773
|
-
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'],
|
|
27981
|
+
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', 'update:sort'],
|
|
27774
27982
|
setup(props, {
|
|
27775
27983
|
slots,
|
|
27776
27984
|
expose,
|
|
@@ -28176,7 +28384,7 @@
|
|
|
28176
28384
|
}, [vue.createVNode(TableHeader, {
|
|
28177
28385
|
"ref": tableHeader,
|
|
28178
28386
|
"border": props.border,
|
|
28179
|
-
"
|
|
28387
|
+
"sort": props.sort,
|
|
28180
28388
|
"style": bodyWidthStyle.value
|
|
28181
28389
|
}, null)]), states.columns.length > 0 && vue.createVNode(ScrollerWheel, {
|
|
28182
28390
|
"ref": scroller,
|
|
@@ -28225,7 +28433,7 @@
|
|
|
28225
28433
|
}, [vue.createVNode(TableHeader, {
|
|
28226
28434
|
"ref": leftFixedTableHeader,
|
|
28227
28435
|
"border": props.border,
|
|
28228
|
-
"
|
|
28436
|
+
"sort": props.sort,
|
|
28229
28437
|
"style": bodyWidthStyle.value,
|
|
28230
28438
|
"fixed": "left"
|
|
28231
28439
|
}, null)]), vue.createVNode("div", {
|
|
@@ -28264,7 +28472,7 @@
|
|
|
28264
28472
|
}, [vue.createVNode(TableHeader, {
|
|
28265
28473
|
"ref": rightFixedTableHeader,
|
|
28266
28474
|
"border": props.border,
|
|
28267
|
-
"
|
|
28475
|
+
"sort": props.sort,
|
|
28268
28476
|
"style": bodyWidthStyle.value,
|
|
28269
28477
|
"fixed": "right"
|
|
28270
28478
|
}, null)]), vue.createVNode("div", {
|
|
@@ -29079,7 +29287,8 @@
|
|
|
29079
29287
|
|
|
29080
29288
|
const props$b = {
|
|
29081
29289
|
value: {
|
|
29082
|
-
type: [String, Number, Boolean]
|
|
29290
|
+
type: [String, Number, Boolean],
|
|
29291
|
+
default: void 0
|
|
29083
29292
|
},
|
|
29084
29293
|
label: {
|
|
29085
29294
|
type: [String, Function],
|
|
@@ -29427,7 +29636,7 @@
|
|
|
29427
29636
|
"class": [{
|
|
29428
29637
|
'is-fixed': isFixed
|
|
29429
29638
|
}, 'vcm-tabs__bar']
|
|
29430
|
-
}, [vue.createVNode("slot", {
|
|
29639
|
+
}, [vue.createVNode(vue.resolveComponent("slot"), {
|
|
29431
29640
|
"name": "prepend"
|
|
29432
29641
|
}, null), slots.prepend?.(), props.showStep && tabs.scrollable.value && vue.createVNode("div", {
|
|
29433
29642
|
"class": "vcm-tabs__step is-left",
|
|
@@ -35677,10 +35886,10 @@
|
|
|
35677
35886
|
var _v1 = create$2();
|
|
35678
35887
|
var _v2 = create$2();
|
|
35679
35888
|
function isAroundZero$1(val) {
|
|
35680
|
-
return val > -
|
|
35889
|
+
return val > -EPSILON$4 && val < EPSILON$4;
|
|
35681
35890
|
}
|
|
35682
35891
|
function isNotAroundZero$1(val) {
|
|
35683
|
-
return val > EPSILON$4 || val < -
|
|
35892
|
+
return val > EPSILON$4 || val < -EPSILON$4;
|
|
35684
35893
|
}
|
|
35685
35894
|
function cubicAt(p0, p1, p2, p3, t) {
|
|
35686
35895
|
var onet = 1 - t;
|
|
@@ -36667,7 +36876,7 @@
|
|
|
36667
36876
|
}
|
|
36668
36877
|
var EPSILON$3 = 1e-4;
|
|
36669
36878
|
function isAroundZero(transform) {
|
|
36670
|
-
return transform < EPSILON$3 && transform > -
|
|
36879
|
+
return transform < EPSILON$3 && transform > -EPSILON$3;
|
|
36671
36880
|
}
|
|
36672
36881
|
function round3(transform) {
|
|
36673
36882
|
return mathRound$1(transform * 1e3) / 1e3;
|
|
@@ -37948,7 +38157,7 @@
|
|
|
37948
38157
|
var mIdentity = identity;
|
|
37949
38158
|
var EPSILON$2 = 5e-5;
|
|
37950
38159
|
function isNotAroundZero(val) {
|
|
37951
|
-
return val > EPSILON$2 || val < -
|
|
38160
|
+
return val > EPSILON$2 || val < -EPSILON$2;
|
|
37952
38161
|
}
|
|
37953
38162
|
var scaleTmp = [];
|
|
37954
38163
|
var tmpTransform = [];
|
|
@@ -38666,7 +38875,7 @@
|
|
|
38666
38875
|
this.markRedraw();
|
|
38667
38876
|
if (!useHoverLayer && this.__inHover) {
|
|
38668
38877
|
this._toggleHoverLayerFlag(false);
|
|
38669
|
-
this.__dirty &=
|
|
38878
|
+
this.__dirty &= ~REDRAW_BIT;
|
|
38670
38879
|
}
|
|
38671
38880
|
return state;
|
|
38672
38881
|
};
|
|
@@ -38724,7 +38933,7 @@
|
|
|
38724
38933
|
this.markRedraw();
|
|
38725
38934
|
if (!useHoverLayer && this.__inHover) {
|
|
38726
38935
|
this._toggleHoverLayerFlag(false);
|
|
38727
|
-
this.__dirty &=
|
|
38936
|
+
this.__dirty &= ~REDRAW_BIT;
|
|
38728
38937
|
}
|
|
38729
38938
|
}
|
|
38730
38939
|
};
|
|
@@ -40047,7 +40256,7 @@
|
|
|
40047
40256
|
* @return {boolean}
|
|
40048
40257
|
*/
|
|
40049
40258
|
function isRadianAroundZero(val) {
|
|
40050
|
-
return val > -
|
|
40259
|
+
return val > -RADIAN_EPSILON && val < RADIAN_EPSILON;
|
|
40051
40260
|
}
|
|
40052
40261
|
// eslint-disable-next-line
|
|
40053
40262
|
var TIME_REG = /^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/; // jshint ignore:line
|
|
@@ -41641,7 +41850,7 @@
|
|
|
41641
41850
|
return !!(this.__dirty & STYLE_CHANGED_BIT);
|
|
41642
41851
|
};
|
|
41643
41852
|
Displayable.prototype.styleUpdated = function () {
|
|
41644
|
-
this.__dirty &=
|
|
41853
|
+
this.__dirty &= ~STYLE_CHANGED_BIT;
|
|
41645
41854
|
};
|
|
41646
41855
|
Displayable.prototype.createStyle = function (obj) {
|
|
41647
41856
|
return createObject(DEFAULT_COMMON_STYLE, obj);
|
|
@@ -43150,7 +43359,7 @@
|
|
|
43150
43359
|
};
|
|
43151
43360
|
Path.prototype.buildPath = function (ctx, shapeCfg, inBatch) { };
|
|
43152
43361
|
Path.prototype.pathUpdated = function () {
|
|
43153
|
-
this.__dirty &=
|
|
43362
|
+
this.__dirty &= ~SHAPE_CHANGED_BIT;
|
|
43154
43363
|
};
|
|
43155
43364
|
Path.prototype.getUpdatedPathProxy = function (inBatch) {
|
|
43156
43365
|
!this.path && this.createPathProxy();
|
|
@@ -55736,7 +55945,7 @@
|
|
|
55736
55945
|
function brush$1(ctx, el, scope, isLast) {
|
|
55737
55946
|
var m = el.transform;
|
|
55738
55947
|
if (!el.shouldBePainted(scope.viewWidth, scope.viewHeight, false, false)) {
|
|
55739
|
-
el.__dirty &=
|
|
55948
|
+
el.__dirty &= ~REDRAW_BIT;
|
|
55740
55949
|
el.__isRendered = false;
|
|
55741
55950
|
return;
|
|
55742
55951
|
}
|
|
@@ -114005,7 +114214,7 @@
|
|
|
114005
114214
|
// and velocity is close to 0
|
|
114006
114215
|
//
|
|
114007
114216
|
|
|
114008
|
-
if (velocity.x < -
|
|
114217
|
+
if (velocity.x < -MIN_NEXT_SLIDE_SPEED && currentSlideVisibilityRatio < 0 || velocity.x < 0.1 && currentSlideVisibilityRatio < -0.5) {
|
|
114009
114218
|
// Go to next slide
|
|
114010
114219
|
indexDiff = 1;
|
|
114011
114220
|
velocity.x = Math.min(velocity.x, 0);
|
|
@@ -114069,7 +114278,7 @@
|
|
|
114069
114278
|
// or if we are below and moving downwards
|
|
114070
114279
|
|
|
114071
114280
|
|
|
114072
|
-
if (vDragRatio < 0 && projectedVDragRatio < -
|
|
114281
|
+
if (vDragRatio < 0 && projectedVDragRatio < -MIN_RATIO_TO_CLOSE || vDragRatio > 0 && projectedVDragRatio > MIN_RATIO_TO_CLOSE) {
|
|
114073
114282
|
this.pswp.close();
|
|
114074
114283
|
return;
|
|
114075
114284
|
}
|
|
@@ -132787,6 +132996,7 @@
|
|
|
132787
132996
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
132788
132997
|
|
|
132789
132998
|
exports.ActionSheet = ActionSheet;
|
|
132999
|
+
exports.Affix = Affix;
|
|
132790
133000
|
exports.Alert = Alert;
|
|
132791
133001
|
exports.Artboard = Artboard;
|
|
132792
133002
|
exports.Button = Button;
|
|
@@ -132831,6 +133041,7 @@
|
|
|
132831
133041
|
exports.List = MList;
|
|
132832
133042
|
exports.ListItem = MListItem;
|
|
132833
133043
|
exports.MActionSheet = MActionSheet;
|
|
133044
|
+
exports.MAffix = MAffix;
|
|
132834
133045
|
exports.MAlert = MAlert;
|
|
132835
133046
|
exports.MArtboard = MArtboard;
|
|
132836
133047
|
exports.MButton = MButton;
|