@deot/vc 1.0.43 → 1.0.45
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 +2 -0
- package/dist/index.d.ts +313 -167
- package/dist/index.iife.js +442 -258
- package/dist/index.js +3 -1
- package/dist/index.umd.cjs +442 -258
- package/package.json +4 -4
package/dist/index.iife.js
CHANGED
|
@@ -124,6 +124,222 @@ var Vc = (function (exports, vue) {
|
|
|
124
124
|
return parent;
|
|
125
125
|
};
|
|
126
126
|
|
|
127
|
+
const IS_SERVER$2 = typeof window === "undefined";
|
|
128
|
+
|
|
129
|
+
const hasClass = (el, cls) => {
|
|
130
|
+
if (IS_SERVER$2 || !cls) return false;
|
|
131
|
+
if (cls.includes(" ")) {
|
|
132
|
+
throw new Error("[@deot/helper-dom]: 类名不应该包含空格");
|
|
133
|
+
}
|
|
134
|
+
if (el.classList) {
|
|
135
|
+
return el.classList.contains(cls);
|
|
136
|
+
} else {
|
|
137
|
+
return (" " + el.className + " ").indexOf(" " + cls + " ") > -1;
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
const addClass = (el, cls) => {
|
|
142
|
+
if (IS_SERVER$2 || !cls) return;
|
|
143
|
+
let curClass = el.className;
|
|
144
|
+
const classes = cls.split(" ");
|
|
145
|
+
for (let i = 0, j = classes.length; i < j; i++) {
|
|
146
|
+
const clsName = classes[i];
|
|
147
|
+
if (clsName) {
|
|
148
|
+
if (el.classList) {
|
|
149
|
+
el.classList.add(clsName);
|
|
150
|
+
} else if (!hasClass(el, clsName)) {
|
|
151
|
+
curClass += " " + clsName;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
if (!el.classList) {
|
|
156
|
+
el.className = curClass;
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
const composedPath = (e) => {
|
|
161
|
+
const path = e.composedPath && e.composedPath() || [];
|
|
162
|
+
if (path.length) return path;
|
|
163
|
+
let parent = e.target?.parentNode;
|
|
164
|
+
/* istanbul ignore next -- @preserve */
|
|
165
|
+
while (parent) {
|
|
166
|
+
path.push(parent);
|
|
167
|
+
parent = parent.parentNode;
|
|
168
|
+
}
|
|
169
|
+
return path;
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
const contains$1 = (el, child) => {
|
|
173
|
+
if (IS_SERVER$2 || !child) return false;
|
|
174
|
+
const childRect = child.getBoundingClientRect();
|
|
175
|
+
let elRect;
|
|
176
|
+
if (!el || [window, document, document.documentElement].includes(el)) {
|
|
177
|
+
elRect = {
|
|
178
|
+
top: 0,
|
|
179
|
+
right: window.innerWidth,
|
|
180
|
+
bottom: window.innerHeight,
|
|
181
|
+
left: 0
|
|
182
|
+
};
|
|
183
|
+
} else {
|
|
184
|
+
elRect = el.getBoundingClientRect();
|
|
185
|
+
}
|
|
186
|
+
return childRect.top < elRect.bottom && childRect.bottom > elRect.top && childRect.right > elRect.left && childRect.left < elRect.right;
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
const el$1 = (v) => {
|
|
190
|
+
if (IS_SERVER$2) return null;
|
|
191
|
+
let target;
|
|
192
|
+
if (typeof v === "object") {
|
|
193
|
+
target = v;
|
|
194
|
+
} else {
|
|
195
|
+
target = document.querySelector(v);
|
|
196
|
+
}
|
|
197
|
+
if (!target) {
|
|
198
|
+
throw new Error("[@deot/helper-dom]: el缺失");
|
|
199
|
+
}
|
|
200
|
+
return target;
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
const getStyle$1 = (el, name) => {
|
|
204
|
+
if (IS_SERVER$2 || !name) return "";
|
|
205
|
+
if (name === "float") {
|
|
206
|
+
name = "cssFloat";
|
|
207
|
+
}
|
|
208
|
+
try {
|
|
209
|
+
const computed = document.defaultView.getComputedStyle(el, "");
|
|
210
|
+
return el.style[name] || (computed?.[name] || "");
|
|
211
|
+
} catch (e) {
|
|
212
|
+
return el.style[name] || "";
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
const isScroller = (el, options) => {
|
|
217
|
+
if (IS_SERVER$2 || !el) return false;
|
|
218
|
+
const { className, direction } = options || {};
|
|
219
|
+
let overflow = getStyle$1(el, `overflow-${direction ? "y" : "x"}`);
|
|
220
|
+
overflow = overflow || getStyle$1(el, "overflow");
|
|
221
|
+
return !!(overflow.match(/(scroll|auto)/) || className?.test(el.className));
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
const getScroller = (el, options) => {
|
|
225
|
+
if (IS_SERVER$2 || !el) return null;
|
|
226
|
+
let parent = el;
|
|
227
|
+
while (parent) {
|
|
228
|
+
if ([window, document, document.documentElement].includes(parent)) {
|
|
229
|
+
return window;
|
|
230
|
+
}
|
|
231
|
+
if (isScroller(parent, options)) {
|
|
232
|
+
return parent;
|
|
233
|
+
}
|
|
234
|
+
parent = parent?.parentNode;
|
|
235
|
+
}
|
|
236
|
+
return parent;
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
const off = (el, event, handler, options) => {
|
|
240
|
+
if (IS_SERVER$2) return;
|
|
241
|
+
el.removeEventListener(event, handler, false);
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
const on = (el, event, handler, options) => {
|
|
245
|
+
if (IS_SERVER$2) return () => {
|
|
246
|
+
};
|
|
247
|
+
el.addEventListener(event, handler, false);
|
|
248
|
+
return () => {
|
|
249
|
+
el.removeEventListener(event, handler, false);
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
const $target = IS_SERVER$2 ? {} : document.createElement("div").style;
|
|
254
|
+
const prefix$1 = (() => {
|
|
255
|
+
const keys = {
|
|
256
|
+
webkit: "webkitTransform",
|
|
257
|
+
Moz: "MozTransform",
|
|
258
|
+
O: "OTransform",
|
|
259
|
+
ms: "msTransform",
|
|
260
|
+
standard: "transform"
|
|
261
|
+
};
|
|
262
|
+
const values = {
|
|
263
|
+
webkit: "-webkit-",
|
|
264
|
+
Moz: "-moz-",
|
|
265
|
+
O: "-o-",
|
|
266
|
+
ms: "-ms-",
|
|
267
|
+
standard: ""
|
|
268
|
+
};
|
|
269
|
+
for (const key in keys) {
|
|
270
|
+
if ($target[keys[key]] !== void 0) {
|
|
271
|
+
return {
|
|
272
|
+
camel: key,
|
|
273
|
+
kebab: values[key]
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
return false;
|
|
278
|
+
})();
|
|
279
|
+
const prefixStyle = (v) => {
|
|
280
|
+
if (IS_SERVER$2 || prefix$1 === false) {
|
|
281
|
+
return {
|
|
282
|
+
camel: v,
|
|
283
|
+
kebab: v
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
return {
|
|
287
|
+
camel: prefix$1.camel + v.charAt(0).toUpperCase() + v.substr(1),
|
|
288
|
+
kebab: prefix$1.kebab + v
|
|
289
|
+
};
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
const removeClass = (el, cls) => {
|
|
293
|
+
if (IS_SERVER$2 || !cls) return;
|
|
294
|
+
const classes = cls.split(" ");
|
|
295
|
+
let curClass = " " + el.className + " ";
|
|
296
|
+
for (let i = 0, j = classes.length; i < j; i++) {
|
|
297
|
+
const clsName = classes[i];
|
|
298
|
+
if (clsName) {
|
|
299
|
+
if (el.classList) {
|
|
300
|
+
el.classList.remove(clsName);
|
|
301
|
+
continue;
|
|
302
|
+
}
|
|
303
|
+
/* istanbul ignore next -- @preserve */
|
|
304
|
+
if (hasClass(el, clsName)) {
|
|
305
|
+
curClass = curClass.replace(" " + clsName + " ", " ");
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
if (!el.classList) {
|
|
310
|
+
el.className = curClass.trim();
|
|
311
|
+
}
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
const scrollIntoView = async (el, options) => {
|
|
315
|
+
if (IS_SERVER$2) return;
|
|
316
|
+
const { from = 0, to = 0, duration = 300 } = options || {};
|
|
317
|
+
const difference = Math.abs(from - to);
|
|
318
|
+
const step = Math.ceil(difference / duration * 50);
|
|
319
|
+
let onResolve;
|
|
320
|
+
const target = new Promise((resolve) => {
|
|
321
|
+
onResolve = resolve;
|
|
322
|
+
});
|
|
323
|
+
const scroll = (start, end) => {
|
|
324
|
+
if (start === end) {
|
|
325
|
+
onResolve();
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
let d = start + step > end ? end : start + step;
|
|
329
|
+
if (start > end) {
|
|
330
|
+
d = start - step < end ? end : start - step;
|
|
331
|
+
}
|
|
332
|
+
if (el === window) {
|
|
333
|
+
window.scrollTo(d, d);
|
|
334
|
+
} else {
|
|
335
|
+
el.scrollTop = d;
|
|
336
|
+
}
|
|
337
|
+
window.requestAnimationFrame(() => scroll(d, end));
|
|
338
|
+
};
|
|
339
|
+
scroll(from, to);
|
|
340
|
+
return target;
|
|
341
|
+
};
|
|
342
|
+
|
|
127
343
|
const debounce$1 = (original, wait, options) => {
|
|
128
344
|
const { leading, trailing = true, throttle } = options || {};
|
|
129
345
|
let timer;
|
|
@@ -219,7 +435,7 @@ var Vc = (function (exports, vue) {
|
|
|
219
435
|
);
|
|
220
436
|
};
|
|
221
437
|
|
|
222
|
-
const flatten$1 = (value, parser) => {
|
|
438
|
+
const flatten$1 = (value, parser, exit) => {
|
|
223
439
|
let need = true;
|
|
224
440
|
let safeCount = 1;
|
|
225
441
|
let parseValue = value;
|
|
@@ -229,7 +445,7 @@ var Vc = (function (exports, vue) {
|
|
|
229
445
|
}
|
|
230
446
|
try {
|
|
231
447
|
const next = (parser || decodeURIComponent)(parseValue);
|
|
232
|
-
if (parseValue === next) {
|
|
448
|
+
if (parseValue === next || typeof exit === "function" && exit(next)) {
|
|
233
449
|
need = false;
|
|
234
450
|
}
|
|
235
451
|
parseValue = next;
|
|
@@ -242,8 +458,7 @@ var Vc = (function (exports, vue) {
|
|
|
242
458
|
};
|
|
243
459
|
|
|
244
460
|
const flattenJSONParse = (value) => {
|
|
245
|
-
if (value === null)
|
|
246
|
-
return null;
|
|
461
|
+
if (value === null) return null;
|
|
247
462
|
const regex = /^\d+$/;
|
|
248
463
|
if (regex.test(value) && value.length >= 16 && +value > Number.MAX_SAFE_INTEGER) {
|
|
249
464
|
return value;
|
|
@@ -2588,7 +2803,7 @@ var Vc = (function (exports, vue) {
|
|
|
2588
2803
|
function castSlice(array, start, end) {
|
|
2589
2804
|
var length = array.length;
|
|
2590
2805
|
end = end === undefined ? length : end;
|
|
2591
|
-
return (
|
|
2806
|
+
return (!start && end >= length) ? array : baseSlice(array, start, end);
|
|
2592
2807
|
}
|
|
2593
2808
|
|
|
2594
2809
|
/** Used to compose unicode character classes. */
|
|
@@ -5289,233 +5504,6 @@ var Vc = (function (exports, vue) {
|
|
|
5289
5504
|
});
|
|
5290
5505
|
}
|
|
5291
5506
|
|
|
5292
|
-
const IS_SERVER$2 = typeof window === "undefined";
|
|
5293
|
-
|
|
5294
|
-
const hasClass = (el, cls) => {
|
|
5295
|
-
if (IS_SERVER$2 || !cls)
|
|
5296
|
-
return false;
|
|
5297
|
-
if (cls.includes(" ")) {
|
|
5298
|
-
throw new Error("[@deot/helper-dom]: 类名不应该包含空格");
|
|
5299
|
-
}
|
|
5300
|
-
if (el.classList) {
|
|
5301
|
-
return el.classList.contains(cls);
|
|
5302
|
-
} else {
|
|
5303
|
-
return (" " + el.className + " ").indexOf(" " + cls + " ") > -1;
|
|
5304
|
-
}
|
|
5305
|
-
};
|
|
5306
|
-
|
|
5307
|
-
const addClass = (el, cls) => {
|
|
5308
|
-
if (IS_SERVER$2 || !cls)
|
|
5309
|
-
return;
|
|
5310
|
-
let curClass = el.className;
|
|
5311
|
-
let classes = cls.split(" ");
|
|
5312
|
-
for (let i = 0, j = classes.length; i < j; i++) {
|
|
5313
|
-
let clsName = classes[i];
|
|
5314
|
-
if (clsName) {
|
|
5315
|
-
if (el.classList) {
|
|
5316
|
-
el.classList.add(clsName);
|
|
5317
|
-
} else if (!hasClass(el, clsName)) {
|
|
5318
|
-
curClass += " " + clsName;
|
|
5319
|
-
}
|
|
5320
|
-
}
|
|
5321
|
-
}
|
|
5322
|
-
if (!el.classList) {
|
|
5323
|
-
el.className = curClass;
|
|
5324
|
-
}
|
|
5325
|
-
};
|
|
5326
|
-
|
|
5327
|
-
const composedPath = (e) => {
|
|
5328
|
-
let path = e.composedPath && e.composedPath() || [];
|
|
5329
|
-
if (path.length)
|
|
5330
|
-
return path;
|
|
5331
|
-
let parent = e.target?.parentNode;
|
|
5332
|
-
/* istanbul ignore next -- @preserve */
|
|
5333
|
-
while (parent) {
|
|
5334
|
-
path.push(parent);
|
|
5335
|
-
parent = parent.parentNode;
|
|
5336
|
-
}
|
|
5337
|
-
return path;
|
|
5338
|
-
};
|
|
5339
|
-
|
|
5340
|
-
const contains$1 = (el, child) => {
|
|
5341
|
-
if (IS_SERVER$2 || !child)
|
|
5342
|
-
return false;
|
|
5343
|
-
let childRect = child.getBoundingClientRect();
|
|
5344
|
-
let elRect;
|
|
5345
|
-
if (!el || [window, document, document.documentElement].includes(el)) {
|
|
5346
|
-
elRect = {
|
|
5347
|
-
top: 0,
|
|
5348
|
-
right: window.innerWidth,
|
|
5349
|
-
bottom: window.innerHeight,
|
|
5350
|
-
left: 0
|
|
5351
|
-
};
|
|
5352
|
-
} else {
|
|
5353
|
-
elRect = el.getBoundingClientRect();
|
|
5354
|
-
}
|
|
5355
|
-
return childRect.top < elRect.bottom && childRect.bottom > elRect.top && childRect.right > elRect.left && childRect.left < elRect.right;
|
|
5356
|
-
};
|
|
5357
|
-
|
|
5358
|
-
const el$1 = (v) => {
|
|
5359
|
-
if (IS_SERVER$2)
|
|
5360
|
-
return null;
|
|
5361
|
-
let target;
|
|
5362
|
-
if (typeof v === "object") {
|
|
5363
|
-
target = v;
|
|
5364
|
-
} else {
|
|
5365
|
-
target = document.querySelector(v);
|
|
5366
|
-
}
|
|
5367
|
-
if (!target) {
|
|
5368
|
-
throw new Error("[@deot/helper-dom]: el缺失");
|
|
5369
|
-
}
|
|
5370
|
-
return target;
|
|
5371
|
-
};
|
|
5372
|
-
|
|
5373
|
-
const getStyle$1 = (el, name) => {
|
|
5374
|
-
if (IS_SERVER$2 || !name)
|
|
5375
|
-
return "";
|
|
5376
|
-
if (name === "float") {
|
|
5377
|
-
name = "cssFloat";
|
|
5378
|
-
}
|
|
5379
|
-
try {
|
|
5380
|
-
let computed = document.defaultView.getComputedStyle(el, "");
|
|
5381
|
-
return el.style[name] || (computed?.[name] || "");
|
|
5382
|
-
} catch (e) {
|
|
5383
|
-
return el.style[name] || "";
|
|
5384
|
-
}
|
|
5385
|
-
};
|
|
5386
|
-
|
|
5387
|
-
const isScroll = (el, direction) => {
|
|
5388
|
-
if (IS_SERVER$2 || !el)
|
|
5389
|
-
return false;
|
|
5390
|
-
let overflow = getStyle$1(el, `overflow-${"x"}`);
|
|
5391
|
-
overflow = overflow || getStyle$1(el, "overflow");
|
|
5392
|
-
return !!overflow.match(/(scroll|auto)/);
|
|
5393
|
-
};
|
|
5394
|
-
|
|
5395
|
-
const getScroller = (el, direction) => {
|
|
5396
|
-
if (IS_SERVER$2 || !el)
|
|
5397
|
-
return null;
|
|
5398
|
-
let parent = el;
|
|
5399
|
-
while (parent) {
|
|
5400
|
-
if ([window, document, document.documentElement].includes(parent)) {
|
|
5401
|
-
return window;
|
|
5402
|
-
}
|
|
5403
|
-
if (isScroll(parent)) {
|
|
5404
|
-
return parent;
|
|
5405
|
-
}
|
|
5406
|
-
parent = parent?.parentNode;
|
|
5407
|
-
}
|
|
5408
|
-
return parent;
|
|
5409
|
-
};
|
|
5410
|
-
|
|
5411
|
-
const off = (el, event, handler, options) => {
|
|
5412
|
-
if (IS_SERVER$2)
|
|
5413
|
-
return;
|
|
5414
|
-
el.removeEventListener(event, handler, false);
|
|
5415
|
-
};
|
|
5416
|
-
|
|
5417
|
-
const on = (el, event, handler, options) => {
|
|
5418
|
-
if (IS_SERVER$2)
|
|
5419
|
-
return () => {
|
|
5420
|
-
};
|
|
5421
|
-
el.addEventListener(event, handler, false);
|
|
5422
|
-
return () => {
|
|
5423
|
-
el.removeEventListener(event, handler, false);
|
|
5424
|
-
};
|
|
5425
|
-
};
|
|
5426
|
-
|
|
5427
|
-
const $target = IS_SERVER$2 ? {} : document.createElement("div").style;
|
|
5428
|
-
const prefix$1 = (() => {
|
|
5429
|
-
let keys = {
|
|
5430
|
-
webkit: "webkitTransform",
|
|
5431
|
-
Moz: "MozTransform",
|
|
5432
|
-
O: "OTransform",
|
|
5433
|
-
ms: "msTransform",
|
|
5434
|
-
standard: "transform"
|
|
5435
|
-
};
|
|
5436
|
-
let values = {
|
|
5437
|
-
webkit: "-webkit-",
|
|
5438
|
-
Moz: "-moz-",
|
|
5439
|
-
O: "-o-",
|
|
5440
|
-
ms: "-ms-",
|
|
5441
|
-
standard: ""
|
|
5442
|
-
};
|
|
5443
|
-
for (let key in keys) {
|
|
5444
|
-
if ($target[keys[key]] !== void 0) {
|
|
5445
|
-
return {
|
|
5446
|
-
camel: key,
|
|
5447
|
-
kebab: values[key]
|
|
5448
|
-
};
|
|
5449
|
-
}
|
|
5450
|
-
}
|
|
5451
|
-
return false;
|
|
5452
|
-
})();
|
|
5453
|
-
const prefixStyle = (v) => {
|
|
5454
|
-
if (IS_SERVER$2 || prefix$1 === false) {
|
|
5455
|
-
return {
|
|
5456
|
-
camel: v,
|
|
5457
|
-
kebab: v
|
|
5458
|
-
};
|
|
5459
|
-
}
|
|
5460
|
-
return {
|
|
5461
|
-
camel: prefix$1.camel + v.charAt(0).toUpperCase() + v.substr(1),
|
|
5462
|
-
kebab: prefix$1.kebab + v
|
|
5463
|
-
};
|
|
5464
|
-
};
|
|
5465
|
-
|
|
5466
|
-
const removeClass = (el, cls) => {
|
|
5467
|
-
if (IS_SERVER$2 || !cls)
|
|
5468
|
-
return;
|
|
5469
|
-
let classes = cls.split(" ");
|
|
5470
|
-
let curClass = " " + el.className + " ";
|
|
5471
|
-
for (let i = 0, j = classes.length; i < j; i++) {
|
|
5472
|
-
let clsName = classes[i];
|
|
5473
|
-
if (clsName) {
|
|
5474
|
-
if (el.classList) {
|
|
5475
|
-
el.classList.remove(clsName);
|
|
5476
|
-
continue;
|
|
5477
|
-
}
|
|
5478
|
-
/* istanbul ignore next -- @preserve */
|
|
5479
|
-
if (hasClass(el, clsName)) {
|
|
5480
|
-
curClass = curClass.replace(" " + clsName + " ", " ");
|
|
5481
|
-
}
|
|
5482
|
-
}
|
|
5483
|
-
}
|
|
5484
|
-
if (!el.classList) {
|
|
5485
|
-
el.className = curClass.trim();
|
|
5486
|
-
}
|
|
5487
|
-
};
|
|
5488
|
-
|
|
5489
|
-
const scrollIntoView = async (el, options) => {
|
|
5490
|
-
if (IS_SERVER$2)
|
|
5491
|
-
return;
|
|
5492
|
-
let { from = 0, to = 0, duration = 300 } = options || {};
|
|
5493
|
-
let difference = Math.abs(from - to);
|
|
5494
|
-
let step = Math.ceil(difference / duration * 50);
|
|
5495
|
-
let onResolve;
|
|
5496
|
-
let target = new Promise((resolve) => {
|
|
5497
|
-
onResolve = resolve;
|
|
5498
|
-
});
|
|
5499
|
-
const scroll = (start, end) => {
|
|
5500
|
-
if (start === end) {
|
|
5501
|
-
onResolve();
|
|
5502
|
-
return;
|
|
5503
|
-
}
|
|
5504
|
-
let d = start + step > end ? end : start + step;
|
|
5505
|
-
if (start > end) {
|
|
5506
|
-
d = start - step < end ? end : start - step;
|
|
5507
|
-
}
|
|
5508
|
-
if (el === window) {
|
|
5509
|
-
window.scrollTo(d, d);
|
|
5510
|
-
} else {
|
|
5511
|
-
el.scrollTop = d;
|
|
5512
|
-
}
|
|
5513
|
-
window.requestAnimationFrame(() => scroll(d, end));
|
|
5514
|
-
};
|
|
5515
|
-
scroll(from, to);
|
|
5516
|
-
return target;
|
|
5517
|
-
};
|
|
5518
|
-
|
|
5519
5507
|
class Resize {
|
|
5520
5508
|
el;
|
|
5521
5509
|
static of(el) {
|
|
@@ -9140,16 +9128,16 @@ var Vc = (function (exports, vue) {
|
|
|
9140
9128
|
}
|
|
9141
9129
|
}
|
|
9142
9130
|
const VcInstance = new Instance();
|
|
9143
|
-
const props$
|
|
9131
|
+
const props$1t = {
|
|
9144
9132
|
tag: {
|
|
9145
9133
|
type: String,
|
|
9146
9134
|
default: "div"
|
|
9147
9135
|
}
|
|
9148
9136
|
};
|
|
9149
|
-
const COMPONENT_NAME$
|
|
9137
|
+
const COMPONENT_NAME$28 = "vc-action-sheet";
|
|
9150
9138
|
const ActionSheet = /* @__PURE__ */ vue.defineComponent({
|
|
9151
|
-
name: COMPONENT_NAME$
|
|
9152
|
-
props: props$
|
|
9139
|
+
name: COMPONENT_NAME$28,
|
|
9140
|
+
props: props$1t,
|
|
9153
9141
|
setup(props2, {
|
|
9154
9142
|
slots
|
|
9155
9143
|
}) {
|
|
@@ -9161,6 +9149,176 @@ var Vc = (function (exports, vue) {
|
|
|
9161
9149
|
}
|
|
9162
9150
|
});
|
|
9163
9151
|
const MActionSheet = ActionSheet;
|
|
9152
|
+
const props$1s = {
|
|
9153
|
+
zIndex: {
|
|
9154
|
+
type: [Number, String],
|
|
9155
|
+
default: 1
|
|
9156
|
+
},
|
|
9157
|
+
// TODO: left/right
|
|
9158
|
+
placement: {
|
|
9159
|
+
type: String,
|
|
9160
|
+
default: "top"
|
|
9161
|
+
},
|
|
9162
|
+
disabled: {
|
|
9163
|
+
type: Boolean,
|
|
9164
|
+
default: false
|
|
9165
|
+
},
|
|
9166
|
+
fixed: {
|
|
9167
|
+
type: Boolean,
|
|
9168
|
+
default: true
|
|
9169
|
+
},
|
|
9170
|
+
offset: {
|
|
9171
|
+
type: Number,
|
|
9172
|
+
default: 0
|
|
9173
|
+
},
|
|
9174
|
+
// -> 固钉始终保持在容器内, 超过范围则隐藏(请注意容器避免出现滚动条) 仅fixed为true有效
|
|
9175
|
+
target: {
|
|
9176
|
+
type: String
|
|
9177
|
+
}
|
|
9178
|
+
};
|
|
9179
|
+
const COMPONENT_NAME$27 = "vc-affix";
|
|
9180
|
+
const SCROLLER_WHEEL_REG = /vc-scroller-wheel/;
|
|
9181
|
+
const Affix = /* @__PURE__ */ vue.defineComponent({
|
|
9182
|
+
name: COMPONENT_NAME$27,
|
|
9183
|
+
props: props$1s,
|
|
9184
|
+
setup(props2, {
|
|
9185
|
+
slots,
|
|
9186
|
+
expose
|
|
9187
|
+
}) {
|
|
9188
|
+
const scrollerInstance = vue.inject("vc-scroller", null);
|
|
9189
|
+
const scroller = vue.shallowRef();
|
|
9190
|
+
const base = vue.shallowRef();
|
|
9191
|
+
const current = vue.shallowRef();
|
|
9192
|
+
const currentRect = vue.reactive({
|
|
9193
|
+
top: 0,
|
|
9194
|
+
bottom: 0,
|
|
9195
|
+
width: 0,
|
|
9196
|
+
height: 0
|
|
9197
|
+
});
|
|
9198
|
+
const isActive = vue.ref(false);
|
|
9199
|
+
const transformY = vue.ref(0);
|
|
9200
|
+
const windowHeight = vue.ref(window.innerHeight);
|
|
9201
|
+
const isVcScrollerWheel = vue.computed(() => {
|
|
9202
|
+
return SCROLLER_WHEEL_REG.test(scroller.value?.className || "");
|
|
9203
|
+
});
|
|
9204
|
+
const currentStyle = vue.computed(() => {
|
|
9205
|
+
if (!isActive.value) return {};
|
|
9206
|
+
return {
|
|
9207
|
+
height: `${currentRect.height}px`,
|
|
9208
|
+
width: `${currentRect.width}px`
|
|
9209
|
+
};
|
|
9210
|
+
});
|
|
9211
|
+
const contentStyle = vue.computed(() => {
|
|
9212
|
+
if (!isActive.value) return {};
|
|
9213
|
+
const offset = `${props2.offset}px`;
|
|
9214
|
+
return {
|
|
9215
|
+
height: `${currentRect.height}px`,
|
|
9216
|
+
width: `${currentRect.width}px`,
|
|
9217
|
+
top: props2.placement === "top" ? offset : "",
|
|
9218
|
+
bottom: props2.placement === "bottom" ? offset : "",
|
|
9219
|
+
zIndex: props2.zIndex,
|
|
9220
|
+
transform: transformY.value ? `translateY(${transformY.value}px)` : ""
|
|
9221
|
+
};
|
|
9222
|
+
});
|
|
9223
|
+
const setCurrentRect = () => {
|
|
9224
|
+
const rect = current.value.getBoundingClientRect();
|
|
9225
|
+
Object.assign(currentRect, {
|
|
9226
|
+
top: rect.top,
|
|
9227
|
+
bottom: rect.bottom,
|
|
9228
|
+
width: rect.width,
|
|
9229
|
+
height: rect.height
|
|
9230
|
+
});
|
|
9231
|
+
};
|
|
9232
|
+
const setAbsoluteStatus = () => {
|
|
9233
|
+
const {
|
|
9234
|
+
placement,
|
|
9235
|
+
offset
|
|
9236
|
+
} = props2;
|
|
9237
|
+
const currentHeightOffset = offset + currentRect.height;
|
|
9238
|
+
const containerRect = scroller.value.getBoundingClientRect();
|
|
9239
|
+
let transformOffsetY = 0;
|
|
9240
|
+
if (scrollerInstance && isVcScrollerWheel.value) {
|
|
9241
|
+
const maxMoveY = scrollerInstance.scrollHeight - scrollerInstance.clientHeight;
|
|
9242
|
+
transformOffsetY = scrollerInstance.scrollTop >= maxMoveY ? maxMoveY : scrollerInstance.scrollTop;
|
|
9243
|
+
}
|
|
9244
|
+
if (placement === "top") {
|
|
9245
|
+
isActive.value = currentRect.top - containerRect.top <= props2.offset;
|
|
9246
|
+
transformY.value = Math.min(containerRect.bottom - currentHeightOffset, 0) + transformOffsetY;
|
|
9247
|
+
} else {
|
|
9248
|
+
isActive.value = currentRect.bottom - containerRect.top >= containerRect.height - props2.offset;
|
|
9249
|
+
transformY.value = Math.max(containerRect.height - containerRect.top - currentHeightOffset, 0) + transformOffsetY;
|
|
9250
|
+
}
|
|
9251
|
+
};
|
|
9252
|
+
const setFixedStatus = () => {
|
|
9253
|
+
const {
|
|
9254
|
+
placement,
|
|
9255
|
+
target,
|
|
9256
|
+
offset
|
|
9257
|
+
} = props2;
|
|
9258
|
+
const currentHeightOffset = offset + currentRect.height;
|
|
9259
|
+
const containerRect = target && base.value.getBoundingClientRect();
|
|
9260
|
+
if (placement === "top") {
|
|
9261
|
+
if (target) {
|
|
9262
|
+
isActive.value = offset > currentRect.top && containerRect.bottom > 0;
|
|
9263
|
+
transformY.value = Math.min(containerRect.bottom - currentHeightOffset, 0);
|
|
9264
|
+
} else {
|
|
9265
|
+
isActive.value = offset > currentRect.top;
|
|
9266
|
+
}
|
|
9267
|
+
} else {
|
|
9268
|
+
if (target) {
|
|
9269
|
+
isActive.value = windowHeight.value - offset < currentRect.bottom && windowHeight.value > containerRect.top;
|
|
9270
|
+
transformY.value = -Math.min(windowHeight.value - containerRect.top - currentHeightOffset, 0);
|
|
9271
|
+
} else {
|
|
9272
|
+
isActive.value = windowHeight.value - offset < currentRect.bottom;
|
|
9273
|
+
}
|
|
9274
|
+
}
|
|
9275
|
+
};
|
|
9276
|
+
const refresh = () => {
|
|
9277
|
+
setCurrentRect();
|
|
9278
|
+
scroller.value instanceof Window || props2.fixed ? setFixedStatus() : setAbsoluteStatus();
|
|
9279
|
+
};
|
|
9280
|
+
vue.onMounted(() => {
|
|
9281
|
+
if (typeof props2.target === "string") {
|
|
9282
|
+
base.value = document.querySelector(props2.target) ?? void 0;
|
|
9283
|
+
}
|
|
9284
|
+
!base.value && (base.value = document.documentElement);
|
|
9285
|
+
scroller.value = getScroller(current.value, {
|
|
9286
|
+
className: SCROLLER_WHEEL_REG
|
|
9287
|
+
});
|
|
9288
|
+
if (isVcScrollerWheel.value) {
|
|
9289
|
+
scrollerInstance?.on(refresh);
|
|
9290
|
+
} else {
|
|
9291
|
+
scroller.value?.addEventListener("scroll", refresh);
|
|
9292
|
+
}
|
|
9293
|
+
refresh();
|
|
9294
|
+
});
|
|
9295
|
+
vue.onBeforeUnmount(() => {
|
|
9296
|
+
if (isVcScrollerWheel.value) {
|
|
9297
|
+
scrollerInstance?.off(refresh);
|
|
9298
|
+
} else {
|
|
9299
|
+
scroller.value?.removeEventListener("scroll", refresh);
|
|
9300
|
+
}
|
|
9301
|
+
});
|
|
9302
|
+
expose({
|
|
9303
|
+
refresh
|
|
9304
|
+
});
|
|
9305
|
+
return () => {
|
|
9306
|
+
return vue.createVNode("div", {
|
|
9307
|
+
"ref": current,
|
|
9308
|
+
"class": "vc-affix",
|
|
9309
|
+
"style": currentStyle.value
|
|
9310
|
+
}, [vue.createVNode("div", {
|
|
9311
|
+
"class": {
|
|
9312
|
+
[`vc-affix__${props2.fixed ? "fixed" : "absolute"}`]: isActive.value
|
|
9313
|
+
},
|
|
9314
|
+
"style": contentStyle.value
|
|
9315
|
+
}, [slots?.default?.({
|
|
9316
|
+
active: isActive.value
|
|
9317
|
+
})])]);
|
|
9318
|
+
};
|
|
9319
|
+
}
|
|
9320
|
+
});
|
|
9321
|
+
const MAffix = Affix;
|
|
9164
9322
|
const props$1r = {
|
|
9165
9323
|
modelValue: {
|
|
9166
9324
|
type: Boolean,
|
|
@@ -9829,7 +9987,7 @@ var Vc = (function (exports, vue) {
|
|
|
9829
9987
|
});
|
|
9830
9988
|
const COMPONENT_NAME$1$ = "vc-alert";
|
|
9831
9989
|
const THEME_MAP = {
|
|
9832
|
-
info: ["#
|
|
9990
|
+
info: ["#456CF6", "#91d5ff", "#e6f7ff"],
|
|
9833
9991
|
success: ["#52c41a", "#b7eb8f", "#f6ffed"],
|
|
9834
9992
|
error: ["#ed4014", "#ffb08f", "#fbe9e9"],
|
|
9835
9993
|
warning: ["#ffbf00", "#ffe58f", "#fffbe6"]
|
|
@@ -17726,6 +17884,7 @@ var Vc = (function (exports, vue) {
|
|
|
17726
17884
|
refreshSize();
|
|
17727
17885
|
refreshPosition(options);
|
|
17728
17886
|
};
|
|
17887
|
+
const listeners = [];
|
|
17729
17888
|
const triggerScrollDelegate = (options) => {
|
|
17730
17889
|
const delegates = {
|
|
17731
17890
|
scrollLeft: (options && options.x) ?? scrollX.value,
|
|
@@ -17733,12 +17892,15 @@ var Vc = (function (exports, vue) {
|
|
|
17733
17892
|
clientWidth: wrapperW.value,
|
|
17734
17893
|
clientHeight: wrapperH.value,
|
|
17735
17894
|
scrollWidth: contentW.value,
|
|
17736
|
-
scrollHeight: contentH.value
|
|
17895
|
+
scrollHeight: contentH.value,
|
|
17896
|
+
getBoundingClientRect: () => wrapper.value?.getBoundingClientRect()
|
|
17737
17897
|
};
|
|
17738
|
-
|
|
17898
|
+
const e = {
|
|
17739
17899
|
target: delegates,
|
|
17740
17900
|
currentTarget: delegates
|
|
17741
|
-
}
|
|
17901
|
+
};
|
|
17902
|
+
instance.emit("scroll", e);
|
|
17903
|
+
listeners.forEach((listener) => listener(e));
|
|
17742
17904
|
};
|
|
17743
17905
|
const scrollTo = (options) => {
|
|
17744
17906
|
refreshPosition(options);
|
|
@@ -17765,8 +17927,9 @@ var Vc = (function (exports, vue) {
|
|
|
17765
17927
|
Resize.off(wrapper.value, refresh);
|
|
17766
17928
|
Resize.off(content.value, refresh);
|
|
17767
17929
|
}
|
|
17930
|
+
listeners.splice(0, listeners.length);
|
|
17768
17931
|
});
|
|
17769
|
-
|
|
17932
|
+
const exposed = {
|
|
17770
17933
|
wrapper,
|
|
17771
17934
|
content,
|
|
17772
17935
|
scrollTo,
|
|
@@ -17782,8 +17945,16 @@ var Vc = (function (exports, vue) {
|
|
|
17782
17945
|
},
|
|
17783
17946
|
setScrollLeft: (value) => {
|
|
17784
17947
|
scrollTo({ x: value });
|
|
17948
|
+
},
|
|
17949
|
+
on: (listener) => {
|
|
17950
|
+
listeners.push(listener);
|
|
17951
|
+
},
|
|
17952
|
+
off: (listener) => {
|
|
17953
|
+
listeners.splice(listeners.indexOf(listener), 1);
|
|
17785
17954
|
}
|
|
17786
|
-
}
|
|
17955
|
+
};
|
|
17956
|
+
expose(exposed);
|
|
17957
|
+
vue.provide("vc-scroller", vue.reactive(exposed));
|
|
17787
17958
|
return {
|
|
17788
17959
|
bar,
|
|
17789
17960
|
wrapper,
|
|
@@ -23096,7 +23267,7 @@ var Vc = (function (exports, vue) {
|
|
|
23096
23267
|
color: {
|
|
23097
23268
|
type: [Object, String],
|
|
23098
23269
|
default: () => ({
|
|
23099
|
-
normal: "#
|
|
23270
|
+
normal: "#456CF6",
|
|
23100
23271
|
success: "#52c41a",
|
|
23101
23272
|
error: "#f5222d"
|
|
23102
23273
|
})
|
|
@@ -27821,6 +27992,7 @@ var Vc = (function (exports, vue) {
|
|
|
27821
27992
|
emit("update:modelValue", currentValue.value);
|
|
27822
27993
|
emit("change", currentValue.value);
|
|
27823
27994
|
emit("click", currentValue.value);
|
|
27995
|
+
nav.anchor && document.querySelector(nav.anchor)?.scrollIntoView?.({ behavior: "smooth" });
|
|
27824
27996
|
};
|
|
27825
27997
|
const handleResize = () => {
|
|
27826
27998
|
if (instance.isUnmounted) return;
|
|
@@ -28050,12 +28222,16 @@ var Vc = (function (exports, vue) {
|
|
|
28050
28222
|
});
|
|
28051
28223
|
const props$b = {
|
|
28052
28224
|
value: {
|
|
28053
|
-
type: [String, Number, Boolean]
|
|
28225
|
+
type: [String, Number, Boolean],
|
|
28226
|
+
default: void 0
|
|
28054
28227
|
},
|
|
28055
28228
|
label: {
|
|
28056
28229
|
type: [String, Function],
|
|
28057
28230
|
default: ""
|
|
28058
28231
|
},
|
|
28232
|
+
anchor: {
|
|
28233
|
+
type: String
|
|
28234
|
+
},
|
|
28059
28235
|
/**
|
|
28060
28236
|
* 服务端渲染时,lazy设置为false,可以把内容渲染出来;
|
|
28061
28237
|
* 不能设置为!IS_SERVER, 会影响客服端激活,不一样会存在问题
|
|
@@ -28356,7 +28532,7 @@ var Vc = (function (exports, vue) {
|
|
|
28356
28532
|
"class": [{
|
|
28357
28533
|
"is-fixed": isFixed
|
|
28358
28534
|
}, "vcm-tabs__bar"]
|
|
28359
|
-
}, [vue.createVNode("slot", {
|
|
28535
|
+
}, [vue.createVNode(vue.resolveComponent("slot"), {
|
|
28360
28536
|
"name": "prepend"
|
|
28361
28537
|
}, null), slots.prepend?.(), props2.showStep && tabs.scrollable.value && vue.createVNode("div", {
|
|
28362
28538
|
"class": "vcm-tabs__step is-left",
|
|
@@ -28465,6 +28641,10 @@ var Vc = (function (exports, vue) {
|
|
|
28465
28641
|
default: (props$) => {
|
|
28466
28642
|
return props$.value;
|
|
28467
28643
|
}
|
|
28644
|
+
},
|
|
28645
|
+
theme: {
|
|
28646
|
+
type: String,
|
|
28647
|
+
default: "dark"
|
|
28468
28648
|
}
|
|
28469
28649
|
};
|
|
28470
28650
|
const COMPONENT_NAME$e = "vc-text";
|
|
@@ -28514,7 +28694,7 @@ var Vc = (function (exports, vue) {
|
|
|
28514
28694
|
// 确保不重复创建
|
|
28515
28695
|
triggerEl: e.target,
|
|
28516
28696
|
hover: true,
|
|
28517
|
-
theme:
|
|
28697
|
+
theme: props2.theme,
|
|
28518
28698
|
placement: props2.placement,
|
|
28519
28699
|
portalClass: props2.portalClass,
|
|
28520
28700
|
portalStyle: [props2.portalStyle || `width: ${e.target.clientWidth}px`, "word-break: break-all"],
|
|
@@ -31401,6 +31581,8 @@ var Vc = (function (exports, vue) {
|
|
|
31401
31581
|
const Components = {
|
|
31402
31582
|
ActionSheet,
|
|
31403
31583
|
MActionSheet,
|
|
31584
|
+
Affix,
|
|
31585
|
+
MAffix,
|
|
31404
31586
|
Alert,
|
|
31405
31587
|
MAlert,
|
|
31406
31588
|
Artboard,
|
|
@@ -34726,10 +34908,10 @@ var Vc = (function (exports, vue) {
|
|
|
34726
34908
|
var _v1 = create$2();
|
|
34727
34909
|
var _v2 = create$2();
|
|
34728
34910
|
function isAroundZero$1(val) {
|
|
34729
|
-
return val > -
|
|
34911
|
+
return val > -EPSILON$4 && val < EPSILON$4;
|
|
34730
34912
|
}
|
|
34731
34913
|
function isNotAroundZero$1(val) {
|
|
34732
|
-
return val > EPSILON$4 || val < -
|
|
34914
|
+
return val > EPSILON$4 || val < -EPSILON$4;
|
|
34733
34915
|
}
|
|
34734
34916
|
function cubicAt(p0, p1, p2, p3, t) {
|
|
34735
34917
|
var onet = 1 - t;
|
|
@@ -35716,7 +35898,7 @@ var Vc = (function (exports, vue) {
|
|
|
35716
35898
|
}
|
|
35717
35899
|
var EPSILON$3 = 1e-4;
|
|
35718
35900
|
function isAroundZero(transform) {
|
|
35719
|
-
return transform < EPSILON$3 && transform > -
|
|
35901
|
+
return transform < EPSILON$3 && transform > -EPSILON$3;
|
|
35720
35902
|
}
|
|
35721
35903
|
function round3(transform) {
|
|
35722
35904
|
return mathRound$1(transform * 1e3) / 1e3;
|
|
@@ -36997,7 +37179,7 @@ var Vc = (function (exports, vue) {
|
|
|
36997
37179
|
var mIdentity = identity;
|
|
36998
37180
|
var EPSILON$2 = 5e-5;
|
|
36999
37181
|
function isNotAroundZero(val) {
|
|
37000
|
-
return val > EPSILON$2 || val < -
|
|
37182
|
+
return val > EPSILON$2 || val < -EPSILON$2;
|
|
37001
37183
|
}
|
|
37002
37184
|
var scaleTmp = [];
|
|
37003
37185
|
var tmpTransform = [];
|
|
@@ -37715,7 +37897,7 @@ var Vc = (function (exports, vue) {
|
|
|
37715
37897
|
this.markRedraw();
|
|
37716
37898
|
if (!useHoverLayer && this.__inHover) {
|
|
37717
37899
|
this._toggleHoverLayerFlag(false);
|
|
37718
|
-
this.__dirty &=
|
|
37900
|
+
this.__dirty &= ~REDRAW_BIT;
|
|
37719
37901
|
}
|
|
37720
37902
|
return state;
|
|
37721
37903
|
};
|
|
@@ -37773,7 +37955,7 @@ var Vc = (function (exports, vue) {
|
|
|
37773
37955
|
this.markRedraw();
|
|
37774
37956
|
if (!useHoverLayer && this.__inHover) {
|
|
37775
37957
|
this._toggleHoverLayerFlag(false);
|
|
37776
|
-
this.__dirty &=
|
|
37958
|
+
this.__dirty &= ~REDRAW_BIT;
|
|
37777
37959
|
}
|
|
37778
37960
|
}
|
|
37779
37961
|
};
|
|
@@ -39096,7 +39278,7 @@ var Vc = (function (exports, vue) {
|
|
|
39096
39278
|
* @return {boolean}
|
|
39097
39279
|
*/
|
|
39098
39280
|
function isRadianAroundZero(val) {
|
|
39099
|
-
return val > -
|
|
39281
|
+
return val > -RADIAN_EPSILON && val < RADIAN_EPSILON;
|
|
39100
39282
|
}
|
|
39101
39283
|
// eslint-disable-next-line
|
|
39102
39284
|
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
|
|
@@ -40690,7 +40872,7 @@ var Vc = (function (exports, vue) {
|
|
|
40690
40872
|
return !!(this.__dirty & STYLE_CHANGED_BIT);
|
|
40691
40873
|
};
|
|
40692
40874
|
Displayable.prototype.styleUpdated = function () {
|
|
40693
|
-
this.__dirty &=
|
|
40875
|
+
this.__dirty &= ~STYLE_CHANGED_BIT;
|
|
40694
40876
|
};
|
|
40695
40877
|
Displayable.prototype.createStyle = function (obj) {
|
|
40696
40878
|
return createObject(DEFAULT_COMMON_STYLE, obj);
|
|
@@ -42199,7 +42381,7 @@ var Vc = (function (exports, vue) {
|
|
|
42199
42381
|
};
|
|
42200
42382
|
Path.prototype.buildPath = function (ctx, shapeCfg, inBatch) { };
|
|
42201
42383
|
Path.prototype.pathUpdated = function () {
|
|
42202
|
-
this.__dirty &=
|
|
42384
|
+
this.__dirty &= ~SHAPE_CHANGED_BIT;
|
|
42203
42385
|
};
|
|
42204
42386
|
Path.prototype.getUpdatedPathProxy = function (inBatch) {
|
|
42205
42387
|
!this.path && this.createPathProxy();
|
|
@@ -54785,7 +54967,7 @@ var Vc = (function (exports, vue) {
|
|
|
54785
54967
|
function brush$1(ctx, el, scope, isLast) {
|
|
54786
54968
|
var m = el.transform;
|
|
54787
54969
|
if (!el.shouldBePainted(scope.viewWidth, scope.viewHeight, false, false)) {
|
|
54788
|
-
el.__dirty &=
|
|
54970
|
+
el.__dirty &= ~REDRAW_BIT;
|
|
54789
54971
|
el.__isRendered = false;
|
|
54790
54972
|
return;
|
|
54791
54973
|
}
|
|
@@ -113054,7 +113236,7 @@ var Vc = (function (exports, vue) {
|
|
|
113054
113236
|
// and velocity is close to 0
|
|
113055
113237
|
//
|
|
113056
113238
|
|
|
113057
|
-
if (velocity.x < -
|
|
113239
|
+
if (velocity.x < -MIN_NEXT_SLIDE_SPEED && currentSlideVisibilityRatio < 0 || velocity.x < 0.1 && currentSlideVisibilityRatio < -0.5) {
|
|
113058
113240
|
// Go to next slide
|
|
113059
113241
|
indexDiff = 1;
|
|
113060
113242
|
velocity.x = Math.min(velocity.x, 0);
|
|
@@ -113118,7 +113300,7 @@ var Vc = (function (exports, vue) {
|
|
|
113118
113300
|
// or if we are below and moving downwards
|
|
113119
113301
|
|
|
113120
113302
|
|
|
113121
|
-
if (vDragRatio < 0 && projectedVDragRatio < -
|
|
113303
|
+
if (vDragRatio < 0 && projectedVDragRatio < -MIN_RATIO_TO_CLOSE || vDragRatio > 0 && projectedVDragRatio > MIN_RATIO_TO_CLOSE) {
|
|
113122
113304
|
this.pswp.close();
|
|
113123
113305
|
return;
|
|
113124
113306
|
}
|
|
@@ -131836,6 +132018,7 @@ var Vc = (function (exports, vue) {
|
|
|
131836
132018
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
131837
132019
|
|
|
131838
132020
|
exports.ActionSheet = ActionSheet;
|
|
132021
|
+
exports.Affix = Affix;
|
|
131839
132022
|
exports.Alert = Alert;
|
|
131840
132023
|
exports.Artboard = Artboard;
|
|
131841
132024
|
exports.Button = Button;
|
|
@@ -131881,6 +132064,7 @@ var Vc = (function (exports, vue) {
|
|
|
131881
132064
|
exports.List = MList;
|
|
131882
132065
|
exports.ListItem = MListItem;
|
|
131883
132066
|
exports.MActionSheet = MActionSheet;
|
|
132067
|
+
exports.MAffix = MAffix;
|
|
131884
132068
|
exports.MAlert = MAlert;
|
|
131885
132069
|
exports.MArtboard = MArtboard;
|
|
131886
132070
|
exports.MButton = MButton;
|