Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
1b2bab29
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看板
未验证
提交
1b2bab29
编写于
10月 19, 2022
作者:
O
openharmony_ci
提交者:
Gitee
10月 19, 2022
浏览文件
操作
浏览文件
下载
差异文件
!10833 断链修改
Merge pull request !10833 from LiAn/OpenHarmony-3.2-Beta3
上级
4a55dc6c
9632e817
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
42 addition
and
50 deletion
+42
-50
zh-cn/application-dev/quick-start/arkts-get-started.md
zh-cn/application-dev/quick-start/arkts-get-started.md
+1
-1
zh-cn/application-dev/reference/apis/js-apis-prompt.md
zh-cn/application-dev/reference/apis/js-apis-prompt.md
+6
-6
zh-cn/application-dev/reference/arkui-ts/ts-container-refresh.md
...pplication-dev/reference/arkui-ts/ts-container-refresh.md
+1
-1
zh-cn/application-dev/reference/arkui-ts/ts-methods-custom-dialog-box.md
...on-dev/reference/arkui-ts/ts-methods-custom-dialog-box.md
+26
-34
zh-cn/application-dev/reference/arkui-ts/ts-types.md
zh-cn/application-dev/reference/arkui-ts/ts-types.md
+1
-1
zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-visibility.md
.../reference/arkui-ts/ts-universal-attributes-visibility.md
+1
-1
zh-cn/application-dev/reference/arkui-ts/ts-universal-events-touch.md
...ation-dev/reference/arkui-ts/ts-universal-events-touch.md
+2
-2
zh-cn/application-dev/reference/arkui-ts/ts-universal-mouse-key.md
...lication-dev/reference/arkui-ts/ts-universal-mouse-key.md
+2
-2
zh-cn/application-dev/ui/ui-ts-components.md
zh-cn/application-dev/ui/ui-ts-components.md
+2
-2
未找到文件。
zh-cn/application-dev/quick-start/arkts-get-started.md
浏览文件 @
1b2bab29
...
@@ -8,7 +8,7 @@ ArkTS是OpenHarmony优选的主力应用开发语言。ArkTS基于TypeScript(
...
@@ -8,7 +8,7 @@ ArkTS是OpenHarmony优选的主力应用开发语言。ArkTS基于TypeScript(
当前扩展的声明式UI包括如下特性。
当前扩展的声明式UI包括如下特性。
-
[
基本UI描述
](
e
ts-basic-ui-description.md
)
:ArkTS定义了各种装饰器、自定义组件、UI描述机制,再配合UI开发框架中的UI内置组件、事件方法、属性方法等共同构成了UI开发的主体。
-
[
基本UI描述
](
ark
ts-basic-ui-description.md
)
:ArkTS定义了各种装饰器、自定义组件、UI描述机制,再配合UI开发框架中的UI内置组件、事件方法、属性方法等共同构成了UI开发的主体。
-
[
状态管理
](
arkts-state-mgmt-page-level.md
)
:ArkTS提供了多维度的状态管理机制,在UI开发框架中,和UI相关联的数据,不仅可以在组件内使用,还可以在不同组件层级间传递,比如父子组件之间、爷孙组件之间,也可以是全局范围内的传递,还可以是 跨设备传递。另外,从数据的传递形式来看,可分为只读的单向传递和可变更的双向传递。开发者可以灵活的利用这些能力来实现数据和UI的联动。
-
[
状态管理
](
arkts-state-mgmt-page-level.md
)
:ArkTS提供了多维度的状态管理机制,在UI开发框架中,和UI相关联的数据,不仅可以在组件内使用,还可以在不同组件层级间传递,比如父子组件之间、爷孙组件之间,也可以是全局范围内的传递,还可以是 跨设备传递。另外,从数据的传递形式来看,可分为只读的单向传递和可变更的双向传递。开发者可以灵活的利用这些能力来实现数据和UI的联动。
-
[
动态构建UI元素
](
arkts-dynamic-ui-elememt-building.md
)
:ArkTS提供了动态构建UI元素的能力,不仅可以自定义组件内部的UI结构,还可复用组件样式,扩展原生组件。
-
[
动态构建UI元素
](
arkts-dynamic-ui-elememt-building.md
)
:ArkTS提供了动态构建UI元素的能力,不仅可以自定义组件内部的UI结构,还可复用组件样式,扩展原生组件。
-
[
渲染控制
](
arkts-rendering-control.md
)
:ArkTS提供了渲染控制的能力。条件渲染可根据应用的不同状态,渲染对应状态下的部分内容。循环渲染可从数据源中迭代获取数据,并在每次迭代过程中创建相应的组件。
-
[
渲染控制
](
arkts-rendering-control.md
)
:ArkTS提供了渲染控制的能力。条件渲染可根据应用的不同状态,渲染对应状态下的部分内容。循环渲染可从数据源中迭代获取数据,并在每次迭代过程中创建相应的组件。
...
...
zh-cn/application-dev/reference/apis/js-apis-prompt.md
浏览文件 @
1b2bab29
...
@@ -43,7 +43,7 @@ prompt.showToast({
...
@@ -43,7 +43,7 @@ prompt.showToast({
| 名称 | 类型 | 必填 | 说明 |
| 名称 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | ---------------------------------------- |
| -------- | ---------------------------------------- | ---- | ---------------------------------------- |
| message | string
\|
[
Resource
](
../arkui-ts/ts-types.md#resource
类型
)
<sup>
9+
</sup>
| 是 | 显示的文本信息。 |
| message | string
\|
[
Resource
](
../arkui-ts/ts-types.md#resource
)
<sup>
9+
</sup>
| 是 | 显示的文本信息。 |
| duration | number | 否 | 默认值1500ms,取值区间:1500ms-10000ms。若小于1500ms则取默认值,若大于10000ms则取上限值10000ms。 |
| duration | number | 否 | 默认值1500ms,取值区间:1500ms-10000ms。若小于1500ms则取默认值,若大于10000ms则取上限值10000ms。 |
| bottom | string
\|
number | 否 | 设置弹窗边框距离屏幕底部的位置。 |
| bottom | string
\|
number | 否 | 设置弹窗边框距离屏幕底部的位置。 |
...
@@ -144,8 +144,8 @@ prompt.showDialog({
...
@@ -144,8 +144,8 @@ prompt.showDialog({
| 名称 | 类型 | 必填 | 说明 |
| 名称 | 类型 | 必填 | 说明 |
| ------- | ---------------------------------------- | ---- | ---------------------------------------- |
| ------- | ---------------------------------------- | ---- | ---------------------------------------- |
| title | string
\|
[
Resource
](
../
../ui/ts-types.md#resource类型
)
<sup>
9+
</sup>
| 否 | 标题文本。 |
| title | string
\|
[
Resource
](
../
arkui-ts/ts-types.md#resource
)
<sup>
9+
</sup>
| 否 | 标题文本。 |
| message | string
\|
[
Resource
](
../
../ui/ts-types.md#resource类型
)
<sup>
9+
</sup>
| 否 | 内容文本。 |
| message | string
\|
[
Resource
](
../
arkui-ts/ts-types.md#resource
)
<sup>
9+
</sup>
| 否 | 内容文本。 |
| buttons | Array | 否 | 对话框中按钮的数组,结构为:{text:'button',
color:
'
\#
666666'},支持1-3个按钮。其中第一个为positiveButton;第二个为negativeButton;第三个为neutralButton。 |
| buttons | Array | 否 | 对话框中按钮的数组,结构为:{text:'button',
color:
'
\#
666666'},支持1-3个按钮。其中第一个为positiveButton;第二个为negativeButton;第三个为neutralButton。 |
## ShowDialogSuccessResponse
## ShowDialogSuccessResponse
...
@@ -252,7 +252,7 @@ prompt.showActionMenu({
...
@@ -252,7 +252,7 @@ prompt.showActionMenu({
| 名称 | 类型 | 必填 | 说明 |
| 名称 | 类型 | 必填 | 说明 |
| ------- | ---------------------------------------- | ---- | ---------------------------------------- |
| ------- | ---------------------------------------- | ---- | ---------------------------------------- |
| title | string
\|
[
Resource
](
../
../ui/ts-types.md#resource类型
)
<sup>
9+
</sup>
| 否 | 标题文本。 |
| title | string
\|
[
Resource
](
../
arkui-ts/ts-types.md#resource
)
<sup>
9+
</sup>
| 否 | 标题文本。 |
| buttons | Array
<
[Button](#button)
>
| 是 | 菜单中菜单项按钮的数组,结构为:{text:'button',
color:
'
\#
666666'},支持1-6个按钮。大于6个按钮时弹窗不显示。 |
| buttons | Array
<
[Button](#button)
>
| 是 | 菜单中菜单项按钮的数组,结构为:{text:'button',
color:
'
\#
666666'},支持1-6个按钮。大于6个按钮时弹窗不显示。 |
## ActionMenuSuccessResponse
## ActionMenuSuccessResponse
...
@@ -273,6 +273,6 @@ prompt.showActionMenu({
...
@@ -273,6 +273,6 @@ prompt.showActionMenu({
| 名称 | 类型 | 必填 | 说明 |
| 名称 | 类型 | 必填 | 说明 |
| ----- | ---------------------------------------- | ---- | ------- |
| ----- | ---------------------------------------- | ---- | ------- |
| text | string
\|
[
Resource
](
../
../ui/ts-types.md#resource类型
)
<sup>
9+
</sup>
| 是 | 按钮文本内容。 |
| text | string
\|
[
Resource
](
../
arkui-ts/ts-types.md#resource
)
<sup>
9+
</sup>
| 是 | 按钮文本内容。 |
| color | string
\|
[
Resource
](
../
../ui/ts-types.md#resource类型
)
<sup>
9+
</sup>
| 是 | 按钮文本颜色。 |
| color | string
\|
[
Resource
](
../
arkui-ts/ts-types.md#resource
)
<sup>
9+
</sup>
| 是 | 按钮文本颜色。 |
zh-cn/application-dev/reference/arkui-ts/ts-container-refresh.md
浏览文件 @
1b2bab29
...
@@ -18,7 +18,7 @@ Refresh\(value: \{ refreshing: boolean, offset?: number | string , fr
...
@@ -18,7 +18,7 @@ Refresh\(value: \{ refreshing: boolean, offset?: number | string , fr
| 参数 | 参数名 | 必填 | 参数描述 |
| 参数 | 参数名 | 必填 | 参数描述 |
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| refreshing | boolean | 是 | 当前组件是否正在刷新。
<br/>
该参数支持
[
$$
](
../../
ui/ts-syntactic-sugar.md
)
双向绑定变量。 |
| refreshing | boolean | 是 | 当前组件是否正在刷新。
<br/>
该参数支持
[
$$
](
../../
quick-start/arkts-restrictions-and-extensions.md#变量的双向绑定
)
双向绑定变量。 |
| offset | string
\|
number | 否 | 刷新组件静止时距离父组件顶部的距离。
<br/>
默认值:16,单位vp |
| offset | string
\|
number | 否 | 刷新组件静止时距离父组件顶部的距离。
<br/>
默认值:16,单位vp |
| friction | number
\|
string | 否 | 下拉摩擦系数,取值范围为0到100。
<br/>
默认值:62
<br/>
-
0表示下拉刷新容器不跟随手势下拉而下拉。
<br/>
-
100表示下拉刷新容器紧紧跟随手势下拉而下拉。
<br/>
-
数值越大,下拉刷新容器跟随手势下拉的反应越灵敏。 |
| friction | number
\|
string | 否 | 下拉摩擦系数,取值范围为0到100。
<br/>
默认值:62
<br/>
-
0表示下拉刷新容器不跟随手势下拉而下拉。
<br/>
-
100表示下拉刷新容器紧紧跟随手势下拉而下拉。
<br/>
-
数值越大,下拉刷新容器跟随手势下拉的反应越灵敏。 |
...
...
zh-cn/application-dev/reference/arkui-ts/ts-methods-custom-dialog-box.md
浏览文件 @
1b2bab29
...
@@ -14,40 +14,32 @@
...
@@ -14,40 +14,32 @@
CustomDialogController(value:{builder: CustomDialog, cancel?: () =
>
void, autoCancel?: boolean, alignment?: DialogAlignment, offset?: Offset, customStyle?: boolean})
CustomDialogController(value:{builder: CustomDialog, cancel?: () =
>
void, autoCancel?: boolean, alignment?: DialogAlignment, offset?: Offset, customStyle?: boolean})
-
参数
**参数:**
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| ---------------------- | ---------------------------------------- | ---- | ----------------------- | ---------------------- |
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| builder |
[
CustomDialog
](
../../ui/ts-component-based-customdialog.md
)
| 是 | - | 自定义弹窗内容构造器。 |
| ---------------------- | ---------------------------------------- | ---- | ----------------------- | ---------------------- |
| cancel | ()
=
>
void | 否 | - | 点击遮障层退出时的回调。 |
| builder |
[
CustomDialog
](
../../quick-start/arkts-dynamic-ui-elememt-building.md#customdialog
)
| 是 | - | 自定义弹窗内容构造器。 |
| autoCancel | boolean | 否 | true | 是否允许点击遮障层退出。 |
| cancel | ()
=
>
void | 否 | - | 点击遮障层退出时的回调。 |
| alignment | DialogAlignment | 否 | DialogAlignment.Default | 弹窗在竖直方向上的对齐方式。 |
| autoCancel | boolean | 否 | true | 是否允许点击遮障层退出。 |
| offset | {
<br/>
dx:
Length
\|
[Resource](ts-types.md#resource类型),
<br/>
dy:
Length
\|
[
Resource
](
ts-types.md#resource类型
)
<br/>
} | 否 | - | 弹窗相对alignment所在位置的偏移量。 |
| alignment | DialogAlignment | 否 | DialogAlignment.Default | 弹窗在竖直方向上的对齐方式。 |
| customStyle | boolean | 否 | false | 弹窗容器样式是否自定义。 |
| offset | {
<br/>
dx:
Length
\|
[Resource](ts-types.md#resource类型),
<br/>
dy:
Length
\|
[
Resource
](
ts-types.md#resource类型
)
<br/>
} | 否 | - | 弹窗相对alignment所在位置的偏移量。 |
| gridCount
<sup>
8+
</sup>
| number | 否 | - | 弹窗宽度占栅格宽度的个数。 |
| customStyle | boolean | 否 | false | 弹窗容器样式是否自定义。 |
| gridCount
<sup>
8+
</sup>
| number | 否 | - | 弹窗宽度占栅格宽度的个数。 |
-
DialogAlignment枚举说明
| 名称 | 描述 |
## DialogAlignment枚举说明
| ------------------------ | ------------------------------------------------------ |
| Top | 垂直顶部对齐。 |
| 名称 | 描述 |
| Center | 垂直居中对齐。 |
| ------------------------ | ------------------------------------------------------ |
| Bottom | 垂直底部对齐。 |
| Top | 垂直顶部对齐。 |
| Default | 默认对齐。
<br/>
**说明:**
<br/>
与枚举值Center效果相同。 |
| Center | 垂直居中对齐。 |
| TopStart
<sup>
8+
</sup>
| 左上对齐。 |
| Bottom | 垂直底部对齐。 |
| TopEnd
<sup>
8+
</sup>
| 右上对齐。 |
| Default | 默认对齐。
<br/>
**说明:**
<br/>
与枚举值Center效果相同。 |
| CenterStart
<sup>
8+
</sup>
| 左中对齐。 |
| TopStart
<sup>
8+
</sup>
| 左上对齐。 |
| CenterEnd
<sup>
8+
</sup>
| 右中对齐。 |
| TopEnd
<sup>
8+
</sup>
| 右上对齐。 |
| BottomStart
<sup>
8+
</sup>
| 左下对齐。 |
| CenterStart
<sup>
8+
</sup>
| 左中对齐。 |
| BottomEnd
<sup>
8+
</sup>
| 右下对齐。 |
| CenterEnd
<sup>
8+
</sup>
| 右中对齐。 |
| BottomStart
<sup>
8+
</sup>
| 左下对齐。 |
| 参数名 | 参数类型 | 必填 | 参数描述 |
| BottomEnd
<sup>
8+
</sup>
| 右下对齐。 |
| ---------------------- | ---------------------------------------- | ------------------------- | ---------------------- |
| builder |
[
CustomDialog
](
../../ui/ts-component-based-customdialog.md
)
| 是 | 自定义弹窗内容构造器。 |
| cancel | ()
=
>
void | 否 | 点击遮障层退出时的回调。 |
| autoCancel | boolean | 否 | 是否允许点击遮障层退出。
<br>
默认值:true |
| alignment |
[
DialogAlignment
](
ts-methods-alert-dialog-box.md#dialogalignment枚举说明
)
| 否 | 弹窗在竖直方向上的对齐方式。
<br>
默认值:DialogAlignment.Default |
| offset | {
<br/>
dx:
Length
\|
[Resource](ts-types.md#resource),
<br/>
dy:
Length
\|
[
Resource
](
ts-types.md#resource
)
<br/>
} | 否 | 弹窗相对alignment所在位置的偏移量。 |
| customStyle | boolean | 否 | 弹窗容器样式是否自定义。
<br>
默认值:false |
| gridCount
<sup>
8+
</sup>
| number | 否 | 弹窗宽度占栅格宽度的个数。 |
## CustomDialogController
## CustomDialogController
...
...
zh-cn/application-dev/reference/arkui-ts/ts-types.md
浏览文件 @
1b2bab29
...
@@ -213,5 +213,5 @@
...
@@ -213,5 +213,5 @@
| 名称 | 类型定义 | 描述 |
| 名称 | 类型定义 | 描述 |
| ------------- | ---------------------- | ---------------------------------------- |
| ------------- | ---------------------- | ---------------------------------------- |
| CustomBuilder | ()
=
>
any | 该方法类型必须使用@Builder装饰器修饰。具体用法见
[
@Builder
](
../../
ui/ts-component-based-builder.md
)
。 |
| CustomBuilder | ()
=
>
any | 该方法类型必须使用@Builder装饰器修饰。具体用法见
[
@Builder
](
../../
quick-start/arkts-dynamic-ui-elememt-building.md#builder
)
。 |
zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-visibility.md
浏览文件 @
1b2bab29
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
| 名称 | 参数类型 | 描述 |
| 名称 | 参数类型 | 描述 |
| ---------- | ---------------------------- | ------------------------------------------ |
| ---------- | ---------------------------- | ------------------------------------------ |
| visibility |
[
Visibility
](
ts-appendix-enums.md#visibility
)
| 控制当前组件显示或隐藏。注意,即使组件处于隐藏状态,在页面刷新时仍存在重新创建过程,因此当对性能有严格要求时建议使用
[
条件渲染
](
../../
ui/ts-rending-control-syntax-if-else.md
)
代替。
<br>
默认值:Visibility.Visible|
| visibility |
[
Visibility
](
ts-appendix-enums.md#visibility
)
| 控制当前组件显示或隐藏。注意,即使组件处于隐藏状态,在页面刷新时仍存在重新创建过程,因此当对性能有严格要求时建议使用
[
条件渲染
](
../../
quick-start/arkts-rendering-control.md#条件渲染
)
代替。
<br>
默认值:Visibility.Visible|
## 示例
## 示例
...
...
zh-cn/application-dev/reference/arkui-ts/ts-universal-events-touch.md
浏览文件 @
1b2bab29
...
@@ -23,8 +23,8 @@
...
@@ -23,8 +23,8 @@
| changedTouches | Array
<
[TouchObject](#touchobject对象说明)
>
| 当前发生变化的手指信息。 |
| changedTouches | Array
<
[TouchObject](#touchobject对象说明)
>
| 当前发生变化的手指信息。 |
| stopPropagation | () => void | 阻塞事件冒泡。 |
| stopPropagation | () => void | 阻塞事件冒泡。 |
| timestamp
<sup>
8+
</sup>
| number | 事件时间戳。触发事件时距离系统启动的时间间隔,单位纳秒。 |
| timestamp
<sup>
8+
</sup>
| number | 事件时间戳。触发事件时距离系统启动的时间间隔,单位纳秒。 |
| target
<sup>
8+
</sup>
|
[
EventTarget
](
ts-universal-events-click.md
\
#eventtarget8对象说明
)
| 触发触发手势事件的元素对象显示区域。 |
| target
<sup>
8+
</sup>
|
[
EventTarget
](
ts-universal-events-click.md#eventtarget8对象说明
)
| 触发触发手势事件的元素对象显示区域。 |
| source
<sup>
8+
</sup>
|
[
SourceType
](
ts-gesture-settings.md
\
#sourcetype枚举说明
)
| 事件输入设备。 |
| source
<sup>
8+
</sup>
|
[
SourceType
](
ts-gesture-settings.md#sourcetype枚举说明
)
| 事件输入设备。 |
## TouchObject对象说明
## TouchObject对象说明
...
...
zh-cn/application-dev/reference/arkui-ts/ts-universal-mouse-key.md
浏览文件 @
1b2bab29
...
@@ -27,8 +27,8 @@
...
@@ -27,8 +27,8 @@
| action |
[
MouseAction
](
ts-appendix-enums.md#mouseaction
)
| 鼠标动作。 |
| action |
[
MouseAction
](
ts-appendix-enums.md#mouseaction
)
| 鼠标动作。 |
| stopPropagation | () => void | 阻塞事件冒泡。 |
| stopPropagation | () => void | 阻塞事件冒泡。 |
| timestamp
<sup>
8+
</sup>
| number | 事件时间戳。触发事件时距离系统启动的时间间隔,单位纳秒。 |
| timestamp
<sup>
8+
</sup>
| number | 事件时间戳。触发事件时距离系统启动的时间间隔,单位纳秒。 |
| target
<sup>
8+
</sup>
|
[
EventTarget
](
ts-universal-events-click.md
\
#eventtarget8对象说明
)
| 触发手势事件的元素对象显示区域。 |
| target
<sup>
8+
</sup>
|
[
EventTarget
](
ts-universal-events-click.md#eventtarget8对象说明
)
| 触发手势事件的元素对象显示区域。 |
| source
<sup>
8+
</sup>
|
[
SourceType
](
ts-gesture-settings.md
\
#sourcetype枚举说明
)
| 事件输入设备。 |
| source
<sup>
8+
</sup>
|
[
SourceType
](
ts-gesture-settings.md#sourcetype枚举说明
)
| 事件输入设备。 |
## 示例
## 示例
...
...
zh-cn/application-dev/ui/ui-ts-components.md
浏览文件 @
1b2bab29
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
## 组件和装饰器
## 组件和装饰器
在声明式UI中,所有的页面都是由组件构成。组件的数据结构为struct,装饰器
[
@Component
](
../ui/ts-component-based-component.md
)
是组件化的标志。用@Component修饰的struct表示这个结构体有了组件化的能力。
在声明式UI中,所有的页面都是由组件构成。组件的数据结构为struct,装饰器
@Component
是组件化的标志。用@Component修饰的struct表示这个结构体有了组件化的能力。
自定义组件的声明方式为:
自定义组件的声明方式为:
...
@@ -22,7 +22,7 @@ interface Builder {
...
@@ -22,7 +22,7 @@ interface Builder {
}
}
```
```
[
@Entry
](
../ui/ts-component-based-entry.md
)
修饰的Component表示该Component是页面的总入口,也可以理解为页面的根节点。值得注意的是,一个页面有且仅能有一个@Entry,只有被@Entry修饰的组件或者其子组件,才会在页面上显示。
@Entry
修饰的Component表示该Component是页面的总入口,也可以理解为页面的根节点。值得注意的是,一个页面有且仅能有一个@Entry,只有被@Entry修饰的组件或者其子组件,才会在页面上显示。
@Component和@Entry都是基础且十分重要的装饰器。简单地理解,装饰器就是某一种修饰,给被装饰的对象赋予某一种能力,比如@Entry就是页面入口的能力,@Component就是组件化能力。
@Component和@Entry都是基础且十分重要的装饰器。简单地理解,装饰器就是某一种修饰,给被装饰的对象赋予某一种能力,比如@Entry就是页面入口的能力,@Component就是组件化能力。
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录