| | |
| | | <template> |
| | | <div id="app"> |
| | | <childHealth v-if="config.activeBook.name == 'childHealth'"></childHealth> |
| | | <book v-if="config.activeBook.name == 'content'"></book> |
| | | <embedded v-if="config.activeBook.name == 'embedded'" ></embedded> |
| | | <childHealth v-if="activeBook.name == 'childHealth'"></childHealth> |
| | | <book v-if="activeBook.name == 'content'"></book> |
| | | <embedded v-if="activeBook.name == 'embedded'"></embedded> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import childHealth from "./books/childHealth/view/index.vue"; |
| | | import book from './books/content/index.vue' |
| | | import embedded from "./books/embedded/view/index.vue" |
| | | import book from "./books/content/index.vue"; |
| | | import embedded from "./books/embedded/view/index.vue"; |
| | | |
| | | export default { |
| | | name: "App", |
| | | components: { |
| | | childHealth, |
| | | book, |
| | | embedded |
| | | embedded, |
| | | }, |
| | | data() { |
| | | return { |
| | | activeBook: {}, |
| | | }; |
| | | }, |
| | | async created() { |
| | | this.activeBook = await this.config.getBookConfig(); |
| | | console.log('图书',this.activeBook); |
| | | if (this.$store.state.qiankun,this.$store.state.qiankun.getBookConfig) { |
| | | this.$store.state.qiankun.getBookConfig({ |
| | | bookConfig: this.activeBook, |
| | | }); |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | |