File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed
hap-server/src/preview/views Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 1- /* Copyright (c) 2024-present, the hapjs-platform Project Contributors
1+ /* Copyright (c) 2024-present, the hapjs-platform Project Contributors
22 * SPDX-License-Identifier: Apache-2.0
33 */
44export default function commandLoader ( source ) {
@@ -10,4 +10,4 @@ export default function commandLoader(source) {
1010 throw new Error ( `${ this . resourcePath } 中的 <data> 解析失败,请检查是否为标准的 JSON 格式\n${ e } ` )
1111 }
1212 return `module.exports = ${ JSON . stringify ( jsonObj ) } `
13- }
13+ }
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ const defaultLoaders = {
4444 'extract-css' : resolveSync ( './extract-css-loader.js' ) ,
4545 // honor loader
4646 datapp : resolveSync ( './datapp-loader.js' ) ,
47- command : resolveSync ( './command-loader.js' ) ,
47+ command : resolveSync ( './command-loader.js' )
4848 // end honor loader
4949}
5050
@@ -686,6 +686,6 @@ export {
686686 parseImportList ,
687687 // honor process frag
688688 processDataAppFrag ,
689- processCommandFrag ,
689+ processCommandFrag
690690 // end honor process frag
691691}
Original file line number Diff line number Diff line change 8686 }
8787 </ style >
8888 < script src ="hap-preview://index.js "> </ script >
89+ < script type ="text/javascript ">
90+ if ( `{{devtoolUrl}}` ) {
91+ document . write ( '<script src="{{devtoolUrl}}">\x3C/script>' )
92+ }
93+ </ script >
8994 <!-- https://statres.quickapp.cn/quickapp/ide/web.js -->
9095 < script src ="{{webJsUrl}} "> </ script >
9196 < script type ="text/javascript ">
9297 if ( ! window . Hap ) {
9398 document . write ( '<script src="/preview-static/web.js">\x3C/script>' )
9499 }
95100 </ script >
96- < script type ="text/javascript ">
97- if ( `{{devtoolUrl}}` ) {
98- document . write ( '<script src="{{devtoolUrl}}">\x3C/script>' )
99- }
100- </ script >
101101 < script type ="text/javascript ">
102102 var base = '/preview'
103103 var type = '{{ type }}'
You can’t perform that action at this time.
0 commit comments