web-view
承载网页的容器。
属性 | 类型 | 默认值 | 必填 | 说明 | 最低版本 |
---|---|---|---|---|---|
src | String | 否 | 网页的链接 | ||
progress-color | Color | #00cac4 | 否 | 进度条颜色 | |
disable-title | Boolean | false | 否 | 导航栏标题是否随网页变换 | |
bindload | EventHandler | 否 | 网页加载成功时候触发此事件。e.detail = { src } | ||
binderror | EventHandler | 否 | 网页加载失败的时候触发此事件。e.detail = { src } |
示例代码:
<!--pages/component/pages/web-view/web-view.mcml-->
<view class="container" style="background-color:red">
<web-view src="https://www.morecross.cn"></web-view>
</view>