Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
88f26692
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,发现更多精彩内容 >>
提交
88f26692
编写于
12月 08, 2022
作者:
Y
yamila
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update arkts-basic-ui-description
Signed-off-by:
N
yamila
<
tianyu55@huawei.com
>
上级
417b1185
变更
20
隐藏空白更改
内联
并排
Showing
20 changed file
with
73 addition
and
73 deletion
+73
-73
zh-cn/application-dev/quick-start/arkts-basic-ui-description.md
...application-dev/quick-start/arkts-basic-ui-description.md
+1
-1
zh-cn/application-dev/quick-start/start-with-ets-fa.md
zh-cn/application-dev/quick-start/start-with-ets-fa.md
+1
-1
zh-cn/application-dev/quick-start/start-with-ets-stage.md
zh-cn/application-dev/quick-start/start-with-ets-stage.md
+1
-1
zh-cn/application-dev/reference/arkui-js/js-components-basic-input.md
...ation-dev/reference/arkui-js/js-components-basic-input.md
+7
-7
zh-cn/application-dev/reference/arkui-js/js-components-basic-menu.md
...cation-dev/reference/arkui-js/js-components-basic-menu.md
+2
-2
zh-cn/application-dev/reference/arkui-js/js-components-basic-picker.md
...tion-dev/reference/arkui-js/js-components-basic-picker.md
+12
-13
zh-cn/application-dev/reference/arkui-js/js-components-basic-rating.md
...tion-dev/reference/arkui-js/js-components-basic-rating.md
+2
-2
zh-cn/application-dev/reference/arkui-js/js-components-basic-switch.md
...tion-dev/reference/arkui-js/js-components-basic-switch.md
+5
-5
zh-cn/application-dev/reference/arkui-js/js-components-basic-textarea.md
...on-dev/reference/arkui-js/js-components-basic-textarea.md
+2
-2
zh-cn/application-dev/reference/arkui-js/js-components-canvas-imagedata.md
...-dev/reference/arkui-js/js-components-canvas-imagedata.md
+2
-2
zh-cn/application-dev/reference/arkui-js/js-components-common-methods.md
...on-dev/reference/arkui-js/js-components-common-methods.md
+4
-4
zh-cn/application-dev/reference/arkui-js/js-components-common-transition.md
...dev/reference/arkui-js/js-components-common-transition.md
+1
-1
zh-cn/application-dev/reference/arkui-js/js-components-container-dialog.md
...-dev/reference/arkui-js/js-components-container-dialog.md
+5
-5
zh-cn/application-dev/reference/arkui-js/js-components-container-div.md
...ion-dev/reference/arkui-js/js-components-container-div.md
+12
-12
zh-cn/application-dev/reference/arkui-js/js-components-container-list-item-group.md
...rence/arkui-js/js-components-container-list-item-group.md
+3
-3
zh-cn/application-dev/reference/arkui-js/js-components-container-popup.md
...n-dev/reference/arkui-js/js-components-container-popup.md
+2
-2
zh-cn/application-dev/reference/arkui-js/js-components-container-refresh.md
...dev/reference/arkui-js/js-components-container-refresh.md
+3
-3
zh-cn/application-dev/reference/arkui-js/js-components-grid-col.md
...lication-dev/reference/arkui-js/js-components-grid-col.md
+3
-3
zh-cn/application-dev/reference/arkui-ts/ts-basic-components-image.md
...ation-dev/reference/arkui-ts/ts-basic-components-image.md
+2
-1
zh-cn/application-dev/reference/arkui-ts/ts-universal-events-show-hide.md
...n-dev/reference/arkui-ts/ts-universal-events-show-hide.md
+3
-3
未找到文件。
zh-cn/application-dev/quick-start/arkts-basic-ui-description.md
浏览文件 @
88f26692
...
...
@@ -144,7 +144,7 @@ Text(`count: ${this.count}`)
...
Button
(
'
add counter
'
)
.
onClick
(
this
.
myClickHandler
)
.
onClick
(
this
.
myClickHandler
.
bind
(
this
)
)
```
### 子组件配置
...
...
zh-cn/application-dev/quick-start/start-with-ets-fa.md
浏览文件 @
88f26692
...
...
@@ -223,7 +223,7 @@
.
height
(
'
5%
'
)
// 跳转按钮绑定onClick事件,点击时跳转到第二页
.
onClick
(()
=>
{
router
.
push
({
url
:
'
pages/second
'
})
router
.
push
Url
({
url
:
'
pages/second
'
})
})
}
.
width
(
'
100%
'
)
...
...
zh-cn/application-dev/quick-start/start-with-ets-stage.md
浏览文件 @
88f26692
...
...
@@ -216,7 +216,7 @@
.
height
(
'
5%
'
)
// 跳转按钮绑定onClick事件,点击时跳转到第二页
.
onClick
(()
=>
{
router
.
push
({
url
:
'
pages/Second
'
})
router
.
push
Url
({
url
:
'
pages/Second
'
})
})
}
.
width
(
'
100%
'
)
...
...
zh-cn/application-dev/reference/arkui-js/js-components-basic-input.md
浏览文件 @
88f26692
...
...
@@ -125,16 +125,16 @@
```
js
// xxx.js
import
prompt
from
'
@system.prompt
'
import
prompt
Action
from
'
@ohos.promptAction
'
export
default
{
change
(
e
){
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
"
value:
"
+
e
.
value
,
duration
:
3000
,
});
},
enterkeyClick
(
e
){
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
"
enterkey clicked
"
,
duration
:
3000
,
});
...
...
@@ -192,10 +192,10 @@
```
js
// xxx.js
import
prompt
from
'
@system.prompt
'
import
prompt
Action
from
'
@ohos.promptAction
'
export
default
{
checkboxOnChange
(
e
)
{
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
'
checked:
'
+
e
.
checked
,
duration
:
3000
,
});
...
...
@@ -227,11 +227,11 @@
```
js
// xxx.js
import
prompt
from
'
@system.prompt
'
import
prompt
Action
from
'
@ohos.promptAction
'
export
default
{
onRadioChange
(
inputValue
,
e
)
{
if
(
inputValue
===
e
.
value
)
{
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
'
The chosen radio is
'
+
e
.
value
,
duration
:
3000
,
});
...
...
zh-cn/application-dev/reference/arkui-js/js-components-basic-menu.md
浏览文件 @
88f26692
...
...
@@ -90,10 +90,10 @@
```
js
// xxx.js
import
prompt
from
'
@system.prompt
'
;
import
prompt
Action
from
'
@ohos.promptAction
'
;
export
default
{
onMenuSelected
(
e
)
{
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
e
.
value
})
},
...
...
zh-cn/application-dev/reference/arkui-js/js-components-basic-picker.md
浏览文件 @
88f26692
...
...
@@ -223,8 +223,7 @@ select {
```
js
// xxx.js
import
router
from
'
@system.router
'
;
import
prompt
from
'
@system.prompt
'
;
import
promptAction
from
'
@ohos.promptAction
'
;
export
default
{
data
:
{
...
...
@@ -252,63 +251,63 @@ export default {
},
textonchange
(
e
)
{
this
.
textvalue
=
e
.
newValue
;
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
"
text:
"
+
e
.
newValue
+
"
,newSelected:
"
+
e
.
newSelected
})
},
textoncancel
(
e
)
{
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
"
text: textoncancel
"
})
},
dateonchange
(
e
)
{
this
.
datevalue
=
e
.
year
+
"
-
"
+
e
.
month
+
"
-
"
+
e
.
day
;
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
"
date:
"
+
e
.
year
+
"
-
"
+
(
e
.
month
+
1
)
+
"
-
"
+
e
.
day
})
},
dateoncancel
()
{
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
"
date: dateoncancel
"
})
},
timeonchange
(
e
)
{
if
(
this
.
containsecond
)
{
this
.
timevalue
=
e
.
hour
+
"
:
"
+
e
.
minute
+
"
:
"
+
e
.
second
;
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
"
Time:
"
+
e
.
hour
+
"
:
"
+
e
.
minute
+
"
:
"
+
e
.
second
})
}
else
{
this
.
timevalue
=
e
.
hour
+
"
:
"
+
e
.
minute
;
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
"
Time:
"
+
e
.
hour
+
"
:
"
+
e
.
minute
})
}
},
timeoncancel
()
{
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
"
timeoncancel
"
})
},
datetimeonchange
(
e
)
{
this
.
datetimevalue
=
e
.
year
+
"
-
"
+
e
.
month
+
"
-
"
+
e
.
day
+
"
"
+
e
.
hour
+
"
:
"
+
e
.
minute
;
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
"
Time:
"
+
(
e
.
month
+
1
)
+
"
-
"
+
e
.
day
+
"
"
+
e
.
hour
+
"
:
"
+
e
.
minute
})
},
datetimeoncancel
()
{
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
"
datetimeoncancel
"
})
},
multitextonchange
(
e
)
{
this
.
multitextvalue
=
e
.
newValue
;
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
"
Multi-column text change
"
+
e
.
newValue
})
},
multitextoncancel
()
{
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
"
multitextoncancel
"
})
},
...
...
zh-cn/application-dev/reference/arkui-js/js-components-basic-rating.md
浏览文件 @
88f26692
...
...
@@ -83,10 +83,10 @@ rating {
```
js
// xxx.js
import
prompt
from
'
@system.prompt
'
;
import
prompt
Action
from
'
@ohos.promptAction
'
;
export
default
{
changeRating
(
e
){
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
e
.
rating
});
}
...
...
zh-cn/application-dev/reference/arkui-js/js-components-basic-switch.md
浏览文件 @
88f26692
...
...
@@ -91,29 +91,29 @@
```
js
// xxx.js
import
prompt
from
'
@system.prompt
'
;
import
prompt
Action
from
'
@ohos.promptAction
'
;
export
default
{
data
:
{
title
:
'
World
'
},
switchChange
(
e
)
{
if
(
e
.
checked
)
{
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
"
打开开关
"
});
}
else
{
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
"
关闭开关
"
});
}
},
normalswitchChange
(
e
)
{
if
(
e
.
checked
)
{
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
"
switch on
"
});
}
else
{
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
"
switch off
"
});
}
...
...
zh-cn/application-dev/reference/arkui-js/js-components-basic-textarea.md
浏览文件 @
88f26692
...
...
@@ -95,10 +95,10 @@
```
js
// xxx.js
import
prompt
from
'
@system.prompt
'
;
import
prompt
Action
from
'
@ohos.promptAction
'
;
export
default
{
change
(
e
){
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
'
value:
'
+
e
.
text
+
'
, lines:
'
+
e
.
lines
+
'
, height:
'
+
e
.
height
,
duration
:
3000
,
});
...
...
zh-cn/application-dev/reference/arkui-js/js-components-canvas-imagedata.md
浏览文件 @
88f26692
...
...
@@ -26,14 +26,14 @@ ImageData对象可以存储canvas渲染的像素数据。
```
js
// xxx.js
import
prompt
from
'
@system.prompt
'
;
import
prompt
Action
from
'
@ohos.promptAction
'
;
export
default
{
onShow
()
{
const
el
=
this
.
$refs
.
canvas
;
const
ctx
=
el
.
getContext
(
'
2d
'
);
ctx
.
fillRect
(
0
,
0
,
200
,
200
)
var
imageData
=
ctx
.
createImageData
(
1
,
1
)
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
imageData
,
duration
:
5000
})
...
...
zh-cn/application-dev/reference/arkui-js/js-components-common-methods.md
浏览文件 @
88f26692
...
...
@@ -138,7 +138,7 @@ button{
```
js
// xxx.js
import
prompt
from
'
@system.prompt
'
;
import
prompt
Action
from
'
@ohos.promptAction
'
;
export
default
{
data
:{
animation
:
''
,
...
...
@@ -161,19 +161,19 @@ export default{
this
.
animation
=
this
.
$element
(
'
idName
'
).
animate
(
frames
,
options
);
// handle finish event
this
.
animation
.
onfinish
=
function
(){
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
"
The animation is finished.
"
});
};
// handle cancel event
this
.
animation
.
oncancel
=
function
(){
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
"
The animation is canceled.
"
});
};
// handle repeat event
this
.
animation
.
onrepeat
=
function
(){
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
"
The animation is repeated.
"
});
};
...
...
zh-cn/application-dev/reference/arkui-js/js-components-common-transition.md
浏览文件 @
88f26692
...
...
@@ -257,7 +257,7 @@ Page1有一个不透明盒子,点击盒子会跳转到Page2,当点击Page2
</div>
```
```
cs
s
```
j
s
// xxx.js
import
router
from
'
@ohos.router
'
;
export
default
{
...
...
zh-cn/application-dev/reference/arkui-js/js-components-container-dialog.md
浏览文件 @
88f26692
...
...
@@ -130,30 +130,30 @@
```
js
// xxx.js
import
prompt
from
'
@system.prompt
'
;
import
prompt
Action
from
'
@ohos.promptAction
'
;
export
default
{
showDialog
()
{
this
.
$element
(
'
simpledialog
'
).
show
()
},
cancelDialog
()
{
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
'
Dialog cancelled
'
})
},
cancelSchedule
()
{
this
.
$element
(
'
simpledialog
'
).
close
()
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
'
Successfully cancelled
'
})
},
setSchedule
()
{
this
.
$element
(
'
simpledialog
'
).
close
()
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
'
Successfully confirmed
'
})
},
doubleclick
(){
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
'
doubleclick
'
})
}
...
...
zh-cn/application-dev/reference/arkui-js/js-components-container-div.md
浏览文件 @
88f26692
...
...
@@ -252,22 +252,22 @@
```
```
css
/* xxx.css */
.container
{
/* xxx.css */
.container
{
flex-direction
:
column
;
width
:
100%
;
height
:
100%
;
}
.content
{
}
.content
{
width
:
200px
;
height
:
200px
;
background-color
:
red
;
}
}
```
```
js
// xxx.js
import
prompt
from
'
@system.prompt
'
;
import
prompt
Action
from
'
@ohos.promptAction
'
;
export
default
{
data
:{
left
:
0
,
...
...
@@ -283,7 +283,7 @@
this
.
top
=
e
.
globalY
;
},
dragend
(
e
){
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
'
End Drag
'
})
}
...
...
@@ -320,7 +320,7 @@
```
js
// xxx.js
import
prompt
from
'
@system.prompt
'
;
import
prompt
Action
from
'
@ohos.promptAction
'
;
export
default
{
data
:{
left
:
0
,
...
...
@@ -331,22 +331,22 @@
this
.
top
=
e
.
globalY
;
},
dragenter
(
e
){
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
'
enter
'
})
},
dragover
(
e
){
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
'
over
'
})
},
dragleave
(
e
){
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
'
leave
'
})
},
drop
(
e
){
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
'
drop
'
})
}
...
...
zh-cn/application-dev/reference/arkui-js/js-components-container-list-item-group.md
浏览文件 @
88f26692
...
...
@@ -123,7 +123,7 @@
```
js
// xxx.js
import
prompt
from
'
@system.prompt
'
;
import
prompt
Action
from
'
@ohos.promptAction
'
;
export
default
{
data
:
{
direction
:
'
column
'
,
...
...
@@ -157,12 +157,12 @@ export default {
this
.
$element
(
'
mylist
'
).
expandGroup
()
},
collapse
(
e
)
{
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
'
Close
'
+
e
.
groupid
})
},
expand
(
e
)
{
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
'
Open
'
+
e
.
groupid
})
}
...
...
zh-cn/application-dev/reference/arkui-js/js-components-container-popup.md
浏览文件 @
88f26692
...
...
@@ -110,10 +110,10 @@
```
js
// xxx.js
import
prompt
from
'
@system.prompt
'
import
prompt
Action
from
'
@ohos.promptAction
'
export
default
{
visibilitychange
(
e
)
{
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
'
visibility change visibility:
'
+
e
.
visibility
,
duration
:
3000
});
...
...
zh-cn/application-dev/reference/arkui-js/js-components-container-refresh.md
浏览文件 @
88f26692
...
...
@@ -106,7 +106,7 @@
```
js
// xxx.js
import
prompt
from
'
@system.prompt
'
;
import
prompt
Action
from
'
@ohos.promptAction
'
;
export
default
{
data
:
{
list
:[],
...
...
@@ -120,7 +120,7 @@ export default {
}
},
refresh
:
function
(
e
)
{
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
'
刷新中...
'
})
var
that
=
this
;
...
...
@@ -129,7 +129,7 @@ export default {
that
.
fresh
=
false
;
var
addItem
=
'
更新元素
'
;
that
.
list
.
unshift
(
addItem
);
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
'
刷新完成!
'
})
},
2000
)
...
...
zh-cn/application-dev/reference/arkui-js/js-components-grid-col.md
浏览文件 @
88f26692
...
...
@@ -92,11 +92,11 @@ grid-col是栅格布局容器grid-row的子容器组件。
```
js
// index.js
import
prompt
from
'
@system.prompt
'
;
import
prompt
Action
from
'
@ohos.promptAction
'
;
export
default
{
getCol
(
e
)
{
this
.
$element
(
'
mygrid
'
).
getColumns
(
function
(
result
)
{
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
e
.
target
.
id
+
'
result =
'
+
result
,
duration
:
3000
,
});
...
...
@@ -104,7 +104,7 @@ export default {
},
getColWidth
(
e
)
{
this
.
$element
(
'
mygrid
'
).
getColumnWidth
(
function
(
result
)
{
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
e
.
target
.
id
+
'
result =
'
+
result
,
duration
:
3000
,
});
...
...
zh-cn/application-dev/reference/arkui-ts/ts-basic-components-image.md
浏览文件 @
88f26692
...
...
@@ -354,6 +354,7 @@ struct ImageExample3 {
```
ts
import
fileio
from
'
@ohos.fileio
'
import
fs
from
'
@ohos.file.fs
'
;
import
context
from
'
@ohos.application.context
'
@
Entry
...
...
@@ -374,7 +375,7 @@ struct LoadImageExample {
.
onClick
(()
=>
{
this
.
sandboxPath
=
this
.
context
.
getApplicationContext
().
filesDir
+
'
/icon.png
'
console
.
log
(
`读取沙箱图片=========>
${
this
.
sandboxPath
}
`
)
let
fd
=
f
ileio
.
openSync
(
this
.
sandboxPath
,
0o100
,
0o666
)
let
fd
=
f
s
.
openSync
(
this
.
sandboxPath
,
0o100
)
console
.
log
(
`create file========>
${
fd
}
`
)
let
srcPath
=
this
.
context
.
bundleCodeDir
+
'
/entry/resources/base/media/icon.png
'
console
.
log
(
'
mySrcpath
'
+
srcPath
)
...
...
zh-cn/application-dev/reference/arkui-ts/ts-universal-events-show-hide.md
浏览文件 @
88f26692
...
...
@@ -19,7 +19,7 @@
```
ts
// xxx.ets
import
prompt
from
'
@ohos.prompt
'
import
prompt
Action
from
'
@ohos.promptAction
'
@
Entry
@
Component
...
...
@@ -38,14 +38,14 @@ struct AppearExample {
Text
(
this
.
myText
).
fontSize
(
26
).
fontWeight
(
FontWeight
.
Bold
)
.
onAppear
(()
=>
{
this
.
changeAppear
=
'
Hide Text
'
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
'
The text is shown
'
,
duration
:
2000
})
})
.
onDisAppear
(()
=>
{
this
.
changeAppear
=
'
Show Text
'
prompt
.
showToast
({
prompt
Action
.
showToast
({
message
:
'
The text is hidden
'
,
duration
:
2000
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录