From 9c9b096bb2361468aec346060078d90072ae4d3f Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Wed, 29 Apr 2020 20:49:57 +0800 Subject: [PATCH] Update document --- docs/zh-Hans/CLI.md | 4 ++++ .../UI/Angular/Confirmation-Service.md | 24 ++++++++++++++++++- docs/zh-Hans/UI/Common/Utils/Linked-List.md | 22 ++++++++--------- 3 files changed, 38 insertions(+), 12 deletions(-) diff --git a/docs/zh-Hans/CLI.md b/docs/zh-Hans/CLI.md index 3b440ed722..658545c4fd 100644 --- a/docs/zh-Hans/CLI.md +++ b/docs/zh-Hans/CLI.md @@ -166,6 +166,10 @@ CLI的一些功能需要登录到abp.io平台. 使用你的用户名登录 abp login ``` +```bash +abp login -p +``` + 请注意,新的登录将终止先前的会话并创建一个新的会话. ### logout diff --git a/docs/zh-Hans/UI/Angular/Confirmation-Service.md b/docs/zh-Hans/UI/Angular/Confirmation-Service.md index d6ff4bc3c5..a1a181837c 100644 --- a/docs/zh-Hans/UI/Angular/Confirmation-Service.md +++ b/docs/zh-Hans/UI/Angular/Confirmation-Service.md @@ -86,10 +86,32 @@ this.confirmation.warn( - `messageLocalizationParams`是用于消息本地化的插值参数. - `titleLocalizationParams` 是标题本地化的插值参数. -With the options above, the confirmation popup looks like this: +使用以上选项确认弹层窗口如下所示: ![confirmation](./images/confirmation.png) +你可以传递HTML字符串作为标题,消息或按钮文本. 例如: + +```js +const options: Partial = { + yesText: 'Yes, delete it', +}; + +this.confirmation.warn( + ` + Role Demo will be deleted +
+ Do you confirm that? + `, + 'Are you sure?', + options, +); +``` + +由于这些值现在是HTML,因此应该手动处理本地化. 参阅[LocalizationService](./Localization#using-the-localization-service)了解如何实现. + +> 注意,Angular会清除所有字符串,并且并非每个HTML字符串都可以使用. 仅显示被Angular视为"安全"的值. + ### 如何删除一个确认弹层 打开的确认弹出窗口可以通过 `clear` 方法手动删除: diff --git a/docs/zh-Hans/UI/Common/Utils/Linked-List.md b/docs/zh-Hans/UI/Common/Utils/Linked-List.md index 871db960ab..53c356628f 100644 --- a/docs/zh-Hans/UI/Common/Utils/Linked-List.md +++ b/docs/zh-Hans/UI/Common/Utils/Linked-List.md @@ -1229,7 +1229,7 @@ find(predicate: ListIteratorFunction): ListNode | undefined 从链表中找到与给定谓词匹配的第一个节点: ```js -list.addTailMany(['a', 'b', 'b', 'c']); +list.addManyTail(['a', 'b', 'b', 'c']); // "a" <-> "b" <-> "b" <-> "c" @@ -1251,7 +1251,7 @@ findIndex(predicate: ListIteratorFunction): number 从链表中找到与给定谓词匹配的第一个节点的位置: ```js -list.addTailMany(['a', 'b', 'b', 'c']); +list.addManyTail(['a', 'b', 'b', 'c']); // "a" <-> "b" <-> "b" <-> "c" @@ -1279,7 +1279,7 @@ get(position: number): ListNode | undefined 查找并返回链表中特定位置的节点: ```js -list.addTailMany(['a', 'b', 'c']); +list.addManyTail(['a', 'b', 'c']); // "a" <-> "b" <-> "c" @@ -1303,7 +1303,7 @@ indexOf(value: T, compareFn?: ListComparisonFn): number 在链表中找到匹配给定值的第一个节点位置: ```js -list.addTailMany(['a', 'b', 'b', 'c']); +list.addManyTail(['a', 'b', 'b', 'c']); // "a" <-> "b" <-> "b" <-> "c" @@ -1325,7 +1325,7 @@ i3 === -1 你可以自定义比较器 ```js -list.addTailMany([{ x: 1 }, { x: 0 }, { x: 2 }, { x: 0 }, { x: 3 }]); +list.addManyTail([{ x: 1 }, { x: 0 }, { x: 2 }, { x: 0 }, { x: 3 }]); // {"x":1} <-> {"x":0} <-> {"x":2} <-> {"x":0} <-> {"x":3} @@ -1365,7 +1365,7 @@ forEach(iteratorFn: ListIteratorFn): void 从头到尾在链表中的所有节点上运行回调函数: ```js -list.addTailMany(['a', 'b', 'c']); +list.addManyTail(['a', 'b', 'c']); // "a" <-> "b" <-> "c" @@ -1381,7 +1381,7 @@ list.forEach((node, index) => console.log(node.value + index)); 链表是可迭代的. 换句话说你可以使用诸如`for ... of`之类的方法. ```js -list.addTailMany(['a', 'b', 'c']); +list.addManyTail(['a', 'b', 'c']); // "a" <-> "b" <-> "c" @@ -1405,7 +1405,7 @@ toArray(): T[] 转换链表值为数组: ```js -list.addTailMany(['a', 'b', 'c']); +list.addManyTail(['a', 'b', 'c']); // "a" <-> "b" <-> "c" @@ -1427,7 +1427,7 @@ toNodeArray(): T[] 转换链表节点为数组: ```js -list.addTailMany(['a', 'b', 'c']); +list.addManyTail(['a', 'b', 'c']); // "a" <-> "b" <-> "c" @@ -1449,7 +1449,7 @@ toString(mapperFn: ListMapperFn = JSON.stringify): string 将链表转换为节点及其关系的字符串表示形式: ```js -list.addTailMany(['a', 2, 'c', { k: 4, v: 'd' }]); +list.addManyTail(['a', 2, 'c', { k: 4, v: 'd' }]); // "a" <-> 2 <-> "c" <-> {"k":4,"v":"d"} @@ -1507,7 +1507,7 @@ export class ListNode { - `previous`引用列表中的上一个节点. ```js -list.addTailMany([ 0, 1, 2 ]); +list.addManyTail([ 0, 1, 2 ]); console.log( list.head.value, // 0