fix: web书籍部分图片加载失败
This commit is contained in:
@@ -85,7 +85,7 @@
|
||||
<div class="title" :index="data.index" v-if="showContent">
|
||||
{{ data.title }}
|
||||
</div>
|
||||
<chapter-content :carray="data.content" v-if="showContent"/>
|
||||
<chapter-content :carray="data.content" v-if="showContent" />
|
||||
</div>
|
||||
<div class="loading" ref="loading"></div>
|
||||
<div class="bottom-bar" ref="bottom"></div>
|
||||
@@ -105,7 +105,7 @@ const loadingSerive = ref(null);
|
||||
const content = ref();
|
||||
|
||||
watch(showLoading, (loading) => {
|
||||
if (!loading) return loadingSerive.value?.close();
|
||||
if (!loading) return loadingSerive.value?.close();
|
||||
loadingSerive.value = ElLoading.service({
|
||||
target: content.value,
|
||||
spinner: loadingSvg,
|
||||
@@ -139,15 +139,13 @@ const {
|
||||
showContent,
|
||||
} = storeToRefs(store);
|
||||
|
||||
const { chapterPos, index: chapterIndex} = toRefs(store.readingBook);
|
||||
const { chapterPos, index: chapterIndex } = toRefs(store.readingBook);
|
||||
|
||||
const { theme, infiniteLoading } = toRefs(store.config);
|
||||
|
||||
// 主题部分
|
||||
const bodyColor = computed(() => settings.themes[theme.value].body);
|
||||
const chapterColor = computed(
|
||||
() => settings.themes[theme.value].content
|
||||
);
|
||||
const chapterColor = computed(() => settings.themes[theme.value].content);
|
||||
const popupColor = computed(() => settings.themes[theme.value].popup);
|
||||
|
||||
const readWidth = computed(() => {
|
||||
@@ -215,7 +213,6 @@ watch(popupColor, (color) => {
|
||||
rightBarTheme.value.background = color;
|
||||
});
|
||||
|
||||
|
||||
watchEffect(() => {
|
||||
if (chapterData.value.length > 0) {
|
||||
store.setContentLoading(false);
|
||||
|
||||
@@ -147,7 +147,7 @@ const searchBook = () => {
|
||||
() => {
|
||||
showLoading.value = false;
|
||||
if (books.value.length == 0) {
|
||||
ElMessage.info("搜索结果为空")
|
||||
ElMessage.info("搜索结果为空");
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -224,7 +224,7 @@ const fetchBookShelfData = () => {
|
||||
showLoading.value = false;
|
||||
store.setConnectType("danger");
|
||||
store.setConnectStatus("连接失败");
|
||||
ElMessage.error("后端连接失败")
|
||||
ElMessage.error("后端连接失败");
|
||||
store.setNewConnect(false);
|
||||
throw error;
|
||||
});
|
||||
|
||||
@@ -34,10 +34,5 @@ if (/bookSource/i.test(location.href)) {
|
||||
width: 360px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
#loading {
|
||||
position: fixed;
|
||||
top: 100px;
|
||||
left: 90vw;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user