Skip to content

Commit d310bad

Browse files
chore(release): release 10.0.0 (#71)
Co-authored-by: huaweidevcloud <[email protected]>
1 parent e78ae0d commit d310bad

File tree

411 files changed

+4905
-1964
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

411 files changed

+4905
-1964
lines changed
File renamed without changes.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ To see more in [devui.design](https://devui.design/home).
2323

2424
## Angular Support
2525

26-
Now supports Angular <font color=red>`^9.0.0`</font>
26+
Now supports Angular <font color=red>`^10.0.0`</font>
2727

2828
## Getting Started
2929

README_zh_CN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ DevUI Design设计系统包含了DevUI规则、设计语言和最佳实践的资
2323

2424
## Angular版本
2525

26-
当前支持的angular版本<font color=red>`^9.0.0`</font>
26+
当前支持的angular版本<font color=red>`^10.0.0`</font>
2727

2828
## 快速开始
2929

devui/accordion/demo/accordion-demo.moudule.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ import { DDemoNavModule } from 'src/app/component/d-demo-nav.module';
4545
ChangeKeyComponent,
4646
],
4747
providers: [],
48-
entryComponents: [
49-
]
48+
5049
})
5150
export class AccordionDemoModule {
5251
}

devui/accordion/demo/template/template.component.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
width: 16px;
1010
height: 16px;
1111
border-radius: 8px;
12-
font-size: 12px;
12+
font-size: $devui-font-size;
1313
line-height: 12px;
1414
padding: 2px;
1515
color: $devui-light-text;

devui/alert/alert.component.scss

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
@import '../style/mixins/index';
22
@import '../style/theme/color';
33
@import '../style/theme/shadow';
4+
@import '../style/core/_font';
45

56
:host {
67
display: block;
78
}
89

910
.devui-alert {
1011
color: $devui-text;
11-
font-size: 12px;
12+
font-size: $devui-font-size;
1213
border: 1px solid transparent;
1314
padding: 10px;
1415
line-height: 20px;
@@ -26,7 +27,7 @@
2627

2728
span {
2829
color: $devui-text;
29-
font-size: 12px;
30+
font-size: $devui-font-size;
3031
font-weight: bold;
3132
}
3233
}

devui/alert/demo/alert-demo.module.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ import { DDemoNavModule } from 'src/app/component/d-demo-nav.module';
3434
BasicComponent,
3535
CloseComponent,
3636
],
37-
entryComponents: [
38-
AlertDemoComponent,
39-
],
37+
4038
})
4139
export class AlertDemoModule {
4240
}

devui/anchor/demo/anchor-demo.module.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ import { ScrollTargetComponent } from './scroll-target/scroll-target.component';
4545
HashComponent,
4646
ScrollTargetComponent
4747
],
48-
entryComponents: [
49-
AnchorDemoComponent,
50-
],
48+
5149
})
5250
export class AnchorDemoModule {
5351
}

devui/anchor/demo/async/async.component.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
cursor: pointer;
1414
height: 30px;
1515
line-height: 1.5;
16-
font-size: 12px;
16+
font-size: $devui-font-size;
1717
color: $devui-text-weak;
1818
position: relative;
1919
display: flex;

devui/anchor/demo/basic/basic.component.scss

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
@import '~ng-devui/styles-var/devui-var.scss';
22

3-
43
/* 序号 */
54
.step-nav {
65
padding-top: 10px;
@@ -14,7 +13,7 @@
1413
cursor: pointer;
1514
height: 30px;
1615
line-height: 1.5;
17-
font-size: 12px;
16+
font-size: $devui-font-size;
1817
color: $devui-text-weak;
1918
position: relative;
2019
display: flex;

devui/anchor/demo/hash/hash.component.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
cursor: pointer;
1313
height: 30px;
1414
line-height: 1.5;
15-
font-size: 12px;
15+
font-size: $devui-font-size;
1616
color: $devui-text-weak;
1717
position: relative;
1818
display: flex;

devui/anchor/demo/scroll-target/scroll-target.component.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
cursor: pointer;
1414
height: 30px;
1515
line-height: 1.5;
16-
font-size: 12px;
16+
font-size: $devui-font-size;
1717
color: $devui-text-weak;
1818
position: relative;
1919
display: flex;

devui/auto-complete/auto-complete.directive.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ export class AutoCompleteDirective implements OnInit, OnDestroy, OnChanges, Cont
181181
let tempSource = [];
182182
if (this.latestSource && this.latestSource.length > 0) {
183183
this.searchFn('').subscribe(source => {
184-
const t = this.latestSource.slice(-5); // 最近输入只支持最多5个,截取后5项
184+
const t = this.latestSource;
185185
tempSource = t.filter(data => {
186186
if (!data.label) {
187187
return source.find(item => item === data);

devui/auto-complete/auto-complete.module.ts

+5-7
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,17 @@ import { CommonModule } from '@angular/common';
33
import { FormsModule } from '@angular/forms';
44
import { OverlayModule } from '@angular/cdk/overlay';
55
import { PositioningModule } from 'ng-devui/position';
6-
import { LazyLoadModule } from 'ng-devui/utils';
6+
import { HighlightModule, LazyLoadModule } from 'ng-devui/utils';
77
import { LoadingModule } from 'ng-devui/loading';
8-
98
import { AutoCompleteConfig } from './auto-complete-config';
109
import { AutoCompleteDirective } from './auto-complete.directive';
1110
import { AutoCompletePopupComponent } from './auto-complete-popup.component';
12-
import { HighlightComponent } from './highlight.component';
1311

1412
@NgModule({
15-
imports: [CommonModule, FormsModule, OverlayModule, LazyLoadModule, LoadingModule, PositioningModule],
16-
exports: [AutoCompleteDirective, AutoCompletePopupComponent, HighlightComponent],
17-
declarations: [AutoCompleteDirective, AutoCompletePopupComponent, HighlightComponent],
13+
imports: [CommonModule, FormsModule, OverlayModule, LazyLoadModule, LoadingModule, PositioningModule, HighlightModule],
14+
exports: [AutoCompleteDirective, AutoCompletePopupComponent],
15+
declarations: [AutoCompleteDirective, AutoCompletePopupComponent],
1816
providers: [AutoCompleteConfig],
19-
entryComponents: [AutoCompletePopupComponent]
17+
2018
})
2119
export class AutoCompleteModule { }

devui/auto-complete/highlight.component.ts

-29
This file was deleted.

devui/auto-complete/public-api.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
export * from './highlight.component';
21
export * from './auto-complete.directive';
32
export * from './auto-complete.module';
43
export * from './auto-complete-popup.component';

devui/badge/badge.component.html

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
<span #contentProjection><ng-content></ng-content></span>
2-
<span class="devui-badge-count devui-badge-count-{{ status }}" *ngIf="!showDot && !hasContent">
2+
<span
3+
class="devui-badge-count devui-badge-count-{{ status }}"
4+
*ngIf="!showDot && !hasContent"
5+
[style.background]="bgColor"
6+
[style.color]="textColor"
7+
>
38
{{ count }}
49
</span>
510
<span class="devui-badge-status devui-badge-status-{{ status }}" *ngIf="showDot && !hasContent"></span>
611
<span
712
class="devui-badge-content devui-badge-content-{{ status }} devui-badge-content-{{ badgePos }}"
813
*ngIf="hasContent"
914
[style.background]="bgColor"
15+
[style.color]="textColor"
1016
[style.right.px]="offsetXY && offsetXY[0] ? -offsetXY[0] : null"
1117
[style.top.px]="offsetXY && offsetXY[1] ? offsetXY[1] : null"
1218
[ngClass]="{ 'devui-badge-content-count': !showDot, 'devui-badge-content-dot': showDot }"

devui/badge/badge.component.scss

+9-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@import '../style/theme/color';
2+
@import '../style/core/_font';
23

34
@mixin status-color {
45
&-danger {
@@ -33,13 +34,14 @@
3334
z-index: auto;
3435

3536
&-count {
36-
background: $devui-placeholder;
37+
background: $devui-brand;
3738
color: $devui-light-text;
3839
min-width: 16px;
3940
height: 16px;
40-
line-height: 16px;
41+
font-size: $devui-font-size;
42+
line-height: 12px;
4143
text-align: center;
42-
padding: 0 4px;
44+
padding: 2px 4px;
4345
border-radius: 8px;
4446
}
4547

@@ -79,13 +81,14 @@
7981
.devui-badge-count {
8082
position: relative;
8183
right: 0;
82-
background: $devui-placeholder;
84+
background: $devui-brand;
8385
color: $devui-light-text;
8486
min-width: 16px;
8587
height: 16px;
86-
line-height: 16px;
88+
font-size: $devui-font-size;
89+
line-height: 12px;
8790
text-align: center;
88-
padding: 2px 8px;
91+
padding: 2px 4px;
8992
border-radius: 8px;
9093
@include status-color;
9194
}

devui/badge/badge.component.ts

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export class BadgeComponent implements AfterViewInit {
2525
@Input() badgePos: BadgePositionType = 'top-right';
2626
@Input() offsetXY: [number, number];
2727
@Input() bgColor: string;
28+
@Input() textColor: string;
2829

2930
hasContentProjection() {
3031
const nodes = this.contentProjection?.nativeElement;

devui/badge/demo/basic/basic.component.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<section>
2+
<h4>标准徽章,通过count参数设置徽章展示的数目,通过status参数可设置徽章状态色</h4>
23
<div class="badge-group">
34
<d-badge count="6" status="success">
45
<div class="demo-card">未读消息</div>
@@ -12,19 +13,19 @@
1213
<d-badge count="14" status="warning">
1314
<div class="demo-card">未读消息</div>
1415
</d-badge>
15-
<h5>标准徽章,通过count参数设置徽章展示的数目,通过status参数可设置徽章状态色</h5>
1616
</div>
1717

18+
<h4>可通过maxCount参数设置徽章展示的数目最大值,默认为99</h4>
1819
<div class="badge-group">
1920
<d-badge count="114">
2021
<div class="demo-card">未读消息</div>
2122
</d-badge>
2223
<d-badge count="114" maxCount="10">
2324
<div class="demo-card">未读消息</div>
2425
</d-badge>
25-
<h5>可通过maxCount参数设置徽章展示的数目最大值,默认为99</h5>
2626
</div>
2727

28+
<h4>通过bgColor参数设置徽章展示状态色,通过offsetXY参数可设置徽章偏移量</h4>
2829
<div class="badge-group">
2930
<d-badge count="8" bgColor="#678">
3031
<i class="demo icon icon-helping"></i>
@@ -33,9 +34,9 @@ <h5>可通过maxCount参数设置徽章展示的数目最大值,默认为99</h
3334
<d-badge count="8" [offsetXY]="[0, 0]">
3435
<i class="demo icon icon-comment"></i>
3536
</d-badge>
36-
<h5>通过bgColor参数设置徽章展示状态色,通过offsetXY参数可设置徽章偏移量</h5>
3737
</div>
3838

39+
<h4>通过badgePos参数设置徽章位置</h4>
3940
<div class="badge-group">
4041
<d-badge count="8" badgePos="top-left">
4142
<i class="demo icon icon-infomation"></i>
@@ -44,6 +45,5 @@ <h5>通过bgColor参数设置徽章展示状态色,通过offsetXY参数可设
4445
<d-badge count="8" badgePos="top-right">
4546
<i class="demo icon icon-desk-notice"></i>
4647
</d-badge>
47-
<h5>通过badgePos参数设置徽章位置</h5>
4848
</div>
4949
</section>

devui/badge/demo/basic/basic.component.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010

1111
.demo {
1212
vertical-align: middle;
13-
font-size: 20px;
13+
font-size: $devui-font-size-page-title;
1414

1515
&-card {
1616
width: 90px;
1717
height: 42px;
1818
line-height: 42px;
1919
border-radius: 4px;
2020
background: $devui-global-bg;
21-
font-size: 14px;
21+
font-size: $devui-font-size-card-title;
2222
text-align: center;
2323
display: inline-block;
2424
}

devui/badge/demo/count/count.component.html

+6
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,10 @@
1616
</li>
1717
</ul>
1818
</div>
19+
20+
<div>
21+
<h4>通过textColor、bgColor自定义文字、背景颜色</h4>
22+
<strong><span>代码</span></strong>
23+
<d-badge class="span-space" count="2.3k" bgColor="#F2F2F3" textColor="#7A7E87"> </d-badge>
24+
</div>
1925
</section>

devui/badge/demo/count/count.component.scss

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@import '~ng-devui/styles-var/devui-var.scss';
22

33
.title {
4-
font-size: 14px;
4+
font-size: $devui-font-size-card-title;
55
margin-bottom: 10px;
66
font-weight: bold;
77
}
@@ -24,7 +24,7 @@
2424

2525
.item-title {
2626
color: $devui-text;
27-
font-size: 14px;
27+
font-size: $devui-font-size-card-title;
2828
}
2929
}
3030

@@ -37,3 +37,7 @@
3737
}
3838
}
3939
}
40+
41+
.span-space {
42+
left: 5px;
43+
}

devui/badge/demo/dot/dot.component.scss

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
@import '~ng-devui/styles-var/devui-var.scss';
2+
13
:host {
2-
font-size: 16px;
4+
font-size: $devui-font-size-icon;
35
}
46

57
.badge-group d-badge {

devui/badge/doc/api.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
### d-badge 参数
22

3-
| 参数 | 类型 | 默认 | 说明 | 跳转Demo |
3+
| 参数 | 类型 | 默认 | 说明 | 跳转 Demo |
44
| :---------: | :------------: | :-----: | :--------------------------------------------------------------------------- | :--------------------------- |
55
| count | `number` | -- | 可选,设置基本徽章和计数徽章中显示的数目 | [基本徽章](/components/badge/demo#badge-basic) |
66
| maxCount | `number` | 99 | 可选,设置基本徽章和计数徽章最大可显示数目,当 count > maxCount 时显示maxCount+ | [基本徽章](/components/badge/demo#badge-basic) |
@@ -9,4 +9,4 @@
99
| badgePos | `BadgeStatusType` | 'top-right' | 可选,徽标位置 'top-left' \| 'top-rihgt' \| 'bottpm-left' \| ''bottom-right'' | [基本徽章](/components/badge/demo#badge-basic) |
1010
| offsetXY | `[number, number]` | -- | 可选,有包裹时徽标位置偏移量,格式为[x,y],单位为px。x为相对right偏移量(right: -x px),y为相对top偏移量(top: y px) | [状态徽章](/components/badge/demo#badge-status) |
1111
| bgColor | `string` | -- | 可选, 可自定义徽标色 | [基本徽章](/components/badge/demo#badge-basic) |
12-
12+
| textColor | `string` | -- | 可选, 可自定义徽标文字颜色 | [计数徽章](/components/badge/demo#badge-count) |

0 commit comments

Comments
 (0)