Skip to content

Commit

Permalink
fix(module:water-mark): nzWaterMark is a block element && standalone (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
OriginRing authored Dec 2, 2023
1 parent 165f171 commit e4d6082
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 6 deletions.
7 changes: 6 additions & 1 deletion components/water-mark/doc/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,18 @@ Add specific text or patterns to the page.
- Use when the page needs to be watermarked to identify the copyright.
- Suitable for preventing information theft.

module:
```ts
import { NzWaterMarkModule } from 'ng-zorro-antd/water-mark';
```
standalone:
```ts
import { NzWaterMarkComponent } from 'ng-zorro-antd/water-mark';
```

## API

### nz-water-mark
### nz-water-mark:standalone

| Property | Description | Type | Default |
| ----------- | ------------------------------------------------------------------------------------------------- | -------------------- | ------------------------ |
Expand Down
7 changes: 6 additions & 1 deletion components/water-mark/doc/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,18 @@ cover: https://img.alicdn.com/imgextra/i3/O1CN0194FGAd1FlrwQShfR8_!!600000000052
- 页面需要添加水印标识版权时使用。
- 适用于防止信息盗用。

module:
```ts
import { NzWaterMarkModule } from 'ng-zorro-antd/water-mark';
```
standalone:
```ts
import { NzWaterMarkComponent } from 'ng-zorro-antd/water-mark';
```

## API

### nz-water-mark
### nz-water-mark:standalone

| 参数 | 说明 | 类型 | 默认值 |
| ----------- | ----------------------------------------------------------- | -------------------- | ------------------------ |
Expand Down
1 change: 1 addition & 0 deletions components/water-mark/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
@water-mark-prefix-cls: ~'@{ant-prefix}-water-mark';

.@{water-mark-prefix-cls} {
display: block;
position: relative;
}
1 change: 1 addition & 0 deletions components/water-mark/typings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export interface MarkStyleType {
pointerEvents: string;
backgroundRepeat: string;
backgroundPosition?: string;
visibility: string;
}

export interface MarkStyleCanvasType extends MarkStyleType {
Expand Down
4 changes: 3 additions & 1 deletion components/water-mark/water-mark.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const FontGap = 3;

@Component({
selector: 'nz-water-mark',
standalone: true,
exportAs: 'NzWaterMark',
changeDetection: ChangeDetectionStrategy.OnPush,
template: ` <ng-content></ng-content> `,
Expand Down Expand Up @@ -120,7 +121,8 @@ export class NzWaterMarkComponent implements AfterViewInit, OnInit, OnChanges, O
width: '100%',
height: '100%',
pointerEvents: 'none',
backgroundRepeat: 'repeat'
backgroundRepeat: 'repeat',
visibility: 'visible'
};

/** Calculate the style of the nzOffset */
Expand Down
4 changes: 1 addition & 3 deletions components/water-mark/water-mark.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
*/

import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';

import { NzWaterMarkComponent } from './water-mark.component';

@NgModule({
exports: [NzWaterMarkComponent],
declarations: [NzWaterMarkComponent],
imports: [CommonModule]
imports: [NzWaterMarkComponent]
})
export class NzWaterMarkModule {}

0 comments on commit e4d6082

Please sign in to comment.