From 0a465050c773d8b420f2b99d598de3d5dc9aef2b Mon Sep 17 00:00:00 2001 From: YM <479443481@qq.com> Date: 星期五, 17 五月 2024 15:45:28 +0800 Subject: [PATCH] Merge branch 'master' of http://182.92.203.7:2001/r/testbookLayout --- src/main.js | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main.js b/src/main.js index 07be28c..6ffb576 100644 --- a/src/main.js +++ b/src/main.js @@ -2,6 +2,7 @@ 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"; @@ -30,7 +31,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 +59,9 @@ }); props.setGlobalState({ - state: 3 // 搴旂敤鎸傝浇瀹屾垚锛屽悓鏃剁敤浜庤Е鍙戜竴娆tateChange灏唖tate鎸傝浇鍦╲uex褰撲腑 + state: 3, // 搴旂敤鎸傝浇瀹屾垚锛屽悓鏃剁敤浜庤Е鍙戜竴娆tateChange灏唖tate鎸傝浇鍦╲uex褰撲腑 + bookName: config.activeBook.bookName, + bookId: config.activeBook.bookId }); render(props); @@ -70,4 +76,3 @@ // export async function update(props) { // render(props); // } - -- Gitblit v1.9.1