未验证 提交 ca7e95d3 编写于 作者: O openharmony_ci 提交者: Gitee

!10175 翻译完成:9881+9897+9946+9934+9902 5个文档刷新(只涉及代码和格式)

Merge pull request !10175 from wusongqing/TR9881
......@@ -81,7 +81,7 @@ import Ability from '@ohos.application.Ability'
```ts
export default class MySequenceable {
num: number = 0
str: String = ""
str: string = ""
constructor(num, string) {
this.num = num
......
......@@ -54,7 +54,7 @@ You can create a subwindow, such as a dialog box, and set its properties.
import window from '@ohos.window';
let windowClass = null;
// 1. Method 1: Create a subwindow.
// Method 1: Create a subwindow.
window.create("subWindow", window.WindowType.TYPE_APP, (err, data) => {
if (err.code) {
console.error('Failed to create the subWindow. Cause: ' + JSON.stringify(err));
......@@ -63,7 +63,7 @@ You can create a subwindow, such as a dialog box, and set its properties.
console.info('Succeeded in creating subWindow. Data: ' + JSON.stringify(data));
windowClass = data;
});
// 1. Method 2: Obtain a subwindow.
// Method 2: Obtain a subwindow.
window.getTopWindow((err, data) => {
if (err.code) {
console.error('Failed to get the subWindow. Cause: ' + JSON.stringify(err));
......@@ -72,7 +72,7 @@ You can create a subwindow, such as a dialog box, and set its properties.
console.info('Succeeded in getting subWindow. Data: ' + JSON.stringify(data));
windowClass = data;
});
// 1. Method 3: Find a subwindow.
// Method 3: Find a subwindow.
window.find("subWindow", (err, data) => {
if (err.code) {
console.error('Failed to find the subWindow. Cause: ' + JSON.stringify(err));
......@@ -88,7 +88,7 @@ You can create a subwindow, such as a dialog box, and set its properties.
After the subwindow is created, you can set its properties, such as the size, position, background color, and brightness.
```js
// 2. Move the subwindow.
// Move the subwindow.
windowClass.moveTo(300, 300, (err, data) => {
if (err.code) {
console.error('Failed to move the window. Cause:' + JSON.stringify(err));
......@@ -96,7 +96,7 @@ You can create a subwindow, such as a dialog box, and set its properties.
}
console.info('Succeeded in moving the window. Data: ' + JSON.stringify(data));
});
// 2. Change the size of the subwindow.
// Change the size of the subwindow.
windowClass.resetSize(500, 1000, (err, data) => {
if (err.code) {
console.error('Failed to change the window size. Cause:' + JSON.stringify(err));
......@@ -111,14 +111,14 @@ You can create a subwindow, such as a dialog box, and set its properties.
Call `loadContent` and `show` to load and display the content in the subwindow.
```js
// 3. Load the page content to the subwindow.
// Load the page content to the subwindow.
windowClass.loadContent("pages/page2", (err, data) => {
if (err.code) {
console.error('Failed to load the content. Cause: ' + JSON.stringify(err));
return;
}
console.info('Succeeded in loading the content. Data: ' + JSON.stringify(data));
// 3. Show the subwindow.
// Show the subwindow.
windowClass.show((err, data) => {
if (err.code) {
console.error('Failed to show the window. Cause: ' + JSON.stringify(err));
......@@ -134,7 +134,7 @@ You can create a subwindow, such as a dialog box, and set its properties.
When the subwindow is no longer needed, you can call `destroy` to destroy it.
```js
// 4. Destroy the subwindow when a click event outside the window is detected.
// Destroy the subwindow when a click event outside the window is detected.
windowClass.on('touchOutside', () => {
console.info('touch outside');
windowClass.destroy((err, data) => {
......@@ -167,7 +167,7 @@ To create a better video watching and gaming experience, you can use the immersi
import window from '@ohos.window';
let mainWindowClass = null;
// 1. Obtain the main window.
// Obtain the main window.
window.getTopWindow((err, data) => {
if (err.code) {
console.error('Failed to get the subWindow. Cause: ' + JSON.stringify(err));
......@@ -185,7 +185,7 @@ To create a better video watching and gaming experience, you can use the immersi
- Method 3: Call `setLayoutFullScreen` to enable the full-screen mode for the main window layout. Call `setSystemProperties` to set the opacity, background color, text color, and highlighted icon of the navigation bar and status bar to ensure that their display effect is consistent with that of the main window.
```js
// 2. Use method 1 to implement the immersive effect.
// Use method 1 to implement the immersive effect.
let isFullScreen = true;
mainWindowClass.setFullScreen(isFullScreen, (err, data) => {
if (err.code) {
......@@ -194,7 +194,7 @@ To create a better video watching and gaming experience, you can use the immersi
}
console.info('Succeeded in enabling the full-screen mode. Data: ' + JSON.stringify(data));
});
// 2. Use method 2 to implement the immersive effect.
// Use method 2 to implement the immersive effect.
let names = [];
mainWindowClass.setSystemBarEnable(names, (err, data) => {
if (err.code) {
......@@ -203,7 +203,7 @@ To create a better video watching and gaming experience, you can use the immersi
}
console.info('Succeeded in setting the system bar to be visible. Data: ' + JSON.stringify(data));
});
// 2. Use method 3 to implement the immersive effect.
// Use method 3 to implement the immersive effect.
let isLayoutFullScreen = true;
mainWindowClass.setLayoutFullScreen(isLayoutFullScreen, (err, data) => {
if (err.code) {
......@@ -236,14 +236,14 @@ To create a better video watching and gaming experience, you can use the immersi
Call `loadContent` and `show` to load and display the content in the immersive window.
```js
// 3. Load the page content to the immersive window.
// Load the page content to the immersive window.
mainWindowClass.loadContent("pages/page3", (err, data) => {
if (err.code) {
console.error('Failed to load the content. Cause: ' + JSON.stringify(err));
return;
}
console.info('Succeeded in loading the content. Data: ' + JSON.stringify(data));
// 3. Show the immersive window.
// Show the immersive window.
mainWindowClass.show((err, data) => {
if (err.code) {
console.error('Failed to show the window. Cause: ' + JSON.stringify(err));
......
# Writing Instructions<a name="EN-US_TOPIC_0000001053707964"></a>
# Writing Instructions
This document describes the writing specifications for contributing OpenHarmony documents.
## Naming Specifications<a name="section6823246189"></a>
## Naming Specifications
To submit a new document, create a new **.md** file in the **doc** directory of the project code on Gitee. The file name must be in the _xxx-xxx_**.md** format.
For example, a document that describes writing specifications can be named **write-standard.md**.
## Content Specifications<a name="section650663210183"></a>
## Content Specifications
The content should be concise and intuitive. Introductory documents describe principles, architecture, and design ideas in a concise manner, and operation documents describe key steps to help other developers. Chinese is preferred. It is recommended that both Chinese and English be supported. The OpenHarmony will be updated continuously to ensure the synchronization between Chinese and English.
......@@ -73,7 +73,8 @@ Pictures used in **OpenHarmony\_DOCUMENTS/docs/quick-start/write-standard.md**
If a self-made picture is used, refer to the following figure to configure the color. The format can be **png**, **jpg**, **gif**, and so on.
**Figure 1** Example<a name="fig952595173513"></a>
**Figure 1** Example
![](figures/example.png "example")
For screenshots, see the requirements below. If you need to highlight key information in the figure, add a red box or text remarks.
......@@ -88,7 +89,7 @@ English font: Arial
Font size: 10 pt
**Figure 2** <a name="fig1472123913217"></a>
**Figure 2**
**Table**
......@@ -109,38 +110,11 @@ Output
**Table 1** Parameters
<a name="table163931041183019"></a>
<table><thead align="left"><tr id="row1393134183014"><th class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.2.4.1.1"><p id="p1539314418307"><a name="p1539314418307"></a><a name="p1539314418307"></a>Table</p>
</th>
<th class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.2.4.1.2"><p id="p1339324120303"><a name="p1339324120303"></a><a name="p1339324120303"></a>Type</p>
</th>
<th class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.2.4.1.3"><p id="p13932041133012"><a name="p13932041133012"></a><a name="p13932041133012"></a>Note</p>
</th>
</tr>
</thead>
<tbody><tr id="row1839304110309"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.1 "><p id="p4393174143014"><a name="p4393174143014"></a><a name="p4393174143014"></a>first</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.2 "><p id="p6393141133013"><a name="p6393141133013"></a><a name="p6393141133013"></a>standard</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.3 "><p id="p17393184112307"><a name="p17393184112307"></a><a name="p17393184112307"></a>None</p>
</td>
</tr>
<tr id="row1039318412306"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.1 "><p id="p113941541103012"><a name="p113941541103012"></a><a name="p113941541103012"></a>second</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.2 "><p id="p83941841153016"><a name="p83941841153016"></a><a name="p83941841153016"></a>outstanding</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.3 "><p id="p1539404114305"><a name="p1539404114305"></a><a name="p1539404114305"></a>5</p>
</td>
</tr>
<tr id="row6547101813118"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.1 "><p id="p35483184313"><a name="p35483184313"></a><a name="p35483184313"></a>third</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.2 "><p id="p1554821817318"><a name="p1554821817318"></a><a name="p1554821817318"></a>inside</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.3 "><p id="p15548201819310"><a name="p15548201819310"></a><a name="p15548201819310"></a>with</p>
</td>
</tr>
</tbody>
</table>
| Tables | Type | Note |
| ------ | :---------: | ---: |
| first | standard | None |
| second | outstanding | 5 |
| third | inside | with |
**Code**
......
......@@ -186,31 +186,29 @@ For details about the adaptation status, see [SIG-Devboard](https://gitee.com/op
| Subsystem| Sample| Introduction| Programming Language|
| -------- | -------- | -------- | -------- |
| ArkUI | MouseEvent | This sample simulates a minesweeper game that calls mouse event-related APIs.| eTS |
| ArkUI | Vibrator | This sample simulates the countdown scenario to show the use of the vibrator APIs.| eTS |
| DFX | FaultLogger | This sample illustrates how to obtain fault information of an application in eTS.| eTS |
| ArkUI | Gallery | This sample demonstrates the functions of different components such as universal events, universal attributes, and gestures.| eTS |
| Graphics| JsWebGL | This sample shows how to use WebGL APIs to draw pentagrams and rectangles by invoking GPU resources.| JS |
| ArkUI | Clock | This sample exemplifies how to implement a simple clock application using the eTS UI capability.| eTS |
| Network management| Http | This sample simulates Postman, which requires the input of an API address and outputs the data obtained, to show the use of the data request APIs.| eTS |
| ArkUI | FlishLight | This sample simulates a flashlight by changing the screen brightness. If the screen becomes brighter, the flashlight is turned on. If the screen becomes darker, the flashlight is turned off.| eTS |
| Network management| Socket | This sample demonstrates the application of Socket in network communication, including connection authentication and chat communication between two devices.| eTS |
| Distributed data management| DistributedRdb | This sample shows how to add, delete, modify, query, and synchronize data in the distributed relational database with eTS.| eTS |
| Ability| BackgroundTaskManager | This sample simulates the download function. Being processed by the background task management, a download task can continue after the application exits. It stops until the download is complete.| eTS |
| Ability| BringApp | This sample uses the **FeatureAbility** APIs to start a system application based on the application's bundle name and ability name.| eTS |
| Media| VideoPlayer | This sample shows how to play a video using the **VideoPlayer** APIs in eTS. It also provides an ability that can be invoked by other applications to play the video.| eTS |
| Ability| DistributeCalc | This sample implements a simple calculator application using JS distributed features. The calculator can perform simple numerical calculations and start a remote calculator FA to perform collaborative calculation.| eTS |
| Multimedia| JSRecorder | This sample shows how to implement audio recording and playback by calling media-related APIs.| eTS |
| Web | Browser | This sample uses the stage model and related APIs to show a simple browser.| eTS |
| Ability| DeviceUsageStatistics | This sample shows the device usage statistics.| eTS |
| ArkUI | AdaptiveCapabilities | This sample shows multi-device adaptation in eTS, including resource qualifiers, atomic layouts, and responsive layouts.| eTS |
| ArkUI | Game2048 | This sample shows how to develop a 2048 game using the **\<Grid>** component.| eTS |
| Window Manager| Window | This sample shows how to create a window, display an application over another application in the form of a floating window, and display an application on split screens.| eTS |
| Distributed data management| Preference | This sample shows the theme switching function of preferences.| eTS |
| ArkUI | NativeAPI | This sample shows how to call C++ APIs in eTS and how C++ APIs call back JS APIs to play the Gomoku game. The native APIs implement the calculation logic, and eTS implements UI rendering and re-rendering.| eTS/C++ |
| Globalization| International | This sample shows how to use APIs related to i18n, intl, and resourceManager in eTS to set the system language, region, time, and time zone. It also provides locale setting examples.| eTS |
For more information, visit [Samples](https://gitee.com/openharmony/app_samples).
| ArkUI | [MouseEvent](https://gitee.com/openharmony/applications_app_samples/tree/master/ETSUI/MouseEvent) | This sample simulates a minesweeper game that calls mouse event-related APIs.| eTS |
| ArkUI | [Vibrator](https://gitee.com/openharmony/applications_app_samples/tree/master/device/Vibrator) | This sample simulates the countdown scenario to show the use of the vibrator APIs.| eTS |
| DFX | [FaultLogger](https://gitee.com/openharmony/applications_app_samples/tree/master/DFX/FaultLogger) | This sample illustrates how to obtain fault information of an application in eTS.| eTS |
| ArkUI | [Gallery](https://gitee.com/openharmony/applications_app_samples/tree/master/ETSUI/Gallery) | This sample demonstrates the functions of different components such as universal events, universal attributes, and gestures.| eTS |
| Graphics| [JsWebGL](https://gitee.com/openharmony/applications_app_samples/tree/master/Graphics/JsWebGL) | This sample shows how to use WebGL APIs to draw pentagrams and rectangles by invoking GPU resources.| JS |
| ArkUI | [Clock](https://gitee.com/openharmony/applications_app_samples/tree/master/Preset/Clock) | This sample exemplifies how to implement a simple clock application using the eTS UI capability.| eTS |
| Network management| [Http](https://gitee.com/openharmony/applications_app_samples/tree/master/Network/Http) | This sample simulates Postman, which requires the input of an API address and outputs the data obtained, to show the use of the data request APIs.| eTS |
| Network management| [Socket](https://gitee.com/openharmony/applications_app_samples/tree/master/Network/Socket) | This sample demonstrates the application of Socket in network communication, including connection authentication and chat communication between two devices.| eTS |
| Distributed data management| [DistributedRdb](https://gitee.com/openharmony/applications_app_samples/tree/master/data/DistributedRdb) | This sample shows how to add, delete, modify, query, and synchronize data in the distributed relational database with eTS.| eTS |
| Ability| [BackgroundTaskManager](https://gitee.com/openharmony/applications_app_samples/tree/master/ResourcesSchedule/BackgroundTaskManager) | This sample simulates the download function. Being processed by the background task management, a download task can continue after the application exits. It stops until the download is complete.| eTS |
| Ability| [BringApp](https://gitee.com/openharmony/applications_app_samples/tree/master/ETSUI/BringApp) | This sample uses the **FeatureAbility** APIs to start a system application based on the application's bundle name and ability name.| eTS |
| Media| [VideoPlayer](https://gitee.com/openharmony/applications_app_samples/tree/master/media/VideoPlayer) | This sample shows how to play a video using the **VideoPlayer** APIs in eTS. It also provides an ability that can be invoked by other applications to play the video.| eTS |
| Ability| [DistributeCalc](https://gitee.com/openharmony/applications_app_samples/tree/master/Preset/DistributeCalc) | This sample implements a simple calculator application using JS distributed features. The calculator can perform simple numerical calculations and start a remote calculator FA to perform collaborative calculation.| eTS |
| Web | [Browser](https://gitee.com/openharmony/applications_app_samples/tree/master/device/Browser) | This sample uses the stage model and related APIs to show a simple browser.| eTS |
| Ability| [DeviceUsageStatistics](https://gitee.com/openharmony/applications_app_samples/tree/master/device/DeviceUsageStatistics) | This sample shows the device usage statistics.| eTS |
| ArkUI | [AdaptiveCapabilities](https://gitee.com/openharmony/applications_app_samples/tree/master/MultiDeviceAppDev/AdaptiveCapabilities) | This sample shows multi-device adaptation in eTS, including resource qualifiers, atomic layouts, and responsive layouts.| eTS |
| ArkUI | [Game2048](https://gitee.com/openharmony/applications_app_samples/tree/master/ETSUI/Game2048) | This sample shows how to develop a 2048 game using the **\<Grid>** component.| eTS |
| Window Manager| [Window](https://gitee.com/openharmony/applications_app_samples/tree/master/Graphics/Window) | This sample shows how to create a window, display an application over another application in the form of a floating window, and display an application on split screens.| eTS |
| Distributed data management| [Preference](https://gitee.com/openharmony/applications_app_samples/tree/master/data/Preferences) | This sample shows the theme switching function of preferences.| eTS |
| ArkUI | [NativeAPI](https://gitee.com/openharmony/applications_app_samples/tree/master/Native/NativeAPI) | This sample shows how to call C++ APIs in eTS and how C++ APIs call back JS APIs to play the Gomoku game. The native APIs implement the calculation logic, and eTS implements UI rendering and re-rendering.| eTS/C++ |
| Globalization| [International](https://gitee.com/openharmony/applications_app_samples/tree/master/common/International) | This sample shows how to use APIs related to i18n, intl, and resourceManager in eTS to set the system language, region, time, and time zone. It also provides locale setting examples.| eTS |
For more information, visit [Samples](https://gitee.com/openharmony/applications_app_samples).
## Resolved Issues
......@@ -229,4 +227,3 @@ For more information, visit [Samples](https://gitee.com/openharmony/app_samples)
| ------------------------------------------------------------ | ---------------------------------------------------------- | ------------------------------------------------------------ | ------------ |
| [I4Z3G9](https://gitee.com/openharmony/graphic_graphic_2d/issues/I4Z3G9) | [RK3568] Screen flickering occurs when the secondary window is opened in the immersive primary window.| Developer experience is affected. | 2022-06-15 |
| [I59M4Q](https://gitee.com/openharmony/developtools_hdc/issues/I59M4Q) | There is a low probability that the device is disconnected when hdc_std of API version 9 is used to connect to the device. | This issue occurs at a low probability (less than 1/30). It can be resolved by restarting the IDE or hdc_std.| 2022-06-30 |
| [I54D32](https://gitee.com/openharmony/multimedia_camera_standard/issues/I54D32) | [RK3568] A black screen is displayed when the camera has been recording videos for multiple consecutive times. | Developer experience is affected. | 2022-06-15 |
......@@ -6,9 +6,10 @@ The table below lists the APIs changes of the web subsystem in OpenHarmony 3.2 B
| Module| Class| Function| Change Type|
|---|---|---|---|
| web | WebAttribute | "onShowFileSelector(callback: (event?: { result: FileSelectorResult, fileSelector: FileSelectorParam }) => boolean): WebAttribute;" | Added|
| web | WebAttribute | onShowFileSelector(callback: (event?: { result: FileSelectorResult, fileSelector: FileSelectorParam }) => boolean): WebAttribute; | Added|
| web | WebAttribute | webDebuggingAccess(webDebuggingAccess: boolean): WebAttribute; | Added|
| web | WebAttribute | fileFromUrlAccess(fileFromUrlAccess: boolean): WebAttribute; | Added|
| web | WebAttribute | onRenderExited(callback: (event?: { renderExitReason: RenderExitReason }) => void): WebAttribute; | Added|
| web | WebController | getCookieManager() : WebCookie | Added|
| web | WebCookie | deleteExpiredCookie(): void; | Added|
| web | WebCookie | deleteSessionCookie(): void; | Added|
......@@ -22,6 +23,7 @@ The table below lists the APIs changes of the web subsystem in OpenHarmony 3.2 B
| web | WebCookie | isFileURICookieAllowed(): boolean; | Added|
| web | WebCookie | isThirdPartyCookieAllowed(): boolean; | Added|
| web | WebCookie | isCookieAllowed(): boolean; | Added|
| web | WebCookie | setCookie(url: string, value: string): boolean; | Added|
| web | FileSelectorResult | handleFileList(fileList: Array\<string>): void; | Added|
| web | FileSelectorResult | constructor(); | Added|
| web | FileSelectorParam | isCapture(): boolean; | Added|
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册