Xwite 3 лет назад
Родитель
Сommit
ee060ad753

+ 1 - 1
modules/web/.env.development

@@ -1 +1 @@
-VITE_API=http://192.168.10.5:1122
+VITE_API=http://192.168.10.11:1122

+ 7 - 7
modules/web/package.json

@@ -13,22 +13,22 @@
     "@element-plus/icons-vue": "^2.1.0",
     "@element-plus/icons-vue": "^2.1.0",
     "@vueuse/shared": "^9.13.0",
     "@vueuse/shared": "^9.13.0",
     "axios": "^1.3.5",
     "axios": "^1.3.5",
-    "element-plus": "^2.3.1",
-    "pinia": "^2.0.33",
+    "element-plus": "^2.3.3",
+    "hotkeys-js": "^3.10.2",
+    "pinia": "^2.0.34",
     "vue": "^3.2.47",
     "vue": "^3.2.47",
-    "vue-router": "^4.1.6",
-    "hotkeys-js": "^3.10.1"
+    "vue-router": "^4.1.6"
   },
   },
   "devDependencies": {
   "devDependencies": {
     "@vitejs/plugin-vue": "^4.1.0",
     "@vitejs/plugin-vue": "^4.1.0",
-    "eslint": "^8.37.0",
+    "eslint": "^8.38.0",
     "eslint-config-prettier": "^8.8.0",
     "eslint-config-prettier": "^8.8.0",
     "eslint-plugin-prettier": "^4.2.1",
     "eslint-plugin-prettier": "^4.2.1",
     "eslint-plugin-vue": "^9.10.0",
     "eslint-plugin-vue": "^9.10.0",
     "prettier": "^2.8.7",
     "prettier": "^2.8.7",
-    "sass": "^1.60.0",
+    "sass": "^1.61.0",
     "unplugin-auto-import": "^0.15.2",
     "unplugin-auto-import": "^0.15.2",
-    "unplugin-icons": "^0.16.0",
+    "unplugin-icons": "^0.16.1",
     "unplugin-vue-components": "^0.24.1",
     "unplugin-vue-components": "^0.24.1",
     "vite": "^4.2.1"
     "vite": "^4.2.1"
   }
   }

+ 11 - 18
modules/web/src/views/BookChapter.vue

@@ -82,10 +82,10 @@
       <div class="content">
       <div class="content">
         <div class="top-bar" ref="top"></div>
         <div class="top-bar" ref="top"></div>
         <div v-for="data in chapterData" :key="data.index" ref="chapter">
         <div v-for="data in chapterData" :key="data.index" ref="chapter">
-          <div class="title" :index="data.index">
+          <div class="title" :index="data.index" v-if="show">
             {{ data.title }}
             {{ data.title }}
           </div>
           </div>
-          <chapter-content :carray="data.content" />
+          <chapter-content :carray="data.content" v-if="show"/>
         </div>
         </div>
         <div class="loading" ref="loading"></div>
         <div class="loading" ref="loading"></div>
         <div class="bottom-bar" ref="bottom"></div>
         <div class="bottom-bar" ref="bottom"></div>
@@ -102,13 +102,14 @@ import loadingSvg from "@element-plus/icons-svg/loading.svg?raw";
 
 
 const showLoading = ref(false);
 const showLoading = ref(false);
 const loadingSerive = ref(null);
 const loadingSerive = ref(null);
+const content = ref();
+
 watch(showLoading, (loading) => {
 watch(showLoading, (loading) => {
-  if (!loading) return loadingSerive.value?.close();
+ if (!loading) return loadingSerive.value?.close();
   loadingSerive.value = ElLoading.service({
   loadingSerive.value = ElLoading.service({
     target: content.value,
     target: content.value,
     spinner: loadingSvg,
     spinner: loadingSvg,
     text: "正在获取信息",
     text: "正在获取信息",
-    backgroud: "rgb(0,0,0,0)",
     lock: true,
     lock: true,
   });
   });
 });
 });
@@ -121,7 +122,6 @@ try {
 } catch {
 } catch {
   localStorage.removeItem("config");
   localStorage.removeItem("config");
 }
 }
-const content = ref();
 const loading = ref();
 const loading = ref();
 
 
 const noPoint = ref(true);
 const noPoint = ref(true);
@@ -141,10 +141,10 @@ const {
   popCataVisible,
   popCataVisible,
   readSettingsVisible,
   readSettingsVisible,
   config,
   config,
-  showContent: show,
-  miniInterface,
+  miniInterface
 } = storeToRefs(store);
 } = storeToRefs(store);
 
 
+const show = computed(()=>store.showContent)
 const theme = computed(() => config.value.theme);
 const theme = computed(() => config.value.theme);
 
 
 const bodyColor = computed(() => settings.themes[config.value.theme].body);
 const bodyColor = computed(() => settings.themes[config.value.theme].body);
@@ -212,8 +212,7 @@ watchEffect(() => {
 });
 });
 
 
 watchEffect(() => {
 watchEffect(() => {
-  document.title = catalog.value[chapterIndex.value]?.title;
-  console.log(chapterIndex.value, store.readingBook.index);
+  document.title = catalog.value[chapterIndex.value]?.title || document.title;
   store.saveBookProcess();
   store.saveBookProcess();
 });
 });
 const isNight = ref(false);
 const isNight = ref(false);
@@ -652,15 +651,6 @@ onUnmounted(() => {
     }
     }
   }
   }
 
 
-  .chapter-bar {
-    .el-breadcrumb {
-      .item {
-        font-size: 14px;
-        color: #606266;
-      }
-    }
-  }
-
   .chapter {
   .chapter {
     font-family: "Microsoft YaHei", PingFangSC-Regular, HelveticaNeue-Light,
     font-family: "Microsoft YaHei", PingFangSC-Regular, HelveticaNeue-Light,
       "Helvetica Neue Light", sans-serif;
       "Helvetica Neue Light", sans-serif;
@@ -670,6 +660,9 @@ onUnmounted(() => {
     width: 670px;
     width: 670px;
     margin: 0 auto;
     margin: 0 auto;
 
 
+    :deep(.el-loading-mask) {
+      background-color: rgba(0, 0, 0, 0);
+    }
     :deep(.el-loading-spinner) {
     :deep(.el-loading-spinner) {
       font-size: 36px;
       font-size: 36px;
       color: #b5b5b5;
       color: #b5b5b5;

+ 3 - 2
modules/web/src/views/BookShelf.vue

@@ -101,7 +101,6 @@ watch(showLoading, (loading) => {
     target: shelfWrapper.value,
     target: shelfWrapper.value,
     spinner: loadingSvg,
     spinner: loadingSvg,
     text: "正在获取书籍信息",
     text: "正在获取书籍信息",
-    backgroud: "rgb(247,247,247)",
     lock: true,
     lock: true,
   });
   });
 });
 });
@@ -326,7 +325,9 @@ const fetchBookShelfData = () => {
     width: 100%;
     width: 100%;
     display: flex;
     display: flex;
     flex-direction: column;
     flex-direction: column;
-
+    :deep(.el-loading-mask) {
+      background-color: rgba(0, 0, 0, 0);
+    }
     :deep(.el-loading-spinner) {
     :deep(.el-loading-spinner) {
       font-size: 36px;
       font-size: 36px;
       color: #b5b5b5;
       color: #b5b5b5;