Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
c1e3ab6f
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,发现更多精彩内容 >>
未验证
提交
c1e3ab6f
编写于
7月 30, 2022
作者:
O
openharmony_ci
提交者:
Gitee
7月 30, 2022
浏览文件
操作
浏览文件
下载
差异文件
!7478 attribute not variable
Merge pull request !7478 from Bo Jiang/tiao
上级
2d693c9d
5d5d4a3a
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
14 addition
and
14 deletion
+14
-14
zh-cn/application-dev/ui/ts-component-based-builder.md
zh-cn/application-dev/ui/ts-component-based-builder.md
+9
-9
zh-cn/application-dev/ui/ts-custom-component-initialization.md
.../application-dev/ui/ts-custom-component-initialization.md
+5
-5
未找到文件。
zh-cn/application-dev/ui/ts-component-based-builder.md
浏览文件 @
c1e3ab6f
...
...
@@ -9,12 +9,12 @@
@
Entry
@
Component
struct
CompA
{
size
:
number
=
100
;
size
1
:
number
=
100
;
@
Builder
SquareText
(
label
:
string
)
{
Text
(
label
)
.
width
(
1
*
this
.
size
)
.
height
(
1
*
this
.
size
)
.
width
(
1
*
this
.
size
1
)
.
height
(
1
*
this
.
size
1
)
}
@
Builder
RowOfSquareTexts
(
label1
:
string
,
label2
:
string
)
{
...
...
@@ -22,8 +22,8 @@ struct CompA {
this
.
SquareText
(
label1
)
this
.
SquareText
(
label2
)
}
.
width
(
2
*
this
.
size
)
.
height
(
1
*
this
.
size
)
.
width
(
2
*
this
.
size
1
)
.
height
(
1
*
this
.
size
1
)
}
build
()
{
...
...
@@ -33,12 +33,12 @@ struct CompA {
this
.
SquareText
(
"
B
"
)
// or as long as tsc is used
}
.
width
(
2
*
this
.
size
)
.
height
(
1
*
this
.
size
)
.
width
(
2
*
this
.
size
1
)
.
height
(
1
*
this
.
size
1
)
this
.
RowOfSquareTexts
(
"
C
"
,
"
D
"
)
}
.
width
(
2
*
this
.
size
)
.
height
(
2
*
this
.
size
)
.
width
(
2
*
this
.
size
1
)
.
height
(
2
*
this
.
size
1
)
}
}
```
...
...
zh-cn/application-dev/ui/ts-custom-component-initialization.md
浏览文件 @
c1e3ab6f
...
...
@@ -85,13 +85,13 @@ struct Parent {
build
()
{
Column
()
{
Flex
({
justifyContent
:
FlexAlign
.
Start
,
alignItems
:
ItemAlign
.
Center
})
{
CompA
({
a
s
tate
:
new
ClassA
(
2
),
aLink
:
$parentState
})
CompA
({
a
S
tate
:
new
ClassA
(
2
),
aLink
:
$parentState
})
}
Flex
({
justifyContent
:
FlexAlign
.
Start
,
alignItems
:
ItemAlign
.
Center
})
{
CompA
({
aLink
:
$parentState
})
}
Flex
({
justifyContent
:
FlexAlign
.
Start
,
alignItems
:
ItemAlign
.
Center
})
{
CompA
({
a
s
tate
:
new
ClassA
(
3
),
aLink
:
$parentState
})
CompA
({
a
S
tate
:
new
ClassA
(
3
),
aLink
:
$parentState
})
}
}
}
...
...
@@ -99,8 +99,8 @@ struct Parent {
@
Component
struct
CompA
{
@
State
aState
:
any
=
false
@
Link
aLink
:
ClassA
@
State
aState
:
any
=
false
@
Link
aLink
:
ClassA
build
()
{
Column
()
{
...
...
@@ -113,7 +113,7 @@ struct CompA {
@
Component
struct
CompB
{
@
Link
bLink
:
ClassA
@
Prop
bProp
:
b
pp
lean
@
Prop
bProp
:
b
oo
lean
build
()
{
Flex
({
justifyContent
:
FlexAlign
.
Start
,
alignItems
:
ItemAlign
.
Center
})
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录