Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
7cb6ddcf
D
Docs
项目概览
OpenHarmony
/
Docs
大约 2 年 前同步成功
通知
161
Star
293
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看板
未验证
提交
7cb6ddcf
编写于
8月 18, 2022
作者:
O
openharmony_ci
提交者:
Gitee
8月 18, 2022
浏览文件
操作
浏览文件
下载
差异文件
!8257 【轻量级 PR】:【OpenHarmony开源贡献者计划2022】代码缩进格式化
Merge pull request !8257 from 喝可乐的猫/N/A
上级
e944ee53
23eac04c
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
55 addition
and
55 deletion
+55
-55
zh-cn/application-dev/reference/arkui-ts/ts-basic-components-web.md
...ication-dev/reference/arkui-ts/ts-basic-components-web.md
+55
-55
未找到文件。
zh-cn/application-dev/reference/arkui-ts/ts-basic-components-web.md
浏览文件 @
7cb6ddcf
...
@@ -30,10 +30,10 @@ Web(options: { src: string, controller?: WebController })
...
@@ -30,10 +30,10 @@ Web(options: { src: string, controller?: WebController })
@
Entry
@
Entry
@
Component
@
Component
struct
WebComponent
{
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
controller
:
WebController
=
new
WebController
();
build
()
{
build
()
{
Column
()
{
Column
()
{
Web
({
src
:
'
www.example.com
'
,
controller
:
this
.
controller
})
Web
({
src
:
'
www.example.com
'
,
controller
:
this
.
controller
})
}
}
}
}
}
}
...
@@ -64,10 +64,10 @@ domStorageAccess(domStorageAccess: boolean)
...
@@ -64,10 +64,10 @@ domStorageAccess(domStorageAccess: boolean)
@
Entry
@
Entry
@
Component
@
Component
struct
WebComponent
{
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
controller
:
WebController
=
new
WebController
();
build
()
{
build
()
{
Column
()
{
Column
()
{
Web
({
src
:
'
www.example.com
'
,
controller
:
this
.
controller
})
Web
({
src
:
'
www.example.com
'
,
controller
:
this
.
controller
})
.
domStorageAccess
(
true
)
.
domStorageAccess
(
true
)
}
}
}
}
...
@@ -118,10 +118,10 @@ fileFromUrlAccess(fileFromUrlAccess: boolean)
...
@@ -118,10 +118,10 @@ fileFromUrlAccess(fileFromUrlAccess: boolean)
@
Entry
@
Entry
@
Component
@
Component
struct
WebComponent
{
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
controller
:
WebController
=
new
WebController
();
build
()
{
build
()
{
Column
()
{
Column
()
{
Web
({
src
:
'
www.example.com
'
,
controller
:
this
.
controller
})
Web
({
src
:
'
www.example.com
'
,
controller
:
this
.
controller
})
.
fileFromUrlAccess
(
true
)
.
fileFromUrlAccess
(
true
)
}
}
}
}
...
@@ -145,10 +145,10 @@ imageAccess(imageAccess: boolean)
...
@@ -145,10 +145,10 @@ imageAccess(imageAccess: boolean)
@
Entry
@
Entry
@
Component
@
Component
struct
WebComponent
{
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
controller
:
WebController
=
new
WebController
();
build
()
{
build
()
{
Column
()
{
Column
()
{
Web
({
src
:
'
www.example.com
'
,
controller
:
this
.
controller
})
Web
({
src
:
'
www.example.com
'
,
controller
:
this
.
controller
})
.
imageAccess
(
true
)
.
imageAccess
(
true
)
}
}
}
}
...
@@ -175,7 +175,7 @@ javaScriptProxy(javaScriptProxy: { object: object, name: string, methodList: Arr
...
@@ -175,7 +175,7 @@ javaScriptProxy(javaScriptProxy: { object: object, name: string, methodList: Arr
@
Entry
@
Entry
@
Component
@
Component
struct
WebComponent
{
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
controller
:
WebController
=
new
WebController
();
testObj
=
{
testObj
=
{
test
:
(
data1
,
data2
,
data3
)
=>
{
test
:
(
data1
,
data2
,
data3
)
=>
{
console
.
log
(
"
data1:
"
+
data1
);
console
.
log
(
"
data1:
"
+
data1
);
...
@@ -189,7 +189,7 @@ javaScriptProxy(javaScriptProxy: { object: object, name: string, methodList: Arr
...
@@ -189,7 +189,7 @@ javaScriptProxy(javaScriptProxy: { object: object, name: string, methodList: Arr
}
}
build
()
{
build
()
{
Column
()
{
Column
()
{
Web
({
src
:
'
www.example.com
'
,
controller
:
this
.
controller
})
Web
({
src
:
'
www.example.com
'
,
controller
:
this
.
controller
})
.
javaScriptAccess
(
true
)
.
javaScriptAccess
(
true
)
.
javaScriptProxy
({
.
javaScriptProxy
({
object
:
this
.
testObj
,
object
:
this
.
testObj
,
...
@@ -219,10 +219,10 @@ javaScriptAccess(javaScriptAccess: boolean)
...
@@ -219,10 +219,10 @@ javaScriptAccess(javaScriptAccess: boolean)
@
Entry
@
Entry
@
Component
@
Component
struct
WebComponent
{
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
controller
:
WebController
=
new
WebController
();
build
()
{
build
()
{
Column
()
{
Column
()
{
Web
({
src
:
'
www.example.com
'
,
controller
:
this
.
controller
})
Web
({
src
:
'
www.example.com
'
,
controller
:
this
.
controller
})
.
javaScriptAccess
(
true
)
.
javaScriptAccess
(
true
)
}
}
}
}
...
@@ -246,11 +246,11 @@ mixedMode(mixedMode: MixedMode)
...
@@ -246,11 +246,11 @@ mixedMode(mixedMode: MixedMode)
@
Entry
@
Entry
@
Component
@
Component
struct
WebComponent
{
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
controller
:
WebController
=
new
WebController
();
@
State
mode
:
MixedMode
=
MixedMode
.
All
;
@
State
mode
:
MixedMode
=
MixedMode
.
All
;
build
()
{
build
()
{
Column
()
{
Column
()
{
Web
({
src
:
'
www.example.com
'
,
controller
:
this
.
controller
})
Web
({
src
:
'
www.example.com
'
,
controller
:
this
.
controller
})
.
mixedMode
(
this
.
mode
)
.
mixedMode
(
this
.
mode
)
}
}
}
}
...
@@ -274,10 +274,10 @@ onlineImageAccess(onlineImageAccess: boolean)
...
@@ -274,10 +274,10 @@ onlineImageAccess(onlineImageAccess: boolean)
@
Entry
@
Entry
@
Component
@
Component
struct
WebComponent
{
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
controller
:
WebController
=
new
WebController
();
build
()
{
build
()
{
Column
()
{
Column
()
{
Web
({
src
:
'
www.example.com
'
,
controller
:
this
.
controller
})
Web
({
src
:
'
www.example.com
'
,
controller
:
this
.
controller
})
.
onlineImageAccess
(
true
)
.
onlineImageAccess
(
true
)
}
}
}
}
...
@@ -301,10 +301,10 @@ zoomAccess(zoomAccess: boolean)
...
@@ -301,10 +301,10 @@ zoomAccess(zoomAccess: boolean)
@
Entry
@
Entry
@
Component
@
Component
struct
WebComponent
{
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
controller
:
WebController
=
new
WebController
();
build
()
{
build
()
{
Column
()
{
Column
()
{
Web
({
src
:
'
www.example.com
'
,
controller
:
this
.
controller
})
Web
({
src
:
'
www.example.com
'
,
controller
:
this
.
controller
})
.
zoomAccess
(
true
)
.
zoomAccess
(
true
)
}
}
}
}
...
@@ -328,10 +328,10 @@ overviewModeAccess(overviewModeAccess: boolean)
...
@@ -328,10 +328,10 @@ overviewModeAccess(overviewModeAccess: boolean)
@
Entry
@
Entry
@
Component
@
Component
struct
WebComponent
{
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
controller
:
WebController
=
new
WebController
();
build
()
{
build
()
{
Column
()
{
Column
()
{
Web
({
src
:
'
www.example.com
'
,
controller
:
this
.
controller
})
Web
({
src
:
'
www.example.com
'
,
controller
:
this
.
controller
})
.
overviewModeAccess
(
true
)
.
overviewModeAccess
(
true
)
}
}
}
}
...
@@ -355,10 +355,10 @@ databaseAccess(databaseAccess: boolean)
...
@@ -355,10 +355,10 @@ databaseAccess(databaseAccess: boolean)
@
Entry
@
Entry
@
Component
@
Component
struct
WebComponent
{
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
controller
:
WebController
=
new
WebController
();
build
()
{
build
()
{
Column
()
{
Column
()
{
Web
({
src
:
'
www.example.com
'
,
controller
:
this
.
controller
})
Web
({
src
:
'
www.example.com
'
,
controller
:
this
.
controller
})
.
databaseAccess
(
true
)
.
databaseAccess
(
true
)
}
}
}
}
...
@@ -382,10 +382,10 @@ geolocationAccess(geolocationAccess: boolean)
...
@@ -382,10 +382,10 @@ geolocationAccess(geolocationAccess: boolean)
@
Entry
@
Entry
@
Component
@
Component
struct
WebComponent
{
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
controller
:
WebController
=
new
WebController
();
build
()
{
build
()
{
Column
()
{
Column
()
{
Web
({
src
:
'
www.example.com
'
,
controller
:
this
.
controller
})
Web
({
src
:
'
www.example.com
'
,
controller
:
this
.
controller
})
.
geolocationAccess
(
true
)
.
geolocationAccess
(
true
)
}
}
}
}
...
@@ -409,11 +409,11 @@ cacheMode(cacheMode: CacheMode)
...
@@ -409,11 +409,11 @@ cacheMode(cacheMode: CacheMode)
@
Entry
@
Entry
@
Component
@
Component
struct
WebComponent
{
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
controller
:
WebController
=
new
WebController
();
@
State
mode
:
CacheMode
=
CacheMode
.
None
;
@
State
mode
:
CacheMode
=
CacheMode
.
None
;
build
()
{
build
()
{
Column
()
{
Column
()
{
Web
({
src
:
'
www.example.com
'
,
controller
:
this
.
controller
})
Web
({
src
:
'
www.example.com
'
,
controller
:
this
.
controller
})
.
cacheMode
(
this
.
mode
)
.
cacheMode
(
this
.
mode
)
}
}
}
}
...
@@ -437,11 +437,11 @@ textZoomRatio(textZoomRatio: number)
...
@@ -437,11 +437,11 @@ textZoomRatio(textZoomRatio: number)
@
Entry
@
Entry
@
Component
@
Component
struct
WebComponent
{
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
controller
:
WebController
=
new
WebController
();
@
State
atio
:
number
=
150
;
@
State
atio
:
number
=
150
;
build
()
{
build
()
{
Column
()
{
Column
()
{
Web
({
src
:
'
www.example.com
'
,
controller
:
this
.
controller
})
Web
({
src
:
'
www.example.com
'
,
controller
:
this
.
controller
})
.
textZoomRatio
(
this
.
atio
)
.
textZoomRatio
(
this
.
atio
)
}
}
}
}
...
@@ -465,11 +465,11 @@ userAgent(userAgent: string)
...
@@ -465,11 +465,11 @@ userAgent(userAgent: string)
@
Entry
@
Entry
@
Component
@
Component
struct
WebComponent
{
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
controller
:
WebController
=
new
WebController
();
@
State
userAgent
:
string
=
'
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36
'
;
@
State
userAgent
:
string
=
'
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36
'
;
build
()
{
build
()
{
Column
()
{
Column
()
{
Web
({
src
:
'
www.example.com
'
,
controller
:
this
.
controller
})
Web
({
src
:
'
www.example.com
'
,
controller
:
this
.
controller
})
.
userAgent
(
this
.
userAgent
)
.
userAgent
(
this
.
userAgent
)
}
}
}
}
...
@@ -508,10 +508,10 @@ onAlert(callback: (event?: { url: string; message: string; result: JsResult }) =
...
@@ -508,10 +508,10 @@ onAlert(callback: (event?: { url: string; message: string; result: JsResult }) =
@
Entry
@
Entry
@
Component
@
Component
struct
WebComponent
{
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
controller
:
WebController
=
new
WebController
();
build
()
{
build
()
{
Column
()
{
Column
()
{
Web
({
src
:
'
www.example.com
'
,
controller
:
this
.
controller
})
Web
({
src
:
'
www.example.com
'
,
controller
:
this
.
controller
})
.
onAlert
((
event
)
=>
{
.
onAlert
((
event
)
=>
{
AlertDialog
.
show
({
AlertDialog
.
show
({
title
:
'
title
'
,
title
:
'
title
'
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录