闫增涛
2024-05-15 172907557aceaa4622f2ca5ed084d32693da1724
src/main.js
@@ -30,7 +30,9 @@
let instance = null;
function render(props = {}) {
  const { container } = props;
  const { container, onGlobalStateChange, setGlobalState } = props;
  Vue.prototype.onGlobalStateChange = onGlobalStateChange;
  Vue.prototype.setGlobalState = setGlobalState;
  instance = new Vue({
    // router,
    store,
@@ -55,7 +57,9 @@
  });
  props.setGlobalState({
    state: 3 // 应用挂载完成,同时用于触发一次stateChange将state挂载在vuex当中
    state: 3, // 应用挂载完成,同时用于触发一次stateChange将state挂载在vuex当中
    bookName: config.activeBook.bookName,
    bookId: config.activeBook.bookId
  });
  render(props);
@@ -70,4 +74,3 @@
// export async function update(props) {
//   render(props);
// }