Skip to content

Commit bb665de

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

File tree

220 files changed

+5028
-1158
lines changed

Some content is hidden

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

220 files changed

+5028
-1158
lines changed

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

+9-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,15 @@
99
}">
1010
<div class="header-left">
1111
<div *ngIf="showSlideButton" class="slide-menu-link" (click)="clickSlideMenu()">
12-
<span></span>
12+
<span>
13+
<svg width="18px" height="14px" viewBox="0 0 18 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
14+
<g id="slide-button-outer" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
15+
<g id="slide-button-inner">
16+
<path d="M18,6 L18,8 L0,8 L0,6 L18,6 Z M18,0 L18,2 L0,2 L0,0 L18,0 Z M14,12 L14,14 L0,14 L0,12 L14,12 Z"></path>
17+
</g>
18+
</g>
19+
</svg>
20+
</span>
1321
</div>
1422
<ng-content select="d-header-logo"></ng-content>
1523
<d-search *ngIf="showSearch" [isKeyupSearch]="true" [placeholder]="searchPlaceholder" (searchFn)="onSearch($event)"></d-search>

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

+12-3
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,16 @@
7171
border-right: 1px solid $devui-dividing-line;
7272

7373
span {
74-
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAOAQMAAAAYFN70AAAABlBMVEUAAAAhKDGQazuIAAAAAXRSTlMAQObYZgAAABRJREFUCNdj+P//ABijAdzif8AYAMnZDu+UDPvPAAAAAElFTkSuQmCC)
75-
no-repeat scroll 0 center;
74+
line-height: 40px;
7675
display: block;
7776
width: 18px;
7877
height: 40px;
7978
margin: 0 10px;
8079
cursor: pointer;
80+
81+
#slide-button-inner {
82+
fill: $devui-text;
83+
}
8184
}
8285
}
8386
}
@@ -90,7 +93,7 @@
9093
vertical-align: text-bottom;
9194
border: 0;
9295
height: 20px;
93-
width: 90px;
96+
width: 100px;
9497
margin: 0 12px;
9598
}
9699
}
@@ -176,6 +179,12 @@
176179
}
177180
}
178181

182+
@media (max-width: 380px) {
183+
d-search {
184+
width: 180px;
185+
}
186+
}
187+
179188
:host d-search ::ng-deep input {
180189
border-width: 0;
181190
}

devui-commons/src/header/logo/logo.component.scss

+8
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,12 @@
2828
margin-left: 0 !important;
2929
}
3030
}
31+
}
32+
33+
@media (max-width: 360px) {
34+
.header-logo {
35+
.text {
36+
display: none;
37+
}
38+
}
3139
}

devui-commons/src/header/menu/menu.component.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
}
8888
}
8989

90-
@media (max-width: 1180px) {
90+
@media (max-width: 1360px) {
9191
.header-menu {
9292
flex-direction: column;
9393
}

devui-commons/src/header/version-switch/version-switch.component.scss

+6
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,10 @@
77
.header-version-switch {
88
width: 60px;
99
}
10+
}
11+
12+
@media (max-width: 1360px) {
13+
.header-version-switch {
14+
width: 70px;
15+
}
1016
}

devui/accordion/accordion.component.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
height: 40px;
5252
width: 100%;
5353
padding: 0 12px 0 20px;
54-
font-weight: 400;
54+
font-weight: normal;
5555
line-height: 40px;
5656
color: $devui-text-weak;
5757
background: transparent;

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
color: $devui-light-text;
1515
text-align: center;
1616
background: $devui-brand;
17-
font-weight: 400;
17+
font-weight: normal;
1818
}
1919

2020
.loading {

devui/alert/alert.component.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="devui-alert devui-alert-{{ type }} {{ cssClass }}" *ngIf="!hide">
2-
<button type="button" class="devui-close" (click)="close()" *ngIf="closeable">
2+
<div class="devui-close" (click)="close()" *ngIf="closeable">
33
<svg
44
width="10px"
55
height="10px"
@@ -16,7 +16,7 @@
1616
</g>
1717
</g>
1818
</svg>
19-
</button>
19+
</div>
2020
<span class="devui-alert-icon" *ngIf="showIcon !== false && type !== 'simple'">
2121
<svg
2222
width="16px"

devui/alert/alert.component.scss

+10-9
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/theme/_font';
5+
@import '../style/core/_font';
66

77
:host {
88
display: block;
@@ -12,16 +12,17 @@
1212
color: $devui-text;
1313
font-size: $devui-font-size;
1414
border: 1px solid transparent;
15-
padding: 8px;
15+
padding: 8px 16px;
1616
line-height: 24px;
1717
border-radius: $devui-border-radius;
18-
padding-left: 16px;
1918
word-break: normal;
2019
word-wrap: break-word;
2120

22-
button.devui-close {
21+
.devui-close {
2322
color: $devui-text;
2423
opacity: 1;
24+
line-height: 26px;
25+
height: 24px;
2526

2627
& > svg path {
2728
fill: $devui-light-text;
@@ -39,7 +40,7 @@
3940
border-color: $devui-success-line;
4041
color: $devui-text;
4142

42-
button.devui-close {
43+
.devui-close {
4344
& > svg path {
4445
fill: $devui-success-line;
4546
}
@@ -51,7 +52,7 @@
5152
border-color: $devui-info-line;
5253
color: $devui-text;
5354

54-
button.devui-close {
55+
.devui-close {
5556
& > svg path {
5657
fill: $devui-info-line;
5758
}
@@ -63,7 +64,7 @@
6364
border-color: $devui-warning-line;
6465
color: $devui-text;
6566

66-
button.devui-close {
67+
.devui-close {
6768
& > svg path {
6869
fill: $devui-warning-line;
6970
}
@@ -75,7 +76,7 @@
7576
border-color: $devui-danger-line;
7677
color: $devui-text;
7778

78-
button.devui-close {
79+
.devui-close {
7980
& > svg path {
8081
fill: $devui-danger-line;
8182
}
@@ -86,7 +87,7 @@
8687
border-color: $devui-line;
8788
color: $devui-text;
8889

89-
button.devui-close {
90+
.devui-close {
9091
& > svg path {
9192
fill: $devui-text-weak;
9293
}

devui/alert/alert.spec.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -107,15 +107,15 @@ describe('alert', () => {
107107

108108
describe('alert close', () => {
109109
it('Alert should close', () => {
110-
const closeButton = alertElement.querySelector('button');
111-
closeButton.click();
110+
const closeButton = alertElement.querySelector('.devui-close');
111+
closeButton.dispatchEvent(new Event('click'));
112112
fixture.detectChanges();
113113
expect(alertElement.querySelector('.devui-alert')).toBe(null);
114114
});
115115

116116
it('Alert should activate closeEvent', () => {
117-
const closeButton = alertElement.querySelector('button');
118-
closeButton.click();
117+
const closeButton = alertElement.querySelector('.devui-close');
118+
closeButton.dispatchEvent(new Event('click'));
119119
fixture.detectChanges();
120120
expect(testComponent.clickCount).toBe(1);
121121
});

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export class AutoCompletePopupComponent implements ControlValueAccessor {
6767
}
6868

6969
onSelect(event, item) {
70-
if (this.disabledKey && item[this.disabledKey]) {
70+
if (this.disabledKey && item && item[this.disabledKey]) {
7171
event.preventDefault();
7272
event.stopPropagation();
7373
return;

devui/badge/doc/api-cn.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { BadgeModule } from 'ng-devui/badge';
2121
| maxCount | `number` | 99 | 可选,设置基本徽章和计数徽章最大可显示数目,当 count > maxCount 时显示maxCount+ | [基本徽章](demo#badge-basic) |
2222
| showDot | `boolean` | false | 可选,true时为点状徽章(有包裹)或状态徽章(无包裹),false时为基本徽章(有包裹)或计数徽章(无包裹) | [点状徽章](demo#badge-dot) |
2323
| status |`BadgeStatusType` | -- | 可选,状态色 'danger' \| 'warning' \| 'waiting' \| 'success' \| 'info' | [基本徽章](demo#badge-basic) |
24-
| badgePos | `BadgePositionType` | 'top-right' | 可选,徽标位置 'top-left' \| 'top-right' \| 'bottpm-left' \| ''bottom-right'' | [徽章位置](demo#position) |
24+
| badgePos | `BadgePositionType` | 'top-right' | 可选,徽标位置 'top-left' \| 'top-right' \| 'bottom-left' \| ''bottom-right'' | [徽章位置](demo#position) |
2525
| offsetXY | `[number, number]` | -- | 可选,有包裹时徽标位置偏移量,格式为[x,y],单位为px。x为相对right偏移量(right: -x `px`),y为相对top偏移量(top: y `px`) | [自定义](demo#custom) |
2626
| bgColor | `string` | -- | 可选,自定义徽标色,此时status参数设置的徽章状态色失效 | [自定义](demo#custom) |
2727
| textColor | `string` | -- | 可选, 可自定义徽标文字颜色 | [自定义](demo#custom) |

devui/badge/doc/api-en.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ In the page:
2121
| maxCount | `number` | 99 | Optional. Sets the maximum number of basic and counting badges that can be displayed. When count is greater than maxCount, maxCount+ is displayed. | [Basic Badge](demo#badge-basic) |
2222
| showDot | `boolean` | false | Optional. The value true indicates the dot badge (with package) or status badge (without package). The value false indicates the basic badge (with package) or count badge (without package). | [Dotted Badge](demo#badge-dot) |
2323
| status |`BadgeStatusType` | -- | Optional. The status color is'danger'\| 'warning' \| 'waiting' \| 'success' \| 'info'. | [Basic Badge](demo#badge-basic) |
24-
| badgePos | `BadgePositionType` | 'top-right' | Optional. Logo position'top-left' \|'top-right' \|'bottpm-left' \|'bottom-right'. | [Badge Position](demo#position) |
24+
| badgePos | `BadgePositionType` | 'top-right' | Optional. Logo position'top-left' \|'top-right' \|'bottom-left' \|'bottom-right'. | [Badge Position](demo#position) |
2525
| offsetXY | `[number, number]` | -- |Optional. Indicates the logo position offset when there is a package. The format is [x,y], in px. This parameter is optional. x is the relative right offset (right: -x `px`), y is the relative top offset (top: y `px`). | [Custom](demo#custom) |
2626
| bgColor | `string` | -- | Optional. The badge color can be customized. In this case, the badge status color specified by status is invalid.| [Custom](demo#custom) |
2727
| textColor | `string` | -- | Optional. You can customize the logo text color. | [Custom](demo#custom) |

devui/breadcrumb/breadcrumb-item/breadcrumb-item.component.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
max-width: 200px;
8080

8181
li {
82-
padding: 0 16px;
82+
padding: 0 12px;
8383
font-size: $devui-font-size;
8484
line-height: 36px;
8585
overflow: hidden;

devui/button/button.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
(click)="onClick($event)"
1414
[ngClass]="{ 'd-btn-icon': !!icon && !hasContent() && bsStyle !== 'primary', 'd-btn-icon-wrap': !!icon }"
1515
>
16-
<span *ngIf="!!icon" class="devui-icon-fix icon {{ icon }}" [ngClass]="{ 'clear-right-5': hasContent() }"></span>
16+
<span *ngIf="!!icon" class="devui-icon-fix icon {{ icon }}" [ngClass]="{ 'clear-right-4': hasContent() }"></span>
1717
<!--
1818
--><span class="button-content" [class.devui-btn-more-text-omits]="width !== undefined" #buttonContent><ng-content></ng-content></span>
1919
</button>

devui/button/button.component.scss

+9-9
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66
@import '../style/core/animation';
77

88
$devui-btn-loading-color: $devui-text;
9-
$devui-btn-xs-padding: 1px 5px;
9+
$devui-btn-xs-padding: 0 4px;
1010
$devui-btn-xs-height: 24px;
1111
$devui-btn-icon-xs-min-width: 24px;
1212
$devui-btn-xs-min-width: 48px;
13-
$devui-btn-sm-padding: 1px 15px;
13+
$devui-btn-sm-padding: 0 16px;
1414
$devui-btn-sm-min-width: 56px;
1515
$devui-btn-icon-sm-min-width: 24px;
1616
$devui-btn-sm-height: 24px;
1717
$devui-btn-min-width: 64px;
1818
$devui-btn-height: 28px;
19-
$devui-btn-padding: 3px 20px;
20-
$devui-btn-lg-padding: 5px 23px;
19+
$devui-btn-padding: 0 20px;
20+
$devui-btn-lg-padding: 0 24px;
2121
$devui-btn-lg-min-width: 72px;
2222
$devui-btn-icon-lg-min-width: 32px;
2323
$devui-btn-lg-height: 32px;
@@ -173,7 +173,7 @@ $devui-btn-pseudo-config: (
173173
border-width: 1px;
174174
border-color: transparent;
175175
background-color: transparent;
176-
@each $type in text, text-dark, common, stress, primary, danger, left, right, xs, sm, lg {
176+
@each $type in common, stress, primary, danger, left, right, xs, sm, lg, text, text-dark {
177177
&.devui-btn-#{$type} {
178178
@each $key, $value in map-get($devui-btn-normal-config, $type) {
179179
#{$key}: $value;
@@ -332,13 +332,13 @@ $devui-btn-pseudo-config: (
332332
}
333333

334334
&.d-btn-icon {
335-
padding: 7px 8px;
335+
padding: 8px 8px;
336336
line-height: 1em;
337337
border: 1px solid transparent;
338338

339339
&.devui-btn-xs,
340340
&.devui-btn-sm {
341-
padding: 5px;
341+
padding: 4px;
342342
}
343343

344344
&.devui-btn-xs {
@@ -393,8 +393,8 @@ $devui-btn-pseudo-config: (
393393
position: relative;
394394
}
395395

396-
.clear-right-5 {
397-
margin-right: 5px;
396+
.clear-right-4 {
397+
margin-right: 4px;
398398
}
399399

400400
.devui-btn-more-text-omits {

devui/button/button.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Component, DebugElement } from '@angular/core';
2-
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2+
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
33
import { By } from '@angular/platform-browser';
44
import { ButtonModule } from 'ng-devui/button';
55
import { LoadingComponent } from './../loading/loading.component';
@@ -44,7 +44,7 @@ class TestButtonAutoFocusComponent {
4444

4545
describe('Button', () => {
4646
let fixture: ComponentFixture<any>;
47-
beforeEach(async(() => {
47+
beforeEach(waitForAsync(() => {
4848
TestBed.configureTestingModule({
4949
imports: [ButtonModule],
5050
declarations: [TestButtonComponent, TestButtonAutoFocusComponent],
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<d-button bsStyle="text" bsSize="lg">lgText</d-button>
12
<d-button bsStyle="text" style="margin-right: 20px">Text</d-button>
23
<d-button bsStyle="text-dark" style="margin-right: 20px">Text dark</d-button>
34
<d-button bsStyle="text" [disabled]="true">Disabled</d-button>

devui/card/card.component.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ $card-content-font-size: $devui-font-size;
2121
.devui-card-title {
2222
display: block;
2323
font-size: $card-title-font-size;
24-
font-weight: 600;
24+
font-weight: bold;
2525
color: $devui-text;
2626
}
2727

devui/carousel/carousel-item.component.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
1+
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
22

33
import { CarouselItemComponent } from './carousel-item.component';
44

55
describe('CarouselItemComponent', () => {
66
let component: CarouselItemComponent;
77
let fixture: ComponentFixture<CarouselItemComponent>;
88

9-
beforeEach(async(() => {
9+
beforeEach(waitForAsync(() => {
1010
TestBed.configureTestingModule({
1111
declarations: [ CarouselItemComponent ]
1212
})

devui/carousel/carousel.component.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Component, ViewChild } from '@angular/core';
2-
import { async, ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing';
2+
import { ComponentFixture, fakeAsync, TestBed, tick, waitForAsync } from '@angular/core/testing';
33
import { By } from '@angular/platform-browser';
44
import { CarouselComponent } from './carousel.component';
55
import { CarouselModule } from './carousel.module';
@@ -38,7 +38,7 @@ describe('CarouselComponent', () => {
3838
let fixture: ComponentFixture<TestCarouselComponent>;
3939
let carouselElement: HTMLElement;
4040

41-
beforeEach(async(() => {
41+
beforeEach(waitForAsync(() => {
4242
TestBed.configureTestingModule({
4343
imports: [CarouselModule],
4444
declarations: [ TestCarouselComponent ],

0 commit comments

Comments
 (0)