Load the OpenHarmony web page [Nut Pie]

Load the OpenHarmony web page

Load online web page

The use of Web components is very simple. You only need to create a Web component in the ArkTS file in the Page directory and pass in two parameters. Among them, src specifies the referenced web page path, and controller is the controller of the component. The Web component is bound through the controller to control the Web component.

Step 1: Create a new Page

image-20230825223345987

Step 2: Import the module

import web_webview from '@ohos.web.webview'

Step Three: Use the Controller

   controller: web_webview.WebviewController = 

Guess you like

Origin blog.csdn.net/qq_39132095/article/details/133938487