提交 85cee149 编写于 作者: L lixingchi1

lixingchi1@huawei.com

Signed-off-by: Nlixingchi1 <lixingchi1@huawei.com>
上级 361662f9
......@@ -99,9 +99,9 @@ struct WebComponent {
controller: WebController = new WebController();
build() {
Column() {
Web(src: $rawfile('index.html'), controller: this.controller)
.javaScriptAccess(javaScriptAccess)
.fileAccess(fileAccess)
Web({ src: $rawfile('index.html'), controller: this.controller })
.javaScriptAccess(this.javaScriptAccess)
.fileAccess(this.fileAccess)
.onPageEnd(e => {
// test() 在 index.html 中已定义
this.controller.runJavaScript('test()');
......@@ -110,8 +110,9 @@ struct WebComponent {
}
}
}
// index.html
```
```
<!-- index.html -->
<!DOCTYPE html>
<html>
<meta charset="utf-8">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册