Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
5980dc33
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看板
提交
5980dc33
编写于
2月 24, 2023
作者:
G
Gloria
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update docs against 14784+14482
Signed-off-by: wusongqing<wusongqing@huawei.com>
上级
080bf723
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
79 addition
and
68 deletion
+79
-68
en/application-dev/reference/apis/js-apis-screen.md
en/application-dev/reference/apis/js-apis-screen.md
+4
-4
en/application-dev/reference/apis/js-apis-sensor.md
en/application-dev/reference/apis/js-apis-sensor.md
+31
-20
en/application-dev/reference/apis/js-apis-window.md
en/application-dev/reference/apis/js-apis-window.md
+44
-44
未找到文件。
en/application-dev/reference/apis/js-apis-screen.md
浏览文件 @
5980dc33
...
@@ -724,8 +724,8 @@ Defines virtual screen parameters.
...
@@ -724,8 +724,8 @@ Defines virtual screen parameters.
| Name | Type| Readable| Writable| Description |
| Name | Type| Readable| Writable| Description |
| --------- | -------- | ---- | ---- | ------------------------- |
| --------- | -------- | ---- | ---- | ------------------------- |
| name | string | Yes | Yes | Name of a virtual screen. |
| name | string | Yes | Yes | Name of a virtual screen. |
| width | number | Yes | Yes | Width of the virtual screen
.
|
| width | number | Yes | Yes | Width of the virtual screen
, in pixels.
|
| height | number | Yes | Yes | Height of the virtual screen
.
|
| height | number | Yes | Yes | Height of the virtual screen
, in pixels.
|
| density | number | Yes | Yes | Density of the virtual screen. |
| density | number | Yes | Yes | Density of the virtual screen. |
| surfaceId | string | Yes | Yes | Surface ID of the virtual screen.|
| surfaceId | string | Yes | Yes | Surface ID of the virtual screen.|
...
@@ -1006,6 +1006,6 @@ Defines the screen mode information.
...
@@ -1006,6 +1006,6 @@ Defines the screen mode information.
| Name | Type| Readable| Writable| Description |
| Name | Type| Readable| Writable| Description |
| ----------- | -------- | ---- | ---- | -------------------------------------------------- |
| ----------- | -------- | ---- | ---- | -------------------------------------------------- |
| id | number | Yes | Yes | Mode ID. The supported mode is determined by the device resolution and refresh rate.|
| id | number | Yes | Yes | Mode ID. The supported mode is determined by the device resolution and refresh rate.|
| width | number | Yes | Yes |
Screen width.
|
| width | number | Yes | Yes |
Width of the screen, in pixels.
|
| height | number | Yes | Yes |
Screen height.
|
| height | number | Yes | Yes |
Height of the screen, in pixels.
|
| refreshRate | number | Yes | Yes | Screen refresh rate. |
| refreshRate | number | Yes | Yes | Screen refresh rate. |
en/application-dev/reference/apis/js-apis-sensor.md
浏览文件 @
5980dc33
...
@@ -2876,7 +2876,7 @@ Transforms a rotation vector based on the coordinate system. This API uses an as
...
@@ -2876,7 +2876,7 @@ Transforms a rotation vector based on the coordinate system. This API uses an as
| Name | Type | Mandatory| Description |
| Name | Type | Mandatory| Description |
| ---------------- | ----------------------------------------- | ---- | ---------------------- |
| ---------------- | ----------------------------------------- | ---- | ---------------------- |
| inRotationVector | Array
<
number
>
| Yes | Rotation
matrix
. |
| inRotationVector | Array
<
number
>
| Yes | Rotation
vector
. |
| coordinates |
[
CoordinatesOptions
](
#coordinatesoptions
)
| Yes | Rotation vector to transform. |
| coordinates |
[
CoordinatesOptions
](
#coordinatesoptions
)
| Yes | Rotation vector to transform. |
| callback | AsyncCallback
<
Array
<
number
>>
| Yes | Callback used to return the rotation vector after being transformed.|
| callback | AsyncCallback
<
Array
<
number
>>
| Yes | Callback used to return the rotation vector after being transformed.|
...
@@ -2923,7 +2923,7 @@ Transforms a rotation vector based on the coordinate system. This API uses a pro
...
@@ -2923,7 +2923,7 @@ Transforms a rotation vector based on the coordinate system. This API uses a pro
| Name | Type | Mandatory| Description |
| Name | Type | Mandatory| Description |
| ---------------- | ----------------------------------------- | ---- | ---------------- |
| ---------------- | ----------------------------------------- | ---- | ---------------- |
| inRotationVector | Array
<
number
>
| Yes | Rotation
matrix
. |
| inRotationVector | Array
<
number
>
| Yes | Rotation
vector
. |
| coordinates |
[
CoordinatesOptions
](
#coordinatesoptions
)
| Yes | Rotation vector to transform.|
| coordinates |
[
CoordinatesOptions
](
#coordinatesoptions
)
| Yes | Rotation vector to transform.|
**Return value**
**Return value**
...
@@ -3179,7 +3179,7 @@ For details about the following error codes, see [Error Codes of sensor.getRotat
...
@@ -3179,7 +3179,7 @@ For details about the following error codes, see [Error Codes of sensor.getRotat
try
{
try
{
let
gravity
=
[
-
0.27775216
,
0.5351276
,
9.788099
];
let
gravity
=
[
-
0.27775216
,
0.5351276
,
9.788099
];
let
geomagnetic
=
[
210.87253
,
-
78.6096
,
-
111.44444
];
let
geomagnetic
=
[
210.87253
,
-
78.6096
,
-
111.44444
];
sensor
.
getRotationMatrix
(
gravity
,
geomagnetic
,
function
(
err
,
data
)
=>
{
sensor
.
getRotationMatrix
(
gravity
,
geomagnetic
,
function
(
err
,
data
)
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
'
Get rotationMatrix failed. Error code:
'
+
err
.
code
+
'
; message:
'
+
err
.
message
);
console
.
error
(
'
Get rotationMatrix failed. Error code:
'
+
err
.
code
+
'
; message:
'
+
err
.
message
);
return
;
return
;
...
@@ -3496,9 +3496,9 @@ Describes the acceleration sensor data. It extends from [Response](#response).
...
@@ -3496,9 +3496,9 @@ Describes the acceleration sensor data. It extends from [Response](#response).
| Name| Type | Readable| Writable| Description |
| Name| Type | Readable| Writable| Description |
| ---- | ------ | ---- | ---- | ------------------------------------ |
| ---- | ------ | ---- | ---- | ------------------------------------ |
| x | number | Yes | Yes | Acceleration along the x-axis of the device, in m/s².
|
| x | number | Yes | Yes | Acceleration along the x-axis of the device, in m/s².|
| y | number | Yes | Yes | Acceleration along the y-axis of the device, in m/s².
|
| y | number | Yes | Yes | Acceleration along the y-axis of the device, in m/s².|
| z | number | Yes | Yes | Acceleration along the z-axis of the device, in m/s².
|
| z | number | Yes | Yes | Acceleration along the z-axis of the device, in m/s².|
## LinearAccelerometerResponse
## LinearAccelerometerResponse
...
@@ -3510,9 +3510,9 @@ Describes the linear acceleration sensor data. It extends from [Response](#respo
...
@@ -3510,9 +3510,9 @@ Describes the linear acceleration sensor data. It extends from [Response](#respo
| Name| Type | Readable| Writable| Description |
| Name| Type | Readable| Writable| Description |
| ---- | ------ | ---- | ---- | ---------------------------------------- |
| ---- | ------ | ---- | ---- | ---------------------------------------- |
| x | number | Yes | Yes | Linear acceleration along the x-axis of the device, in m/s².
|
| x | number | Yes | Yes | Linear acceleration along the x-axis of the device, in m/s².|
| y | number | Yes | Yes | Linear acceleration along the y-axis of the device, in m/s².
|
| y | number | Yes | Yes | Linear acceleration along the y-axis of the device, in m/s².|
| z | number | Yes | Yes | Linear acceleration along the z-axis of the device, in m/s².
|
| z | number | Yes | Yes | Linear acceleration along the z-axis of the device, in m/s².|
## AccelerometerUncalibratedResponse
## AccelerometerUncalibratedResponse
...
@@ -3528,7 +3528,7 @@ Describes the uncalibrated acceleration sensor data. It extends from [Response](
...
@@ -3528,7 +3528,7 @@ Describes the uncalibrated acceleration sensor data. It extends from [Response](
| y | number | Yes | Yes | Uncalibrated acceleration along the y-axis of the device, in m/s². |
| y | number | Yes | Yes | Uncalibrated acceleration along the y-axis of the device, in m/s². |
| z | number | Yes | Yes | Uncalibrated acceleration along the z-axis of the device, in m/s². |
| z | number | Yes | Yes | Uncalibrated acceleration along the z-axis of the device, in m/s². |
| biasX | number | Yes | Yes | Uncalibrated acceleration bias along the x-axis of the device, in m/s². |
| biasX | number | Yes | Yes | Uncalibrated acceleration bias along the x-axis of the device, in m/s². |
| biasY | number | Yes | Yes | Uncalibrated acceleration bias along the y-axis of the device, in m/s².
|
| biasY | number | Yes | Yes | Uncalibrated acceleration bias along the y-axis of the device, in m/s².|
| biasZ | number | Yes | Yes | Uncalibrated acceleration bias along the z-axis of the device, in m/s². |
| biasZ | number | Yes | Yes | Uncalibrated acceleration bias along the z-axis of the device, in m/s². |
...
@@ -3541,9 +3541,9 @@ Describes the gravity sensor data. It extends from [Response](#response).
...
@@ -3541,9 +3541,9 @@ Describes the gravity sensor data. It extends from [Response](#response).
| Name| Type | Readable| Writable| Description |
| Name| Type | Readable| Writable| Description |
| ---- | ------ | ---- | ---- | ---------------------------------------- |
| ---- | ------ | ---- | ---- | ---------------------------------------- |
| x | number | Yes | Yes | Gravitational acceleration along the x-axis of the device, in m/s².
|
| x | number | Yes | Yes | Gravitational acceleration along the x-axis of the device, in m/s².|
| y | number | Yes | Yes | Gravitational acceleration along the y-axis of the device, in m/s².
|
| y | number | Yes | Yes | Gravitational acceleration along the y-axis of the device, in m/s².|
| z | number | Yes | Yes | Gravitational acceleration along the z-axis of the device, in m/s².
|
| z | number | Yes | Yes | Gravitational acceleration along the z-axis of the device, in m/s².|
## OrientationResponse
## OrientationResponse
...
@@ -3831,6 +3831,18 @@ Describes the geographical location.
...
@@ -3831,6 +3831,18 @@ Describes the geographical location.
| longitude | number | Yes | Yes | Longitude. |
| longitude | number | Yes | Yes | Longitude. |
| altitude | number | Yes | Yes | Altitude.|
| altitude | number | Yes | Yes | Altitude.|
## LocationOptions
Describes the geographical location.
**System capability**
: SystemCapability.Sensors.Sensor
| Name | Type | Readable | Writable | Description |
| --------- | ------ | -------- | -------- | ----------- |
| latitude | number | Yes | Yes | Latitude. |
| longitude | number | Yes | Yes | Longitude. |
| altitude | number | Yes | Yes | Altitude. |
## sensor.on<sup>(deprecated)</sup>
## sensor.on<sup>(deprecated)</sup>
### ACCELEROMETER<sup>(deprecated)</sup>
### ACCELEROMETER<sup>(deprecated)</sup>
...
@@ -6231,7 +6243,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.getRo
...
@@ -6231,7 +6243,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.getRo
}
}
console
.
info
(
JSON
.
stringify
(
data
));
console
.
info
(
JSON
.
stringify
(
data
));
})
})
```
```
...
...
en/application-dev/reference/apis/js-apis-window.md
浏览文件 @
5980dc33
...
@@ -188,10 +188,10 @@ Describes the rectangular area of the window.
...
@@ -188,10 +188,10 @@ Describes the rectangular area of the window.
| Name | Type| Readable| Writable| Description |
| Name | Type| Readable| Writable| Description |
| ------ | -------- | ---- | ---- | ------------------ |
| ------ | -------- | ---- | ---- | ------------------ |
| left | number | Yes | Yes | Left boundary of the rectangle.|
| left | number | Yes | Yes | Left boundary of the rectangle
, in pixels
.|
| top | number | Yes | Yes | Top boundary of the rectangle.|
| top | number | Yes | Yes | Top boundary of the rectangle
, in pixels
.|
| width | number | Yes | Yes | Width of the rectangle
.
|
| width | number | Yes | Yes | Width of the rectangle
, in pixels.
|
| height | number | Yes | Yes | Height of the rectangle
.
|
| height | number | Yes | Yes | Height of the rectangle
, in pixels.
|
## AvoidArea<sup>7+</sup>
## AvoidArea<sup>7+</sup>
...
@@ -215,8 +215,8 @@ Describes the window size.
...
@@ -215,8 +215,8 @@ Describes the window size.
| Name | Type| Readable| Writable| Description |
| Name | Type| Readable| Writable| Description |
| ------ | -------- | ---- | ---- | ---------- |
| ------ | -------- | ---- | ---- | ---------- |
| width | number | Yes | Yes | Window width.|
| width | number | Yes | Yes | Window width
, in pixels
.|
| height | number | Yes | Yes | Window height.|
| height | number | Yes | Yes | Window height
, in pixels
.|
## WindowProperties
## WindowProperties
...
@@ -5903,9 +5903,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
...
@@ -5903,9 +5903,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example**
**Example**
```
ts
```
ts
import
Ability
from
'
@ohos.application.
Ability
'
;
import
UIAbility
from
'
@ohos.app.ability.UI
Ability
'
;
class
myAbility
extends
Ability
{
class
myAbility
extends
UI
Ability
{
onWindowStageCreate
(
windowStage
)
{
onWindowStageCreate
(
windowStage
)
{
console
.
log
(
'
onWindowStageCreate
'
);
console
.
log
(
'
onWindowStageCreate
'
);
let
windowClass
=
null
;
let
windowClass
=
null
;
...
@@ -5949,9 +5949,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
...
@@ -5949,9 +5949,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example**
**Example**
```
ts
```
ts
import
Ability
from
'
@ohos.application.
Ability
'
;
import
UIAbility
from
'
@ohos.app.ability.UI
Ability
'
;
class
myAbility
extends
Ability
{
class
myAbility
extends
UI
Ability
{
onWindowStageCreate
(
windowStage
)
{
onWindowStageCreate
(
windowStage
)
{
console
.
log
(
'
onWindowStageCreate
'
);
console
.
log
(
'
onWindowStageCreate
'
);
let
windowClass
=
null
;
let
windowClass
=
null
;
...
@@ -5994,9 +5994,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
...
@@ -5994,9 +5994,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example**
**Example**
```
ts
```
ts
import
Ability
from
'
@ohos.application.
Ability
'
;
import
UIAbility
from
'
@ohos.app.ability.UI
Ability
'
;
class
myAbility
extends
Ability
{
class
myAbility
extends
UI
Ability
{
onWindowStageCreate
(
windowStage
)
{
onWindowStageCreate
(
windowStage
)
{
console
.
log
(
'
onWindowStageCreate
'
);
console
.
log
(
'
onWindowStageCreate
'
);
try
{
try
{
...
@@ -6037,9 +6037,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
...
@@ -6037,9 +6037,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example**
**Example**
```
ts
```
ts
import
Ability
from
'
@ohos.application.
Ability
'
;
import
UIAbility
from
'
@ohos.app.ability.UI
Ability
'
;
class
myAbility
extends
Ability
{
class
myAbility
extends
UI
Ability
{
onWindowStageCreate
(
windowStage
)
{
onWindowStageCreate
(
windowStage
)
{
console
.
log
(
'
onWindowStageCreate
'
);
console
.
log
(
'
onWindowStageCreate
'
);
let
windowClass
=
null
;
let
windowClass
=
null
;
...
@@ -6093,9 +6093,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
...
@@ -6093,9 +6093,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example**
**Example**
```
ts
```
ts
import
Ability
from
'
@ohos.application.
Ability
'
;
import
UIAbility
from
'
@ohos.app.ability.UI
Ability
'
;
class
myAbility
extends
Ability
{
class
myAbility
extends
UI
Ability
{
onWindowStageCreate
(
windowStage
)
{
onWindowStageCreate
(
windowStage
)
{
console
.
log
(
'
onWindowStageCreate
'
);
console
.
log
(
'
onWindowStageCreate
'
);
let
windowClass
=
null
;
let
windowClass
=
null
;
...
@@ -6141,9 +6141,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
...
@@ -6141,9 +6141,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example**
**Example**
```
ts
```
ts
import
Ability
from
'
@ohos.application.
Ability
'
;
import
UIAbility
from
'
@ohos.app.ability.UI
Ability
'
;
class
myAbility
extends
Ability
{
class
myAbility
extends
UI
Ability
{
onWindowStageCreate
(
windowStage
)
{
onWindowStageCreate
(
windowStage
)
{
console
.
log
(
'
onWindowStageCreate
'
);
console
.
log
(
'
onWindowStageCreate
'
);
let
windowClass
=
null
;
let
windowClass
=
null
;
...
@@ -6185,9 +6185,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
...
@@ -6185,9 +6185,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example**
**Example**
```
ts
```
ts
import
Ability
from
'
@ohos.application.
Ability
'
;
import
UIAbility
from
'
@ohos.app.ability.UI
Ability
'
;
class
myAbility
extends
Ability
{
class
myAbility
extends
UI
Ability
{
onWindowStageCreate
(
windowStage
)
{
onWindowStageCreate
(
windowStage
)
{
console
.
log
(
'
onWindowStageCreate
'
);
console
.
log
(
'
onWindowStageCreate
'
);
let
windowClass
=
null
;
let
windowClass
=
null
;
...
@@ -6231,9 +6231,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
...
@@ -6231,9 +6231,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example**
**Example**
```
ts
```
ts
import
Ability
from
'
@ohos.application.
Ability
'
;
import
UIAbility
from
'
@ohos.app.ability.UI
Ability
'
;
class
myAbility
extends
Ability
{
class
myAbility
extends
UI
Ability
{
storage
:
LocalStorage
storage
:
LocalStorage
onWindowStageCreate
(
windowStage
)
{
onWindowStageCreate
(
windowStage
)
{
this
.
storage
=
new
LocalStorage
();
this
.
storage
=
new
LocalStorage
();
...
@@ -6289,9 +6289,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
...
@@ -6289,9 +6289,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example**
**Example**
```
ts
```
ts
import
Ability
from
'
@ohos.application.
Ability
'
;
import
UIAbility
from
'
@ohos.app.ability.UI
Ability
'
;
class
myAbility
extends
Ability
{
class
myAbility
extends
UI
Ability
{
storage
:
LocalStorage
storage
:
LocalStorage
onWindowStageCreate
(
windowStage
)
{
onWindowStageCreate
(
windowStage
)
{
this
.
storage
=
new
LocalStorage
();
this
.
storage
=
new
LocalStorage
();
...
@@ -6340,9 +6340,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
...
@@ -6340,9 +6340,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example**
**Example**
```
ts
```
ts
import
Ability
from
'
@ohos.application.
Ability
'
;
import
UIAbility
from
'
@ohos.app.ability.UI
Ability
'
;
class
myAbility
extends
Ability
{
class
myAbility
extends
UI
Ability
{
onWindowStageCreate
(
windowStage
)
{
onWindowStageCreate
(
windowStage
)
{
console
.
log
(
'
onWindowStageCreate
'
);
console
.
log
(
'
onWindowStageCreate
'
);
try
{
try
{
...
@@ -6389,9 +6389,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
...
@@ -6389,9 +6389,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example**
**Example**
```
ts
```
ts
import
Ability
from
'
@ohos.application.
Ability
'
;
import
UIAbility
from
'
@ohos.app.ability.UI
Ability
'
;
class
myAbility
extends
Ability
{
class
myAbility
extends
UI
Ability
{
onWindowStageCreate
(
windowStage
)
{
onWindowStageCreate
(
windowStage
)
{
console
.
log
(
'
onWindowStageCreate
'
);
console
.
log
(
'
onWindowStageCreate
'
);
try
{
try
{
...
@@ -6436,9 +6436,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
...
@@ -6436,9 +6436,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example**
**Example**
```
ts
```
ts
import
Ability
from
'
@ohos.application.
Ability
'
;
import
UIAbility
from
'
@ohos.app.ability.UI
Ability
'
;
class
myAbility
extends
Ability
{
class
myAbility
extends
UI
Ability
{
onWindowStageCreate
(
windowStage
)
{
onWindowStageCreate
(
windowStage
)
{
console
.
log
(
'
onWindowStageCreate
'
);
console
.
log
(
'
onWindowStageCreate
'
);
try
{
try
{
...
@@ -6475,9 +6475,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
...
@@ -6475,9 +6475,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example**
**Example**
```
ts
```
ts
import
Ability
from
'
@ohos.application.
Ability
'
;
import
UIAbility
from
'
@ohos.app.ability.UI
Ability
'
;
class
myAbility
extends
Ability
{
class
myAbility
extends
UI
Ability
{
onWindowStageCreate
(
windowStage
)
{
onWindowStageCreate
(
windowStage
)
{
console
.
log
(
'
disableWindowDecor
'
);
console
.
log
(
'
disableWindowDecor
'
);
windowStage
.
disableWindowDecor
();
windowStage
.
disableWindowDecor
();
...
@@ -6515,9 +6515,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
...
@@ -6515,9 +6515,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example**
**Example**
```
ts
```
ts
import
Ability
from
'
@ohos.application.
Ability
'
;
import
UIAbility
from
'
@ohos.app.ability.UI
Ability
'
;
class
myAbility
extends
Ability
{
class
myAbility
extends
UI
Ability
{
onWindowStageCreate
(
windowStage
)
{
onWindowStageCreate
(
windowStage
)
{
console
.
log
(
'
onWindowStageCreate
'
);
console
.
log
(
'
onWindowStageCreate
'
);
try
{
try
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录