From e296b2bd6cebec047d9406476bf6a7eb323deff9 Mon Sep 17 00:00:00 2001 From: YM <479443481@qq.com> Date: 星期三, 22 五月 2024 21:00:05 +0800 Subject: [PATCH] 调整 --- src/App.vue | 26 ++++++++++++++++++-------- 1 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/App.vue b/src/App.vue index e0274e7..e27c01e 100644 --- a/src/App.vue +++ b/src/App.vue @@ -11,7 +11,7 @@ import childHealth from "./books/childHealth/view/index.vue"; import book from "./books/content/index.vue"; import embedded from "./books/embedded/view/index.vue"; -import english from "./books/English/view/index.vue" +import english from "./books/English/view/index.vue"; export default { name: "App", @@ -23,18 +23,28 @@ }, data() { return { - activeBook: {}, + activeBook: {} }; }, async created() { - this.activeBook = this.thisBookConfig; - console.log('鍥句功',this.activeBook); - if (this.$store.state.qiankun,this.$store.state.qiankun.getBookConfig) { - this.$store.state.qiankun.getBookConfig({ - bookConfig: this.activeBook, + if (this.setGlobalState) { + this.setGlobalState({ + initTestBook: async (bookId) => { + this.activeBook = await this.config.getBookConfig(bookId); + console.log("鍥句功", this.activeBook); + if ( + (this.$store.state.qiankun, this.$store.state.qiankun.getBookConfig) + ) { + this.$store.state.qiankun.getBookConfig({ + bookConfig: this.activeBook + }); + } + } }); + } else { + this.activeBook = await this.config.getBookConfig(); } - }, + } }; </script> -- Gitblit v1.9.1