Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
243ecd50
D
Docs
项目概览
OpenHarmony
/
Docs
大约 1 年 前同步成功
通知
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
243ecd50
编写于
7月 27, 2022
作者:
T
tianyu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update docs
Signed-off-by:
N
tianyu
<
tianyu55@h-partners.com
>
上级
acea059c
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
33 addition
and
31 deletion
+33
-31
zh-cn/application-dev/reference/apis/js-apis-router.md
zh-cn/application-dev/reference/apis/js-apis-router.md
+2
-2
zh-cn/application-dev/reference/arkui-js/js-components-canvas-canvasgradient.md
...reference/arkui-js/js-components-canvas-canvasgradient.md
+1
-1
zh-cn/application-dev/reference/arkui-js/js-components-canvas-path2d.md
...ion-dev/reference/arkui-js/js-components-canvas-path2d.md
+11
-11
zh-cn/application-dev/reference/arkui-ts/ts-basic-components-image.md
...ation-dev/reference/arkui-ts/ts-basic-components-image.md
+4
-4
zh-cn/application-dev/reference/arkui-ts/ts-basic-components-remotewindow.md
...ev/reference/arkui-ts/ts-basic-components-remotewindow.md
+8
-6
zh-cn/application-dev/reference/arkui-ts/ts-basic-gestures-pinchgesture.md
...-dev/reference/arkui-ts/ts-basic-gestures-pinchgesture.md
+3
-3
zh-cn/application-dev/reference/arkui-ts/ts-container-flex.md
...n/application-dev/reference/arkui-ts/ts-container-flex.md
+4
-4
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-router.md
浏览文件 @
243ecd50
...
@@ -133,7 +133,7 @@ back(options?: RouterOptions ): void
...
@@ -133,7 +133,7 @@ back(options?: RouterOptions ): void
**示例:**
**示例:**
```
js
```
js
router
.
back
({
ur
i
:
'
pages/detail
'
});
router
.
back
({
ur
l
:
'
pages/detail
'
});
```
```
## router.clear
## router.clear
...
@@ -313,7 +313,7 @@ export default {
...
@@ -313,7 +313,7 @@ export default {
// 在detail页面中
// 在detail页面中
export
default
{
export
default
{
onInit
()
{
onInit
()
{
console
.
info
(
'
showData1:
'
+
router
.
getParams
()
.
data1
);
console
.
info
(
'
showData1:
'
+
router
.
getParams
()
[
data1
]
);
}
}
}
}
```
```
...
...
zh-cn/application-dev/reference/arkui-js/js-components-canvas-canvasgradient.md
浏览文件 @
243ecd50
...
@@ -22,7 +22,7 @@ addColorStop(offset: number, color: string): void
...
@@ -22,7 +22,7 @@ addColorStop(offset: number, color: string): void
```
html
```
html
<!-- xxx.hml -->
<!-- xxx.hml -->
<div>
<div>
<canvas
ref=
"canvas"
style=
"width: 500px; height: 500px; background-color: #ffff00;"
</
canvas
>
<canvas
ref=
"canvas"
style=
"width: 500px; height: 500px; background-color: #ffff00;"
>
</canvas>
<input
type=
"button"
style=
"width: 180px; height: 60px;"
value=
"fillStyle"
onclick=
"handleClick"
/>
<input
type=
"button"
style=
"width: 180px; height: 60px;"
value=
"fillStyle"
onclick=
"handleClick"
/>
</div>
</div>
```
```
...
...
zh-cn/application-dev/reference/arkui-js/js-components-canvas-path2d.md
浏览文件 @
243ecd50
...
@@ -21,7 +21,7 @@ addPath(path: Object): void
...
@@ -21,7 +21,7 @@ addPath(path: Object): void
```
html
```
html
<!-- xxx.hml -->
<!-- xxx.hml -->
<div>
<div>
<canvas
ref=
"canvas"
style=
"width: 500px; height: 500px; background-color: #ffff00;"
</
canvas
>
<canvas
ref=
"canvas"
style=
"width: 500px; height: 500px; background-color: #ffff00;"
>
</canvas>
</div>
</div>
```
```
...
@@ -61,7 +61,7 @@ setTransform(scaleX: number, skewX: number, skewY: number, scaleY: number, trans
...
@@ -61,7 +61,7 @@ setTransform(scaleX: number, skewX: number, skewY: number, scaleY: number, trans
```
html
```
html
<!-- xxx.hml -->
<!-- xxx.hml -->
<div>
<div>
<canvas
ref=
"canvas"
style=
"width: 200px; height: 150px; background-color: #ffff00;"
</
canvas
>
<canvas
ref=
"canvas"
style=
"width: 200px; height: 150px; background-color: #ffff00;"
>
</canvas>
</div>
</div>
```
```
...
@@ -91,7 +91,7 @@ closePath(): void
...
@@ -91,7 +91,7 @@ closePath(): void
```
html
```
html
<!-- xxx.hml -->
<!-- xxx.hml -->
<div>
<div>
<canvas
ref=
"canvas"
style=
"width: 200px; height: 150px; background-color: #ffff00;"
</
canvas
>
<canvas
ref=
"canvas"
style=
"width: 200px; height: 150px; background-color: #ffff00;"
>
</canvas>
</div>
</div>
```
```
...
@@ -130,7 +130,7 @@ moveTo(x: number, y: number): void
...
@@ -130,7 +130,7 @@ moveTo(x: number, y: number): void
```
html
```
html
<!-- xxx.hml -->
<!-- xxx.hml -->
<div>
<div>
<canvas
ref=
"canvas"
style=
"width: 300px; height: 250px; background-color: #ffff00;"
</
canvas
>
<canvas
ref=
"canvas"
style=
"width: 300px; height: 250px; background-color: #ffff00;"
>
</canvas>
</div>
</div>
```
```
...
@@ -169,7 +169,7 @@ lineTo(x: number, y: number): void
...
@@ -169,7 +169,7 @@ lineTo(x: number, y: number): void
```
html
```
html
<!-- xxx.hml -->
<!-- xxx.hml -->
<div>
<div>
<canvas
ref=
"canvas"
style=
"width: 400px; height: 450px; background-color: #ffff00;"
</
canvas
>
<canvas
ref=
"canvas"
style=
"width: 400px; height: 450px; background-color: #ffff00;"
>
</canvas>
</div>
</div>
```
```
...
@@ -213,7 +213,7 @@ bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number,
...
@@ -213,7 +213,7 @@ bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number,
```
html
```
html
<!-- xxx.hml -->
<!-- xxx.hml -->
<div>
<div>
<canvas
ref=
"canvas"
style=
"width: 200px; height: 150px; background-color: #ffff00;"
</
canvas
>
<canvas
ref=
"canvas"
style=
"width: 200px; height: 150px; background-color: #ffff00;"
>
</canvas>
</div>
</div>
```
```
...
@@ -252,7 +252,7 @@ quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void
...
@@ -252,7 +252,7 @@ quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void
```
html
```
html
<!-- xxx.hml -->
<!-- xxx.hml -->
<div>
<div>
<canvas
ref=
"canvas"
style=
"width: 200px; height: 150px; background-color: #ffff00;"
</
canvas
>
<canvas
ref=
"canvas"
style=
"width: 200px; height: 150px; background-color: #ffff00;"
>
</canvas>
</div>
</div>
```
```
...
@@ -293,7 +293,7 @@ arc(x: number, y: number, radius: number, startAngle: number, endAngle: number,
...
@@ -293,7 +293,7 @@ arc(x: number, y: number, radius: number, startAngle: number, endAngle: number,
```
html
```
html
<!-- xxx.hml -->
<!-- xxx.hml -->
<div>
<div>
<canvas
ref=
"canvas"
style=
"width: 200px; height: 150px; background-color: #ffff00;"
</
canvas
>
<canvas
ref=
"canvas"
style=
"width: 200px; height: 150px; background-color: #ffff00;"
>
</canvas>
</div>
</div>
```
```
...
@@ -332,7 +332,7 @@ arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void
...
@@ -332,7 +332,7 @@ arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void
```
html
```
html
<!-- xxx.hml -->
<!-- xxx.hml -->
<div>
<div>
<canvas
ref=
"canvas"
style=
"width: 200px; height: 150px; background-color: #ffff00;"
</
canvas
>
<canvas
ref=
"canvas"
style=
"width: 200px; height: 150px; background-color: #ffff00;"
>
</canvas>
</div>
</div>
```
```
...
@@ -374,7 +374,7 @@ ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number
...
@@ -374,7 +374,7 @@ ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number
```
html
```
html
<!-- xxx.hml -->
<!-- xxx.hml -->
<div>
<div>
<canvas
ref=
"canvas"
style=
"width: 500px; height: 450px; background-color: #ffff00;"
</
canvas
>
<canvas
ref=
"canvas"
style=
"width: 500px; height: 450px; background-color: #ffff00;"
>
</canvas>
</div>
</div>
```
```
...
@@ -412,7 +412,7 @@ rect(x: number, y: number, width: number, height: number): void
...
@@ -412,7 +412,7 @@ rect(x: number, y: number, width: number, height: number): void
```
html
```
html
<!-- xxx.hml -->
<!-- xxx.hml -->
<div>
<div>
<canvas
ref=
"canvas"
style=
"width: 500px; height: 450px; background-color: #ffff00;"
</
canvas
>
<canvas
ref=
"canvas"
style=
"width: 500px; height: 450px; background-color: #ffff00;"
>
</canvas>
</div>
</div>
```
```
...
...
zh-cn/application-dev/reference/arkui-ts/ts-basic-components-image.md
浏览文件 @
243ecd50
...
@@ -234,8 +234,8 @@ struct ImageExample2 {
...
@@ -234,8 +234,8 @@ struct ImageExample2 {
@
Entry
@
Entry
@
Component
@
Component
struct
ImageExample3
{
struct
ImageExample3
{
@
State
width
:
number
=
0
@
State
width
Value
:
number
=
0
@
State
height
:
number
=
0
@
State
height
Value
:
number
=
0
private
on
:
Resource
=
$r
(
'
app.media.image_on
'
)
private
on
:
Resource
=
$r
(
'
app.media.image_on
'
)
private
off
:
Resource
=
$r
(
'
app.media.image_off
'
)
private
off
:
Resource
=
$r
(
'
app.media.image_off
'
)
private
on2off
:
Resource
=
$r
(
'
app.media.image_on2off
'
)
private
on2off
:
Resource
=
$r
(
'
app.media.image_on2off
'
)
...
@@ -256,8 +256,8 @@ struct ImageExample3 {
...
@@ -256,8 +256,8 @@ struct ImageExample3 {
.
height
(
180
).
width
(
180
)
.
height
(
180
).
width
(
180
)
// 图片加载完成后,获取图片尺寸。
// 图片加载完成后,获取图片尺寸。
.
onComplete
((
msg
:
{
width
:
number
,
height
:
number
})
=>
{
.
onComplete
((
msg
:
{
width
:
number
,
height
:
number
})
=>
{
this
.
width
=
msg
.
width
this
.
width
Value
=
msg
.
width
this
.
height
=
msg
.
height
this
.
height
Value
=
msg
.
height
})
})
.
onError
(()
=>
{
.
onError
(()
=>
{
console
.
log
(
'
load image fail
'
)
console
.
log
(
'
load image fail
'
)
...
...
zh-cn/application-dev/reference/arkui-ts/ts-basic-components-remotewindow.md
浏览文件 @
243ecd50
...
@@ -61,13 +61,15 @@ struct RemoteWindowExample {
...
@@ -61,13 +61,15 @@ struct RemoteWindowExample {
@
State
target
:
WindowAnimationTarget
=
undefined
// 通过windowAnimationManager获取
@
State
target
:
WindowAnimationTarget
=
undefined
// 通过windowAnimationManager获取
build
()
{
build
()
{
RemoteWindow
(
this
.
target
)
Column
()
{
.
translate
({
x
:
100
,
y
:
200
})
RemoteWindow
(
this
.
target
)
.
scale
({
x
:
0.5
,
y
:
0.5
})
.
translate
({
x
:
100
,
y
:
200
})
.
scale
({
x
:
0.5
,
y
:
0.5
})
.
opacity
(
0.8
)
.
opacity
(
0.8
)
.
position
({
x
:
px2vp
(
this
.
target
?.
windowBounds
.
left
),
y
:
px2vp
(
this
.
target
?.
windowBounds
.
top
)})
.
position
({
x
:
px2vp
(
this
.
target
?.
windowBounds
.
left
),
y
:
px2vp
(
this
.
target
?.
windowBounds
.
top
)})
.
width
(
px2vp
(
this
.
target
?.
windowBounds
.
width
))
.
width
(
px2vp
(
this
.
target
?.
windowBounds
.
width
))
.
height
(
px2vp
(
this
.
target
?.
windowBounds
.
height
))
.
height
(
px2vp
(
this
.
target
?.
windowBounds
.
height
))
}
}
}
}
}
```
```
\ No newline at end of file
zh-cn/application-dev/reference/arkui-ts/ts-basic-gestures-pinchgesture.md
浏览文件 @
243ecd50
...
@@ -46,21 +46,21 @@ PinchGesture(options?: { fingers?: number, distance?: number })
...
@@ -46,21 +46,21 @@ PinchGesture(options?: { fingers?: number, distance?: number })
@
Entry
@
Entry
@
Component
@
Component
struct
PinchGestureExample
{
struct
PinchGestureExample
{
@
State
scale
:
number
=
1
@
State
scale
Value
:
number
=
1
build
()
{
build
()
{
Flex
({
direction
:
FlexDirection
.
Column
,
alignItems
:
ItemAlign
.
Center
,
justifyContent
:
FlexAlign
.
SpaceBetween
})
{
Flex
({
direction
:
FlexDirection
.
Column
,
alignItems
:
ItemAlign
.
Center
,
justifyContent
:
FlexAlign
.
SpaceBetween
})
{
Text
(
'
PinchGesture scale:
'
+
this
.
scale
)
Text
(
'
PinchGesture scale:
'
+
this
.
scale
)
}
}
.
height
(
100
).
width
(
200
).
padding
(
20
).
border
({
width
:
1
}).
margin
(
80
)
.
height
(
100
).
width
(
200
).
padding
(
20
).
border
({
width
:
1
}).
margin
(
80
)
.
scale
({
x
:
this
.
scale
,
y
:
this
.
scale
,
z
:
this
.
scal
e
})
.
scale
({
x
:
this
.
scale
Value
,
y
:
this
.
scaleValue
,
z
:
this
.
scaleValu
e
})
.
gesture
(
.
gesture
(
PinchGesture
()
PinchGesture
()
.
onActionStart
((
event
:
GestureEvent
)
=>
{
.
onActionStart
((
event
:
GestureEvent
)
=>
{
console
.
info
(
'
Pinch start
'
)
console
.
info
(
'
Pinch start
'
)
})
})
.
onActionUpdate
((
event
:
GestureEvent
)
=>
{
.
onActionUpdate
((
event
:
GestureEvent
)
=>
{
this
.
scale
=
event
.
scale
this
.
scale
Value
=
event
.
scale
})
})
.
onActionEnd
(()
=>
{
.
onActionEnd
(()
=>
{
console
.
info
(
'
Pinch end
'
)
console
.
info
(
'
Pinch end
'
)
...
...
zh-cn/application-dev/reference/arkui-ts/ts-container-flex.md
浏览文件 @
243ecd50
...
@@ -40,10 +40,10 @@ Flex(options?: { direction?: FlexDirection, wrap?: FlexWrap, justifyContent?: F
...
@@ -40,10 +40,10 @@ Flex(options?: { direction?: FlexDirection, wrap?: FlexWrap, justifyContent?: F
| ColumnReverse | 与Column相反方向进行布局。 |
| ColumnReverse | 与Column相反方向进行布局。 |
-
FlexWrap枚举说明
-
FlexWrap枚举说明
| 名称
| 描述
|
| 名称
| 描述
|
| ----------- | --------------------------- |
| ----------- | ---------------------------
----------------------
|
| NoWrap | Flex容器的元素单行/列布局,子项允许超出容器。 |
| NoWrap | Flex容器的元素单行/列布局,子项
不
允许超出容器。 |
| Wrap | Flex容器的元素多行/列排布,子项允许超出容器。 |
| Wrap | Flex容器的元素多行/列排布,子项允许超出容器。
|
| WrapReverse | Flex容器的元素反向多行/列排布,子项允许超出容器。 |
| WrapReverse | Flex容器的元素反向多行/列排布,子项允许超出容器。 |
-
FlexAlign枚举说明
-
FlexAlign枚举说明
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录