diff --git a/src/main/ets/pages/XWebview.ets b/src/main/ets/pages/XWebview.ets index 37efbc1..5efbdb3 100644 --- a/src/main/ets/pages/XWebview.ets +++ b/src/main/ets/pages/XWebview.ets @@ -159,7 +159,7 @@ export struct XWebview { .visibility(this.progress > 95 || this.progress == 0 ? Visibility.None : Visibility.Visible) .width('100%') - Web({ src: this.url ?? 'www.example.com', controller: this.controller }) + Web({ src: this.url ?? '', controller: this.controller }) .javaScriptAccess(true) .javaScriptProxy({ object: XWebManager.objs.get(this._uuidToHtml), @@ -249,9 +249,7 @@ export struct XWebview { } if (this.content) { try { - this.controller.loadData(this.content, - "text/html", - "UTF-8", '', '') + this.controller.loadData(this.content, 'text/html', 'UTF-8', " ", " ") } catch (e) { ToolsHelper.showAlertDialog({ title: '警告',