diff --git a/zh-cn/application-dev/reference/apis/js-apis-mediaquery.md b/zh-cn/application-dev/reference/apis/js-apis-mediaquery.md index aef2af9a2b4a2f402df7673594865bb815990582..4252170d417341fcfc2b3f4c6efc1850a09ff7e2 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-mediaquery.md +++ b/zh-cn/application-dev/reference/apis/js-apis-mediaquery.md @@ -122,8 +122,6 @@ off(type: 'change', callback?: Callback<MediaQueryResult>): void ```ts import mediaquery from '@ohos.mediaquery' -let portraitFunc = null - @Entry @Component struct MediaQueryExample { @@ -142,7 +140,7 @@ struct MediaQueryExample { } aboutToAppear() { - portraitFunc = this.onPortrait.bind(this) //bind current js instance + let portraitFunc = this.onPortrait.bind(this) //bind current js instance this.listener.on('change', portraitFunc) } diff --git a/zh-cn/application-dev/reference/arkui-ts/figures/zh-cn_image_0000001194352468.gif b/zh-cn/application-dev/reference/arkui-ts/figures/zh-cn_image_0000001194352468.gif index e22d25b7aa139409766723e4ed0fd6172b85b6cf..58feeb2988e8d9a643234691ae4d5cf5ccef6d4f 100644 Binary files a/zh-cn/application-dev/reference/arkui-ts/figures/zh-cn_image_0000001194352468.gif and b/zh-cn/application-dev/reference/arkui-ts/figures/zh-cn_image_0000001194352468.gif differ diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-components-canvas-lottie.md b/zh-cn/application-dev/reference/arkui-ts/ts-components-canvas-lottie.md index be0cb2c09316aeec04eb8a8a63fdc6b67c340953..0965712d3e039a5e73a7dfa9ebcb36e6409b09eb 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-components-canvas-lottie.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-components-canvas-lottie.md @@ -18,7 +18,10 @@ import lottie from '@ohos/lottieETS' ``` > **说明:** +> > 在Terminal窗口使用 `npm install @ohos/lottieETS` 命令下载Lottie。 +> +> 安装ohos npm 三方包时,需要先执行`npm config set @ohos:registry=https://repo.harmonyos.com/npm/`设置仓库地址。 ## lottie.loadAnimation diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-page-transition-animation.md b/zh-cn/application-dev/reference/arkui-ts/ts-page-transition-animation.md index 357c5614ab7bab703cea7ec9d7b2fbd78fb5e61c..718c6092fdbe1c7ca88bd71b11a27627d459d6cb 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-page-transition-animation.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-page-transition-animation.md @@ -23,10 +23,10 @@ - RouteType枚举说明 - | 名称 | 描述 | - | ---- | ---------------- | - | Pop | 重定向指定页面。 | - | Push | 跳转到下一页面。 | + | 名称 | 描述 | + | ---- | ------------------------------------------------------------ | + | Pop | 重定向指定页面。PageA跳转到PageB时,PageA为Exit+Push,PageB为Enter+Push。 | + | Push | 跳转到下一页面。PageB返回至PageA时,PageA为Enter+Pop,PageB为Exit+Pop。 | ## 属性 @@ -70,15 +70,12 @@ PageTransitionEnter和PageTransitionExit组件支持的事件: struct PageTransitionExample1 { @State scale1: number = 1 @State opacity1: number = 1 - @State active: boolean = false + build() { Column() { Navigator({ target: 'pages/page1', type: NavigationType.Push }) { Image($r('app.media.bg1')).width("100%").height("100%") } - .onClick(() => { - this.active = true - }) }.scale({ x: this.scale1 }).opacity(this.opacity1) } // 自定义方式1:完全自定义转场过程的效果 @@ -104,7 +101,7 @@ struct PageTransitionExample1 { struct AExample { @State scale2: number = 1 @State opacity2: number = 1 - @State active: boolean = false + build() { Column() { Navigator({ target: 'pages/index' ,type: NavigationType.Push}) { @@ -139,16 +136,12 @@ struct AExample { struct PageTransitionExample { @State scale1: number = 1 @State opacity1: number = 1 - @State active: boolean = false build() { Column() { Navigator({ target: 'pages/page1', type: NavigationType.Push }) { Image($r('app.media.bg1')).width("100%").height("100%") } - .onClick(() => { - this.active = true - }) }.scale({ x: this.scale1 }).opacity(this.opacity1) } @@ -170,16 +163,12 @@ struct PageTransitionExample { struct PageTransitionExample1 { @State scale2: number = 1 @State opacity2: number = 1 - @State active: boolean = false build() { Column() { Navigator({ target: 'pages/index', type: NavigationType.Push }) { Image($r('app.media.bg2')).width ("100%").height("100%") } - .onClick(() => { - this.active = true - }) }.scale({ x: this.scale2 }).opacity(this.opacity2) }