提交 d5601e2c 编写于 作者: Y yanghf

ts告警处理

Signed-off-by: Nyanghf <yanghefei1@huawei.com>
上级 afd54ea3
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
## 导入模块 ## 导入模块
```js ```ts
import windowAnimationManager from '@ohos.animation.windowAnimationManager' import windowAnimationManager from '@ohos.animation.windowAnimationManager'
``` ```
...@@ -31,8 +31,8 @@ setController(controller: WindowAnimationController): void ...@@ -31,8 +31,8 @@ setController(controller: WindowAnimationController): void
**示例:** **示例:**
```js ```ts
let controller = { let controller: WindowAnimationController = {
onStartAppFromLauncher(startingWindowTarget: windowAnimationManager.WindowAnimationTarget, finishCallback: windowAnimationManager.WindowAnimationFinishedCallback): void { onStartAppFromLauncher(startingWindowTarget: windowAnimationManager.WindowAnimationTarget, finishCallback: windowAnimationManager.WindowAnimationFinishedCallback): void {
console.log('onStartAppFromLauncher, the startingWindowTarget is: ' + startingWindowTarget); console.log('onStartAppFromLauncher, the startingWindowTarget is: ' + startingWindowTarget);
finishCallback.onAnimationFinish(); finishCallback.onAnimationFinish();
...@@ -68,7 +68,7 @@ let controller = { ...@@ -68,7 +68,7 @@ let controller = {
} }
} }
windowAnimationManager.setController(controller) windowAnimationManager.setController(controller);
``` ```
## windowAnimationManager.minimizeWindowWithAnimation ## windowAnimationManager.minimizeWindowWithAnimation
...@@ -88,9 +88,9 @@ minimizeWindowWithAnimation(windowTarget: WindowAnimationTarget, callback: Async ...@@ -88,9 +88,9 @@ minimizeWindowWithAnimation(windowTarget: WindowAnimationTarget, callback: Async
**示例:** **示例:**
```js ```ts
let target: WindowAnimationTarget = undefined; let target: WindowAnimationTarget = undefined;
let controller = { let controller: WindowAnimationController = {
onStartAppFromLauncher(startingWindowTarget: windowAnimationManager.WindowAnimationTarget, finishCallback: windowAnimationManager.WindowAnimationFinishedCallback): void { onStartAppFromLauncher(startingWindowTarget: windowAnimationManager.WindowAnimationTarget, finishCallback: windowAnimationManager.WindowAnimationFinishedCallback): void {
console.log('onStartAppFromLauncher, the startingWindowTarget is: ' + startingWindowTarget); console.log('onStartAppFromLauncher, the startingWindowTarget is: ' + startingWindowTarget);
target = startingWindowTarget; target = startingWindowTarget;
...@@ -133,7 +133,7 @@ let controller = { ...@@ -133,7 +133,7 @@ let controller = {
} }
} }
windowAnimationManager.setController(controller) windowAnimationManager.setController(controller);
let finishedCallback: windowAnimationManager.WindowAnimationFinishedCallback = undefined; let finishedCallback: windowAnimationManager.WindowAnimationFinishedCallback = undefined;
windowAnimationManager.minimizeWindowWithAnimation(target, (err, data) => { windowAnimationManager.minimizeWindowWithAnimation(target, (err, data) => {
...@@ -171,9 +171,9 @@ minimizeWindowWithAnimation(windowTarget: WindowAnimationTarget): Promise&lt;Win ...@@ -171,9 +171,9 @@ minimizeWindowWithAnimation(windowTarget: WindowAnimationTarget): Promise&lt;Win
**示例:** **示例:**
```js ```ts
let target: WindowAnimationTarget = undefined; let target: WindowAnimationTarget = undefined;
let controller = { let controller: WindowAnimationController = {
onStartAppFromLauncher(startingWindowTarget: windowAnimationManager.WindowAnimationTarget, finishCallback: windowAnimationManager.WindowAnimationFinishedCallback): void { onStartAppFromLauncher(startingWindowTarget: windowAnimationManager.WindowAnimationTarget, finishCallback: windowAnimationManager.WindowAnimationFinishedCallback): void {
console.log('onStartAppFromLauncher, the startingWindowTarget is: ' + startingWindowTarget); console.log('onStartAppFromLauncher, the startingWindowTarget is: ' + startingWindowTarget);
finishCallback.onAnimationFinish(); finishCallback.onAnimationFinish();
...@@ -209,7 +209,7 @@ let controller = { ...@@ -209,7 +209,7 @@ let controller = {
} }
} }
windowAnimationManager.setController(controller) windowAnimationManager.setController(controller);
let promise = windowAnimationManager.minimizeWindowWithAnimation(target); let promise = windowAnimationManager.minimizeWindowWithAnimation(target);
promise.then((data) => { promise.then((data) => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册