闫增涛
2024-05-22 d07c2414b1d7be4a0d601c10987589bd2db83598
src/App.vue
@@ -1,23 +1,37 @@
<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>