Skip to content

Commit e65c144

Browse files
author
幾米
committed
vue Devtools 只有调试模式启用支持
1 parent a287e17 commit e65c144

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎box/chavy.boxjs.js‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ async function handlePage() {
124124
const isDebugWeb = [true, 'true'].includes($.getdata('@chavy_boxjs_userCfgs.isDebugWeb'))
125125
const cache = $.getjson($.KEY_web_cache, null)
126126
if (!isDebugWeb && cache && cache.version === $.version) {
127-
$.html = cache.cache.replace('vue.min.js', 'vue.js')
127+
$.html = cache.cache
128128
} else {
129129
await $.http.get($.web).then(
130130
(resp) => {
@@ -156,6 +156,11 @@ async function handlePage() {
156156
* 所以先渲染到 `boxServerData: null` 再由前端 `this.box = this.boxServerData` 实现双向绑定
157157
*/
158158
$.html = $.html.replace('boxServerData: null', 'boxServerData:' + JSON.stringify(getBoxData()))
159+
160+
// 调试模式支持 vue Devtools
161+
if(isDebugWeb) {
162+
$.html = $.html.replace('vue.min.js', 'vue.js');
163+
}
159164
}
160165

161166
/**

0 commit comments

Comments
 (0)