Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
bb5d68c5
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看板
提交
bb5d68c5
编写于
8月 17, 2022
作者:
T
tianyu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update router
Signed-off-by:
N
tianyu
<
tianyu55@h-partners.com
>
上级
dac57a71
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
40 addition
and
31 deletion
+40
-31
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-ts/figures/zh-cn_image_0000001219744203.gif
...ference/arkui-ts/figures/zh-cn_image_0000001219744203.gif
+0
-0
zh-cn/application-dev/reference/arkui-ts/ts-components-canvas-lottie.md
...ion-dev/reference/arkui-ts/ts-components-canvas-lottie.md
+2
-2
zh-cn/application-dev/reference/arkui-ts/ts-methods-custom-dialog-box.md
...on-dev/reference/arkui-ts/ts-methods-custom-dialog-box.md
+14
-5
zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-size.md
...on-dev/reference/arkui-ts/ts-universal-attributes-size.md
+9
-9
zh-cn/application-dev/reference/arkui-ts/ts-universal-events-touch.md
...ation-dev/reference/arkui-ts/ts-universal-events-touch.md
+13
-13
zh-cn/application-dev/ui/ts-component-states-state.md
zh-cn/application-dev/ui/ts-component-states-state.md
+1
-1
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-router.md
浏览文件 @
bb5d68c5
...
@@ -115,7 +115,7 @@ back(options?: RouterOptions ): void
...
@@ -115,7 +115,7 @@ back(options?: RouterOptions ): void
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| options |
[
RouterOptions
](
#routeroptions
)
| 是 | 返回页面描述信息,其中参数url指路由跳转时会返回到指定url的界面,如果页面栈上没有url页面,则不响应该情况。如果url未设置,则返回上一页。 |
| options |
[
RouterOptions
](
#routeroptions
)
| 是 | 返回页面描述信息,其中参数url指路由跳转时会返回到指定url的界面,如果页面栈上没有url页面,则不响应该情况。如果url未设置,则返回上一页
,页面栈里面的page不会回收,出栈后会回收
。 |
**示例:**
**示例:**
```
js
```
js
...
...
zh-cn/application-dev/reference/arkui-ts/figures/zh-cn_image_0000001219744203.gif
查看替换文件 @
dac57a71
浏览文件 @
bb5d68c5
407.6 KB
|
W:
|
H:
641.2 KB
|
W:
|
H:
2-up
Swipe
Onion skin
zh-cn/application-dev/reference/arkui-ts/ts-components-canvas-lottie.md
浏览文件 @
bb5d68c5
...
@@ -17,7 +17,7 @@ import lottie from '@ohos/lottieETS'
...
@@ -17,7 +17,7 @@ import lottie from '@ohos/lottieETS'
```
```
> **说明:**
> **说明:**
> 在Terminal窗口使用 `npm install @ohos/lottieETS` 命令下载Lottie。
> 在Terminal窗口使用 `npm install @ohos/lottieETS` 命令下载Lottie
,下载之前需要配置权限
。
## lottie.loadAnimation
## lottie.loadAnimation
...
@@ -63,7 +63,7 @@ destroy(name: string): void
...
@@ -63,7 +63,7 @@ destroy(name: string): void
private animatePath: string = "common/lottie/data.json"
private animatePath: string = "common/lottie/data.json"
private animateItem: any = null
private animateItem: any = null
private
onPageHide(): void {
onPageHide(): void {
console.log('onPageHide')
console.log('onPageHide')
lottie.destroy()
lottie.destroy()
}
}
...
...
zh-cn/application-dev/reference/arkui-ts/ts-methods-custom-dialog-box.md
浏览文件 @
bb5d68c5
...
@@ -63,17 +63,23 @@ close(): void
...
@@ -63,17 +63,23 @@ close(): void
## 示例
## 示例
```
```
// xxx.ets
@CustomDialog
@CustomDialog
struct CustomDialogExample {
struct CustomDialogExample {
@Link textValue: string
@Link inputValue: string
controller: CustomDialogController
controller: CustomDialogController
cancel: () => void
cancel: () => void
confirm: () => void
confirm: () => void
build() {
build() {
Column() {
Column() {
Text('Software uninstall').width('70%').fontSize(20).margin({ top: 10, bottom: 10 })
Text('Change text').fontSize(20).margin({ top: 10, bottom: 10 })
Image($r('app.media.icon')).width(80).height(80)
TextInput({ placeholder: '', text: this.textValue }).height(60).width('90%')
Text('Whether to uninstall a software?').fontSize(16).margin({ bottom: 10 })
.onChange((value: string) => {
this.textValue = value
})
Text('Whether to change a text?').fontSize(16).margin({ bottom: 10 })
Flex({ justifyContent: FlexAlign.SpaceAround }) {
Flex({ justifyContent: FlexAlign.SpaceAround }) {
Button('cancel')
Button('cancel')
.onClick(() => {
.onClick(() => {
...
@@ -82,6 +88,7 @@ struct CustomDialogExample {
...
@@ -82,6 +88,7 @@ struct CustomDialogExample {
}).backgroundColor(0xffffff).fontColor(Color.Black)
}).backgroundColor(0xffffff).fontColor(Color.Black)
Button('confirm')
Button('confirm')
.onClick(() => {
.onClick(() => {
this.inputValue = this.textValue
this.controller.close()
this.controller.close()
this.confirm()
this.confirm()
}).backgroundColor(0xffffff).fontColor(Color.Red)
}).backgroundColor(0xffffff).fontColor(Color.Red)
...
@@ -93,8 +100,10 @@ struct CustomDialogExample {
...
@@ -93,8 +100,10 @@ struct CustomDialogExample {
@Entry
@Entry
@Component
@Component
struct CustomDialogUser {
struct CustomDialogUser {
@State textValue: string = ''
@State inputValue: string = 'click me'
dialogController: CustomDialogController = new CustomDialogController({
dialogController: CustomDialogController = new CustomDialogController({
builder: CustomDialogExample({ cancel: this.onCancel, confirm: this.onAccept }),
builder: CustomDialogExample({ cancel: this.onCancel, confirm: this.onAccept
, textValue: $textValue, inputValue: $inputValue
}),
cancel: this.existApp,
cancel: this.existApp,
autoCancel: true
autoCancel: true
})
})
...
@@ -111,7 +120,7 @@ struct CustomDialogUser {
...
@@ -111,7 +120,7 @@ struct CustomDialogUser {
build() {
build() {
Column() {
Column() {
Button(
'click me'
)
Button(
this.inputValue
)
.onClick(() => {
.onClick(() => {
this.dialogController.open()
this.dialogController.open()
}).backgroundColor(0x317aff)
}).backgroundColor(0x317aff)
...
...
zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-size.md
浏览文件 @
bb5d68c5
...
@@ -14,14 +14,14 @@
...
@@ -14,14 +14,14 @@
| 名称 | 参数说明 | 默认值 | 描述 |
| 名称 | 参数说明 | 默认值 | 描述 |
| -------------- | ----------------------------------------
| ---------------------------------------- |
---------------------------------------- |
| -------------- | ----------------------------------------
-------------------- | ------------------------------------------------------------ | --------------------
---------------------------------------- |
| width | Length | - | 设置组件自身的宽度,缺省时使用元素自身内容需要的宽度。 |
| width | Length | - | 设置组件自身的宽度,缺省时使用元素自身内容需要的宽度。 |
| height | Length | - | 设置组件自身的高度,缺省时使用元素自身内容需要的高度。 |
| height | Length | - | 设置组件自身的高度,缺省时使用元素自身内容需要的高度。 |
| size | {
<br/>
width?:
Length,
<br/>
height?:
Length
<br/>
} | - | 设置高宽尺寸。 |
| size | {
<br/>
width?:
Length,
<br/>
height?:
Length
<br/>
} | - | 设置高宽尺寸。 |
| padding | {
<br/>
top?:
Length,
<br/>
right?:
Length,
<br/>
bottom?:
Length,
<br/>
left?:
Length
<br/>
}
\|
Length | 0 | 设置内边距属性。
<br/>
参数为Length类型时,四个方向内边距同时生效。 |
| padding | {
<br/>
top?:
Length,
<br/>
right?:
Length,
<br/>
bottom?:
Length,
<br/>
left?:
Length
<br/>
}
\|
Length | 0 | 设置内边距属性。
<br/>
参数为Length类型时,四个方向内边距同时生效。 |
| margin | {
<br/>
top?:
Length,
<br/>
right?:
Length,
<br/>
bottom?:
Length,
<br/>
left?:
Length
<br/>
}
<br/>
\|
Length | 0 | 设置外边距属性。
<br/>
参数为Length类型时,四个方向外边距同时生效。 |
| margin | {
<br/>
top?:
Length,
<br/>
right?:
Length,
<br/>
bottom?:
Length,
<br/>
left?:
Length
<br/>
}
<br/>
\|
Length | 0 | 设置外边距属性。
<br/>
参数为Length类型时,四个方向外边距同时生效。 |
| constraintSize | {
<br/>
minWidth?:
Length,
<br/>
maxWidth?:
Length,
<br/>
minHeight?:
Length,
<br/>
maxHeight?:
Length
<br/>
} | {
<br/>
minWidth:
0,
<br/>
maxWidth:
Infinity,
<br/>
minHeight:
0,
<br/>
maxHeight:
Infinity
<br/>
} | 设置约束尺寸,组件布局时,进行尺寸范围限制。 |
| constraintSize | {
<br/>
minWidth?:
Length,
<br/>
maxWidth?:
Length,
<br/>
minHeight?:
Length,
<br/>
maxHeight?:
Length
<br/>
} | {
<br/>
minWidth:
0,
<br/>
maxWidth:
Infinity,
<br/>
minHeight:
0,
<br/>
maxHeight:
Infinity
<br/>
} | 设置约束尺寸,组件布局时,进行尺寸范围限制。 |
| layoutWeight | number
| 0 | 容器尺寸确定时,元素与兄弟节点主轴布局尺寸按照权重进行分配,忽略本身尺寸设置
。
<br/>
>
**说明:**
<br/>
>
仅在Row/Column/Flex布局中生效。 |
| layoutWeight | number
| 0 | 容器尺寸确定时,元素与兄弟节点主轴布局尺寸按照权重进行分配,忽略本身尺寸设置,表示自适应占满剩余空间
。
<br/>
>
**说明:**
<br/>
>
仅在Row/Column/Flex布局中生效。 |
## 示例
## 示例
...
...
zh-cn/application-dev/reference/arkui-ts/ts-universal-events-touch.md
浏览文件 @
bb5d68c5
...
@@ -22,11 +22,11 @@
...
@@ -22,11 +22,11 @@
### 属性
### 属性
| 属性名称 | 类型 | 描述 |
| 属性名称 | 类型 | 描述 |
| ------------------- | ----------------------------------------
|
------------ |
| ------------------- | ----------------------------------------
-------------------- | ----------------------
------------ |
| type | TouchType | 触摸事件的类型。 |
| type | TouchType | 触摸事件的类型。 |
| touches | Array
<
[TouchObject](#touchobject对象说明)
>
| 全部手指信息。 |
| touches | Array
<
[TouchObject](#touchobject对象说明)
>
| 全部手指信息。 |
| changedTouches | Array
<
[TouchObject](#touchobject对象说明)
>
| 当前发生变化的手指信息。 |
| changedTouches | Array
<
[TouchObject](#touchobject对象说明)
>
| 当前发生变化的手指信息。 |
| timestamp | number
| 事件时间戳。
|
| timestamp | number
| 距离开机时间的时间戳,单位为毫秒。
|
| target
<sup>
8+
</sup>
|
[
EventTarget
](
ts-universal-events-click.md#eventtarget8对象说明
)
| 被触摸元素对象。 |
| target
<sup>
8+
</sup>
|
[
EventTarget
](
ts-universal-events-click.md#eventtarget8对象说明
)
| 被触摸元素对象。 |
### 接口
### 接口
...
@@ -48,11 +48,11 @@
...
@@ -48,11 +48,11 @@
## TouchType枚举说明
## TouchType枚举说明
| 名称 | 描述 |
| 名称 | 描述 |
| ------ | --------------- |
| ------ | ---------------
-------------------
|
| Down | 手指按下时触发。 |
| Down | 手指按下时触发。 |
| Up | 手指抬起时触发。 |
| Up | 手指抬起时触发。 |
| Move | 手指按压态在屏幕上移动时触发。 |
| Move | 手指按压态在屏幕上移动时触发。 |
| Cancel | 触摸
事件取消时触发。
|
| Cancel | 触摸
交互过程中应用退到后台时触发。
|
## 示例
## 示例
...
...
zh-cn/application-dev/ui/ts-component-states-state.md
浏览文件 @
bb5d68c5
# @State
# @State
@State装饰的变量是组件内部的状态数据,当这些状态数据被修改时,将会调用所在组件的build方法进行UI刷新。
@State装饰的变量是组件内部的状态数据,当这些状态数据被修改时,将会调用所在组件的build方法进行UI刷新
,只能监听第一层数据的改变,内层数据的改变@State监听不到,无法触发build生命周期
。
@State状态数据具有以下特征:
@State状态数据具有以下特征:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录