web书架: 判断同步的阅读宽度是否超出当前设备

This commit is contained in:
Xwite
2023-05-15 22:51:01 +08:00
parent ed803f0c94
commit de9d9c3562
13 changed files with 37 additions and 37 deletions
+1 -1
View File
@@ -49,7 +49,7 @@
</div>
</template>
<script setup>
import { dateFormat } from "../plugins/utils";
import { dateFormat } from "../utils/utils";
const props = defineProps(["books", "isSearch"]);
const emit = defineEmits(["bookClick"]);
const handleClick = (book) => emit("bookClick", book);
@@ -18,7 +18,7 @@
</template>
<script setup>
import { getImageFromLegado, isLegadoUrl } from "@/plugins/utils";
import { getImageFromLegado, isLegadoUrl } from "@/utils/utils";
import jump from "@/plugins/jump";
const props = defineProps({
+1 -1
View File
@@ -21,7 +21,7 @@
<script setup>
import VirtualList from "vue3-virtual-scroll-list";
import settings from "../plugins/config";
import settings from "../config/themeConfig";
import "../assets/fonts/popfont.css";
import CatalogItem from "./CatalogItem.vue";
+3 -2
View File
@@ -163,7 +163,7 @@
<script setup>
import "../assets/fonts/popfont.css";
import "../assets/fonts/iconfont.css";
import settings from "../plugins/config";
import settings from "../config/themeConfig";
import API from "@api";
const store = useBookStore();
@@ -295,7 +295,8 @@ const readWidth = computed(() => {
return store.config.readWidth;
});
const moreReadWidth = () => {
/*if (config.value.readWidth < 960)*/
// 此时会截断页面
if (config.value.readWidth + 160 + 2 * 68 > window.innerWidth) return;
config.value.readWidth += 160;
saveConfig(config.value);
};