Skip to content

Commit 0254ee2

Browse files
authored
feat(module:hash-code): add HashCode component (#8111)
1 parent 1507ed0 commit 0254ee2

30 files changed

Lines changed: 841 additions & 1 deletion

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ components/qr-code/** @OriginRing
7171
components/cron-expression/** @OriginRing
7272
components/water-mark/** @OriginRing
7373
components/color-picker/** @OriginRing
74+
components/hash-code/** @OriginRing
7475

7576
# The `components/core/*` owners
7677
components/core/config/** @hullis

components/components.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,4 @@
6666
@import './qr-code/style/entry.less';
6767
@import './water-mark/style/entry.less';
6868
@import './color-picker/style/entry.less';
69+
@import './hash-code/style/entry.less';

components/hash-code/demo/basic.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
order: 0
3+
title:
4+
zh-CN: 基本
5+
en-US: Basic
6+
---
7+
8+
## zh-CN
9+
10+
最简单的用法。
11+
12+
## en-US
13+
14+
The simplest usage.

components/hash-code/demo/basic.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { Component } from '@angular/core';
2+
3+
@Component({
4+
selector: 'nz-demo-hash-code-basic',
5+
template: ` <nz-hash-code [nzValue]="value"></nz-hash-code> `
6+
})
7+
export class NzDemoHashCodeBasicComponent {
8+
value = 'dfb5fe9ef7b99b2b1db102114a6d7d445d992f40a5d575f801c148990199a068';
9+
}

components/hash-code/demo/copy.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
order: 1
3+
title:
4+
zh-CN: 复制
5+
en-US: Copy
6+
---
7+
8+
## zh-CN
9+
10+
点击复制的 icon
11+
12+
## en-US
13+
14+
Click on the copied icon.

components/hash-code/demo/copy.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { Component } from '@angular/core';
2+
3+
@Component({
4+
selector: 'nz-demo-hash-code-copy',
5+
template: ` <nz-hash-code [nzValue]="value" (nzOnCopy)="getCopy($event)"></nz-hash-code> `
6+
})
7+
export class NzDemoHashCodeCopyComponent {
8+
value = 'dfb5fe9ef7b99b2b1db102114a6d7d445d992f40a5d575f801c148990199a068';
9+
10+
getCopy(value: string): void {
11+
console.log(`hashCode:${value}`);
12+
}
13+
}

components/hash-code/demo/logo.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
order: 6
3+
title:
4+
zh-CN: 添加 Logo
5+
en-US: Logo
6+
---
7+
8+
## zh-CN
9+
10+
可设置右上角的标志
11+
12+
## en-US
13+
14+
Possibility to set the logo in the upper right corner.

components/hash-code/demo/logo.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { Component } from '@angular/core';
2+
3+
@Component({
4+
selector: 'nz-demo-hash-code-logo',
5+
template: ` <nz-hash-code [nzValue]="value" nzLogo="Antd"></nz-hash-code> `
6+
})
7+
export class NzDemoHashCodeLogoComponent {
8+
value = 'dfb5fe9ef7b99b2b1db102114a6d7d445d992f40a5d575f801c148990199a068';
9+
}

components/hash-code/demo/module

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { NzHashCodeModule } from 'ng-zorro-antd/hash-code';
2+
3+
export const moduleList = [NzHashCodeModule];
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
order: 2
3+
title:
4+
zh-CN: 更换样式
5+
en-US: Style
6+
---
7+
8+
## zh-CN
9+
10+
更换样式。
11+
12+
## en-US
13+
14+
Replacement of styles.

0 commit comments

Comments
 (0)