Skip to content

Commit 70ac40c

Browse files
chore(release): release 12.0.0 (#132)
Co-authored-by: huaweidevcloud <[email protected]>
1 parent 1c17f09 commit 70ac40c

File tree

369 files changed

+1909
-1063
lines changed

Some content is hidden

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

369 files changed

+1909
-1063
lines changed

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>`^11.0.0`</font>
26+
Now supports Angular <font color=red>`^12.0.0`</font>
2727

2828
## Getting Started
2929

devui-commons/src/header/header.component.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
</div>
2828
<div *ngIf="showAvatar" class="header-avatar">
2929
<d-avatar
30-
[width]="'40'"
31-
[height]="'40'"
30+
[width]="40"
31+
[height]="40"
3232
[imgSrc]="userAvatar"
3333
></d-avatar>
3434
</div>

devui/accordion/accordion.component.scss

+8-8
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
}
3131

3232
& > .devui-accordion-list {
33-
padding: 10px 0;
33+
padding: 8px 0;
3434
}
3535

3636
.devui-over-flow-ellipsis {
@@ -50,7 +50,7 @@
5050
display: block;
5151
height: 40px;
5252
width: 100%;
53-
padding: 0 10px 0 20px;
53+
padding: 0 12px 0 20px;
5454
font-weight: 400;
5555
line-height: 40px;
5656
color: $devui-text-weak;
@@ -103,7 +103,7 @@
103103
padding: 0;
104104

105105
& > a {
106-
padding: 0 10px 0 20px;
106+
padding: 0 12px 0 20px;
107107
}
108108
}
109109
}
@@ -126,7 +126,7 @@
126126
width: 16px;
127127
height: 16px;
128128
line-height: 16px;
129-
transition: transform $devui-animation-duration-slow $devui-animation-ease-in-smooth;
129+
transition: transform $devui-animation-duration-slow $devui-animation-ease-in-out-smooth;
130130

131131
& > svg {
132132
width: 16px;
@@ -162,7 +162,7 @@
162162

163163
/* 可展开的菜单 */
164164
:host ::ng-deep .devui-accordion-menu-item > .devui-accordion-item-title {
165-
padding-right: 30px;
165+
padding-right: 28px;
166166

167167
&.active:not(.open) {
168168
color: $devui-brand-active;
@@ -214,12 +214,12 @@
214214

215215
:host ::ng-deep .devui-accordion-show-animate .devui-accordion-item-title {
216216
transition:
217-
font-weight $devui-animation-duration-fast $devui-animation-ease-in-smooth,
218-
background-color $devui-animation-duration-fast $devui-animation-ease-in-smooth;
217+
font-weight $devui-animation-duration-fast $devui-animation-ease-in-out-smooth,
218+
background-color $devui-animation-duration-fast $devui-animation-ease-in-out-smooth;
219219

220220
.devui-accordion-splitter::before {
221221
transform: scaleY(0);
222-
transition: transform $devui-animation-duration-slow $devui-animation-ease-in-smooth;
222+
transition: transform $devui-animation-duration-slow $devui-animation-ease-in-out-smooth;
223223
}
224224

225225
&.devui-router-active,

devui/accordion/demo/inner-list-template/inner-list-template.component.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
.my-menu {
66
min-height: 60px;
77
line-height: 40px;
8-
padding: 10px;
8+
padding: 12px;
99
}
1010

1111
@media (max-width: 500px) {

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

+3-5
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,19 @@
88
display: inline-block;
99
width: 16px;
1010
height: 16px;
11-
border-radius: (16px/2);
11+
border-radius: 8px;
1212
font-size: $devui-font-size;
13-
line-height: 12px;
14-
padding: 2px;
13+
line-height: 16px;
1514
color: $devui-light-text;
1615
text-align: center;
1716
background: $devui-brand;
18-
margin-top: -2px;
1917
font-weight: 400;
2018
}
2119

2220
.loading {
2321
position: relative;
2422
line-height: 40px;
25-
padding-left: 66px;
23+
padding-left: 64px;
2624
}
2725

2826
.circle-spinner {

devui/alert/alert.component.scss

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
@import '../style/theme/color';
33
@import '../style/theme/shadow';
44
@import '../style/theme/corner';
5-
@import '../style/core/_font';
5+
@import '../style/theme/_font';
66

77
:host {
88
display: block;
@@ -12,8 +12,8 @@
1212
color: $devui-text;
1313
font-size: $devui-font-size;
1414
border: 1px solid transparent;
15-
padding: 10px;
16-
line-height: 20px;
15+
padding: 8px;
16+
line-height: 24px;
1717
border-radius: $devui-border-radius;
1818
padding-left: 16px;
1919
word-break: normal;

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/* 序号 */
44
.step-nav {
5-
padding-top: 10px;
5+
padding-top: 8px;
66
width: 240px;
77
}
88

@@ -41,7 +41,7 @@
4141
line-height: 26px;
4242
border-radius: 50%;
4343
background-color: $devui-base-bg;
44-
margin-right: 18px;
44+
margin-right: 20px;
4545
border: 2px solid $devui-dividing-line;
4646
}
4747

@@ -75,7 +75,7 @@
7575
}
7676

7777
.mycontent {
78-
padding: 10px;
78+
padding: 8px;
7979
margin-left: 240px;
8080
}
8181

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/* 序号 */
44
.step-nav {
5-
padding-top: 10px;
5+
padding-top: 8px;
66
width: 240px;
77
}
88

@@ -41,7 +41,7 @@
4141
line-height: 26px;
4242
border-radius: 50%;
4343
background-color: $devui-base-bg;
44-
margin-right: 18px;
44+
margin-right: 20px;
4545
border: 2px solid $devui-dividing-line;
4646
}
4747

@@ -75,7 +75,7 @@
7575
}
7676

7777
.mycontent {
78-
padding: 10px;
78+
padding: 8px;
7979
margin-left: 240px;
8080
}
8181

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/* 序号 */
44
.step-nav {
5-
padding-top: 10px;
5+
padding-top: 8px;
66
width: 240px;
77
}
88

@@ -40,7 +40,7 @@
4040
line-height: 26px;
4141
border-radius: 50%;
4242
background-color: $devui-base-bg;
43-
margin-right: 18px;
43+
margin-right: 20px;
4444
border: 2px solid $devui-dividing-line;
4545
}
4646

@@ -74,7 +74,7 @@
7474
}
7575

7676
.mycontent {
77-
padding: 10px;
77+
padding: 8px;
7878
margin-left: 240px;
7979
}
8080

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/* 序号 */
44
.step-nav {
5-
padding-top: 10px;
5+
padding-top: 8px;
66
width: 240px;
77
}
88

@@ -41,7 +41,7 @@
4141
line-height: 26px;
4242
border-radius: 50%;
4343
background-color: $devui-base-bg;
44-
margin-right: 18px;
44+
margin-right: 20px;
4545
border: 2px solid $devui-dividing-line;
4646
}
4747

@@ -75,7 +75,7 @@
7575
}
7676

7777
.mycontent {
78-
padding: 10px;
78+
padding: 8px;
7979
margin-left: 240px;
8080
}
8181

devui/auto-complete/auto-complete-popup.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
[title]="formatter(item)"
4747
[ngClass]="{
4848
selected: $index == activeIndex,
49-
'devui-dropdown-bg': $index == activeIndex,
49+
'devui-dropdown-bg': $index == hoverIndex,
5050
disabled: disabledKey && item[disabledKey]
5151
}"
5252
(click)="onSelect($event, item)"

devui/auto-complete/auto-complete-popup.component.scss

+12-5
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,29 @@
1010
cursor: pointer;
1111
display: block;
1212
width: 100%;
13-
padding: 8px 10px;
13+
padding: 8px 12px;
1414
clear: both;
1515
border: 0;
1616
overflow: hidden;
1717
text-overflow: ellipsis;
1818
white-space: nowrap;
19+
line-height: 14px;
20+
}
1921

20-
&.selected:not(.disabled) {
21-
color: $devui-brand-active;
22+
.devui-dropdown-menu {
23+
.devui-dropdown-item:not(.disabled) {
24+
&.selected {
25+
color: $devui-list-item-active-text;
26+
background-color: $devui-list-item-active-bg;
27+
}
2228
}
2329
}
2430

2531
.devui-no-result-template,
2632
.devui-is-searching-template {
2733
display: block;
2834
width: 100%;
29-
padding: 8px 10px;
35+
padding: 8px 12px;
3036
clear: both;
3137
border: 0;
3238
overflow: hidden;
@@ -35,6 +41,7 @@
3541
cursor: not-allowed;
3642
background-color: $devui-disabled-bg;
3743
color: $devui-disabled-text;
44+
line-height: 14px;
3845

3946
&:hover,
4047
&:active,
@@ -61,5 +68,5 @@ ul.devui-list-unstyled {
6168

6269
.devui-popup-tips {
6370
color: $devui-text-weak; // TODO: Color-Question
64-
padding: 3px 1em;
71+
padding: 4px 12px;
6572
}

devui/auto-complete/auto-complete-popup.component.ts

+17-13
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export class AutoCompletePopupComponent implements ControlValueAccessor {
3838
@ViewChild('selectMenuElement') selectMenuElement: ElementRef;
3939
@ViewChild('dropdownUl') dropdownUl: ElementRef;
4040
activeIndex = 0;
41+
hoverIndex = 0;
4142
showLoading = false;
4243
private value: any;
4344
labelMinHeight = 20; // position.top小于20px时候,表示光标在第一行
@@ -83,7 +84,8 @@ export class AutoCompletePopupComponent implements ControlValueAccessor {
8384
}
8485

8586
selectCurrentItem(event) {
86-
this.onSelect(event, this.source[this.activeIndex]);
87+
this.activeIndex = this.hoverIndex;
88+
this.onSelect(event, this.source[this.hoverIndex]);
8789
}
8890

8991
onActiveIndexChange(index) {
@@ -92,12 +94,14 @@ export class AutoCompletePopupComponent implements ControlValueAccessor {
9294

9395
reset() {
9496
this.activeIndex = 0;
97+
this.hoverIndex = 0;
9598
}
9699

97-
scrollToActive(): void {
100+
scrollToActive(index?): void {
98101
const that = this;
99102
setTimeout(() => {
100-
const selectIndex = that.activeIndex;
103+
const scrollIndex = index === undefined ? this.activeIndex : index;
104+
const selectIndex = scrollIndex;
101105
const scrollPane: any = that.dropdownUl.nativeElement.children[selectIndex];
102106
if (scrollPane.scrollIntoViewIfNeeded) {
103107
scrollPane.scrollIntoViewIfNeeded(false);
@@ -113,25 +117,25 @@ export class AutoCompletePopupComponent implements ControlValueAccessor {
113117

114118
next() {
115119
if (this.isOpen && this.source && this.source.length) {
116-
if (this.activeIndex === this.source.length - 1) {
117-
this.activeIndex = 0;
118-
this.scrollToActive();
120+
if (this.hoverIndex === this.source.length - 1) {
121+
this.hoverIndex = 0;
122+
this.scrollToActive(this.hoverIndex);
119123
return;
120124
}
121-
this.activeIndex = this.activeIndex + 1;
122-
this.scrollToActive();
125+
this.hoverIndex = this.hoverIndex + 1;
126+
this.scrollToActive(this.hoverIndex);
123127
}
124128
}
125129

126130
prev() {
127131
if (this.isOpen && this.source && this.source.length) {
128-
if (this.activeIndex === 0) {
129-
this.activeIndex = this.source.length - 1;
130-
this.scrollToActive();
132+
if (this.hoverIndex === 0) {
133+
this.hoverIndex = this.source.length - 1;
134+
this.scrollToActive(this.hoverIndex);
131135
return;
132136
}
133-
this.activeIndex = this.activeIndex - 1;
134-
this.scrollToActive();
137+
this.hoverIndex = this.hoverIndex - 1;
138+
this.scrollToActive(this.hoverIndex);
135139
}
136140
}
137141

devui/badge/badge.component.scss

+6-6
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@
3838
min-width: 16px;
3939
height: 16px;
4040
font-size: $devui-font-size;
41-
line-height: 12px;
41+
line-height: 16px;
4242
text-align: center;
43-
padding: 2px 4px;
44-
border-radius: (16px/2);
43+
padding: 0 4px;
44+
border-radius: 8px;
4545
}
4646

4747
&-dot {
@@ -85,10 +85,10 @@
8585
min-width: 16px;
8686
height: 16px;
8787
font-size: $devui-font-size;
88-
line-height: 12px;
88+
line-height: 16px;
8989
text-align: center;
90-
padding: 2px 4px;
91-
border-radius: (16px/2);
90+
padding: 0 4px;
91+
border-radius: 8px;
9292
@include status-color;
9393
}
9494

0 commit comments

Comments
 (0)