Merge remote-tracking branch 'origin/master'

This commit is contained in:
kunfei
2023-07-26 13:58:58 +08:00
24 changed files with 72 additions and 51 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
import{A as f,u as i}from"./index-aa0dac2e.js";import"./vendor-b9134af1.js";f.getReadConfig().then(e=>{var t=e.data.data;if(t){const a=i();let o=JSON.parse(t),s=a.config;o=Object.assign(s,o),a.setConfig(o)}});
import{A as f,u as i}from"./index-e7b92a96.js";import"./vendor-b9134af1.js";f.getReadConfig().then(e=>{var t=e.data.data;if(t){const a=i();let o=JSON.parse(t),s=a.config;o=Object.assign(s,o),a.setConfig(o)}});

View File

@@ -1 +1 @@
.el-link[data-v-aee57c78]{padding:4px}.el-text[data-v-aee57c78]{padding-top:20px}[data-v-830cee5a] .el-checkbox__label{flex:1;display:flex;justify-content:space-between;align-items:center}.error[data-v-830cee5a]{border-color:var(--el-color-error)!important;color:var(--el-color-error)!important;--el-checkbox-checked-text-color: var(--el-color-error);--el-checkbox-checked-bg-color: var(--el-color-error);--el-checkbox-checked-input-border-color: var(--el-color-error)}.edit[data-v-830cee5a]{border-color:var(--el-color-dark)!important}.tool[data-v-cd1572ca]{display:flex;margin:4px 0;justify-content:center}#source-list[data-v-cd1572ca]{margin-top:6px;height:calc(100vh - 119px)}#source-list[data-v-cd1572ca] .el-checkbox{margin-bottom:4px;width:100%}[data-v-372e8d43] #debug-text{height:calc(100vh - 86px)}[data-v-7e91a802] .el-input{width:100%}[data-v-7e91a802] #source-json{height:calc(100vh - 50px)}[data-v-dcce2457] .el-tabs__header{margin-bottom:5px}.flex-space-between[data-v-1427b2c0]{display:flex;justify-content:space-between;align-items:baseline}.flex-column-center[data-v-1427b2c0]{display:flex;flex-direction:column;justify-content:center}.menu>.el-button[data-v-1427b2c0]{margin:4px;padding:1em;width:6em}.hotkeys-item .title[data-v-1427b2c0]{width:5em;display:flex;justify-content:flex-end;margin-right:1em}.hotkeys-item__content[data-v-1427b2c0]{display:flex;flex-wrap:wrap;flex:1}.hotkeys-item__content div[data-v-1427b2c0]{margin-bottom:1em}.hotkeys-item__content span[data-v-1427b2c0]{margin:.5em}[data-v-2cfb5302] .el-tab-pane{height:calc(100vh - 55px);padding-top:15px;padding-right:5px;overflow-y:auto}[data-v-2cfb5302] .el-tabs__header{margin:0}kbd{background-color:#fcfcfc;border-radius:3px;border:1px solid hsl(0deg,0%,80%);padding:4px 5px;font-weight:700}code{background-color:#f2f1f1;padding:.125rem .25rem;border-radius:.25rem;font-size:.835rem}body{padding:0;margin:0}.el-tabs__header{position:sticky;top:0px;z-index:2;background-color:#fff}.editor[data-v-5fe2b79d]{display:flex;height:100vh;overflow:hidden}.editor .left[data-v-5fe2b79d]{flex:1;margin-left:20px}.editor .right[data-v-5fe2b79d]{flex:1;width:360px;margin-right:20px}
.el-link[data-v-aee57c78]{padding:4px}.el-text[data-v-aee57c78]{padding-top:20px}[data-v-830cee5a] .el-checkbox__label{flex:1;display:flex;justify-content:space-between;align-items:center}.error[data-v-830cee5a]{border-color:var(--el-color-error)!important;color:var(--el-color-error)!important;--el-checkbox-checked-text-color: var(--el-color-error);--el-checkbox-checked-bg-color: var(--el-color-error);--el-checkbox-checked-input-border-color: var(--el-color-error)}.edit[data-v-830cee5a]{border-color:var(--el-color-dark)!important}.tool[data-v-cd1572ca]{display:flex;margin:4px 0;justify-content:center}#source-list[data-v-cd1572ca]{margin-top:6px;height:calc(100vh - 119px)}#source-list[data-v-cd1572ca] .el-checkbox{margin-bottom:4px;width:100%}[data-v-f7a4e94b] #debug-text{height:calc(100vh - 86px)}[data-v-7e91a802] .el-input{width:100%}[data-v-7e91a802] #source-json{height:calc(100vh - 50px)}[data-v-dcce2457] .el-tabs__header{margin-bottom:5px}.flex-space-between[data-v-9fd45dad]{display:flex;justify-content:space-between;align-items:baseline}.flex-column-center[data-v-9fd45dad]{display:flex;flex-direction:column;justify-content:center}.menu>.el-button[data-v-9fd45dad]{margin:4px;padding:1em;width:6em}.hotkeys-item .title[data-v-9fd45dad]{width:5em;display:flex;justify-content:flex-end;margin-right:1em}.hotkeys-item__content[data-v-9fd45dad]{display:flex;flex-wrap:wrap;flex:1}.hotkeys-item__content div[data-v-9fd45dad]{margin-bottom:1em}.hotkeys-item__content span[data-v-9fd45dad]{margin:.5em}[data-v-2cfb5302] .el-tab-pane{height:calc(100vh - 55px);padding-top:15px;padding-right:5px;overflow-y:auto}[data-v-2cfb5302] .el-tabs__header{margin:0}kbd{background-color:#fcfcfc;border-radius:3px;border:1px solid hsl(0deg,0%,80%);padding:4px 5px;font-weight:700}code{background-color:#f2f1f1;padding:.125rem .25rem;border-radius:.25rem;font-size:.835rem}body{padding:0;margin:0}.el-tabs__header{position:sticky;top:0px;z-index:2;background-color:#fff}.editor[data-v-5fe2b79d]{display:flex;height:100vh;overflow:hidden}.editor .left[data-v-5fe2b79d]{flex:1;margin-left:20px}.editor .right[data-v-5fe2b79d]{flex:1;width:360px;margin-right:20px}

View File

@@ -1 +1 @@
import{u as S}from"./index-aa0dac2e.js";import{z as L,K as p,a5 as w,ae as D,u as v}from"./vendor-b9134af1.js";const Y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;function y(t,i,e,a){let o=t<12?"AM":"PM";return a&&(o=o.split("").reduce((n,l)=>n+=`${l}.`,"")),e?o.toLowerCase():o}function z(t,i,e={}){var a;const o=t.getFullYear(),n=t.getMonth(),l=t.getDate(),s=t.getHours(),r=t.getMinutes(),g=t.getSeconds(),f=t.getMilliseconds(),h=t.getDay(),c=(a=e.customMeridiem)!=null?a:y,d={YY:()=>String(o).slice(-2),YYYY:()=>o,M:()=>n+1,MM:()=>`${n+1}`.padStart(2,"0"),MMM:()=>t.toLocaleDateString(e.locales,{month:"short"}),MMMM:()=>t.toLocaleDateString(e.locales,{month:"long"}),D:()=>String(l),DD:()=>`${l}`.padStart(2,"0"),H:()=>String(s),HH:()=>`${s}`.padStart(2,"0"),h:()=>`${s%12||12}`.padStart(1,"0"),hh:()=>`${s%12||12}`.padStart(2,"0"),m:()=>String(r),mm:()=>`${r}`.padStart(2,"0"),s:()=>String(g),ss:()=>`${g}`.padStart(2,"0"),SSS:()=>`${f}`.padStart(3,"0"),d:()=>h,dd:()=>t.toLocaleDateString(e.locales,{weekday:"narrow"}),ddd:()=>t.toLocaleDateString(e.locales,{weekday:"short"}),dddd:()=>t.toLocaleDateString(e.locales,{weekday:"long"}),A:()=>c(s,r),AA:()=>c(s,r,!1,!0),a:()=>c(s,r,!0),aa:()=>c(s,r,!0,!0)};return i.replace(Y,(m,M)=>{var u;return M||((u=d[m])==null?void 0:u.call(d))||m})}const b=t=>/,\s*\{/.test(t)||!(t.startsWith("http")||t.startsWith("data:")||t.startsWith("blob:"));function A(t){return location.origin+"/image?path="+encodeURIComponent(t)+"&url="+encodeURIComponent(sessionStorage.getItem("bookUrl"))+"&width="+S().config.readWidth}const W=t=>{let i=new Date().getTime(),e=Math.floor((i-t)/1e3),a="";return e<=30?a="":e<60?a=e+"":e<3600?a=Math.floor(e/60)+"":e<86400?a=Math.floor(e/3600)+"":e<2592e3?a=Math.floor(e/86400)+"":a=z(new Date(t),"YYYY-MM-DD"),a},$='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path fill="currentColor" d="M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32zm0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32zm448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32zm-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32zM195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0zm-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"/></svg>';const U=(t,i,e=$)=>{const a=L(!1);let o=null;const n=()=>a.value=!1,l=()=>a.value=!0;p(a,r=>{if(!r)return o==null?void 0:o.close();o=D.service({target:v(t),spinner:e,text:i,lock:!0,background:"rgba(0, 0, 0, 0)"})});const s=r=>{if(!(r instanceof Promise))throw TypeError("loadingWrapper argument must be Promise");return l(),r.finally(n)};return w(()=>{n()}),{isLoading:a,showLoading:l,closeLoading:n,loadingWrapper:s}};export{W as d,A as g,b as i,U as u};
import{u as S}from"./index-e7b92a96.js";import{z as L,K as p,a5 as w,ae as D,u as v}from"./vendor-b9134af1.js";const Y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;function y(t,i,e,a){let o=t<12?"AM":"PM";return a&&(o=o.split("").reduce((n,l)=>n+=`${l}.`,"")),e?o.toLowerCase():o}function z(t,i,e={}){var a;const o=t.getFullYear(),n=t.getMonth(),l=t.getDate(),s=t.getHours(),r=t.getMinutes(),g=t.getSeconds(),f=t.getMilliseconds(),h=t.getDay(),c=(a=e.customMeridiem)!=null?a:y,d={YY:()=>String(o).slice(-2),YYYY:()=>o,M:()=>n+1,MM:()=>`${n+1}`.padStart(2,"0"),MMM:()=>t.toLocaleDateString(e.locales,{month:"short"}),MMMM:()=>t.toLocaleDateString(e.locales,{month:"long"}),D:()=>String(l),DD:()=>`${l}`.padStart(2,"0"),H:()=>String(s),HH:()=>`${s}`.padStart(2,"0"),h:()=>`${s%12||12}`.padStart(1,"0"),hh:()=>`${s%12||12}`.padStart(2,"0"),m:()=>String(r),mm:()=>`${r}`.padStart(2,"0"),s:()=>String(g),ss:()=>`${g}`.padStart(2,"0"),SSS:()=>`${f}`.padStart(3,"0"),d:()=>h,dd:()=>t.toLocaleDateString(e.locales,{weekday:"narrow"}),ddd:()=>t.toLocaleDateString(e.locales,{weekday:"short"}),dddd:()=>t.toLocaleDateString(e.locales,{weekday:"long"}),A:()=>c(s,r),AA:()=>c(s,r,!1,!0),a:()=>c(s,r,!0),aa:()=>c(s,r,!0,!0)};return i.replace(Y,(m,M)=>{var u;return M||((u=d[m])==null?void 0:u.call(d))||m})}const b=t=>/,\s*\{/.test(t)||!(t.startsWith("http")||t.startsWith("data:")||t.startsWith("blob:"));function A(t){return location.origin+"/image?path="+encodeURIComponent(t)+"&url="+encodeURIComponent(sessionStorage.getItem("bookUrl"))+"&width="+S().config.readWidth}const W=t=>{let i=new Date().getTime(),e=Math.floor((i-t)/1e3),a="";return e<=30?a="":e<60?a=e+"":e<3600?a=Math.floor(e/60)+"":e<86400?a=Math.floor(e/3600)+"":e<2592e3?a=Math.floor(e/86400)+"":a=z(new Date(t),"YYYY-MM-DD"),a},$='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path fill="currentColor" d="M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32zm0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32zm448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32zm-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32zM195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0zm-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"/></svg>';const U=(t,i,e=$)=>{const a=L(!1);let o=null;const n=()=>a.value=!1,l=()=>a.value=!0;p(a,r=>{if(!r)return o==null?void 0:o.close();o=D.service({target:v(t),spinner:e,text:i,lock:!0,background:"rgba(0, 0, 0, 0)"})});const s=r=>{if(!(r instanceof Promise))throw TypeError("loadingWrapper argument must be Promise");return l(),r.finally(n)};return w(()=>{n()}),{isLoading:a,showLoading:l,closeLoading:n,loadingWrapper:s}};export{W as d,A as g,b as i,U as u};

View File

@@ -4,10 +4,10 @@
<meta charset="UTF-8" />
<link rel="icon" href="./favicon.ico" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<script type="module" crossorigin src="./assets/index-aa0dac2e.js"></script>
<script type="module" crossorigin src="./assets/index-e7b92a96.js"></script>
<link rel="modulepreload" crossorigin href="./assets/vendor-b9134af1.js">
<link rel="stylesheet" href="./assets/vendor-5578283d.css">
<link rel="stylesheet" href="./assets/index-f9e374f2.css">
<link rel="stylesheet" href="./assets/index-bd50a38f.css">
</head>
<body>

View File

@@ -78,6 +78,7 @@
"watch": true,
"watchEffect": true,
"watchPostEffect": true,
"watchSyncEffect": true
"watchSyncEffect": true,
"toValue": true
}
}
}

View File

@@ -3,7 +3,7 @@ import fs from "node:fs";
const LEGADO_ASSETS_WEB_VUE_DIR = new URL(
"../../../app/src/main/assets/web/vue",
import.meta.url
import.meta.url,
);
const VUE_DIST_DIR = new URL("../dist", import.meta.url);
@@ -33,8 +33,8 @@ fs.rm(
throw error;
}
console.log("> cp success");
}
},
);
});
}
},
);

View File

@@ -30,7 +30,7 @@ const saveBookProgressWithBeacon = (bookProgress) => {
// 常规请求可能会被取消 使用Fetch keep-alive 或者 navigator.sendBeacon
navigator.sendBeacon(
`${import.meta.env.VITE_API || location.origin}/saveBookProgress`,
JSON.stringify(bookProgress)
JSON.stringify(bookProgress),
);
};
@@ -41,19 +41,19 @@ const getChapterList = (/** @type {string} */ bookUrl) =>
const getBookContent = (
/** @type {string} */ bookUrl,
/** @type {number} */ chapterIndex
/** @type {number} */ chapterIndex,
) =>
ajax.get(
"/getBookContent?url=" +
encodeURIComponent(bookUrl) +
"&index=" +
chapterIndex
chapterIndex,
);
const search = (
/** @type {string} */ searchKey,
/** @type {(data: string) => void} */ onReceive,
/** @type {() => void} */ onFinish
/** @type {() => void} */ onFinish,
) => {
// webSocket
const url = `ws://${hostname}:${Number(port) + 1}/searchBook`;
@@ -97,7 +97,7 @@ const debug = (
/** @type {string} */ sourceUrl,
/** @type {string} */ searchKey,
/** @type {(data: string) => void} */ onReceive,
/** @type {() => void} */ onFinish
/** @type {() => void} */ onFinish,
) => {
// webSocket
const url = `ws://${hostname}:${Number(port) + 1}/${

View File

@@ -61,6 +61,7 @@ declare global {
const toRaw: typeof import('vue')['toRaw']
const toRef: typeof import('vue')['toRef']
const toRefs: typeof import('vue')['toRefs']
const toValue: typeof import('vue')['toValue']
const triggerRef: typeof import('vue')['triggerRef']
const unref: typeof import('vue')['unref']
const useAttrs: typeof import('vue')['useAttrs']

View File

@@ -62,7 +62,7 @@ const getCover = (coverUrl) => {
};
const subJustify = computed(() =>
props.isSearch ? "space-between" : "flex-start"
props.isSearch ? "space-between" : "flex-start",
);
</script>

View File

@@ -59,7 +59,7 @@ const paragraphRef = ref();
const scrollToReadedLength = (length) => {
if (length === 0) return;
let paragraphIndex = chapterPos.value.findIndex(
(wordCount) => wordCount >= length
(wordCount) => wordCount >= length,
);
if (paragraphIndex === -1) return;
nextTick(() => {
@@ -81,14 +81,14 @@ onMounted(() => {
emit(
"readedLengthChange",
props.chapterIndex,
parseInt(target.dataset.chapterpos)
parseInt(target.dataset.chapterpos),
);
}
}
},
{
rootMargin: `0px 0px -${window.innerHeight - 24}px 0px`,
}
},
);
intersectionObserver.observe(titleRef.value);
paragraphRef.value.forEach((element) => {
@@ -105,8 +105,12 @@ onUnmounted(() => {
<style lang="scss" scoped>
.title {
margin-bottom: 57px;
font: 24px / 32px PingFangSC-Regular, HelveticaNeue-Light,
"Helvetica Neue Light", "Microsoft YaHei", sans-serif;
font:
24px / 32px PingFangSC-Regular,
HelveticaNeue-Light,
"Helvetica Neue Light",
"Microsoft YaHei",
sans-serif;
}
p {

View File

@@ -106,8 +106,12 @@ onUpdated(() => {
//width: 50%;
height: 40px;
cursor: pointer;
font: 16px / 40px PingFangSC-Regular, HelveticaNeue-Light,
"Helvetica Neue Light", "Microsoft YaHei", sans-serif;
font:
16px / 40px PingFangSC-Regular,
HelveticaNeue-Light,
"Helvetica Neue Light",
"Microsoft YaHei",
sans-serif;
}
}

View File

@@ -362,7 +362,10 @@ const uploadConfig = (config) => {
list-style: none outside none;
i {
font: 12px / 16px PingFangSC-Regular, "-apple-system", Simsun;
font:
12px / 16px PingFangSC-Regular,
"-apple-system",
Simsun;
display: inline-block;
min-width: 48px;
margin-right: 16px;
@@ -410,8 +413,12 @@ const uploadConfig = (config) => {
text-align: center;
vertical-align: middle;
display: inline-block;
font: 14px / 34px PingFangSC-Regular, HelveticaNeue-Light,
"Helvetica Neue Light", "Microsoft YaHei", sans-serif;
font:
14px / 34px PingFangSC-Regular,
HelveticaNeue-Light,
"Helvetica Neue Light",
"Microsoft YaHei",
sans-serif;
}
.font-item-input {
width: 168px;

View File

@@ -31,7 +31,7 @@ watch(
() => store.isDebuging,
() => {
if (store.isDebuging) startDebug();
}
},
);
const appendDebugMsg = (msg) => {
@@ -46,7 +46,7 @@ const startDebug = async () => {
store.currentSourceUrl,
searchKey.value || store.searchKey,
appendDebugMsg,
store.debugFinish
store.debugFinish,
);
};

View File

@@ -211,8 +211,8 @@ const buttons = ref(
{ name: "↶撤销操作", hotKeys: [], action: undo },
{ name: "↷重做操作", hotKeys: [], action: redo },
{ name: "⇏调试源", hotKeys: [], action: debug },
{ name: "✓保存源", hotKeys: [], action: saveSource }
)
{ name: "✓保存源", hotKeys: [], action: saveSource },
),
);
const hotkeysDialogVisible = ref(true);
@@ -250,7 +250,7 @@ watch(
buttons.value[recordKeyDownIndex.value].hotKeys = pressedKeys;
});
},
{ immediate: true }
{ immediate: true },
);
const recordKeyDown = (index) => {

View File

@@ -225,7 +225,7 @@ const checkPageWidth = (readWidth) => {
};
watch(
() => store.config.readWidth,
(width) => checkPageWidth(width)
(width) => checkPageWidth(width),
);
// 顶部底部跳转
const top = ref();
@@ -285,8 +285,8 @@ const getContent = (index, reloadChapter = true, chapterPos = 0) => {
chapterData.value.push({ index, content, title });
store.setShowContent(true);
throw err;
}
)
},
),
);
};
@@ -498,8 +498,8 @@ onMounted(() => {
(err) => {
ElMessage({ message: "获取书籍目录失败", type: "error" });
throw err;
}
)
},
),
);
});
@@ -624,7 +624,9 @@ onUnmounted(() => {
.day {
:deep(.popup) {
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
box-shadow:
0 2px 4px rgba(0, 0, 0, 0.12),
0 0 6px rgba(0, 0, 0, 0.04);
}
:deep(.tool-icon) {
@@ -645,7 +647,9 @@ onUnmounted(() => {
.night {
:deep(.popup) {
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.48), 0 0 6px rgba(0, 0, 0, 0.16);
box-shadow:
0 2px 4px rgba(0, 0, 0, 0.48),
0 0 6px rgba(0, 0, 0, 0.16);
}
:deep(.tool-icon) {

View File

@@ -29,7 +29,7 @@
readingRecent.name,
readingRecent.author,
readingRecent.chapterIndex,
readingRecent.chapterPos
readingRecent.chapterPos,
)
"
:class="{ 'no-point': readingRecent.url == '' }"
@@ -100,7 +100,7 @@ const readingRecent = ref({
const shelfWrapper = ref(null);
const { showLoading, closeLoading, loadingWrapper } = useLoading(
shelfWrapper,
"正在获取书籍信息"
"正在获取书籍信息",
);
const books = ref([]);
@@ -144,7 +144,7 @@ const searchBook = () => {
if (books.value.length == 0) {
ElMessage.info("搜索结果为空");
}
}
},
);
};
@@ -195,7 +195,7 @@ onMounted(() => {
store
.saveBookProgress()
//确保各种网络情况下同步请求先完成
.finally(fetchBookShelfData)
.finally(fetchBookShelfData),
);
});
const fetchBookShelfData = () => {
@@ -209,7 +209,7 @@ const fetchBookShelfData = () => {
var x = a["durChapterTime"] || 0;
var y = b["durChapterTime"] || 0;
return y - x;
})
}),
);
} else {
ElMessage.error(response.data.errorMsg);