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

!21473 翻译完成:20620 零散更新

Merge pull request !21473 from wusongqing/TR20620
......@@ -338,7 +338,7 @@ hashMap.clear();
keys(): IterableIterator<K>
Obtains an iterator that contains all the elements in this container.
Obtains an iterator that contains all the keys in this container.
**System capability**: SystemCapability.Utils.Lang
......
......@@ -4,7 +4,7 @@
**TreeMap** is implemented using a red-black tree, which is a binary search tree where keys are stored in sorted order for efficient insertion and removal.
**[HashMap](js-apis-treemap.md)** is faster in accessing data than **TreeMap**, because the former accesses data based on the hash code of the key, whereas the latter stores and accesses the keys in sorted order.
**[HashMap](js-apis-hashmap.md)** is faster in accessing data than **TreeMap**, because the former accesses data based on the hash code of the key, whereas the latter stores and accesses the keys in sorted order.
Recommended use case: Use **TreeMap** when you need to store KV pairs in sorted order.
......
......@@ -89,7 +89,7 @@ const workerFAModel02 = new worker.ThreadWorker("../workers/worker.ts");
// In the stage model, the workers directory is at the same level as the pages directory in the entry module.
const workerStageModel01 = new worker.ThreadWorker('entry/ets/workers/worker.ts', {name:"first worker in Stage model"});
// In the stage model, the workers directory is at the same level as the parent directory of the pages directory in the entry module.
// In the stage model, the workers directory is a child directory of the pages directory in the entry module.
const workerStageModel02 = new worker.ThreadWorker('entry/ets/pages/workers/worker.ts');
// For the script URL "entry/ets/workers/worker.ts" in the stage model:
......@@ -101,7 +101,7 @@ const workerStageModel02 = new worker.ThreadWorker('entry/ets/pages/workers/work
// workerdir indicates the directory where the worker file is located, and workerfile indicates the worker file name.
// In the stage model, the workers directory is at the same level as the pages directory in the entry module, and bundlename is com.example.workerdemo.
const workerStageModel03 = new worker.ThreadWorker('@bundle:com.example.workerdemo/entry/ets/workers/worker');
// In the stage model, the workers directory is at the same level as the parent directory of the pages directory in the entry module, and bundlename is com.example.workerdemo.
// In the stage model, the workers directory is a child directory of the pages directory in the entry module, and bundlename is com.example.workerdemo.
const workerStageModel04 = new worker.ThreadWorker('@bundle:com.example.workerdemo/entry/ets/pages/workers/worker');
```
......@@ -1199,7 +1199,7 @@ const workerFAModel02 = new worker.Worker("../workers/worker.ts");
// In the stage model, the workers directory is at the same level as the pages directory.
const workerStageModel01 = new worker.Worker('entry/ets/workers/worker.ts', {name:"first worker in Stage model"});
// In the stage model, the workers directory is at the same level as the child directory of the pages directory.
// In the stage model, the workers directory is a child directory of the pages directory.
const workerStageModel02 = new worker.Worker('entry/ets/pages/workers/worker.ts');
// For the script URL "entry/ets/workers/worker.ts" in the stage model:
......@@ -2224,4 +2224,5 @@ Configuration of the **build-profile.json5** file:
}
}
```
<!--no_check-->
<!--no_check-->
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册