diff --git a/modules/web/src/components/SourceDebug.vue b/modules/web/src/components/SourceDebug.vue index 7c17dc194..f3bd89c9c 100644 --- a/modules/web/src/components/SourceDebug.vue +++ b/modules/web/src/components/SourceDebug.vue @@ -56,7 +56,7 @@ const startDebug = async () => { }; const isBookSource = computed(() => { - return /bookSource/.test(window.location.href); + return /bookSource/i.test(window.location.href); }); diff --git a/modules/web/src/components/SourceItem.vue b/modules/web/src/components/SourceItem.vue index a85c0bb97..b52c3b9be 100644 --- a/modules/web/src/components/SourceItem.vue +++ b/modules/web/src/components/SourceItem.vue @@ -2,7 +2,7 @@ const store = useSourceStore(); defineProps(["config"]); -const currentSource = store.currentSource; + +const currentSource = computed(() => store.currentSource); +/* +修改currentSource的属性 没有直接修改本身 +const { currentSource } = storeToRefs(store); + */