Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
ad7223db
D
Docs
项目概览
OpenHarmony
/
Docs
接近 2 年 前同步成功
通知
159
Star
292
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
ad7223db
编写于
3月 08, 2022
作者:
L
lixingchi1
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add the Web doc for 1.0.
Signed-off-by:
N
lixingchi1
<
lixingchi1@huawei.com
>
上级
3a95d3c9
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
75 addition
and
4 deletion
+75
-4
zh-cn/application-dev/reference/arkui-js/Readme-CN.md
zh-cn/application-dev/reference/arkui-js/Readme-CN.md
+1
-0
zh-cn/application-dev/reference/arkui-js/js-components-basic-web.md
...ication-dev/reference/arkui-js/js-components-basic-web.md
+70
-0
zh-cn/application-dev/reference/arkui-ts/Readme-CN.md
zh-cn/application-dev/reference/arkui-ts/Readme-CN.md
+4
-4
未找到文件。
zh-cn/application-dev/reference/arkui-js/Readme-CN.md
浏览文件 @
ad7223db
...
...
@@ -60,6 +60,7 @@
- [toolbar](js-components-basic-toolbar.md)
- [toolbar-item](js-components-basic-toolbar-item.md)
- [toggle](js-components-basic-toggle.md)
- [web](js-components-basic-web.md)
- [媒体组件](js-components-media.md)
- [video](js-components-media-video.md)
...
...
zh-cn/application-dev/reference/arkui-js/js-components-basic-web.md
0 → 100644
浏览文件 @
ad7223db
# web
展示网页内容的组件。
> **说明:**
> 该组件从API version 6开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。
## 权限列表
ohos.permission.INTERNET
## 约束
web组件不跟随转场动画。一个页面仅支持一个web组件。
## 子组件
不支持。
## 属性
| 名称 | 参数类型 | 默认值 | 必填 | 描述 |
| -------- | -------- | -------- | -------- | -------- |
| src | string | - | 否 |设置需要显示网页的地址,网址的域名必须为https协议且经过ICP备案。|
| id | string | - | 否 | 组件的唯一标识。 |
## 样式
不支持通用样式设置。
## 事件
仅支持如下事件:
| 名称 | 参数 | 描述 |
| -------- | -------- | -------- |
| pagestart | {url: string} | 加载网页时触发。 |
| pagefinish | {url: string} | 网页加载结束时触发。 |
| error | {url: string, errorCode: number, description: string} | 加载网页出现错误时触发或打开网页出错时触发。 |
## 方法
仅支持如下方法:
| 名称 | 参数 | 描述 |
| -------- | -------- | -------- |
| reload | - | 重新加载页面。 |
## 示例
```
<!-- xxx.hml -->
<div style="height: 500px; width: 500px; flex-direction: column;">
<button onclick="reloadWeb">click to reload</button>
<web src="www.example.com" id="web" onpagestart="pageStart" onpagefinish="pageFinish" on:error="pageError"></web>
</div>
```
```
<!-- xxx.js -->
export default {
reloadWeb() {
this.$element('web').reload()
},
pageStart: function(e) {
console.info('web pageStart: ' + e.url)
},
pageFinish: function(e) {
console.info('web pageFinish: ' + e.url)
},
pageError: function(e) {
console.info('web pageError url: ' + e.url)
console.info('web pageError errorCode: ' + e.errorCode)
console.info('web pageError description: ' + e.description)
}
}
```
\ No newline at end of file
zh-cn/application-dev/reference/arkui-ts/Readme-CN.md
浏览文件 @
ad7223db
...
...
@@ -57,22 +57,22 @@
-
[
Divider
](
ts-basic-components-divider.md
)
-
[
Image
](
ts-basic-components-image.md
)
-
[
ImageAnimator
](
ts-basic-components-imageanimator.md
)
-
[
LoadingProgress
](
ts-basic-components-loadingprogress.md
)
-
[
Progress
](
ts-basic-components-progress.md
)
-
[
QRCode
](
ts-basic-components-qrcode.md
)
-
[
Radio
](
ts-basic-components-radio.md
)
-
[
Rating
](
ts-basic-components-rating.md
)
-
[
S
pan
](
ts-basic-components-span
.md
)
-
[
S
elect
](
ts-basic-components-select
.md
)
-
[
Slider
](
ts-basic-components-slider.md
)
-
[
Span
](
ts-basic-components-span.md
)
-
[
Text
](
ts-basic-components-text.md
)
-
[
TextArea
](
ts-basic-components-textarea.md
)
-
[
TextInput
](
ts-basic-components-textinput.md
)
-
[
TextPicker
](
ts-basic-components-textpicker.md
)
-
[
TextTimer
](
ts-basic-components-texttimer.md
)
-
[
Toggle
](
ts-basic-components-toggle.md
)
-
[
Select
](
ts-basic-components-select.md
)
-
[
TextClock
](
ts-basic-components-textclock.md
)
-
[
LoadingProgress
](
ts-basic-components-loadingprogress.md
)
-
[
Web
](
ts-media-components-web.md
)
-
[
Web
](
ts-basic-components-web.md
)
-
容器组件
-
[
AlphabetIndexer
](
ts-container-alphabet-indexer.md
)
-
[
Badge
](
ts-container-badge.md
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录