From cc232247648ea4cd6b4d3909bb71caea61e388e1 Mon Sep 17 00:00:00 2001
From: 闫增涛 <1829501689@qq.com>
Date: 星期三, 15 五月 2024 23:10:06 +0800
Subject: [PATCH] 第二本书

---
 src/main.js |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/main.js b/src/main.js
index 07be28c..454cb9c 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