Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/hap-dsl-xvm/src/loaders/command-loader.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2024-present, the hapjs-platform Project Contributors
/* Copyright (c) 2024-present, the hapjs-platform Project Contributors
* SPDX-License-Identifier: Apache-2.0
*/
export default function commandLoader(source) {
Expand All @@ -10,4 +10,4 @@ export default function commandLoader(source) {
throw new Error(`${this.resourcePath} 中的 <data> 解析失败,请检查是否为标准的 JSON 格式\n${e}`)
}
return `module.exports = ${JSON.stringify(jsonObj)}`
}
}
4 changes: 2 additions & 2 deletions packages/hap-dsl-xvm/src/loaders/ux-fragment-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const defaultLoaders = {
'extract-css': resolveSync('./extract-css-loader.js'),
// honor loader
datapp: resolveSync('./datapp-loader.js'),
command: resolveSync('./command-loader.js'),
command: resolveSync('./command-loader.js')
// end honor loader
}

Expand Down Expand Up @@ -686,6 +686,6 @@ export {
parseImportList,
// honor process frag
processDataAppFrag,
processCommandFrag,
processCommandFrag
// end honor process frag
}
10 changes: 5 additions & 5 deletions packages/hap-server/src/preview/views/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,18 @@
}
</style>
<script src="hap-preview://index.js"></script>
<script type="text/javascript">
if (`{{devtoolUrl}}`) {
document.write('<script src="{{devtoolUrl}}">\x3C/script>')
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\x3C 转义的形式,为什么只写了一处? 应该都转义或者都不转义?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

转义处的这个符号不转义飘红报错,都转义的话语义化也不好

</script>
<!-- https://statres.quickapp.cn/quickapp/ide/web.js -->
<script src="{{webJsUrl}}"></script>
<script type="text/javascript">
if (!window.Hap) {
document.write('<script src="/preview-static/web.js">\x3C/script>')
}
</script>
<script type="text/javascript">
if (`{{devtoolUrl}}`) {
document.write('<script src="{{devtoolUrl}}">\x3C/script>')
}
</script>
<script type="text/javascript">
var base = '/preview'
var type = '{{ type }}'
Expand Down
Loading