Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
e0159e57
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看板
提交
e0159e57
编写于
3月 09, 2023
作者:
Y
yamila
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ArkUI uniformity
Signed-off-by:
N
yamila
<
tianyu55@huawei.com
>
上级
b4eb5ebc
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
17 addition
and
21 deletion
+17
-21
zh-cn/application-dev/reference/apis/js-apis-router.md
zh-cn/application-dev/reference/apis/js-apis-router.md
+1
-1
zh-cn/application-dev/reference/arkui-js/js-components-custom-basic-usage.md
...ev/reference/arkui-js/js-components-custom-basic-usage.md
+5
-5
zh-cn/application-dev/reference/arkui-js/js-components-custom-props.md
...tion-dev/reference/arkui-js/js-components-custom-props.md
+2
-2
zh-cn/application-dev/reference/arkui-js/js-components-custom-slot.md
...ation-dev/reference/arkui-js/js-components-custom-slot.md
+2
-2
zh-cn/application-dev/reference/arkui-ts/ts-basic-components-formcomponent.md
...v/reference/arkui-ts/ts-basic-components-formcomponent.md
+1
-1
zh-cn/application-dev/reference/arkui-ts/ts-basic-components-image.md
...ation-dev/reference/arkui-ts/ts-basic-components-image.md
+4
-8
zh-cn/application-dev/reference/arkui-ts/ts-basic-components-plugincomponent.md
...reference/arkui-ts/ts-basic-components-plugincomponent.md
+2
-2
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-router.md
浏览文件 @
e0159e57
...
...
@@ -596,7 +596,7 @@ export default {
// 在detail页面中
export
default
{
onInit
()
{
console
.
info
(
'
showData1:
'
+
router
.
getParams
()[
data1
]);
console
.
info
(
'
showData1:
'
+
router
.
getParams
()[
'
data1
'
]);
}
}
```
...
...
zh-cn/application-dev/reference/arkui-js/js-components-custom-basic-usage.md
浏览文件 @
e0159e57
...
...
@@ -3,7 +3,7 @@
自定义组件是用户根据业务需求,将已有的组件组合,封装成的新组件,可以在工程中多次调用,从而提高代码的可读性。自定义组件通过element引入到宿主页面,使用方法如下:
```
html
<element
name=
'comp'
src=
'../
../
common/component/comp.hml'
></element>
<element
name=
'comp'
src=
'../common/component/comp.hml'
></element>
<div>
<comp
prop1=
'xxxx'
@
child1=
"bindParentVmMethod"
></comp>
</div>
...
...
@@ -12,8 +12,8 @@
结合if-else使用自定义组件的示例,showComp1为true时显示自定义组件comp1,否则显示comp2:
```
html
<element
name=
'comp1'
src=
'../
../
common/component/comp1/comp1.hml'
></element>
<element
name=
'comp2'
src=
'../
../
common/component/comp2/comp2.hml'
></element>
<element
name=
'comp1'
src=
'../common/component/comp1/comp1.hml'
></element>
<element
name=
'comp2'
src=
'../common/component/comp2/comp2.hml'
></element>
<div>
<comp1
if=
"{{showComp1}}"
prop1=
'xxxx'
@
child1=
"bindParentVmMethodOne"
></comp1>
<comp2
else
prop1=
'xxxx'
@
child1=
"bindParentVmMethodTwo"
></comp2>
...
...
@@ -76,7 +76,7 @@ export default {
```
html
<!-- xxx.hml -->
<element
name=
'comp'
src=
'../
../
common/component/comp.hml'
></element>
<element
name=
'comp'
src=
'../common/component/comp.hml'
></element>
<div
class=
"container"
>
<comp
@
event-type1=
"textClicked"
></comp>
</div>
...
...
@@ -125,7 +125,7 @@ export default {
```
html
<!-- xxx.hml -->
<element
name=
'comp'
src=
'../
../
common/comp/comp.hml'
></element>
<element
name=
'comp'
src=
'../common/comp/comp.hml'
></element>
<div
class=
"container"
>
<text>
父组件:{{text}}
</text>
<comp
@
event-type1=
"textClicked"
></comp>
...
...
zh-cn/application-dev/reference/arkui-js/js-components-custom-props.md
浏览文件 @
e0159e57
...
...
@@ -21,7 +21,7 @@ export default {
```
html
<!-- xxx.hml -->
<element
name=
'comp'
src=
'../
../
common/component/comp/comp.hml'
></element>
<element
name=
'comp'
src=
'../common/component/comp/comp.hml'
></element>
<div
class=
"container"
>
<comp
comp-prop=
"{{title}}"
></comp>
</div>
...
...
@@ -57,7 +57,7 @@ export default {
```
html
<!-- xxx.hml -->
<element
name=
'comp'
src=
'../
../
common/component/comp/comp.hml'
></element>
<element
name=
'comp'
src=
'../common/component/comp/comp.hml'
></element>
<div
class=
"container"
>
<comp
title=
"自定义组件"
></comp>
</div>
...
...
zh-cn/application-dev/reference/arkui-js/js-components-custom-slot.md
浏览文件 @
e0159e57
...
...
@@ -20,7 +20,7 @@
引用该自定义组件方式如下:
```
html
<!-- xxx.hml -->
<element
name=
'comp'
src=
'../
../
common/component/comp.hml'
></element>
<element
name=
'comp'
src=
'../common/component/comp.hml'
></element>
<div
class=
"container"
>
<comp>
<text
class=
"text-style"
>
父组件中定义的内容
</text>
...
...
@@ -45,7 +45,7 @@
引用该自定义组件方式如下:
```
html
<!-- xxx.hml -->
<element
name=
'comp'
src=
'../
../
common/component/comp.hml'
></element>
<element
name=
'comp'
src=
'../common/component/comp.hml'
></element>
<div
class=
"container"
>
<comp>
<text
class=
"text-style"
slot=
"second"
>
插入第二个插槽中
</text>
...
...
zh-cn/application-dev/reference/arkui-ts/ts-basic-components-formcomponent.md
浏览文件 @
e0159e57
...
...
@@ -108,7 +108,7 @@ struct CardExample {
.
visibility
(
Visibility
.
Visible
)
.
onAcquired
((
form
)
=>
{
console
.
log
(
`form info :
${
JSON
.
stringify
(
form
)}
`
);
this
.
fomId
=
form
.
id
;
this
.
fo
r
mId
=
form
.
id
;
})
.
onError
((
err
)
=>
{
console
.
log
(
`fail to add form, err:
${
JSON
.
stringify
(
err
)}
`
);
...
...
zh-cn/application-dev/reference/arkui-ts/ts-basic-components-image.md
浏览文件 @
e0159e57
...
...
@@ -353,20 +353,16 @@ struct ImageExample3 {
### 渲染沙箱路径图片
```
ts
import
fileio
from
'
@ohos.fileio
'
import
fs
from
'
@ohos.file.fs
'
import
context
from
'
@ohos.app
lication.context
'
import
fileio
from
'
@ohos.fileio
'
;
import
fs
from
'
@ohos.file.fs
'
;
import
context
from
'
@ohos.app
.ability.common
'
;
@
Entry
@
Component
struct
LoadImageExample
{
@
State
resourcesPath
:
string
=
''
@
State
sandboxPath
:
string
=
''
context
:
context
.
AbilityContext
aboutToAppear
()
{
this
.
context
=
getContext
(
this
)
as
context
.
AbilityContext
}
context
:
context
.
UIAbility
=
getContext
(
this
)
as
context
.
UIAbilityContext
build
()
{
Column
()
{
...
...
zh-cn/application-dev/reference/arkui-ts/ts-basic-components-plugincomponent.md
浏览文件 @
e0159e57
...
...
@@ -174,7 +174,7 @@ external.json文件由开发者创建。external.json中以键值对形式存放
```
ts
//PluginUserExample.ets
import
plugin
from
"
plugin_component.js
"
import
plugin
from
"
./
plugin_component.js
"
@
Entry
@
Component
...
...
@@ -230,7 +230,7 @@ struct PluginUserExample {
```
ts
//PluginProviderExample.ets
import
plugin
from
"
plugin_component.js
"
import
plugin
from
"
./
plugin_component.js
"
@
Entry
@
Component
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录