diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-media-components-web.md b/zh-cn/application-dev/reference/arkui-ts/ts-media-components-web.md index 21715b36a87c33444f5d6cba03d0dd84a1070a03..b3b66f73de298f6585b49417bfe132b0b0eaaadf 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-media-components-web.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-media-components-web.md @@ -114,9 +114,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()'); @@ -125,8 +125,9 @@ struct WebComponent { } } } - -// index.html +``` +``` +