WebView
Requires:
@ray-js/ray≥0.6.9
Description
A container that hosts web pages; in Mini Programs it typically fills the entire page. When a page contains a web-view tag, other elements are not displayed, and you cannot apply any styles to it.
Props
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
src | string | No | "" | The URL loaded by webview. You must sign in to the Mini Program management console and configure the webview domain at Mini Program Details -> Development Settings -> Multi-zone Server Domains -> webview whitelisted domains. |
| No | - | Triggers when the page fails to load | ||
| No | - | Triggers when the page loads successfully | ||
| No | - | Triggers at specific times and delivers the messages when the page posts to the mini program (back navigation, component teardown, sharing) | ||
updateLayout | unknown | No | - | Used for cross-layer components to notify the container layer to update styles |
Examples
Basic usage
Scan with SmartLife App to Try
Download Sample Code