delta-comic-core 0.1.0 → 0.1.2
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/LICENSE +661 -661
- package/README.md +30 -30
- package/dist/bundle.cjs +9 -0
- package/dist/bundle.cjs.map +1 -0
- package/dist/bundle.css +1 -1
- package/dist/bundle.js +77 -73
- package/dist/bundle.js.map +1 -1
- package/dist/bundle2.cjs +2 -0
- package/dist/bundle2.cjs.map +1 -0
- package/dist/bundle2.js +40 -0
- package/dist/bundle2.js.map +1 -0
- package/dist/{components → lib/components}/waterfall.vue.d.ts +2 -2
- package/dist/{index.d.ts → lib/index.d.ts} +7 -7
- package/dist/{struct → lib/struct}/item.d.ts +9 -2
- package/dist/pack.tgz +0 -0
- package/dist/vite/index.d.ts +10 -0
- package/package.json +9 -5
- package/dist/bundle.umd.cjs +0 -3
- package/dist/bundle.umd.cjs.map +0 -1
- package/dist/{components → lib/components}/await.vue.d.ts +0 -0
- package/dist/{components → lib/components}/content.vue.d.ts +0 -0
- package/dist/{components → lib/components}/floatPopup.vue.d.ts +0 -0
- package/dist/{components → lib/components}/image.vue.d.ts +2 -2
- /package/dist/{components → lib/components}/list.vue.d.ts +0 -0
- /package/dist/{components → lib/components}/loading.vue.d.ts +0 -0
- /package/dist/{components → lib/components}/popup.vue.d.ts +0 -0
- /package/dist/{components → lib/components}/routerTab.vue.d.ts +0 -0
- /package/dist/{components → lib/components}/text.vue.d.ts +0 -0
- /package/dist/{components → lib/components}/toggleIcon.vue.d.ts +0 -0
- /package/dist/{components → lib/components}/var.vue.d.ts +0 -0
- /package/dist/{config → lib/config}/index.d.ts +0 -0
- /package/dist/{depends → lib/depends}/index.d.ts +0 -0
- /package/dist/{layout → lib/layout}/user.d.ts +0 -0
- /package/dist/{plugin → lib/plugin}/define.d.ts +0 -0
- /package/dist/{plugin → lib/plugin}/index.d.ts +0 -0
- /package/dist/{stores → lib/stores}/temp.d.ts +0 -0
- /package/dist/{struct → lib/struct}/comment.d.ts +0 -0
- /package/dist/{struct → lib/struct}/content.d.ts +0 -0
- /package/dist/{struct → lib/struct}/ep.d.ts +0 -0
- /package/dist/{struct → lib/struct}/image.d.ts +0 -0
- /package/dist/{struct → lib/struct}/index.d.ts +0 -0
- /package/dist/{struct → lib/struct}/user.d.ts +0 -0
- /package/dist/{symbol.d.ts → lib/symbol.d.ts} +0 -0
- /package/dist/{utils → lib/utils}/data.d.ts +0 -0
- /package/dist/{utils → lib/utils}/eventBus.d.ts +0 -0
- /package/dist/{utils → lib/utils}/image.d.ts +0 -0
- /package/dist/{utils → lib/utils}/layout.d.ts +0 -0
- /package/dist/{utils → lib/utils}/message.d.ts +0 -0
- /package/dist/{utils → lib/utils}/plugin.d.ts +0 -0
- /package/dist/{utils → lib/utils}/request.d.ts +0 -0
- /package/dist/{utils → lib/utils}/translate.d.ts +0 -0
package/dist/bundle.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Fragment, Teleport, Transition, TransitionGroup, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, customRef, defineComponent, getCurrentInstance, getCurrentScope, guardReactiveProps, hasInjectionContext, inject, isRef, isVNode, markRaw, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeUnmount, onBeforeUpdate, onDeactivated, onMounted, onScopeDispose, onUnmounted, openBlock, provide, reactive, readonly, ref, renderList, renderSlot, resolveDynamicComponent, shallowReactive, shallowReadonly, shallowRef, toDisplayString, toRef, toValue, unref, useCssVars, useModel, useTemplateRef, vShow, watch, watchEffect, withCtx, withDirectives, withModifiers } from "vue";
|
|
2
2
|
import { onBeforeRouteLeave, useRoute, useRouter } from "vue-router";
|
|
3
|
-
import { NButton, NEmpty, NIcon, NImage, NProgress, NResult, NVirtualList } from "naive-ui";
|
|
3
|
+
import { NButton, NEmpty, NIcon, NIconWrapper, NImage, NProgress, NResult, NVirtualList } from "naive-ui";
|
|
4
4
|
import { Icon, Loading, showImagePreview } from "vant";
|
|
5
5
|
import { defineStore } from "pinia";
|
|
6
6
|
import axios, { getAdapter, isAxiosError, isCancel } from "axios";
|
|
@@ -1081,13 +1081,13 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
|
|
|
1081
1081
|
}), W();
|
|
1082
1082
|
};
|
|
1083
1083
|
isHidden(i) ? nextTick().then(r) : r();
|
|
1084
|
-
}, J = () => K(s.active),
|
|
1085
|
-
!e.touchable || n.touches.length > 1 || (l.start(n), c = !1,
|
|
1086
|
-
},
|
|
1084
|
+
}, J = () => K(s.active), Tl, El = (n) => {
|
|
1085
|
+
!e.touchable || n.touches.length > 1 || (l.start(n), c = !1, Tl = Date.now(), H(), k());
|
|
1086
|
+
}, Dl = (r) => {
|
|
1087
1087
|
e.touchable && s.swiping && (l.move(r), S.value && (!e.loop && (s.active === 0 && h.value > 0 || s.active === p.value - 1 && h.value < 0) || (preventDefault(r, e.stopPropagation), O({ offset: h.value }), c ||= (n("dragStart", { index: b.value }), !0))));
|
|
1088
|
-
},
|
|
1088
|
+
}, Ol = () => {
|
|
1089
1089
|
if (!e.touchable || !s.swiping) return;
|
|
1090
|
-
let r = Date.now() -
|
|
1090
|
+
let r = Date.now() - Tl, i = h.value / r;
|
|
1091
1091
|
if ((Math.abs(i) > .25 || Math.abs(h.value) > m.value / 2) && S.value) {
|
|
1092
1092
|
let n = e.vertical ? l.offsetY.value : l.offsetX.value, r = 0;
|
|
1093
1093
|
r = e.loop ? n > 0 ? h.value > 0 ? -1 : 1 : 0 : -Math[h.value > 0 ? "ceil" : "floor"](h.value / m.value), O({
|
|
@@ -1096,7 +1096,7 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
|
|
|
1096
1096
|
});
|
|
1097
1097
|
} else h.value && O({ pace: 0 });
|
|
1098
1098
|
c = !1, s.swiping = !1, n("dragEnd", { index: b.value }), W();
|
|
1099
|
-
},
|
|
1099
|
+
}, kl = (n, r = {}) => {
|
|
1100
1100
|
k(), l.reset(), doubleRaf(() => {
|
|
1101
1101
|
let i;
|
|
1102
1102
|
i = e.loop && n === p.value ? s.active === 0 ? 0 : n : n % p.value, r.immediate ? doubleRaf(() => {
|
|
@@ -1106,25 +1106,25 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
|
|
|
1106
1106
|
emitChange: !0
|
|
1107
1107
|
});
|
|
1108
1108
|
});
|
|
1109
|
-
},
|
|
1109
|
+
}, Al = (n, r) => {
|
|
1110
1110
|
let i = r === b.value;
|
|
1111
1111
|
return createVNode("i", {
|
|
1112
1112
|
style: i ? { backgroundColor: e.indicatorColor } : void 0,
|
|
1113
1113
|
class: bem$7("indicator", { active: i })
|
|
1114
1114
|
}, null);
|
|
1115
|
-
},
|
|
1115
|
+
}, jl = () => {
|
|
1116
1116
|
if (r.indicator) return r.indicator({
|
|
1117
1117
|
active: b.value,
|
|
1118
1118
|
total: p.value
|
|
1119
1119
|
});
|
|
1120
|
-
if (e.showIndicators && p.value > 1) return createVNode("div", { class: bem$7("indicators", { vertical: e.vertical }) }, [Array(p.value).fill("").map(
|
|
1120
|
+
if (e.showIndicators && p.value > 1) return createVNode("div", { class: bem$7("indicators", { vertical: e.vertical }) }, [Array(p.value).fill("").map(Al)]);
|
|
1121
1121
|
};
|
|
1122
1122
|
return useExpose({
|
|
1123
1123
|
prev: A,
|
|
1124
1124
|
next: z,
|
|
1125
1125
|
state: s,
|
|
1126
1126
|
resize: J,
|
|
1127
|
-
swipeTo:
|
|
1127
|
+
swipeTo: kl
|
|
1128
1128
|
}), f({
|
|
1129
1129
|
size: m,
|
|
1130
1130
|
props: e,
|
|
@@ -1137,17 +1137,17 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
|
|
|
1137
1137
|
() => e.height
|
|
1138
1138
|
], J), watch(usePageVisibility(), (e) => {
|
|
1139
1139
|
e === "visible" ? W() : H();
|
|
1140
|
-
}), onMounted(K), onActivated(() => K(s.active)), onPopupReopen(() => K(s.active)), onDeactivated(H), onBeforeUnmount(H), useEventListener("touchmove",
|
|
1140
|
+
}), onMounted(K), onActivated(() => K(s.active)), onPopupReopen(() => K(s.active)), onDeactivated(H), onBeforeUnmount(H), useEventListener("touchmove", Dl, { target: o }), () => createVNode("div", {
|
|
1141
1141
|
ref: i,
|
|
1142
1142
|
class: bem$7()
|
|
1143
1143
|
}, [createVNode("div", {
|
|
1144
1144
|
ref: o,
|
|
1145
1145
|
style: C.value,
|
|
1146
1146
|
class: bem$7("track", { vertical: e.vertical }),
|
|
1147
|
-
onTouchstartPassive:
|
|
1148
|
-
onTouchend:
|
|
1149
|
-
onTouchcancel:
|
|
1150
|
-
}, [r.default?.call(r)]),
|
|
1147
|
+
onTouchstartPassive: El,
|
|
1148
|
+
onTouchend: Ol,
|
|
1149
|
+
onTouchcancel: Ol
|
|
1150
|
+
}, [r.default?.call(r)]), jl()]);
|
|
1151
1151
|
}
|
|
1152
1152
|
})), [name$6, bem$6] = createNamespace("tabs"), stdin_default$5 = defineComponent({
|
|
1153
1153
|
name: name$6,
|
|
@@ -1247,14 +1247,14 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
|
|
|
1247
1247
|
}
|
|
1248
1248
|
C.lineStyle = c;
|
|
1249
1249
|
});
|
|
1250
|
-
},
|
|
1250
|
+
}, wl = (e) => {
|
|
1251
1251
|
let n = e < C.currentIndex ? -1 : 1;
|
|
1252
1252
|
for (; e >= 0 && e < b.length;) {
|
|
1253
1253
|
if (!b[e].disabled) return e;
|
|
1254
1254
|
e += n;
|
|
1255
1255
|
}
|
|
1256
1256
|
}, V = (r, i) => {
|
|
1257
|
-
let a =
|
|
1257
|
+
let a = wl(r);
|
|
1258
1258
|
if (!isDef$1(a)) return;
|
|
1259
1259
|
let o = b[a], c = O(o, a), l = C.currentIndex !== null;
|
|
1260
1260
|
C.currentIndex !== a && (C.currentIndex = a, i || z(), B()), c !== e.active && (n("update:active", c), l && n("change", c, o.title)), s && !e.scrollspy && setRootScrollTop(Math.ceil(getElementTop(u.value) - A.value));
|
|
@@ -1286,24 +1286,24 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
|
|
|
1286
1286
|
});
|
|
1287
1287
|
}, J = (e) => {
|
|
1288
1288
|
s = e.isFixed, n("scroll", e);
|
|
1289
|
-
},
|
|
1289
|
+
}, Tl = (e) => {
|
|
1290
1290
|
nextTick(() => {
|
|
1291
1291
|
H(e), W(!0);
|
|
1292
1292
|
});
|
|
1293
|
-
},
|
|
1293
|
+
}, El = () => {
|
|
1294
1294
|
for (let e = 0; e < b.length; e++) {
|
|
1295
1295
|
let { top: n } = useRect(b[e].$el);
|
|
1296
1296
|
if (n > M.value) return e === 0 ? 0 : e - 1;
|
|
1297
1297
|
}
|
|
1298
1298
|
return b.length - 1;
|
|
1299
|
-
},
|
|
1300
|
-
e.scrollspy && !o && V(
|
|
1301
|
-
},
|
|
1299
|
+
}, Dl = () => {
|
|
1300
|
+
e.scrollspy && !o && V(El());
|
|
1301
|
+
}, Ol = () => {
|
|
1302
1302
|
if (e.type === "line" && b.length) return createVNode("div", {
|
|
1303
1303
|
class: bem$5("line"),
|
|
1304
1304
|
style: C.lineStyle
|
|
1305
1305
|
}, null);
|
|
1306
|
-
},
|
|
1306
|
+
}, kl = () => {
|
|
1307
1307
|
let { type: n, border: i, sticky: a } = e, o = [createVNode("div", {
|
|
1308
1308
|
ref: a ? void 0 : p,
|
|
1309
1309
|
class: [bem$5("wrap"), { [BORDER_TOP_BOTTOM]: n === "line" && i }]
|
|
@@ -1319,11 +1319,11 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
|
|
|
1319
1319
|
}, [
|
|
1320
1320
|
r["nav-left"]?.call(r),
|
|
1321
1321
|
b.map((e) => e.renderTitle(K)),
|
|
1322
|
-
|
|
1322
|
+
Ol(),
|
|
1323
1323
|
r["nav-right"]?.call(r)
|
|
1324
1324
|
])]), r["nav-bottom"]?.call(r)];
|
|
1325
1325
|
return a ? createVNode("div", { ref: p }, [o]) : o;
|
|
1326
|
-
},
|
|
1326
|
+
}, Al = () => {
|
|
1327
1327
|
B(), nextTick(() => {
|
|
1328
1328
|
var e;
|
|
1329
1329
|
z(!0), (e = m.value?.swipeRef.value) == null || e.resize();
|
|
@@ -1334,20 +1334,20 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
|
|
|
1334
1334
|
e.duration,
|
|
1335
1335
|
e.lineWidth,
|
|
1336
1336
|
e.lineHeight
|
|
1337
|
-
], B), watch(windowWidth,
|
|
1337
|
+
], B), watch(windowWidth, Al), watch(() => e.active, (e) => {
|
|
1338
1338
|
e !== k.value && H(e);
|
|
1339
1339
|
}), watch(() => b.length, () => {
|
|
1340
1340
|
C.inited && (H(e.active), B(), nextTick(() => {
|
|
1341
1341
|
z(!0);
|
|
1342
1342
|
}));
|
|
1343
1343
|
}), useExpose({
|
|
1344
|
-
resize:
|
|
1345
|
-
scrollTo:
|
|
1344
|
+
resize: Al,
|
|
1345
|
+
scrollTo: Tl
|
|
1346
1346
|
}), onActivated(B), onPopupReopen(B), onMountedOrActivated(() => {
|
|
1347
1347
|
H(e.active, !0), nextTick(() => {
|
|
1348
1348
|
C.inited = !0, p.value && (i = useRect(p.value).height), z(!0);
|
|
1349
1349
|
});
|
|
1350
|
-
}), useVisibilityChange(u, B), useEventListener("scroll",
|
|
1350
|
+
}), useVisibilityChange(u, B), useEventListener("scroll", Dl, {
|
|
1351
1351
|
target: g,
|
|
1352
1352
|
passive: !0
|
|
1353
1353
|
}), S({
|
|
@@ -1366,7 +1366,7 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
|
|
|
1366
1366
|
container: u.value,
|
|
1367
1367
|
offsetTop: A.value,
|
|
1368
1368
|
onScroll: J
|
|
1369
|
-
}, { default: () => [
|
|
1369
|
+
}, { default: () => [kl()] }) : kl() : null, createVNode(stdin_default$5, {
|
|
1370
1370
|
ref: m,
|
|
1371
1371
|
count: b.length,
|
|
1372
1372
|
inited: C.inited,
|
|
@@ -2203,7 +2203,7 @@ var loading_default = /* @__PURE__ */ ((e, n) => {
|
|
|
2203
2203
|
textColor: {}
|
|
2204
2204
|
},
|
|
2205
2205
|
setup(e) {
|
|
2206
|
-
useCssVars((e) => ({
|
|
2206
|
+
useCssVars((e) => ({ v479c2258: r.value }));
|
|
2207
2207
|
let n = e, r = computed(() => isNumber(n.size) ? `${n.size}px` : n.size);
|
|
2208
2208
|
return (e, r) => {
|
|
2209
2209
|
let i = Loading$1;
|
|
@@ -2213,7 +2213,7 @@ var loading_default = /* @__PURE__ */ ((e, n) => {
|
|
|
2213
2213
|
}, 16);
|
|
2214
2214
|
};
|
|
2215
2215
|
}
|
|
2216
|
-
}), [["__scopeId", "data-v-
|
|
2216
|
+
}), [["__scopeId", "data-v-088ceaed"]]);
|
|
2217
2217
|
const useGlobalVar = (e, n) => (window.$api.__core_lib__ ??= {})[n] ??= e;
|
|
2218
2218
|
var layout_exports = /* @__PURE__ */ __export({ useZIndex: () => useZIndex }), allLayers = useGlobalVar(shallowReactive([]), "utils/layers");
|
|
2219
2219
|
const useZIndex = (e) => {
|
|
@@ -3472,18 +3472,30 @@ const callbackToPromise = (e) => {
|
|
|
3472
3472
|
let { resolve: n, promise: r } = Promise.withResolvers();
|
|
3473
3473
|
return e(n), r;
|
|
3474
3474
|
};
|
|
3475
|
-
var _hoisted_1$
|
|
3475
|
+
var _hoisted_1$5 = {
|
|
3476
3476
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3477
3477
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
3478
3478
|
viewBox: "0 0 1024 1024"
|
|
3479
3479
|
}, ReloadOutlined_default = defineComponent({
|
|
3480
3480
|
name: "ReloadOutlined",
|
|
3481
3481
|
render: function(e, n) {
|
|
3482
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
3482
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$5, n[0] ||= [createElementVNode("path", {
|
|
3483
3483
|
d: "M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92C290 92 102.3 279.5 102 511.5C101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1c1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 0 0-10.1 4.8c-1.8 5-3.8 10-5.9 14.9c-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 0 1 655.9 829c-42.3 17.9-87.4 27-133.8 27c-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 0 1 279 755.2a342.16 342.16 0 0 1-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4c31.6-31.6 68.4-56.4 109.3-73.8c42.3-17.9 87.4-27 133.8-27c46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 0 1 109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 0 0 3 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z",
|
|
3484
3484
|
fill: "currentColor"
|
|
3485
3485
|
}, null, -1)]);
|
|
3486
3486
|
}
|
|
3487
|
+
}), _hoisted_1$4 = {
|
|
3488
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3489
|
+
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
3490
|
+
viewBox: "0 0 24 24"
|
|
3491
|
+
}, DoneRound_default = defineComponent({
|
|
3492
|
+
name: "DoneRound",
|
|
3493
|
+
render: function(e, n) {
|
|
3494
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$4, n[0] ||= [createElementVNode("path", {
|
|
3495
|
+
d: "M9 16.2l-3.5-3.5a.984.984 0 0 0-1.4 0a.984.984 0 0 0 0 1.4l4.19 4.19c.39.39 1.02.39 1.41 0L20.3 7.7a.984.984 0 0 0 0-1.4a.984.984 0 0 0-1.4 0L9 16.2z",
|
|
3496
|
+
fill: "currentColor"
|
|
3497
|
+
}, null, -1)]);
|
|
3498
|
+
}
|
|
3487
3499
|
}), _hoisted_1$3 = {
|
|
3488
3500
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3489
3501
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
@@ -5149,21 +5161,9 @@ const createLoadingMessage = (e = "加载中", n = window.$message) => {
|
|
|
5149
5161
|
}, createDialog = (e) => {
|
|
5150
5162
|
let n = noop, r = noop, i = new Promise((e, i) => {
|
|
5151
5163
|
n = e, r = i;
|
|
5152
|
-
}), a = shallowRef(!0), [o, s, c] = useZIndex(a)
|
|
5153
|
-
console.log("[createDialog] after useZIndex");
|
|
5154
|
-
let l = watch(o, (e) => m.style.zIndex = e);
|
|
5155
|
-
console.log("[createDialog] after stopStyleWatch");
|
|
5156
|
-
let u = window.$router.beforeEach(() => s ? f() : !0);
|
|
5157
|
-
console.log("[createDialog] after stopRouterBreak");
|
|
5158
|
-
let d = () => (l(), c(), u(), m.destroy(), a.value = !1);
|
|
5159
|
-
console.log("[createDialog] after stop");
|
|
5160
|
-
let f = () => (r(), d(), !1);
|
|
5161
|
-
console.log("[createDialog] after failStop");
|
|
5162
|
-
let p = () => {
|
|
5164
|
+
}), a = shallowRef(!0), [o, s, c] = useZIndex(a), l = watch(o, (e) => m.style.zIndex = e), u = window.$router.beforeEach(() => s ? f() : !0), d = () => (l(), c(), u(), m.destroy(), a.value = !1), f = () => (r(), d(), !1), p = () => {
|
|
5163
5165
|
n(), d();
|
|
5164
|
-
}
|
|
5165
|
-
console.log("[createDialog] after successStop");
|
|
5166
|
-
let m = window.$dialog.create({
|
|
5166
|
+
}, m = window.$dialog.create({
|
|
5167
5167
|
positiveText: "确定",
|
|
5168
5168
|
negativeText: "取消",
|
|
5169
5169
|
...e,
|
|
@@ -5194,15 +5194,15 @@ const createLoadingMessage = (e = "加载中", n = window.$message) => {
|
|
|
5194
5194
|
e.onAfterLeave?.(), d();
|
|
5195
5195
|
}
|
|
5196
5196
|
});
|
|
5197
|
-
return
|
|
5197
|
+
return i.ins = m, i;
|
|
5198
5198
|
};
|
|
5199
5199
|
var allDownloadMessagesIsMinsize = reactive([]);
|
|
5200
5200
|
const createDownloadMessage = async (e, n) => {
|
|
5201
5201
|
let o = allDownloadMessagesIsMinsize.length;
|
|
5202
5202
|
allDownloadMessagesIsMinsize[o] = !1;
|
|
5203
|
-
let s = reactive([]),
|
|
5203
|
+
let s = ref(!1), c = reactive([]), l = ref(!1), u = watch(l, (e) => {
|
|
5204
5204
|
e ? allDownloadMessagesIsMinsize[o] = !0 : allDownloadMessagesIsMinsize[o] = !1;
|
|
5205
|
-
}, { immediate: !0 }),
|
|
5205
|
+
}, { immediate: !0 }), f = computed(() => allDownloadMessagesIsMinsize.slice(0, o).filter((e) => e).length), p = window.$message.create(e, {
|
|
5206
5206
|
render: (e) => {
|
|
5207
5207
|
let n;
|
|
5208
5208
|
return createVNode(motion.div, {
|
|
@@ -5225,7 +5225,7 @@ const createDownloadMessage = async (e, n) => {
|
|
|
5225
5225
|
paddingInline: "2px",
|
|
5226
5226
|
paddingBlock: "2px",
|
|
5227
5227
|
position: "fixed",
|
|
5228
|
-
left: `${
|
|
5228
|
+
left: `${f.value * 40 + 8}px`,
|
|
5229
5229
|
top: "calc(var(--safe-area-inset-top) + 4px)"
|
|
5230
5230
|
},
|
|
5231
5231
|
maxsize: {
|
|
@@ -5236,13 +5236,13 @@ const createDownloadMessage = async (e, n) => {
|
|
|
5236
5236
|
height: "fit-content"
|
|
5237
5237
|
}
|
|
5238
5238
|
},
|
|
5239
|
-
onDragEnd: (e, { offset: n }) => n.y < -30 && (
|
|
5240
|
-
animate:
|
|
5239
|
+
onDragEnd: (e, { offset: n }) => n.y < -30 && (l.value = !0),
|
|
5240
|
+
animate: l.value ? "minsize" : "maxsize",
|
|
5241
5241
|
class: "bg-(--n-color) overflow-hidden",
|
|
5242
5242
|
style: { boxShadow: "var(--n-box-shadow)" }
|
|
5243
|
-
}, { default: () => [createVNode(Transition, { name: "van-fade" }, { default: () => [
|
|
5243
|
+
}, { default: () => [createVNode(Transition, { name: "van-fade" }, { default: () => [l.value ? createVNode("div", {
|
|
5244
5244
|
class: "size-full relative",
|
|
5245
|
-
onClick: () =>
|
|
5245
|
+
onClick: () => l.value = !1
|
|
5246
5246
|
}, [createVNode(Loading, {
|
|
5247
5247
|
class: "absolute top-0 left-0 size-full",
|
|
5248
5248
|
color: "var(--p-color)"
|
|
@@ -5250,13 +5250,17 @@ const createDownloadMessage = async (e, n) => {
|
|
|
5250
5250
|
class: "!absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 ",
|
|
5251
5251
|
size: "18px",
|
|
5252
5252
|
color: "var(--p-color)"
|
|
5253
|
-
}, { default: () => [
|
|
5254
|
-
createVNode("div", { class: "font-semibold text-base" }, [e.content]),
|
|
5253
|
+
}, { default: () => [c.some((e) => e.state == "error") ? createVNode(Icon, { name: "cross" }, null) : createVNode(FileDownloadRound_default, null, null)] })]) : createVNode("div", { class: "w-full relative" }, [
|
|
5254
|
+
createVNode("div", { class: "font-semibold text-base flex items-center gap-2" }, [createVNode("span", null, [e.content]), s.value && createVNode(NIconWrapper, {
|
|
5255
|
+
size: 18,
|
|
5256
|
+
color: "var(--nui-success-color)",
|
|
5257
|
+
borderRadius: 114514
|
|
5258
|
+
}, { default: () => [createVNode(NIcon, { size: 12 }, { default: () => [createVNode(DoneRound_default, null, null)] })] })]),
|
|
5255
5259
|
createVNode(TransitionGroup, {
|
|
5256
5260
|
name: "list",
|
|
5257
5261
|
tag: "ul",
|
|
5258
5262
|
class: "!w-full h-fit !ml-1"
|
|
5259
|
-
}, _isSlot(n =
|
|
5263
|
+
}, _isSlot(n = c.map((e, n) => {
|
|
5260
5264
|
let i;
|
|
5261
5265
|
return createVNode("div", {
|
|
5262
5266
|
class: "w=full py-1 van-hairline--bottom",
|
|
@@ -5277,7 +5281,7 @@ const createDownloadMessage = async (e, n) => {
|
|
|
5277
5281
|
tertiary: !0,
|
|
5278
5282
|
circle: !0,
|
|
5279
5283
|
onClick: e.retry,
|
|
5280
|
-
class: "!absolute right-[4%] w-[18%] top-1/2 -translate-y-1/2"
|
|
5284
|
+
class: "!absolute !ease-in-out right-[4%] w-[18%] top-1/2 -translate-y-1/2"
|
|
5281
5285
|
}, { icon: () => createVNode(NIcon, null, { default: () => [createVNode(ReloadOutlined_default, null, null)] }) }), [[vShow, e.state == "error" && e.retry]])) ? i : { default: () => [i] })]),
|
|
5282
5286
|
createVNode("div", { class: "text-xs text-(--van-text-color-2) !h-[1rem]" }, [e.state == "error" && `${e.error.name}: ${e.error.message}` || e.description || "..."])
|
|
5283
5287
|
]);
|
|
@@ -5286,16 +5290,16 @@ const createDownloadMessage = async (e, n) => {
|
|
|
5286
5290
|
])] })] });
|
|
5287
5291
|
},
|
|
5288
5292
|
duration: 0
|
|
5289
|
-
}),
|
|
5293
|
+
}), m = (e, n, r) => {
|
|
5290
5294
|
let i = Promise.withResolvers(), a = ref(), o = reactive({
|
|
5291
5295
|
description: "",
|
|
5292
5296
|
retryable: !1,
|
|
5293
5297
|
...n
|
|
5294
|
-
}),
|
|
5295
|
-
|
|
5298
|
+
}), s = /* @__PURE__ */ Error(), l = c.length, u = watch([o, a], ([, n]) => {
|
|
5299
|
+
c[l] = {
|
|
5296
5300
|
title: e,
|
|
5297
5301
|
state: n,
|
|
5298
|
-
error:
|
|
5302
|
+
error: s,
|
|
5299
5303
|
retry: o.retryable ? d : void 0,
|
|
5300
5304
|
...o
|
|
5301
5305
|
};
|
|
@@ -5305,18 +5309,18 @@ const createDownloadMessage = async (e, n) => {
|
|
|
5305
5309
|
let e = await r(o);
|
|
5306
5310
|
a.value = "success", await nextTick(), u.stop(), i.resolve(e);
|
|
5307
5311
|
} catch (e) {
|
|
5308
|
-
|
|
5312
|
+
s = isError(e) ? e : Error(toString(e)), a.value = "error", await nextTick(), o.retryable || (u.stop(), i.reject(e));
|
|
5309
5313
|
}
|
|
5310
5314
|
};
|
|
5311
5315
|
return d(), i.promise.finally(() => {}), i.promise;
|
|
5312
|
-
},
|
|
5313
|
-
createProgress: (e, n) =>
|
|
5314
|
-
createLoading: (e, n) =>
|
|
5316
|
+
}, h = await n({
|
|
5317
|
+
createProgress: (e, n) => m(e, { progress: 0 }, n),
|
|
5318
|
+
createLoading: (e, n) => m(e, {}, n)
|
|
5315
5319
|
});
|
|
5316
|
-
await until(() =>
|
|
5317
|
-
let
|
|
5318
|
-
if (console.log("[maybeError]",
|
|
5319
|
-
return
|
|
5320
|
+
await until(() => c.every((e) => !isUndefined(e.state))).toBeTruthy(), l.value = !1, s.value = !0, await nextTick(), await until(l).toBeTruthy(), u.stop(), p.destroy(), allDownloadMessagesIsMinsize[o] = void 0;
|
|
5321
|
+
let g = c.find((e) => e.state == "error");
|
|
5322
|
+
if (console.log("[maybeError]", g, c), g) throw g.error;
|
|
5323
|
+
return h;
|
|
5320
5324
|
};
|
|
5321
5325
|
var ConfigPointer = class {
|
|
5322
5326
|
constructor(e, n) {
|