|
@@ -85,7 +85,7 @@
|
|
|
<div class="title" :index="data.index" v-if="showContent">
|
|
<div class="title" :index="data.index" v-if="showContent">
|
|
|
{{ data.title }}
|
|
{{ data.title }}
|
|
|
</div>
|
|
</div>
|
|
|
- <chapter-content :carray="data.content" v-if="showContent"/>
|
|
|
|
|
|
|
+ <chapter-content :carray="data.content" v-if="showContent" />
|
|
|
</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>
|
|
@@ -105,7 +105,7 @@ const loadingSerive = ref(null);
|
|
|
const content = ref();
|
|
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,
|
|
@@ -139,15 +139,13 @@ const {
|
|
|
showContent,
|
|
showContent,
|
|
|
} = storeToRefs(store);
|
|
} = storeToRefs(store);
|
|
|
|
|
|
|
|
-const { chapterPos, index: chapterIndex} = toRefs(store.readingBook);
|
|
|
|
|
|
|
+const { chapterPos, index: chapterIndex } = toRefs(store.readingBook);
|
|
|
|
|
|
|
|
const { theme, infiniteLoading } = toRefs(store.config);
|
|
const { theme, infiniteLoading } = toRefs(store.config);
|
|
|
|
|
|
|
|
// 主题部分
|
|
// 主题部分
|
|
|
const bodyColor = computed(() => settings.themes[theme.value].body);
|
|
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 popupColor = computed(() => settings.themes[theme.value].popup);
|
|
|
|
|
|
|
|
const readWidth = computed(() => {
|
|
const readWidth = computed(() => {
|
|
@@ -215,7 +213,6 @@ watch(popupColor, (color) => {
|
|
|
rightBarTheme.value.background = color;
|
|
rightBarTheme.value.background = color;
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
-
|
|
|
|
|
watchEffect(() => {
|
|
watchEffect(() => {
|
|
|
if (chapterData.value.length > 0) {
|
|
if (chapterData.value.length > 0) {
|
|
|
store.setContentLoading(false);
|
|
store.setContentLoading(false);
|