YM
2024-05-15 d3d71f644755f2396ce21b5027f0177a80ed89c9
src/main.js
@@ -30,7 +30,10 @@
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,
@@ -55,7 +58,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 +75,3 @@
// export async function update(props) {
//   render(props);
// }