| | |
| | | import App from "./App.vue"; |
| | | import less from "less"; |
| | | import "./books/childHealth/assets/main.less"; |
| | | // import './books/content/css/default.less' |
| | | import ElementUI from "element-ui"; |
| | | import "element-ui/lib/theme-chalk/index.css"; |
| | | import store from "./store"; |
| | |
| | | let instance = null; |
| | | |
| | | function render(props = {}) { |
| | | const { container } = props; |
| | | const { container, onGlobalStateChange, setGlobalState } = props; |
| | | Vue.prototype.onGlobalStateChange = onGlobalStateChange; |
| | | Vue.prototype.setGlobalState = setGlobalState; |
| | | Vue.prototype.container = container; |
| | | instance = new Vue({ |
| | | // router, |
| | | store, |
| | |
| | | }); |
| | | |
| | | props.setGlobalState({ |
| | | state: 3 // 应用挂载完成,同时用于触发一次stateChange将state挂载在vuex当中 |
| | | state: 3, // 应用挂载完成,同时用于触发一次stateChange将state挂载在vuex当中 |
| | | bookName: config.activeBook.bookName, |
| | | bookId: config.activeBook.bookId |
| | | }); |
| | | |
| | | render(props); |
| | |
| | | // export async function update(props) { |
| | | // render(props); |
| | | // } |
| | | |