Skip to content

Commit b21565b

Browse files
author
Zhicheng WANG
committed
docs: 附着改译为附加
1 parent fede0fb commit b21565b

36 files changed

+101
-101
lines changed

src/cdk/a11y/focus-trap/focus-trap.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export class FocusTrap {
121121
* @returns Whether the focus trap managed to attach successfuly. This may not be the case
122122
* if the target element isn't currently in the DOM.
123123
*
124-
* 焦点陷阱是否成功附着。如果目标元素当前不在 DOM 中,则可能不是这种情况。
124+
* 焦点陷阱是否成功附加。如果目标元素当前不在 DOM 中,则可能不是这种情况。
125125
*
126126
*/
127127
attachAnchors(): boolean {
@@ -331,7 +331,7 @@ export class FocusTrap {
331331
/**
332332
* Checks whether the focus trap has successfully been attached.
333333
*
334-
* 检查焦点陷阱是否已附着成功
334+
* 检查焦点陷阱是否已附加成功
335335
*
336336
*/
337337
hasAttached(): boolean {

src/cdk/drag-drop/drop-list-ref.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export class DropListRef<T = any> {
110110
/**
111111
* Element that the drop list is attached to.
112112
*
113-
* 投放表附着到的元素
113+
* 投放表附加到的元素
114114
*
115115
*/
116116
element: HTMLElement | ElementRef<HTMLElement>;

src/cdk/overlay/dispatchers/base-overlay-dispatcher.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {OverlayReference} from '../overlay-reference';
1515
* if any. It maintains a list of attached overlays to determine best suited overlay based
1616
* on event target and order of overlay opens.
1717
*
18-
* 本服务用于将落在主体上的事件派发到适当的浮层引用(如果有)。它维护一个已附着的浮层列表,以便根据事件目标和浮层打开的顺序确定最适合的浮层。
18+
* 本服务用于将落在主体上的事件派发到适当的浮层引用(如果有)。它维护一个已附加的浮层列表,以便根据事件目标和浮层打开的顺序确定最适合的浮层。
1919
*
2020
*/
2121
@Injectable({providedIn: 'root'})
@@ -24,7 +24,7 @@ export abstract class BaseOverlayDispatcher implements OnDestroy {
2424
/**
2525
* Currently attached overlays in the order they were attached.
2626
*
27-
* 当前已附着的浮层,按其附着顺序排列
27+
* 当前已附加的浮层,按其附加顺序排列
2828
*
2929
*/
3030
_attachedOverlays: OverlayReference[] = [];
@@ -43,7 +43,7 @@ export abstract class BaseOverlayDispatcher implements OnDestroy {
4343
/**
4444
* Add a new overlay to the list of attached overlay refs.
4545
*
46-
* 将新的浮层添加到已附着的浮层引用列表中
46+
* 将新的浮层添加到已附加的浮层引用列表中
4747
*
4848
*/
4949
add(overlayRef: OverlayReference): void {
@@ -55,7 +55,7 @@ export abstract class BaseOverlayDispatcher implements OnDestroy {
5555
/**
5656
* Remove an overlay from the list of attached overlay refs.
5757
*
58-
* 从已附着的浮层引用列表中删除浮层
58+
* 从已附加的浮层引用列表中删除浮层
5959
*
6060
*/
6161
remove(overlayRef: OverlayReference): void {

src/cdk/overlay/dispatchers/overlay-keyboard-dispatcher.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {BaseOverlayDispatcher} from './base-overlay-dispatcher';
1616
* if any. It maintains a list of attached overlays to determine best suited overlay based
1717
* on event target and order of overlay opens.
1818
*
19-
* 本服务用于将落在 body 上的键盘事件派发到适当的浮层引用(如果有)。它维护一个已附着的浮层列表,以便根据事件目标和浮层打开顺序确定最适合的浮层。
19+
* 本服务用于将落在 body 上的键盘事件派发到适当的浮层引用(如果有)。它维护一个已附加的浮层列表,以便根据事件目标和浮层打开顺序确定最适合的浮层。
2020
*
2121
*/
2222
@Injectable({providedIn: 'root'})
@@ -29,7 +29,7 @@ export class OverlayKeyboardDispatcher extends BaseOverlayDispatcher {
2929
/**
3030
* Add a new overlay to the list of attached overlay refs.
3131
*
32-
* 将新的浮层添加到已附着的浮层引用列表中
32+
* 将新的浮层添加到已附加的浮层引用列表中
3333
*
3434
*/
3535
add(overlayRef: OverlayReference): void {
@@ -58,7 +58,7 @@ export class OverlayKeyboardDispatcher extends BaseOverlayDispatcher {
5858
/**
5959
* Keyboard event listener that will be attached to the body.
6060
*
61-
* 键盘事件监听器,将被附着到 body 上。
61+
* 键盘事件监听器,将被附加到 body 上。
6262
*
6363
*/
6464
private _keydownListener = (event: KeyboardEvent) => {

src/cdk/overlay/overlay-directives.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ export class CdkConnectedOverlay implements OnDestroy, OnChanges {
550550
/**
551551
* Attaches the overlay and subscribes to backdrop clicks if backdrop exists
552552
*
553-
* 如果存在背景板,请把浮层附着上去并订阅背景板点击事件
553+
* 如果存在背景板,请把浮层附加上去并订阅背景板点击事件
554554
*
555555
*/
556556
private _attachOverlay() {

src/cdk/overlay/overlay-ref.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export class OverlayRef implements PortalOutlet, OverlayReference {
5151
* Reference to the parent of the `_host` at the time it was detached. Used to restore
5252
* the `_host` to its original position in the DOM when it gets re-attached.
5353
*
54-
* 在拆除浮层时,引用其 `_host` 的父元素。当重新附着时,用于把 `_host` 恢复其在 DOM 中的原始位置。
54+
* 在拆除浮层时,引用其 `_host` 的父元素。当重新附加时,用于把 `_host` 恢复其在 DOM 中的原始位置。
5555
*
5656
*/
5757
private _previousHostParent: HTMLElement;
@@ -131,15 +131,15 @@ export class OverlayRef implements PortalOutlet, OverlayReference {
131131
* Attaches content, given via a Portal, to the overlay.
132132
* If the overlay is configured to have a backdrop, it will be created.
133133
*
134-
* 把通过传送点给出的内容附着到浮层上。如果浮层配置为具有背景板,也会创建它。
134+
* 把通过传送点给出的内容附加到浮层上。如果浮层配置为具有背景板,也会创建它。
135135
*
136136
* @param portal Portal instance to which to attach the overlay.
137137
*
138-
* 要附着的传送点实例
138+
* 要附加的传送点实例
139139
*
140140
* @returns The portal attachment result.
141141
*
142-
* 传送点附着的结果
142+
* 传送点附加的结果
143143
*
144144
*/
145145
attach(portal: Portal<any>): any {
@@ -286,7 +286,7 @@ export class OverlayRef implements PortalOutlet, OverlayReference {
286286
/**
287287
* Whether the overlay has attached content.
288288
*
289-
* 浮层是否附着着内容
289+
* 浮层是否附加着内容
290290
*
291291
*/
292292
hasAttached(): boolean {
@@ -306,7 +306,7 @@ export class OverlayRef implements PortalOutlet, OverlayReference {
306306
/**
307307
* Gets an observable that emits when the overlay has been attached.
308308
*
309-
* 获取一个在附着浮层时会发出通知的可观察对象
309+
* 获取一个在附加浮层时会发出通知的可观察对象
310310
*
311311
*/
312312
attachments(): Observable<void> {
@@ -514,7 +514,7 @@ export class OverlayRef implements PortalOutlet, OverlayReference {
514514
/**
515515
* Attaches a backdrop for this overlay.
516516
*
517-
* 为这个浮层附着一个背景板
517+
* 为这个浮层附加一个背景板
518518
*
519519
*/
520520
private _attachBackdrop() {

src/cdk/overlay/scroll/block-scroll-strategy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class BlockScrollStrategy implements ScrollStrategy {
4040
/**
4141
* Blocks page-level scroll while the attached overlay is open.
4242
*
43-
* 打开已附着的浮层时阻止页面级滚动
43+
* 打开已附加的浮层时阻止页面级滚动
4444
*
4545
*/
4646
enable() {
@@ -65,7 +65,7 @@ export class BlockScrollStrategy implements ScrollStrategy {
6565
/**
6666
* Unblocks page-level scroll while the attached overlay is open.
6767
*
68-
* 打开已附着的浮层时,取消阻止页面级滚动。
68+
* 打开已附加的浮层时,取消阻止页面级滚动。
6969
*
7070
*/
7171
disable() {

src/cdk/overlay/scroll/close-scroll-strategy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export class CloseScrollStrategy implements ScrollStrategy {
6161
/**
6262
* Enables the closing of the attached overlay on scroll.
6363
*
64-
* 启用“滚动时关闭已附着浮层”。
64+
* 启用“滚动时关闭已附加浮层”。
6565
*
6666
*/
6767
enable() {
@@ -91,7 +91,7 @@ export class CloseScrollStrategy implements ScrollStrategy {
9191
/**
9292
* Disables the closing the attached overlay on scroll.
9393
*
94-
* 禁用“滚动时关闭已附着浮层”。
94+
* 禁用“滚动时关闭已附加浮层”。
9595
*
9696
*/
9797
disable() {

src/cdk/overlay/scroll/scroll-strategy.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,23 @@ export interface ScrollStrategy {
1818
/**
1919
* Enable this scroll strategy (called when the attached overlay is attached to a portal).
2020
*
21-
* 启用此滚动策略(将已附着的浮层附着到传送点 Portal 时调用)。
21+
* 启用此滚动策略(将已附加的浮层附加到传送点 Portal 时调用)。
2222
*
2323
*/
2424
enable: () => void;
2525

2626
/**
2727
* Disable this scroll strategy (called when the attached overlay is detached from a portal).
2828
*
29-
* 禁用此滚动策略(当已附着的浮层从传送点 Portal 拆除时调用)。
29+
* 禁用此滚动策略(当已附加的浮层从传送点 Portal 拆除时调用)。
3030
*
3131
*/
3232
disable: () => void;
3333

3434
/**
3535
* Attaches this `ScrollStrategy` to an overlay.
3636
*
37-
* 将此 `ScrollStrategy` 附着到浮层
37+
* 将此 `ScrollStrategy` 附加到浮层
3838
*
3939
*/
4040
attach: (overlayRef: OverlayReference) => void;
@@ -51,7 +51,7 @@ export interface ScrollStrategy {
5151
/**
5252
* Returns an error to be thrown when attempting to attach an already-attached scroll strategy.
5353
*
54-
* 返回一个错误,它将在尝试附着到已附着的滚动策略时引发
54+
* 返回一个错误,它将在尝试附加到已附加的滚动策略时引发
5555
*
5656
*/
5757
export function getMatScrollStrategyAlreadyAttachedError(): Error {

src/cdk/portal/dom-portal-outlet.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import {BasePortalOutlet, ComponentPortal, TemplatePortal, DomPortal} from './po
1919
* A PortalOutlet for attaching portals to an arbitrary DOM element outside of the Angular
2020
* application context.
2121
*
22-
* PortalOutlet,用于把传送点附着到 Angular 应用上下文之外的任意一个 DOM 元素上。
22+
* PortalOutlet,用于把传送点附加到 Angular 应用上下文之外的任意一个 DOM 元素上。
2323
*
2424
*/
2525
export class DomPortalOutlet extends BasePortalOutlet {
@@ -48,7 +48,7 @@ export class DomPortalOutlet extends BasePortalOutlet {
4848
*
4949
* @param portal Portal to be attached
5050
*
51-
* 要附着到的传送点
51+
* 要附加到的传送点
5252
*
5353
* @returns Reference to the created component.
5454
*
@@ -89,11 +89,11 @@ export class DomPortalOutlet extends BasePortalOutlet {
8989
/**
9090
* Attaches a template portal to the DOM as an embedded view.
9191
*
92-
* 把一个模板传送点作为嵌入式视图附着到 DOM 上。
92+
* 把一个模板传送点作为嵌入式视图附加到 DOM 上。
9393
*
9494
* @param portal Portal to be attached.
9595
*
96-
* 要附着到的传送点
96+
* 要附加到的传送点
9797
*
9898
* @returns Reference to the created embedded view.
9999
*
@@ -129,11 +129,11 @@ export class DomPortalOutlet extends BasePortalOutlet {
129129
/**
130130
* Attaches a DOM portal by transferring its content into the outlet.
131131
*
132-
* 通过把其内容传入指定的地标来附着到 DOM 传送点。
132+
* 通过把其内容传入指定的地标来附加到 DOM 传送点。
133133
*
134134
* @param portal Portal to be attached.
135135
*
136-
* 要附着到的传送点
136+
* 要附加到的传送点
137137
*
138138
* @deprecated To be turned into a method.
139139
*

0 commit comments

Comments
 (0)