delta-comic-core 0.0.2 → 0.0.4
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 -21
- package/README.md +30 -30
- package/dist/bundle.css +1 -1
- package/dist/bundle.js +253 -365
- package/dist/bundle.js.map +1 -1
- package/dist/bundle.umd.cjs +2 -2
- package/dist/bundle.umd.cjs.map +1 -1
- package/dist/components/image.vue.d.ts +288 -54
- package/dist/config/index.d.ts +46 -29
- package/dist/depends/index.d.ts +24 -0
- package/dist/index.d.ts +426 -1162
- package/dist/pack.tgz +0 -0
- package/dist/plugin/define.d.ts +61 -9
- package/dist/plugin/index.d.ts +5 -1
- package/dist/struct/content.d.ts +16 -6
- package/dist/struct/item.d.ts +1 -0
- package/package.json +10 -10
- package/dist/components/content/unitCard.vue.d.ts +0 -2035
package/dist/bundle.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Fragment, Teleport, Transition, 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
|
-
import { onBeforeRouteLeave, useRoute } from "vue-router";
|
|
3
|
-
import { NButton, NEmpty, NIcon, NImage,
|
|
2
|
+
import { onBeforeRouteLeave, useRoute, useRouter } from "vue-router";
|
|
3
|
+
import { NButton, NEmpty, NIcon, NImage, NResult, NVirtualList, useThemeVars } from "naive-ui";
|
|
4
4
|
import { showImagePreview } from "vant";
|
|
5
5
|
import { defineStore } from "pinia";
|
|
6
6
|
import axios, { getAdapter, isAxiosError, isCancel } from "axios";
|
|
@@ -1080,13 +1080,13 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
|
|
|
1080
1080
|
}), K();
|
|
1081
1081
|
};
|
|
1082
1082
|
isHidden(a) ? nextTick().then(r) : r();
|
|
1083
|
-
},
|
|
1084
|
-
!e.touchable || n.touches.length > 1 || (l.start(n), c = !1,
|
|
1085
|
-
},
|
|
1083
|
+
}, ul = () => J(s.active), dl, fl = (n) => {
|
|
1084
|
+
!e.touchable || n.touches.length > 1 || (l.start(n), c = !1, dl = Date.now(), W(), k());
|
|
1085
|
+
}, pl = (r) => {
|
|
1086
1086
|
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))));
|
|
1087
|
-
},
|
|
1087
|
+
}, ml = () => {
|
|
1088
1088
|
if (!e.touchable || !s.swiping) return;
|
|
1089
|
-
let r = Date.now() -
|
|
1089
|
+
let r = Date.now() - dl, i = h.value / r;
|
|
1090
1090
|
if ((Math.abs(i) > .25 || Math.abs(h.value) > m.value / 2) && S.value) {
|
|
1091
1091
|
let n = e.vertical ? l.offsetY.value : l.offsetX.value, r = 0;
|
|
1092
1092
|
r = e.loop ? n > 0 ? h.value > 0 ? -1 : 1 : 0 : -Math[h.value > 0 ? "ceil" : "floor"](h.value / m.value), O({
|
|
@@ -1095,7 +1095,7 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
|
|
|
1095
1095
|
});
|
|
1096
1096
|
} else h.value && O({ pace: 0 });
|
|
1097
1097
|
c = !1, s.swiping = !1, n("dragEnd", { index: b.value }), K();
|
|
1098
|
-
},
|
|
1098
|
+
}, hl = (n, r = {}) => {
|
|
1099
1099
|
k(), l.reset(), doubleRaf(() => {
|
|
1100
1100
|
let i;
|
|
1101
1101
|
i = e.loop && n === p.value ? s.active === 0 ? 0 : n : n % p.value, r.immediate ? doubleRaf(() => {
|
|
@@ -1105,25 +1105,25 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
|
|
|
1105
1105
|
emitChange: !0
|
|
1106
1106
|
});
|
|
1107
1107
|
});
|
|
1108
|
-
},
|
|
1108
|
+
}, gl = (n, r) => {
|
|
1109
1109
|
let i = r === b.value;
|
|
1110
1110
|
return createVNode("i", {
|
|
1111
1111
|
style: i ? { backgroundColor: e.indicatorColor } : void 0,
|
|
1112
1112
|
class: bem$7("indicator", { active: i })
|
|
1113
1113
|
}, null);
|
|
1114
|
-
},
|
|
1114
|
+
}, _l = () => {
|
|
1115
1115
|
if (r.indicator) return r.indicator({
|
|
1116
1116
|
active: b.value,
|
|
1117
1117
|
total: p.value
|
|
1118
1118
|
});
|
|
1119
|
-
if (e.showIndicators && p.value > 1) return createVNode("div", { class: bem$7("indicators", { vertical: e.vertical }) }, [Array(p.value).fill("").map(
|
|
1119
|
+
if (e.showIndicators && p.value > 1) return createVNode("div", { class: bem$7("indicators", { vertical: e.vertical }) }, [Array(p.value).fill("").map(gl)]);
|
|
1120
1120
|
};
|
|
1121
1121
|
return useExpose({
|
|
1122
1122
|
prev: M,
|
|
1123
1123
|
next: V,
|
|
1124
1124
|
state: s,
|
|
1125
|
-
resize:
|
|
1126
|
-
swipeTo:
|
|
1125
|
+
resize: ul,
|
|
1126
|
+
swipeTo: hl
|
|
1127
1127
|
}), f({
|
|
1128
1128
|
size: m,
|
|
1129
1129
|
props: e,
|
|
@@ -1134,19 +1134,19 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
|
|
|
1134
1134
|
windowHeight,
|
|
1135
1135
|
() => e.width,
|
|
1136
1136
|
() => e.height
|
|
1137
|
-
],
|
|
1137
|
+
], ul), watch(usePageVisibility(), (e) => {
|
|
1138
1138
|
e === "visible" ? K() : W();
|
|
1139
|
-
}), onMounted(J), onActivated(() => J(s.active)), onPopupReopen(() => J(s.active)), onDeactivated(W), onBeforeUnmount(W), useEventListener("touchmove",
|
|
1139
|
+
}), onMounted(J), onActivated(() => J(s.active)), onPopupReopen(() => J(s.active)), onDeactivated(W), onBeforeUnmount(W), useEventListener("touchmove", pl, { target: o }), () => createVNode("div", {
|
|
1140
1140
|
ref: a,
|
|
1141
1141
|
class: bem$7()
|
|
1142
1142
|
}, [createVNode("div", {
|
|
1143
1143
|
ref: o,
|
|
1144
1144
|
style: C.value,
|
|
1145
1145
|
class: bem$7("track", { vertical: e.vertical }),
|
|
1146
|
-
onTouchstartPassive:
|
|
1147
|
-
onTouchend:
|
|
1148
|
-
onTouchcancel:
|
|
1149
|
-
}, [r.default?.call(r)]),
|
|
1146
|
+
onTouchstartPassive: fl,
|
|
1147
|
+
onTouchend: ml,
|
|
1148
|
+
onTouchcancel: ml
|
|
1149
|
+
}, [r.default?.call(r)]), _l()]);
|
|
1150
1150
|
}
|
|
1151
1151
|
})), [name$6, bem$6] = createNamespace("tabs"), stdin_default$5 = defineComponent({
|
|
1152
1152
|
name: name$6,
|
|
@@ -1283,26 +1283,26 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
|
|
|
1283
1283
|
event: a,
|
|
1284
1284
|
disabled: s
|
|
1285
1285
|
});
|
|
1286
|
-
},
|
|
1286
|
+
}, ul = (e) => {
|
|
1287
1287
|
s = e.isFixed, n("scroll", e);
|
|
1288
|
-
},
|
|
1288
|
+
}, dl = (e) => {
|
|
1289
1289
|
nextTick(() => {
|
|
1290
1290
|
W(e), K(!0);
|
|
1291
1291
|
});
|
|
1292
|
-
},
|
|
1292
|
+
}, fl = () => {
|
|
1293
1293
|
for (let e = 0; e < b.length; e++) {
|
|
1294
1294
|
let { top: n } = useRect(b[e].$el);
|
|
1295
1295
|
if (n > M.value) return e === 0 ? 0 : e - 1;
|
|
1296
1296
|
}
|
|
1297
1297
|
return b.length - 1;
|
|
1298
|
-
},
|
|
1299
|
-
e.scrollspy && !o && H(
|
|
1300
|
-
},
|
|
1298
|
+
}, pl = () => {
|
|
1299
|
+
e.scrollspy && !o && H(fl());
|
|
1300
|
+
}, ml = () => {
|
|
1301
1301
|
if (e.type === "line" && b.length) return createVNode("div", {
|
|
1302
1302
|
class: bem$5("line"),
|
|
1303
1303
|
style: C.lineStyle
|
|
1304
1304
|
}, null);
|
|
1305
|
-
},
|
|
1305
|
+
}, hl = () => {
|
|
1306
1306
|
let { type: n, border: i, sticky: a } = e, o = [createVNode("div", {
|
|
1307
1307
|
ref: a ? void 0 : p,
|
|
1308
1308
|
class: [bem$5("wrap"), { [BORDER_TOP_BOTTOM]: n === "line" && i }]
|
|
@@ -1318,11 +1318,11 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
|
|
|
1318
1318
|
}, [
|
|
1319
1319
|
r["nav-left"]?.call(r),
|
|
1320
1320
|
b.map((e) => e.renderTitle(J)),
|
|
1321
|
-
|
|
1321
|
+
ml(),
|
|
1322
1322
|
r["nav-right"]?.call(r)
|
|
1323
1323
|
])]), r["nav-bottom"]?.call(r)];
|
|
1324
1324
|
return a ? createVNode("div", { ref: p }, [o]) : o;
|
|
1325
|
-
},
|
|
1325
|
+
}, gl = () => {
|
|
1326
1326
|
B(), nextTick(() => {
|
|
1327
1327
|
var e;
|
|
1328
1328
|
z(!0), (e = m.value?.swipeRef.value) == null || e.resize();
|
|
@@ -1333,20 +1333,20 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
|
|
|
1333
1333
|
e.duration,
|
|
1334
1334
|
e.lineWidth,
|
|
1335
1335
|
e.lineHeight
|
|
1336
|
-
], B), watch(windowWidth,
|
|
1336
|
+
], B), watch(windowWidth, gl), watch(() => e.active, (e) => {
|
|
1337
1337
|
e !== k.value && W(e);
|
|
1338
1338
|
}), watch(() => b.length, () => {
|
|
1339
1339
|
C.inited && (W(e.active), B(), nextTick(() => {
|
|
1340
1340
|
z(!0);
|
|
1341
1341
|
}));
|
|
1342
1342
|
}), useExpose({
|
|
1343
|
-
resize:
|
|
1344
|
-
scrollTo:
|
|
1343
|
+
resize: gl,
|
|
1344
|
+
scrollTo: dl
|
|
1345
1345
|
}), onActivated(B), onPopupReopen(B), onMountedOrActivated(() => {
|
|
1346
1346
|
W(e.active, !0), nextTick(() => {
|
|
1347
1347
|
C.inited = !0, p.value && (a = useRect(p.value).height), z(!0);
|
|
1348
1348
|
});
|
|
1349
|
-
}), useVisibilityChange(d, B), useEventListener("scroll",
|
|
1349
|
+
}), useVisibilityChange(d, B), useEventListener("scroll", pl, {
|
|
1350
1350
|
target: g,
|
|
1351
1351
|
passive: !0
|
|
1352
1352
|
}), S({
|
|
@@ -1364,8 +1364,8 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
|
|
|
1364
1364
|
}, [e.showHeader ? e.sticky ? createVNode(Sticky, {
|
|
1365
1365
|
container: d.value,
|
|
1366
1366
|
offsetTop: j.value,
|
|
1367
|
-
onScroll:
|
|
1368
|
-
}, { default: () => [
|
|
1367
|
+
onScroll: ul
|
|
1368
|
+
}, { default: () => [hl()] }) : hl() : null, createVNode(stdin_default$5, {
|
|
1369
1369
|
ref: m,
|
|
1370
1370
|
count: b.length,
|
|
1371
1371
|
inited: C.inited,
|
|
@@ -2187,7 +2187,11 @@ function isEmpty(e) {
|
|
|
2187
2187
|
function isError(e) {
|
|
2188
2188
|
return getTag(e) === "[object Error]";
|
|
2189
2189
|
}
|
|
2190
|
-
var
|
|
2190
|
+
var loading_default = /* @__PURE__ */ ((e, n) => {
|
|
2191
|
+
let r = e.__vccOpts || e;
|
|
2192
|
+
for (let [e, i] of n) r[e] = i;
|
|
2193
|
+
return r;
|
|
2194
|
+
})(/* @__PURE__ */ defineComponent({
|
|
2191
2195
|
__name: "loading",
|
|
2192
2196
|
props: {
|
|
2193
2197
|
size: {},
|
|
@@ -2198,7 +2202,7 @@ var loading_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
|
|
|
2198
2202
|
textColor: {}
|
|
2199
2203
|
},
|
|
2200
2204
|
setup(e) {
|
|
2201
|
-
useCssVars((e) => ({
|
|
2205
|
+
useCssVars((e) => ({ v6a9760b4: r.value }));
|
|
2202
2206
|
let n = e, r = computed(() => isNumber(n.size) ? `${n.size}px` : n.size);
|
|
2203
2207
|
return (e, r) => {
|
|
2204
2208
|
let i = Loading;
|
|
@@ -2208,11 +2212,7 @@ var loading_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
|
|
|
2208
2212
|
}, 16);
|
|
2209
2213
|
};
|
|
2210
2214
|
}
|
|
2211
|
-
}),
|
|
2212
|
-
let r = e.__vccOpts || e;
|
|
2213
|
-
for (let [e, i] of n) r[e] = i;
|
|
2214
|
-
return r;
|
|
2215
|
-
}, loading_default = /* @__PURE__ */ __plugin_vue_export_helper_default(loading_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-fb775dfa"]]);
|
|
2215
|
+
}), [["__scopeId", "data-v-472e17a3"]]);
|
|
2216
2216
|
const useGlobalVar = (e, n) => (window.$api.__core_lib__ ??= {})[n] ??= e;
|
|
2217
2217
|
var layout_exports = /* @__PURE__ */ __export({ useZIndex: () => useZIndex }), allLayers = useGlobalVar(shallowReactive([]), "utils/layers");
|
|
2218
2218
|
const useZIndex = (e) => {
|
|
@@ -2235,24 +2235,7 @@ var localProvidedStateMap = /* @__PURE__ */ new WeakMap(), injectLocal = /* @__N
|
|
|
2235
2235
|
let n = e[0], r = getCurrentInstance()?.proxy;
|
|
2236
2236
|
if (r == null && !hasInjectionContext()) throw Error("injectLocal must be called in setup");
|
|
2237
2237
|
return r && localProvidedStateMap.has(r) && n in localProvidedStateMap.get(r) ? localProvidedStateMap.get(r)[n] : inject(...e);
|
|
2238
|
-
};
|
|
2239
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2240
|
-
function makeDestructurable(e, n) {
|
|
2241
|
-
if (typeof Symbol < "u") {
|
|
2242
|
-
let r = { ...e };
|
|
2243
|
-
return Object.defineProperty(r, Symbol.iterator, {
|
|
2244
|
-
enumerable: !1,
|
|
2245
|
-
value() {
|
|
2246
|
-
let e = 0;
|
|
2247
|
-
return { next: () => ({
|
|
2248
|
-
value: n[e++],
|
|
2249
|
-
done: e > n.length
|
|
2250
|
-
}) };
|
|
2251
|
-
}
|
|
2252
|
-
}), r;
|
|
2253
|
-
} else return Object.assign([...n], e);
|
|
2254
|
-
}
|
|
2255
|
-
var isClient = typeof window < "u" && typeof document < "u";
|
|
2238
|
+
}, isClient = typeof window < "u" && typeof document < "u";
|
|
2256
2239
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
2257
2240
|
var notNullish = (e) => e != null, toString = Object.prototype.toString, isObject = (e) => toString.call(e) === "[object Object]", noop = () => {};
|
|
2258
2241
|
function toRef$1(...e) {
|
|
@@ -2334,11 +2317,6 @@ function pxValue(e) {
|
|
|
2334
2317
|
function toArray(e) {
|
|
2335
2318
|
return Array.isArray(e) ? e : [e];
|
|
2336
2319
|
}
|
|
2337
|
-
function cacheStringFunction(e) {
|
|
2338
|
-
let n = /* @__PURE__ */ Object.create(null);
|
|
2339
|
-
return (r) => n[r] || (n[r] = e(r));
|
|
2340
|
-
}
|
|
2341
|
-
var camelizeRE = /-(\w)/g, camelize = cacheStringFunction((e) => e.replace(camelizeRE, (e, n) => n ? n.toUpperCase() : ""));
|
|
2342
2320
|
function getLifeCycleTarget(e) {
|
|
2343
2321
|
return e || getCurrentInstance();
|
|
2344
2322
|
}
|
|
@@ -2482,36 +2460,6 @@ function computedAsync(e, n, r) {
|
|
|
2482
2460
|
}
|
|
2483
2461
|
}, { flush: s }), o ? computed(() => (d.value = !0, f.value)) : f;
|
|
2484
2462
|
}
|
|
2485
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2486
|
-
function createReusableTemplate(e = {}) {
|
|
2487
|
-
let { inheritAttrs: n = !0 } = e, r = shallowRef(), i = /* @__PURE__ */ defineComponent({ setup(e, { slots: n }) {
|
|
2488
|
-
return () => {
|
|
2489
|
-
r.value = n.default;
|
|
2490
|
-
};
|
|
2491
|
-
} }), a = /* @__PURE__ */ defineComponent({
|
|
2492
|
-
inheritAttrs: n,
|
|
2493
|
-
props: e.props,
|
|
2494
|
-
setup(i, { attrs: a, slots: o }) {
|
|
2495
|
-
return () => {
|
|
2496
|
-
if (!r.value && process.env.NODE_ENV !== "production") throw Error("[VueUse] Failed to find the definition of reusable template");
|
|
2497
|
-
let s = r.value?.call(r, {
|
|
2498
|
-
...e.props == null ? keysToCamelKebabCase(a) : i,
|
|
2499
|
-
$slots: o
|
|
2500
|
-
});
|
|
2501
|
-
return n && s?.length === 1 ? s[0] : s;
|
|
2502
|
-
};
|
|
2503
|
-
}
|
|
2504
|
-
});
|
|
2505
|
-
return /* @__PURE__ */ makeDestructurable({
|
|
2506
|
-
define: i,
|
|
2507
|
-
reuse: a
|
|
2508
|
-
}, [i, a]);
|
|
2509
|
-
}
|
|
2510
|
-
function keysToCamelKebabCase(e) {
|
|
2511
|
-
let n = {};
|
|
2512
|
-
for (let r in e) n[camelize(r)] = e[r];
|
|
2513
|
-
return n;
|
|
2514
|
-
}
|
|
2515
2463
|
var defaultWindow = isClient ? window : void 0;
|
|
2516
2464
|
isClient && window.document, isClient && window.navigator, isClient && window.location;
|
|
2517
2465
|
function unrefElement(e) {
|
|
@@ -2920,7 +2868,7 @@ var floatPopup_default = /* @__PURE__ */ defineComponent({
|
|
|
2920
2868
|
overlay: { type: Boolean }
|
|
2921
2869
|
},
|
|
2922
2870
|
setup(e, { expose: s }) {
|
|
2923
|
-
let l =
|
|
2871
|
+
let l = useRouter(), d = e, f = shallowRef(!1), { height: p } = /* @__PURE__ */ useWindowSize(), m = computed(() => isArray(d.anchors) ? d.anchors : d.anchors === "high" ? [
|
|
2924
2872
|
0,
|
|
2925
2873
|
Math.round(.4 * p.value),
|
|
2926
2874
|
Math.round(.7 * p.value),
|
|
@@ -2942,22 +2890,22 @@ var floatPopup_default = /* @__PURE__ */ defineComponent({
|
|
|
2942
2890
|
},
|
|
2943
2891
|
isShowing: shallowReadonly(f),
|
|
2944
2892
|
height: shallowReadonly(h)
|
|
2945
|
-
}), (
|
|
2946
|
-
let
|
|
2947
|
-
return openBlock(), createBlock(Teleport, { to: "#popups" }, [e.overlay ? (openBlock(), createBlock(
|
|
2893
|
+
}), (i, s) => {
|
|
2894
|
+
let l = Overlay, d = FloatingPanel;
|
|
2895
|
+
return openBlock(), createBlock(Teleport, { to: "#popups" }, [e.overlay ? (openBlock(), createBlock(l, {
|
|
2948
2896
|
key: 0,
|
|
2949
2897
|
zIndex: unref(g),
|
|
2950
2898
|
show: f.value,
|
|
2951
|
-
onClick:
|
|
2899
|
+
onClick: s[0] ||= (e) => f.value = !1
|
|
2952
2900
|
}, null, 8, ["zIndex", "show"])) : createCommentVNode("", !0), createVNode(Transition, {
|
|
2953
|
-
onAfterLeave:
|
|
2901
|
+
onAfterLeave: s[3] ||= (e) => h.value = 0,
|
|
2954
2902
|
name: "van-slide-up"
|
|
2955
2903
|
}, {
|
|
2956
|
-
default: withCtx(() => [withDirectives(createVNode(
|
|
2957
|
-
onHeightChange:
|
|
2904
|
+
default: withCtx(() => [withDirectives(createVNode(d, {
|
|
2905
|
+
onHeightChange: s[1] ||= ({ height: e }) => e <= 0 && (f.value = !1),
|
|
2958
2906
|
anchors: m.value,
|
|
2959
2907
|
height: h.value,
|
|
2960
|
-
"onUpdate:height":
|
|
2908
|
+
"onUpdate:height": s[2] ||= (e) => h.value = e,
|
|
2961
2909
|
"content-draggable": !1,
|
|
2962
2910
|
"lock-scroll": e.lockScroll,
|
|
2963
2911
|
style: normalizeStyle([e.style, { zIndex: unref(g) }]),
|
|
@@ -2966,7 +2914,7 @@ var floatPopup_default = /* @__PURE__ */ defineComponent({
|
|
|
2966
2914
|
default: withCtx(() => [createElementVNode("div", {
|
|
2967
2915
|
class: "bg-(--van-background) w-full",
|
|
2968
2916
|
style: normalizeStyle({ height: `calc(${h.value}px - var(--van-floating-panel-header-height))` })
|
|
2969
|
-
}, [h.value == 0 ? createCommentVNode("", !0) : renderSlot(
|
|
2917
|
+
}, [h.value == 0 ? createCommentVNode("", !0) : renderSlot(i.$slots, "default", {
|
|
2970
2918
|
key: 0,
|
|
2971
2919
|
height: h.value
|
|
2972
2920
|
})], 4)]),
|
|
@@ -3080,10 +3028,10 @@ var image_default = /* @__PURE__ */ defineComponent({
|
|
|
3080
3028
|
isLoaded: S,
|
|
3081
3029
|
imageEl: j.value?.imageRef,
|
|
3082
3030
|
imageIns: j.value
|
|
3083
|
-
}), (
|
|
3084
|
-
let
|
|
3031
|
+
}), (r, i) => {
|
|
3032
|
+
let l = NImage, m = Icon;
|
|
3085
3033
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
3086
|
-
y.value ? withDirectives((openBlock(), createBlock(
|
|
3034
|
+
y.value ? withDirectives((openBlock(), createBlock(l, mergeProps({
|
|
3087
3035
|
key: 0,
|
|
3088
3036
|
onError: h
|
|
3089
3037
|
}, d, {
|
|
@@ -3122,9 +3070,9 @@ var image_default = /* @__PURE__ */ defineComponent({
|
|
|
3122
3070
|
d.class
|
|
3123
3071
|
]]),
|
|
3124
3072
|
style: normalizeStyle(n.style),
|
|
3125
|
-
onClick:
|
|
3126
|
-
}, [
|
|
3127
|
-
unref(v).error.has(unref(f)) && !n.hideError ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [n.fallback ? (openBlock(), createBlock(
|
|
3073
|
+
onClick: i[0] ||= (e) => p("click")
|
|
3074
|
+
}, [r.$slots.loading ? renderSlot(r.$slots, "loading", { key: 0 }) : (openBlock(), createBlock(loading_default, { key: 1 }))], 6)) : createCommentVNode("", !0),
|
|
3075
|
+
unref(v).error.has(unref(f)) && !n.hideError ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [n.fallback ? (openBlock(), createBlock(l, mergeProps({
|
|
3128
3076
|
key: 0,
|
|
3129
3077
|
onError: h
|
|
3130
3078
|
}, d, {
|
|
@@ -3157,14 +3105,14 @@ var image_default = /* @__PURE__ */ defineComponent({
|
|
|
3157
3105
|
n.inline ? "inline-flex" : "flex",
|
|
3158
3106
|
d.class
|
|
3159
3107
|
]]),
|
|
3160
|
-
onClick:
|
|
3108
|
+
onClick: i[1] ||= withModifiers(() => {
|
|
3161
3109
|
unref(v).error.delete(unref(f)), b();
|
|
3162
3110
|
}, ["stop"])
|
|
3163
|
-
}, [
|
|
3111
|
+
}, [r.$slots.loading ? renderSlot(r.$slots, "loading", { key: 0 }) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createVNode(m, {
|
|
3164
3112
|
name: "warning-o",
|
|
3165
3113
|
size: "2.5rem",
|
|
3166
3114
|
color: "var(--van-text-color-2)"
|
|
3167
|
-
}),
|
|
3115
|
+
}), i[2] ||= createElementVNode("div", { class: "text-sm text-(--van-text-color-2)" }, "点击重试", -1)], 64))], 2))], 64)) : createCommentVNode("", !0)
|
|
3168
3116
|
], 64);
|
|
3169
3117
|
};
|
|
3170
3118
|
}
|
|
@@ -3513,49 +3461,37 @@ const callbackToPromise = (e) => {
|
|
|
3513
3461
|
let { resolve: n, promise: r } = Promise.withResolvers();
|
|
3514
3462
|
return e(n), r;
|
|
3515
3463
|
};
|
|
3516
|
-
var _hoisted_1$
|
|
3464
|
+
var _hoisted_1$3 = {
|
|
3517
3465
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3518
3466
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
3519
3467
|
viewBox: "0 0 1024 1024"
|
|
3520
3468
|
}, ReloadOutlined_default = defineComponent({
|
|
3521
3469
|
name: "ReloadOutlined",
|
|
3522
3470
|
render: function(e, n) {
|
|
3523
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
3471
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$3, n[0] ||= [createElementVNode("path", {
|
|
3524
3472
|
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",
|
|
3525
3473
|
fill: "currentColor"
|
|
3526
3474
|
}, null, -1)]);
|
|
3527
3475
|
}
|
|
3528
|
-
}), _hoisted_1$
|
|
3529
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
3530
|
-
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
3531
|
-
viewBox: "0 0 24 24"
|
|
3532
|
-
}, MoreVertRound_default = defineComponent({
|
|
3533
|
-
name: "MoreVertRound",
|
|
3534
|
-
render: function(e, n) {
|
|
3535
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$4, n[0] ||= [createElementVNode("path", {
|
|
3536
|
-
d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2s-2 .9-2 2s.9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2z",
|
|
3537
|
-
fill: "currentColor"
|
|
3538
|
-
}, null, -1)]);
|
|
3539
|
-
}
|
|
3540
|
-
}), _hoisted_1$3 = {
|
|
3476
|
+
}), _hoisted_1$2 = {
|
|
3541
3477
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3542
3478
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
3543
3479
|
viewBox: "0 0 24 24"
|
|
3544
3480
|
}, WifiTetheringErrorRound_default = defineComponent({
|
|
3545
3481
|
name: "WifiTetheringErrorRound",
|
|
3546
3482
|
render: function(e, n) {
|
|
3547
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
3483
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$2, n[0] ||= [createElementVNode("path", {
|
|
3548
3484
|
d: "M10.66 7.14c-2.24.48-4.04 2.3-4.52 4.54c-.37 1.75.02 3.38.89 4.66c.34.51 1.08.55 1.51.11c.35-.35.37-.88.1-1.28c-.5-.76-.75-1.71-.61-2.73c.23-1.74 1.67-3.17 3.41-3.4A4.003 4.003 0 0 1 16 13c0 .8-.24 1.54-.64 2.16c-.27.41-.25.95.1 1.29c.43.43 1.17.4 1.51-.11C17.62 15.4 18 14.25 18 13c0-3.75-3.45-6.7-7.34-5.86zm-.41-3.99c-4.05.69-7.19 3.69-8.03 7.72c-.66 3.17.2 6.16 1.97 8.38c.37.46 1.07.49 1.49.07c.36-.36.39-.93.07-1.32a8.004 8.004 0 0 1-1.66-6.28c.55-3.47 3.42-6.24 6.92-6.65c2.76-.33 5.27.74 6.93 2.59c.2.21.47.34.76.34c.85 0 1.34-1.01.77-1.65c-2.19-2.45-5.56-3.82-9.22-3.2zM12 11c-1.1 0-2 .9-2 2c0 .55.23 1.05.59 1.41c.36.36.86.59 1.41.59s1.05-.23 1.41-.59c.36-.36.59-.86.59-1.41c0-1.1-.9-2-2-2zm9-1c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1s-1-.45-1-1v-4c0-.55.45-1 1-1zm0 8c.55 0 1 .45 1 1s-.45 1-1 1s-1-.45-1-1s.45-1 1-1z",
|
|
3549
3485
|
fill: "currentColor"
|
|
3550
3486
|
}, null, -1)]);
|
|
3551
3487
|
}
|
|
3552
|
-
}), _hoisted_1$
|
|
3488
|
+
}), _hoisted_1$1 = { class: "relative size-full overflow-hidden" }, _hoisted_2 = { key: 2 }, _hoisted_3 = {
|
|
3553
3489
|
key: 3,
|
|
3554
3490
|
class: "!size-full"
|
|
3555
|
-
}, _hoisted_4
|
|
3491
|
+
}, _hoisted_4 = {
|
|
3556
3492
|
key: 4,
|
|
3557
3493
|
class: "flex items-center gap-3 justify-around"
|
|
3558
|
-
}, _hoisted_5
|
|
3494
|
+
}, _hoisted_5 = { class: "flex gap-2 flex-col justify-center text-white" }, _hoisted_6 = { class: "text-xs text-wrap" }, content_default = /* @__PURE__ */ defineComponent({
|
|
3559
3495
|
__name: "content",
|
|
3560
3496
|
props: {
|
|
3561
3497
|
retriable: { type: Boolean },
|
|
@@ -3630,13 +3566,14 @@ var _hoisted_1$5 = {
|
|
|
3630
3566
|
left: "50%",
|
|
3631
3567
|
top: "8px",
|
|
3632
3568
|
translateX: "-50%",
|
|
3633
|
-
backgroundColor: "#ffffff"
|
|
3569
|
+
backgroundColor: "#ffffff",
|
|
3570
|
+
borderRadius: "100%"
|
|
3634
3571
|
},
|
|
3635
3572
|
isErrorNoData: {
|
|
3636
3573
|
opacity: 1,
|
|
3637
3574
|
translateY: "-50%",
|
|
3638
3575
|
width: "70%",
|
|
3639
|
-
|
|
3576
|
+
minHeight: d.retriable ? "22rem" : "20rem",
|
|
3640
3577
|
paddingBlock: "2px",
|
|
3641
3578
|
paddingInline: "2px",
|
|
3642
3579
|
left: "50%",
|
|
@@ -3698,16 +3635,16 @@ var _hoisted_1$5 = {
|
|
|
3698
3635
|
borderRadius: "4px"
|
|
3699
3636
|
}
|
|
3700
3637
|
}, h = computed(() => !d.hideLoading && f.value.isLoading ? f.value.isEmpty ? "isLoadingNoData" : "isLoadingData" : !d.hideError && f.value.isError ? f.value.isEmpty ? "isErrorNoData" : "isErrorData" : !d.hideEmpty && f.value.isNoResult ? "isEmpty" : "done"), g = useTemplateRef("cont");
|
|
3701
|
-
return n({ cont: g }), (
|
|
3702
|
-
let
|
|
3703
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
3638
|
+
return n({ cont: g }), (n, i) => {
|
|
3639
|
+
let p = Loading, v = NEmpty, y = NButton, b = NIcon, S = NResult, C = AnimatePresence;
|
|
3640
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1, [createElementVNode("div", {
|
|
3704
3641
|
class: normalizeClass(["relative size-full", [d.class]]),
|
|
3705
3642
|
ref_key: "cont",
|
|
3706
3643
|
ref: g
|
|
3707
|
-
}, [f.value.isEmpty ? createCommentVNode("", !0) : renderSlot(
|
|
3644
|
+
}, [f.value.isEmpty ? createCommentVNode("", !0) : renderSlot(n.$slots, "default", {
|
|
3708
3645
|
key: 0,
|
|
3709
3646
|
data: f.value.data
|
|
3710
|
-
})], 2), createVNode(
|
|
3647
|
+
})], 2), createVNode(C, null, {
|
|
3711
3648
|
default: withCtx(() => [createVNode(unref(motion).div, {
|
|
3712
3649
|
initial: {
|
|
3713
3650
|
opacity: 0,
|
|
@@ -3720,7 +3657,7 @@ var _hoisted_1$5 = {
|
|
|
3720
3657
|
class: "shadow flex justify-center items-center scale-100 absolute whitespace-nowrap"
|
|
3721
3658
|
}, {
|
|
3722
3659
|
default: withCtx(() => [createVNode(Transition, { name: "van-fade" }, {
|
|
3723
|
-
default: withCtx(() => [h.value === "isLoadingNoData" ? (openBlock(), createBlock(
|
|
3660
|
+
default: withCtx(() => [h.value === "isLoadingNoData" ? (openBlock(), createBlock(p, {
|
|
3724
3661
|
key: 0,
|
|
3725
3662
|
size: "25px",
|
|
3726
3663
|
color: "var(--p-color)"
|
|
@@ -3729,28 +3666,28 @@ var _hoisted_1$5 = {
|
|
|
3729
3666
|
size: "10px",
|
|
3730
3667
|
color: "white"
|
|
3731
3668
|
}, {
|
|
3732
|
-
default: withCtx(() => [...
|
|
3669
|
+
default: withCtx(() => [...i[2] ||= [createTextVNode("加载中", -1)]]),
|
|
3733
3670
|
_: 1
|
|
3734
|
-
})) : h.value === "isEmpty" ? (openBlock(), createElementBlock("div", _hoisted_2
|
|
3671
|
+
})) : h.value === "isEmpty" ? (openBlock(), createElementBlock("div", _hoisted_2, [createVNode(v, {
|
|
3735
3672
|
description: "无结果",
|
|
3736
3673
|
class: normalizeClass(["w-full !justify-center", [e.classEmpty]]),
|
|
3737
3674
|
style: normalizeStyle([e.style, e.styleEmpty])
|
|
3738
|
-
}, null, 8, ["class", "style"])])) : h.value === "isErrorNoData" ? (openBlock(), createElementBlock("div", _hoisted_3
|
|
3739
|
-
class: normalizeClass(["!items-center !justify-center flex flex-col !size-full", [e.classError]]),
|
|
3675
|
+
}, null, 8, ["class", "style"])])) : h.value === "isErrorNoData" ? (openBlock(), createElementBlock("div", _hoisted_3, [createVNode(S, {
|
|
3676
|
+
class: normalizeClass(["!items-center !justify-center flex flex-col !size-full *:w-full text-wrap", [e.classError]]),
|
|
3740
3677
|
status: "error",
|
|
3741
3678
|
title: "网络错误",
|
|
3742
3679
|
style: normalizeStyle([e.style, e.styleError]),
|
|
3743
3680
|
description: f.value.errorCause ?? "未知原因"
|
|
3744
3681
|
}, {
|
|
3745
|
-
footer: withCtx(() => [e.retriable ? (openBlock(), createBlock(
|
|
3682
|
+
footer: withCtx(() => [e.retriable ? (openBlock(), createBlock(y, {
|
|
3746
3683
|
key: 0,
|
|
3747
|
-
onClick:
|
|
3684
|
+
onClick: i[0] ||= (e) => n.$emit("resetRetry"),
|
|
3748
3685
|
type: "primary"
|
|
3749
3686
|
}, {
|
|
3750
|
-
default: withCtx(() => [...
|
|
3687
|
+
default: withCtx(() => [...i[3] ||= [createTextVNode("重试", -1)]]),
|
|
3751
3688
|
_: 1
|
|
3752
3689
|
})) : createCommentVNode("", !0)]),
|
|
3753
|
-
icon: withCtx(() => [createVNode(
|
|
3690
|
+
icon: withCtx(() => [createVNode(b, {
|
|
3754
3691
|
size: "10rem",
|
|
3755
3692
|
color: "var(--nui-error-color)"
|
|
3756
3693
|
}, {
|
|
@@ -3762,22 +3699,22 @@ var _hoisted_1$5 = {
|
|
|
3762
3699
|
"class",
|
|
3763
3700
|
"style",
|
|
3764
3701
|
"description"
|
|
3765
|
-
])])) : h.value === "isErrorData" ? (openBlock(), createElementBlock("div", _hoisted_4
|
|
3766
|
-
createVNode(
|
|
3702
|
+
])])) : h.value === "isErrorData" ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
3703
|
+
createVNode(b, {
|
|
3767
3704
|
size: "3rem",
|
|
3768
3705
|
color: "white"
|
|
3769
3706
|
}, {
|
|
3770
3707
|
default: withCtx(() => [createVNode(unref(WifiTetheringErrorRound_default))]),
|
|
3771
3708
|
_: 1
|
|
3772
3709
|
}),
|
|
3773
|
-
createElementVNode("div", _hoisted_5
|
|
3774
|
-
createVNode(
|
|
3710
|
+
createElementVNode("div", _hoisted_5, [i[4] ||= createElementVNode("div", { class: "text-sm" }, "网络错误", -1), createElementVNode("div", _hoisted_6, toDisplayString(f.value.errorCause ?? "未知原因"), 1)]),
|
|
3711
|
+
createVNode(y, {
|
|
3775
3712
|
circle: "",
|
|
3776
3713
|
type: "error",
|
|
3777
3714
|
size: "large",
|
|
3778
|
-
onClick:
|
|
3715
|
+
onClick: i[1] ||= (e) => n.$emit("retry")
|
|
3779
3716
|
}, {
|
|
3780
|
-
icon: withCtx(() => [createVNode(
|
|
3717
|
+
icon: withCtx(() => [createVNode(b, { color: "white" }, {
|
|
3781
3718
|
default: withCtx(() => [createVNode(unref(ReloadOutlined_default))]),
|
|
3782
3719
|
_: 1
|
|
3783
3720
|
})]),
|
|
@@ -3876,15 +3813,15 @@ var _hoisted_1$5 = {
|
|
|
3876
3813
|
return n({
|
|
3877
3814
|
scrollTop: f,
|
|
3878
3815
|
listInstance: d
|
|
3879
|
-
}), (
|
|
3880
|
-
let
|
|
3881
|
-
return openBlock(), createBlock(
|
|
3816
|
+
}), (n, r) => {
|
|
3817
|
+
let i = NVirtualList, s = PullRefresh;
|
|
3818
|
+
return openBlock(), createBlock(s, {
|
|
3882
3819
|
modelValue: h.value,
|
|
3883
|
-
"onUpdate:modelValue":
|
|
3820
|
+
"onUpdate:modelValue": r[0] ||= (e) => h.value = e,
|
|
3884
3821
|
class: normalizeClass(["relative", o.class]),
|
|
3885
3822
|
onRefresh: g,
|
|
3886
3823
|
disabled: (unref(Stream).isStream(e.source) ? !1 : unref(isArray)(e.source) ? !0 : e.source.reloadable ?? !0) || l.value.isError || l.value.isRequesting || !!unref(f) && !m.value,
|
|
3887
|
-
onChange:
|
|
3824
|
+
onChange: r[1] ||= ({ distance: e }) => m.value = !!e,
|
|
3888
3825
|
style: normalizeStyle(e.style)
|
|
3889
3826
|
}, {
|
|
3890
3827
|
default: withCtx(() => [createVNode(content_default, {
|
|
@@ -3897,20 +3834,20 @@ var _hoisted_1$5 = {
|
|
|
3897
3834
|
"hide-loading": m.value && l.value.isRequesting
|
|
3898
3835
|
}, {
|
|
3899
3836
|
default: withCtx(() => [createVNode(var_default, { value: l.value.data }, {
|
|
3900
|
-
default: withCtx(({ value:
|
|
3837
|
+
default: withCtx(({ value: r }) => [createVNode(i, mergeProps(e.listProp ?? {}, {
|
|
3901
3838
|
"item-resizable": e.itemResizable,
|
|
3902
3839
|
"item-size": e.itemHeight,
|
|
3903
3840
|
onScroll: unref(p),
|
|
3904
3841
|
class: ["overflow-x-hidden h-full", [m.value ? "overflow-y-hidden" : "overflow-y-auto"]],
|
|
3905
|
-
items:
|
|
3842
|
+
items: r,
|
|
3906
3843
|
ref_key: "vList",
|
|
3907
3844
|
ref: d
|
|
3908
3845
|
}), {
|
|
3909
|
-
default: withCtx(({ item:
|
|
3846
|
+
default: withCtx(({ item: i }) => [renderSlot(n.$slots, "default", {
|
|
3910
3847
|
height: e.itemHeight,
|
|
3911
3848
|
data: {
|
|
3912
|
-
item:
|
|
3913
|
-
index:
|
|
3849
|
+
item: i,
|
|
3850
|
+
index: r.indexOf(i)
|
|
3914
3851
|
}
|
|
3915
3852
|
})]),
|
|
3916
3853
|
_: 2
|
|
@@ -3982,7 +3919,7 @@ var _hoisted_1$5 = {
|
|
|
3982
3919
|
}),
|
|
3983
3920
|
emits: /* @__PURE__ */ mergeModels(["closed"], ["update:show"]),
|
|
3984
3921
|
setup(e, { expose: n }) {
|
|
3985
|
-
let r =
|
|
3922
|
+
let r = useRouter(), s = e, c = useModel(e, "show"), l = shallowRef(c.value), [u, d] = useZIndex(computed(() => s.useTrulyShow ? l.value : c.value)), f = noop$1;
|
|
3986
3923
|
return watch(c, (e) => {
|
|
3987
3924
|
e ? f = r.beforeEach(() => {
|
|
3988
3925
|
if (console.log("popup:\n", "isLast:", d.value, "show:", c.value), d.value) return c.value ? c.value = !1 : void 0;
|
|
@@ -3990,22 +3927,22 @@ var _hoisted_1$5 = {
|
|
|
3990
3927
|
}, { immediate: !0 }), n({
|
|
3991
3928
|
zIndex: u,
|
|
3992
3929
|
trulyShow: l
|
|
3993
|
-
}), (
|
|
3994
|
-
let
|
|
3995
|
-
return openBlock(), createBlock(
|
|
3930
|
+
}), (n, r) => {
|
|
3931
|
+
let i = Popup;
|
|
3932
|
+
return openBlock(), createBlock(i, mergeProps(s, {
|
|
3996
3933
|
show: c.value,
|
|
3997
|
-
"onUpdate:show":
|
|
3934
|
+
"onUpdate:show": r[0] ||= (e) => c.value = e,
|
|
3998
3935
|
"z-index": unref(u),
|
|
3999
3936
|
teleport: "#popups",
|
|
4000
|
-
onOpen:
|
|
4001
|
-
onClosed:
|
|
4002
|
-
l.value = !1,
|
|
3937
|
+
onOpen: r[1] ||= (e) => l.value = !0,
|
|
3938
|
+
onClosed: r[2] ||= () => {
|
|
3939
|
+
l.value = !1, n.$emit("closed");
|
|
4003
3940
|
},
|
|
4004
3941
|
class: ["max-h-screen !overflow-y-auto overflow-hidden", !e.noBorder && "border-0 border-t border-solid border-(--van-border-color)"],
|
|
4005
3942
|
overlay: "",
|
|
4006
3943
|
"close-on-click-overlay": ""
|
|
4007
3944
|
}), {
|
|
4008
|
-
default: withCtx(() => [l.value ? renderSlot(
|
|
3945
|
+
default: withCtx(() => [l.value ? renderSlot(n.$slots, "default", { key: 0 }) : createCommentVNode("", !0)]),
|
|
4009
3946
|
_: 3
|
|
4010
3947
|
}, 16, [
|
|
4011
3948
|
"show",
|
|
@@ -4021,7 +3958,7 @@ var _hoisted_1$5 = {
|
|
|
4021
3958
|
routerBase: {}
|
|
4022
3959
|
},
|
|
4023
3960
|
setup(n) {
|
|
4024
|
-
let r = n, i = useRoute(), o = ref(decodeURI(i.path.replaceAll(r.routerBase + "/", "").split("/")[0])), c =
|
|
3961
|
+
let r = n, i = useRoute(), o = ref(decodeURI(i.path.replaceAll(r.routerBase + "/", "").split("/")[0])), c = useRouter(), l = useTemplateRef("tab"), u = async (e) => {
|
|
4025
3962
|
let n = "?", i = r.items.find((n) => n.name == e);
|
|
4026
3963
|
for (let e in i.queries ?? {}) if (Object.prototype.hasOwnProperty.call(i.queries ?? {}, e)) {
|
|
4027
3964
|
let r = (i.queries ?? {})[e];
|
|
@@ -4040,21 +3977,21 @@ var _hoisted_1$5 = {
|
|
|
4040
3977
|
});
|
|
4041
3978
|
return onUnmounted(() => {
|
|
4042
3979
|
d();
|
|
4043
|
-
}), (
|
|
4044
|
-
let
|
|
4045
|
-
return openBlock(), createBlock(
|
|
3980
|
+
}), (r, i) => {
|
|
3981
|
+
let c = Tab, d = Tabs;
|
|
3982
|
+
return openBlock(), createBlock(d, {
|
|
4046
3983
|
ref_key: "tab",
|
|
4047
3984
|
ref: l,
|
|
4048
3985
|
shrink: "",
|
|
4049
3986
|
active: o.value,
|
|
4050
|
-
"onUpdate:active":
|
|
3987
|
+
"onUpdate:active": i[0] ||= (e) => o.value = e,
|
|
4051
3988
|
beforeChange: u,
|
|
4052
3989
|
class: "w-full"
|
|
4053
3990
|
}, {
|
|
4054
|
-
"nav-left": withCtx(() => [renderSlot(
|
|
4055
|
-
"nav-right": withCtx(() => [renderSlot(
|
|
4056
|
-
"nav-bottom": withCtx(() => [renderSlot(
|
|
4057
|
-
default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(n.items, (e) => (openBlock(), createBlock(
|
|
3991
|
+
"nav-left": withCtx(() => [renderSlot(r.$slots, "left")]),
|
|
3992
|
+
"nav-right": withCtx(() => [renderSlot(r.$slots, "right")]),
|
|
3993
|
+
"nav-bottom": withCtx(() => [renderSlot(r.$slots, "bottom")]),
|
|
3994
|
+
default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(n.items, (e) => (openBlock(), createBlock(c, {
|
|
4058
3995
|
title: e.title,
|
|
4059
3996
|
onClick: (n) => o.value = e.name,
|
|
4060
3997
|
name: e.name
|
|
@@ -4081,16 +4018,16 @@ var _hoisted_1$5 = {
|
|
|
4081
4018
|
value: e,
|
|
4082
4019
|
mode: "text"
|
|
4083
4020
|
}));
|
|
4084
|
-
return (
|
|
4085
|
-
let
|
|
4021
|
+
return (r, i) => {
|
|
4022
|
+
let u = NButton;
|
|
4086
4023
|
return openBlock(), createElementBlock("div", {
|
|
4087
4024
|
class: normalizeClass([[unref(isNumber)(n.ellipsis) && "overflow-ellipsis overflow-hidden"], "whitespace-pre-wrap text-(--van-text-color)"]),
|
|
4088
4025
|
style: normalizeStyle([unref(isNumber)(n.ellipsis) && `line-break: anywhere;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: ${n.ellipsis};`])
|
|
4089
|
-
}, [renderSlot(
|
|
4026
|
+
}, [renderSlot(r.$slots, "default"), (openBlock(!0), createElementBlock(Fragment, null, renderList(c.value, (n) => (openBlock(), createElementBlock(Fragment, null, [n.mode === "link" ? (openBlock(), createBlock(u, {
|
|
4090
4027
|
key: 0,
|
|
4091
4028
|
tag: "a",
|
|
4092
4029
|
class: "underline",
|
|
4093
|
-
onClick:
|
|
4030
|
+
onClick: i[0] ||= withModifiers(() => {}, ["stop"]),
|
|
4094
4031
|
text: "",
|
|
4095
4032
|
type: "primary",
|
|
4096
4033
|
target: "_blank",
|
|
@@ -4101,7 +4038,7 @@ var _hoisted_1$5 = {
|
|
|
4101
4038
|
}, 1032, ["href"])) : n.mode === "text" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(n.value), 1)], 64)) : createCommentVNode("", !0)], 64))), 256))], 6);
|
|
4102
4039
|
};
|
|
4103
4040
|
}
|
|
4104
|
-
}), _hoisted_1
|
|
4041
|
+
}), _hoisted_1 = { class: "mt-1 text-(--van-text-color-2) text-xs" }, toggleIcon_default = /* @__PURE__ */ defineComponent({
|
|
4105
4042
|
__name: "toggleIcon",
|
|
4106
4043
|
props: /* @__PURE__ */ mergeModels({
|
|
4107
4044
|
icon: {},
|
|
@@ -4129,20 +4066,20 @@ var _hoisted_1$5 = {
|
|
|
4129
4066
|
}, d = useTemplateRef("htmlRefHook");
|
|
4130
4067
|
return onLongPress(d, () => {
|
|
4131
4068
|
i("longClick");
|
|
4132
|
-
}, { modifiers: { prevent: !0 } }), (
|
|
4133
|
-
let
|
|
4069
|
+
}, { modifiers: { prevent: !0 } }), (n, r) => {
|
|
4070
|
+
let i = NIcon;
|
|
4134
4071
|
return openBlock(), createElementBlock("div", {
|
|
4135
4072
|
class: normalizeClass(["flex items-center justify-center **:!transition-colors", [e.rowMode || "flex-col", e.padding && "px-4"]]),
|
|
4136
4073
|
onClick: withModifiers(l, ["stop"]),
|
|
4137
4074
|
ref_key: "htmlRefHook",
|
|
4138
4075
|
ref: d
|
|
4139
|
-
}, [createVNode(
|
|
4076
|
+
}, [createVNode(i, {
|
|
4140
4077
|
size: e.size,
|
|
4141
4078
|
color: o.value ? "var(--p-color)" : "var(--van-gray-7)"
|
|
4142
4079
|
}, {
|
|
4143
4080
|
default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(e.icon)))]),
|
|
4144
4081
|
_: 1
|
|
4145
|
-
}, 8, ["size", "color"]), createElementVNode("span", _hoisted_1
|
|
4082
|
+
}, 8, ["size", "color"]), createElementVNode("span", _hoisted_1, [renderSlot(n.$slots, "default")])], 2);
|
|
4146
4083
|
};
|
|
4147
4084
|
}
|
|
4148
4085
|
}), Z = Object.defineProperty, ee = Object.defineProperties, te = Object.getOwnPropertyDescriptors, I = Object.getOwnPropertySymbols, P = Object.prototype.hasOwnProperty, G = Object.prototype.propertyIsEnumerable, N = (e, n, r) => n in e ? Z(e, n, {
|
|
@@ -4495,42 +4432,42 @@ var Ce = ["data-index"], U = /* @__PURE__ */ defineComponent({
|
|
|
4495
4432
|
deep: 1,
|
|
4496
4433
|
immediate: !0
|
|
4497
4434
|
});
|
|
4498
|
-
let b = useTemplateRef("waterfallEl"), S = useTemp().$
|
|
4499
|
-
for (let e of
|
|
4435
|
+
let b = useTemplateRef("waterfallEl"), S = useTemp().$apply("waterfall", () => ({ top: 0 })), C = S.top++, w = useTemp().$applyRaw(`waterfall:${C}`, () => shallowReactive(/* @__PURE__ */ new Map())), O = [], A = new MutationObserver(([e]) => {
|
|
4436
|
+
for (let e of O) e();
|
|
4500
4437
|
if (!(e.target instanceof HTMLDivElement) || !f.value.data) return;
|
|
4501
4438
|
let n = [...e.target.children];
|
|
4502
4439
|
for (let e of n) {
|
|
4503
4440
|
let n = Number(e.dataset.index), r = f.value.data[n], i = () => {
|
|
4504
4441
|
let n = e.firstElementChild?.getBoundingClientRect();
|
|
4505
|
-
|
|
4442
|
+
w.set(r, n?.height ?? s.minHeight);
|
|
4506
4443
|
}, a = useResizeObserver(e.firstElementChild, i);
|
|
4507
|
-
i(),
|
|
4444
|
+
i(), O.push(() => a.stop());
|
|
4508
4445
|
}
|
|
4509
4446
|
});
|
|
4510
4447
|
watch(b, (e) => {
|
|
4511
|
-
if (!e) return
|
|
4512
|
-
|
|
4448
|
+
if (!e) return A.disconnect();
|
|
4449
|
+
A.observe(e.$el, { childList: !0 });
|
|
4513
4450
|
}), onUnmounted(() => {
|
|
4514
|
-
|
|
4515
|
-
for (let e of
|
|
4451
|
+
A.disconnect();
|
|
4452
|
+
for (let e of O) e();
|
|
4516
4453
|
});
|
|
4517
|
-
let
|
|
4454
|
+
let j = shallowRef(!0);
|
|
4518
4455
|
return n({
|
|
4519
4456
|
scrollTop: y,
|
|
4520
4457
|
scrollParent: v,
|
|
4521
4458
|
async reloadList() {
|
|
4522
|
-
|
|
4459
|
+
j.value = !1, w.clear(), await nextTick(), j.value = !0;
|
|
4523
4460
|
}
|
|
4524
|
-
}), (
|
|
4525
|
-
let
|
|
4526
|
-
return
|
|
4461
|
+
}), (n, r) => {
|
|
4462
|
+
let i = PullRefresh;
|
|
4463
|
+
return j.value ? (openBlock(), createBlock(i, {
|
|
4527
4464
|
key: 0,
|
|
4528
4465
|
modelValue: m.value,
|
|
4529
|
-
"onUpdate:modelValue":
|
|
4466
|
+
"onUpdate:modelValue": r[0] ||= (e) => m.value = e,
|
|
4530
4467
|
class: normalizeClass(["relative h-full", s.class]),
|
|
4531
4468
|
disabled: e.unReloadable || f.value.isRequesting || !!unref(y) && !p.value,
|
|
4532
4469
|
onRefresh: h,
|
|
4533
|
-
onChange:
|
|
4470
|
+
onChange: r[1] ||= ({ distance: e }) => p.value = !!e,
|
|
4534
4471
|
style: normalizeStyle(e.style)
|
|
4535
4472
|
}, {
|
|
4536
4473
|
default: withCtx(() => [createVNode(content_default, {
|
|
@@ -4553,15 +4490,15 @@ var Ce = ["data-index"], U = /* @__PURE__ */ defineComponent({
|
|
|
4553
4490
|
"preload-screen-count": [0, 1],
|
|
4554
4491
|
ref_key: "waterfallEl",
|
|
4555
4492
|
ref: b,
|
|
4556
|
-
"calc-item-height": (n) => unref(
|
|
4493
|
+
"calc-item-height": (n) => unref(w).get(n) ?? e.minHeight,
|
|
4557
4494
|
class: "waterfall",
|
|
4558
4495
|
"min-column-count": d.value[0],
|
|
4559
4496
|
"max-column-count": d.value[1]
|
|
4560
4497
|
}, {
|
|
4561
|
-
default: withCtx(({ item:
|
|
4562
|
-
item:
|
|
4563
|
-
index:
|
|
4564
|
-
height: unref(
|
|
4498
|
+
default: withCtx(({ item: r, index: i }) => [renderSlot(n.$slots, "default", {
|
|
4499
|
+
item: r,
|
|
4500
|
+
index: i,
|
|
4501
|
+
height: unref(w).get(r),
|
|
4565
4502
|
length: f.value.length,
|
|
4566
4503
|
minHeight: e.minHeight
|
|
4567
4504
|
})]),
|
|
@@ -4981,6 +4918,30 @@ var Ce = ["data-index"], U = /* @__PURE__ */ defineComponent({
|
|
|
4981
4918
|
static toContentTypeString(e) {
|
|
4982
4919
|
return isString(e) ? e : `${e.plugin}:${e.name}`;
|
|
4983
4920
|
}
|
|
4921
|
+
static levelboard = useGlobalVar(shallowReactive(/* @__PURE__ */ new Map()), "uni/contentPage/levelboard");
|
|
4922
|
+
static setLevelboard(e, n) {
|
|
4923
|
+
let r = this.levelboard.get(e) ?? [];
|
|
4924
|
+
return r.push(n), this.levelboard.set(e, r), e;
|
|
4925
|
+
}
|
|
4926
|
+
static getLevelboard(e) {
|
|
4927
|
+
return this.levelboard.get(e);
|
|
4928
|
+
}
|
|
4929
|
+
static topButton = useGlobalVar(shallowReactive(/* @__PURE__ */ new Map()), "uni/contentPage/topButton");
|
|
4930
|
+
static setTopButton(e, n) {
|
|
4931
|
+
let r = this.topButton.get(e) ?? [];
|
|
4932
|
+
return r.push(n), this.topButton.set(e, r), e;
|
|
4933
|
+
}
|
|
4934
|
+
static getTopButton(e) {
|
|
4935
|
+
return this.topButton.get(e);
|
|
4936
|
+
}
|
|
4937
|
+
static mainLists = useGlobalVar(shallowReactive(/* @__PURE__ */ new Map()), "uni/contentPage/mainLists");
|
|
4938
|
+
static setMainList(e, n) {
|
|
4939
|
+
let r = this.mainLists.get(e) ?? [];
|
|
4940
|
+
return r.push(n), this.mainLists.set(e, r), e;
|
|
4941
|
+
}
|
|
4942
|
+
static getMainList(e) {
|
|
4943
|
+
return this.mainLists.get(e);
|
|
4944
|
+
}
|
|
4984
4945
|
constructor(e, n, r) {
|
|
4985
4946
|
this.id = n, this.ep = r, this.preload.value = e;
|
|
4986
4947
|
}
|
|
@@ -5078,154 +5039,7 @@ let uni;
|
|
|
5078
5039
|
(function(e) {
|
|
5079
5040
|
e.user = user_exports, e.comment = comment_exports, e.content = content_exports, e.image = image_exports$1, e.item = item_exports, e.ep = ep_exports;
|
|
5080
5041
|
})(uni ||= {});
|
|
5081
|
-
var
|
|
5082
|
-
let n = shallowReactive(/* @__PURE__ */ new Map()), r = e.action((e, r) => {
|
|
5083
|
-
let i = useLocalStorage(`${e}.config`, fromPairs(Object.entries(r).map(([n, r]) => [`${e}.${n}`, r.defaultValue])));
|
|
5084
|
-
return n.set(e, {
|
|
5085
|
-
form: r,
|
|
5086
|
-
value: i
|
|
5087
|
-
}), i.value;
|
|
5088
|
-
}, "useCustomConfig"), a = r("core", {
|
|
5089
|
-
recordHistory: {
|
|
5090
|
-
type: "switch",
|
|
5091
|
-
defaultValue: !1,
|
|
5092
|
-
info: "记录历史记录"
|
|
5093
|
-
},
|
|
5094
|
-
showAIProject: {
|
|
5095
|
-
type: "switch",
|
|
5096
|
-
defaultValue: !0,
|
|
5097
|
-
info: "展示AI作品"
|
|
5098
|
-
},
|
|
5099
|
-
darkMode: {
|
|
5100
|
-
type: "radio",
|
|
5101
|
-
defaultValue: "system",
|
|
5102
|
-
info: "暗色模式配置",
|
|
5103
|
-
comp: "select",
|
|
5104
|
-
selects: [
|
|
5105
|
-
{
|
|
5106
|
-
label: "浅色",
|
|
5107
|
-
value: "light"
|
|
5108
|
-
},
|
|
5109
|
-
{
|
|
5110
|
-
label: "暗色",
|
|
5111
|
-
value: "dark"
|
|
5112
|
-
},
|
|
5113
|
-
{
|
|
5114
|
-
label: "跟随系统",
|
|
5115
|
-
value: "system"
|
|
5116
|
-
}
|
|
5117
|
-
]
|
|
5118
|
-
},
|
|
5119
|
-
easilyTitle: {
|
|
5120
|
-
type: "switch",
|
|
5121
|
-
defaultValue: !1,
|
|
5122
|
-
info: "简化标题(实验)"
|
|
5123
|
-
}
|
|
5124
|
-
}), o = /* @__PURE__ */ usePreferredDark();
|
|
5125
|
-
return {
|
|
5126
|
-
appConfig: a,
|
|
5127
|
-
isDark: computed(() => {
|
|
5128
|
-
switch (a["core.darkMode"]) {
|
|
5129
|
-
case "light": return !1;
|
|
5130
|
-
case "dark": return !0;
|
|
5131
|
-
case "system": return o.value;
|
|
5132
|
-
default: return !1;
|
|
5133
|
-
}
|
|
5134
|
-
}),
|
|
5135
|
-
form: n,
|
|
5136
|
-
$useCustomConfig: r
|
|
5137
|
-
};
|
|
5138
|
-
});
|
|
5139
|
-
const useConfig = () => _useConfig(window.$api.piniaInstance);
|
|
5140
|
-
var _hoisted_1 = ["disabled"], _hoisted_2 = { class: "flex absolute flex-col w-[calc(70%-14px)] h-[calc(100%-8px)] *:text-justify right-2" }, _hoisted_3 = { class: "van-multi-ellipsis--l2" }, _hoisted_4 = { class: "absolute bottom-2 text-(--van-text-color-2) text-sm" }, _hoisted_5 = ["disabled"], _hoisted_6 = { class: "w-full flex items-center relative" }, _hoisted_7 = { class: "absolute w-full h-6 !text-[10px] text-white bg-[linear-gradient(transparent,rgba(0,0,0,0.9))] bottom-0 flex pb-0.5 gap-1 pl-1 items-end justify-start *:flex *:items-center" }, _hoisted_8 = { class: "w-full overflow-hidden p-1 flex flex-col text-(--van-text-color)" }, _hoisted_9 = { class: "flex flex-nowrap" }, _hoisted_10 = { class: "text-start text-sm" }, _hoisted_11 = { class: "my-1 w-full h-auto flex-nowrap flex items-center" }, unitCard_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
5141
|
-
__name: "unitCard",
|
|
5142
|
-
props: {
|
|
5143
|
-
item: {},
|
|
5144
|
-
freeHeight: { type: Boolean },
|
|
5145
|
-
disabled: { type: Boolean },
|
|
5146
|
-
type: { default: "default" },
|
|
5147
|
-
class: {},
|
|
5148
|
-
style: { type: [
|
|
5149
|
-
Boolean,
|
|
5150
|
-
null,
|
|
5151
|
-
String,
|
|
5152
|
-
Object,
|
|
5153
|
-
Array
|
|
5154
|
-
] }
|
|
5155
|
-
},
|
|
5156
|
-
emits: ["click"],
|
|
5157
|
-
setup(n, { emit: r }) {
|
|
5158
|
-
useCssVars((e) => ({ "0388e6a2": h.value }));
|
|
5159
|
-
let d = n, f = r, p = useTemplateRef("cover"), m = computed(() => uni.item.Item.is(d.item) ? d.item.$cover : uni.image.Image.create(d.item.cover)), h = computed(() => p.value?.isLoaded ? "unset" : `${m.value.aspect?.width || 3} / ${m.value.aspect?.height || 4}`), [g, v] = /* @__PURE__ */ createReusableTemplate(), y = () => {
|
|
5160
|
-
uni.item.Item.is(d.item) && SharedFunction.callWitch("addRecent", "core", d.item);
|
|
5161
|
-
}, b = useConfig(), S = computed(() => b.appConfig["core.easilyTitle"] ? d.item.title.replace(/(\([^\)]+\)|\[[^\]]+\]|\([^\)]+\)|\【[^\】]+\】)+?/gi, "").trim() : d.item.title);
|
|
5162
|
-
return (n, r) => {
|
|
5163
|
-
let i = NIcon, h = NButton, b = NPopconfirm;
|
|
5164
|
-
return openBlock(), createElementBlock(Fragment, null, [createVNode(unref(g), null, {
|
|
5165
|
-
default: withCtx(() => [createVNode(b, { onPositiveClick: y }, {
|
|
5166
|
-
trigger: withCtx(() => [createVNode(h, {
|
|
5167
|
-
onClick: r[0] ||= withModifiers(() => {}, ["stop"]),
|
|
5168
|
-
text: "",
|
|
5169
|
-
class: "!absolute bottom-1.5 right-2"
|
|
5170
|
-
}, {
|
|
5171
|
-
default: withCtx(() => [createVNode(i, {
|
|
5172
|
-
color: "var(--van-text-color-2)",
|
|
5173
|
-
size: "1rem"
|
|
5174
|
-
}, {
|
|
5175
|
-
default: withCtx(() => [createVNode(unref(MoreVertRound_default))]),
|
|
5176
|
-
_: 1
|
|
5177
|
-
})]),
|
|
5178
|
-
_: 1
|
|
5179
|
-
})]),
|
|
5180
|
-
default: withCtx(() => [r[3] ||= createTextVNode(" 加入\"稍后再看\"? ", -1)]),
|
|
5181
|
-
_: 1
|
|
5182
|
-
})]),
|
|
5183
|
-
_: 1
|
|
5184
|
-
}), n.type == "small" ? (openBlock(), createElementBlock("div", {
|
|
5185
|
-
key: 1,
|
|
5186
|
-
style: normalizeStyle([{ height: n.freeHeight ? "auto" : "140px" }, n.style]),
|
|
5187
|
-
onClick: r[2] ||= (e) => f("click"),
|
|
5188
|
-
disabled: n.disabled,
|
|
5189
|
-
class: normalizeClass([[{ "van-haptics-feedback": !n.disabled }, d.class], "overflow-hidden w-full rounded-lg block van-hairline--top-bottom bg-center bg-(--van-background-2) text-(--van-text-color) border-none relative p-0 items-center"]),
|
|
5190
|
-
ref: "container"
|
|
5191
|
-
}, [
|
|
5192
|
-
createElementVNode("div", _hoisted_6, [n.$slots.cover ? createCommentVNode("", !0) : (openBlock(), createBlock(image_default, {
|
|
5193
|
-
key: 0,
|
|
5194
|
-
src: m.value,
|
|
5195
|
-
class: "rounded-t-lg w-full image-size",
|
|
5196
|
-
fit: "cover",
|
|
5197
|
-
ref_key: "cover",
|
|
5198
|
-
ref: p
|
|
5199
|
-
}, null, 8, ["src"])), createElementVNode("div", _hoisted_7, [renderSlot(n.$slots, "smallTopInfo", {}, void 0, !0)])]),
|
|
5200
|
-
createElementVNode("div", _hoisted_8, [createElementVNode("div", _hoisted_9, [createElementVNode("span", _hoisted_10, toDisplayString(S.value), 1)]), createElementVNode("div", _hoisted_11, [renderSlot(n.$slots, "default", {}, void 0, !0)])]),
|
|
5201
|
-
createVNode(unref(v))
|
|
5202
|
-
], 14, _hoisted_5)) : (openBlock(), createElementBlock("div", {
|
|
5203
|
-
key: 0,
|
|
5204
|
-
ref: "container",
|
|
5205
|
-
onClick: r[1] ||= (e) => f("click"),
|
|
5206
|
-
disabled: n.disabled,
|
|
5207
|
-
class: normalizeClass(["overflow-hidden w-full van-hairline--top-bottom bg-(--van-background-2) text-(--van-text-color) relative p-2 flex", [{ "van-haptics-feedback": !n.disabled }, d.class]]),
|
|
5208
|
-
style: normalizeStyle([{ height: n.freeHeight ? "auto" : "140px" }, n.style])
|
|
5209
|
-
}, [
|
|
5210
|
-
n.type === "big" ? (openBlock(), createBlock(image_default, {
|
|
5211
|
-
key: 0,
|
|
5212
|
-
src: m.value,
|
|
5213
|
-
class: "blur-lg absolute top-0 left-0 w-full h-full",
|
|
5214
|
-
fit: "cover"
|
|
5215
|
-
}, null, 8, ["src"])) : createCommentVNode("", !0),
|
|
5216
|
-
createVNode(image_default, {
|
|
5217
|
-
src: m.value,
|
|
5218
|
-
class: "!rounded-lg image-size z-2 w-3/10",
|
|
5219
|
-
fit: "contain",
|
|
5220
|
-
ref_key: "cover",
|
|
5221
|
-
ref: p
|
|
5222
|
-
}, null, 8, ["src"]),
|
|
5223
|
-
createElementVNode("div", _hoisted_2, [createElementVNode("span", _hoisted_3, toDisplayString(S.value), 1), createElementVNode("div", _hoisted_4, [renderSlot(n.$slots, "default", {}, void 0, !0)])]),
|
|
5224
|
-
createVNode(unref(v))
|
|
5225
|
-
], 14, _hoisted_1))], 64);
|
|
5226
|
-
};
|
|
5227
|
-
}
|
|
5228
|
-
}), [["__scopeId", "data-v-58777aa0"]]), translate_exports = /* @__PURE__ */ __export({ createDateString: () => createDateString }), import_dayjs_min = /* @__PURE__ */ __toESM(require_dayjs_min(), 1);
|
|
5042
|
+
var translate_exports = /* @__PURE__ */ __export({ createDateString: () => createDateString }), import_dayjs_min = /* @__PURE__ */ __toESM(require_dayjs_min(), 1);
|
|
5229
5043
|
const createDateString = (e = (0, import_dayjs_min.default)()) => {
|
|
5230
5044
|
let n = (0, import_dayjs_min.default)(), r = e.isSame(n, "year"), i = r && e.isSame(n, "month"), a = i && e.date() === n.date(), o = i && e.date() === n.date() - 1, s = "";
|
|
5231
5045
|
return r || (s += "YYYY年 "), a ? s += "今天 " : o ? s += "昨天 " : s += "M月D日 ", s += "HH:mm", e.format(s);
|
|
@@ -5316,6 +5130,73 @@ const createLoadingMessage = (e = "加载中", n = window.$message) => {
|
|
|
5316
5130
|
}
|
|
5317
5131
|
});
|
|
5318
5132
|
return console.log("[createDialog] after const dialog"), i.ins = m, i;
|
|
5133
|
+
};
|
|
5134
|
+
var ConfigPointer = class {
|
|
5135
|
+
constructor(e, n) {
|
|
5136
|
+
this.pluginName = e, this.config = n, this.key = Symbol(e);
|
|
5137
|
+
}
|
|
5138
|
+
key;
|
|
5139
|
+
};
|
|
5140
|
+
const appConfig = new ConfigPointer("core", {
|
|
5141
|
+
recordHistory: {
|
|
5142
|
+
type: "switch",
|
|
5143
|
+
defaultValue: !1,
|
|
5144
|
+
info: "记录历史记录"
|
|
5145
|
+
},
|
|
5146
|
+
showAIProject: {
|
|
5147
|
+
type: "switch",
|
|
5148
|
+
defaultValue: !0,
|
|
5149
|
+
info: "展示AI作品"
|
|
5150
|
+
},
|
|
5151
|
+
darkMode: {
|
|
5152
|
+
type: "radio",
|
|
5153
|
+
defaultValue: "system",
|
|
5154
|
+
info: "暗色模式配置",
|
|
5155
|
+
comp: "select",
|
|
5156
|
+
selects: [
|
|
5157
|
+
{
|
|
5158
|
+
label: "浅色",
|
|
5159
|
+
value: "light"
|
|
5160
|
+
},
|
|
5161
|
+
{
|
|
5162
|
+
label: "暗色",
|
|
5163
|
+
value: "dark"
|
|
5164
|
+
},
|
|
5165
|
+
{
|
|
5166
|
+
label: "跟随系统",
|
|
5167
|
+
value: "system"
|
|
5168
|
+
}
|
|
5169
|
+
]
|
|
5170
|
+
},
|
|
5171
|
+
easilyTitle: {
|
|
5172
|
+
type: "switch",
|
|
5173
|
+
defaultValue: !1,
|
|
5174
|
+
info: "简化标题(实验)"
|
|
5175
|
+
}
|
|
5176
|
+
}), useConfig = defineStore("config", (e) => {
|
|
5177
|
+
let n = shallowReactive(/* @__PURE__ */ new Map()), r = e.action((e) => {
|
|
5178
|
+
let r = n.get(e.key);
|
|
5179
|
+
if (!r) throw Error(`not found config by plugin "${e.pluginName}"`);
|
|
5180
|
+
return r.value;
|
|
5181
|
+
}, "load"), a = /* @__PURE__ */ usePreferredDark();
|
|
5182
|
+
return {
|
|
5183
|
+
isDark: computed(() => {
|
|
5184
|
+
switch (r(appConfig).darkMode) {
|
|
5185
|
+
case "light": return !1;
|
|
5186
|
+
case "dark": return !0;
|
|
5187
|
+
case "system": return a.value;
|
|
5188
|
+
default: return !1;
|
|
5189
|
+
}
|
|
5190
|
+
}),
|
|
5191
|
+
form: n,
|
|
5192
|
+
$load: r
|
|
5193
|
+
};
|
|
5194
|
+
}), resignerConfig = (e) => {
|
|
5195
|
+
let n = useConfig(), r = useLocalStorage(`${e.pluginName}.config`, fromPairs(Object.entries(e.config).map(([e, n]) => [e, n.defaultValue])));
|
|
5196
|
+
n.form.set(e.key, {
|
|
5197
|
+
form: e.config,
|
|
5198
|
+
value: r
|
|
5199
|
+
});
|
|
5319
5200
|
}, definePlugin = (e) => {
|
|
5320
5201
|
if (isFunction(e)) var n = e(window.$$safe$$);
|
|
5321
5202
|
else var n = e;
|
|
@@ -5334,9 +5215,15 @@ const createLoadingMessage = (e = "加载中", n = window.$message) => {
|
|
|
5334
5215
|
if (o) {
|
|
5335
5216
|
if (o.categories) for (let e of o.categories) ContentPage.setCategories(r, e);
|
|
5336
5217
|
if (o.tabbar) for (let e of o.tabbar) ContentPage.setTabbar(r, e);
|
|
5218
|
+
if (o.hotPage) {
|
|
5219
|
+
for (let e of o.hotPage.mainListCard ?? []) ContentPage.setMainList(r, e);
|
|
5220
|
+
for (let e of o.hotPage.levelBoard ?? []) ContentPage.setLevelboard(r, e);
|
|
5221
|
+
for (let e of o.hotPage.topButton ?? []) ContentPage.setTopButton(r, e);
|
|
5222
|
+
}
|
|
5337
5223
|
}
|
|
5338
|
-
s && User.userEditorBase.set(r, s.edit),
|
|
5339
|
-
|
|
5224
|
+
if (s && User.userEditorBase.set(r, s.edit), n.config) for (let e of n.config) resignerConfig(e);
|
|
5225
|
+
return SharedFunction.call("addPlugin", n);
|
|
5226
|
+
}, declareDependType = (e) => Symbol.for(`expose:${e}`), requireDepend = (e) => _pluginExposes.get(e), _pluginExposes = /* @__PURE__ */ new Map(), coreModule = declareDependType("core"), _ = void 0, Comp = {
|
|
5340
5227
|
Await: await_default,
|
|
5341
5228
|
Loading: loading_default,
|
|
5342
5229
|
Content: content_default,
|
|
@@ -5348,8 +5235,7 @@ const createLoadingMessage = (e = "加载中", n = window.$message) => {
|
|
|
5348
5235
|
Text: text_default,
|
|
5349
5236
|
ToggleIcon: toggleIcon_default,
|
|
5350
5237
|
Var: var_default,
|
|
5351
|
-
Waterfall: waterfall_default
|
|
5352
|
-
content: { UnitCard: unitCard_default }
|
|
5238
|
+
Waterfall: waterfall_default
|
|
5353
5239
|
};
|
|
5354
5240
|
let Utils;
|
|
5355
5241
|
(function(e) {
|
|
@@ -5357,8 +5243,10 @@ let Utils;
|
|
|
5357
5243
|
})(Utils ||= {});
|
|
5358
5244
|
const Store = {
|
|
5359
5245
|
useTemp,
|
|
5360
|
-
useConfig
|
|
5246
|
+
useConfig,
|
|
5247
|
+
appConfig,
|
|
5248
|
+
ConfigPointer
|
|
5361
5249
|
};
|
|
5362
|
-
export { Comp, Store, Utils, _, definePlugin, uni };
|
|
5250
|
+
export { Comp, Store, Utils, _, _pluginExposes, coreModule, declareDependType, definePlugin, requireDepend, uni };
|
|
5363
5251
|
|
|
5364
5252
|
//# sourceMappingURL=bundle.js.map
|