Skip to content

Commit d0f65c4

Browse files
chore(release): release 17.1.0 (#351)
Co-authored-by: huaweidevcloud <[email protected]>
1 parent 35bf8d8 commit d0f65c4

File tree

150 files changed

+1611
-849
lines changed

Some content is hidden

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

150 files changed

+1611
-849
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>`^16.0.0`</font>
26+
Now supports Angular <font color=red>`^17.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>`^16.0.0`</font>
26+
当前支持的angular版本<font color=red>`^17.0.0`</font>
2727

2828
## 快速开始
2929

devui/auto-complete/demo/disabled/auto-complete-demo-disable.component.html

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
[disabledKey]="'disable'"
3333
[source]="languages1"
3434
[formatter]="formatter"
35+
[valueParser]="valueParser"
3536
dAutoComplete
3637
[tipsText]="'search result'"
3738
/>

devui/auto-complete/demo/disabled/auto-complete-demo-disable.component.ts

+4
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,8 @@ export class AutoDemoDisableComponent {
4747
formatter(item) {
4848
return item.name;
4949
}
50+
51+
valueParser(item) {
52+
return item.name;
53+
}
5054
}

devui/avatar/avatar.component.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,11 @@ export class AvatarComponent implements OnChanges, OnInit {
108108
}
109109
}
110110
if (width < 30) {
111-
this.nameDisplay = this.name.substr(0, 1).toUpperCase();
111+
if (/^[\u4e00-\u9fa5]/.test(name)) {
112+
this.nameDisplay = name.substr(name.length - 1, 1);
113+
} else {
114+
this.nameDisplay = this.name.substr(0, 1).toUpperCase();
115+
}
112116
}
113117
this.getBackgroundColor(name.substr(0, 1));
114118
}

devui/avatar/avatar.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ describe('avatar basic', () => {
5151
component.comp.setDisplayName(component.name, component.width);
5252
fixture.detectChanges();
5353

54-
expect(nativeEl.textContent).toBe(component.name.substr(0, 1));
54+
expect(nativeEl.textContent).toBe(component.name.substr(component.name.length - 1, 1));
5555
});
5656

5757
it('one word name pick first two character', () => {

devui/breadcrumb/breadcrumb-item/breadcrumb-item.component.html

+3-4
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,16 @@
1111
<ng-template [ngTemplateOutlet]="breadcrumbContentTpl"></ng-template>
1212
<i class="devui-breadcrumb-down-icon">
1313
<svg
14-
width="1em"
15-
height="1em"
14+
width="16px"
15+
height="16px"
1616
viewBox="0 0 16 16"
1717
version="1.1"
1818
xmlns="http://www.w3.org/2000/svg"
1919
xmlns:xlink="http://www.w3.org/1999/xlink"
2020
>
2121
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
2222
<path
23-
d="M12.1464466,6.85355339 L8.35355339,10.6464466 C8.15829124,10.8417088 7.84170876,10.8417088 7.64644661,10.6464466 L3.85355339,6.85355339 C3.65829124,6.65829124 3.65829124,6.34170876 3.85355339,6.14644661 C3.94732158,6.05267842 4.07449854,6 4.20710678,6 L11.7928932,6 C12.0690356,6 12.2928932,6.22385763 12.2928932,6.5 C12.2928932,6.63260824 12.2402148,6.7597852 12.1464466,6.85355339 Z"
24-
fill-rule="nonzero"
23+
d="M3.64644661,5.64644661 C3.82001296,5.47288026 4.08943736,5.45359511 4.2843055,5.58859116 L4.35355339,5.64644661 L8,9.293 L11.6464466,5.64644661 C11.820013,5.47288026 12.0894374,5.45359511 12.2843055,5.58859116 L12.3535534,5.64644661 C12.5271197,5.82001296 12.5464049,6.08943736 12.4114088,6.2843055 L12.3535534,6.35355339 L8.35355339,10.3535534 C8.17998704,10.5271197 7.91056264,10.5464049 7.7156945,10.4114088 L7.64644661,10.3535534 L3.64644661,6.35355339 C3.45118446,6.15829124 3.45118446,5.84170876 3.64644661,5.64644661 Z"
2524
></path>
2625
</g>
2726
</svg>

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

+10-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@
22
@import '../../style/core/_font';
33
@import '../../style/core/animation';
44

5+
:host {
6+
display: inline-flex;
7+
}
8+
59
.devui-breadcrumb-font-style {
6-
font-size: $devui-font-size-sm;
10+
font-size: $devui-font-size;
711
color: $devui-aide-text;
812
}
913

@@ -136,6 +140,11 @@ d-search {
136140
::ng-deep a,
137141
::ng-deep span {
138142
transition: color $devui-animation-duration-slow $devui-animation-ease-in-out-smooth;
143+
display: inline-block;
144+
text-overflow: ellipsis;
145+
overflow: hidden;
146+
white-space: nowrap;
147+
max-width: 440px;
139148
}
140149
}
141150

devui/breadcrumb/breadcrumb.component.scss

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

33
:host {
44
display: flex;
5-
-webkit-align-items: center;
5+
align-items: center;
66
min-height: 28px;
77

88
::ng-deep d-breadcrumb-item:last-child {

devui/breadcrumb/demo/custom/custom.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ <h4>Use Custom Dropdown Behavior</h4>
3131
<span>{{ item.label }}</span>
3232
<i
3333
*ngIf="item.showMenu"
34-
class="icon icon-select-arrow devui-icon-rotate"
34+
class="icon icon-chevron-down-2 devui-icon-rotate"
3535
[style.transform]="dropdownInstance?.isOpen ? 'rotate(180deg)' : 'rotate(0deg)'"
3636
></i>
3737
</a>

devui/breadcrumb/demo/custom/custom.component.scss

+5
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,8 @@
2424
text-decoration: none;
2525
}
2626
}
27+
28+
.icon-chevron-down-2 {
29+
font-size: 12px;
30+
margin-left: 4px;
31+
}

devui/button/button.component.scss

+11-8
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ $devui-btn-sm-font-size: $devui-font-size-sm;
2424
$devui-btn-font-size: $devui-font-size-md;
2525
$devui-btn-lg-font-size: $devui-font-size-lg;
2626
$devui-btn-line-height: $devui-line-height-base;
27+
$devui-btn-border-radius: var(--devui-btn-border-radius, $devui-border-radius);
28+
$devui-btn-primary-bg-disabled: var(--devui-btn-primary-bg-disabled, $devui-primary-disabled);
29+
$devui-btn-primary-text-disabled: var(--devui-btn-primary-text-disabled, $devui-light-text);
2730

2831
$devui-btn-normal-config: (
2932
text: (
@@ -148,7 +151,7 @@ $devui-btn-pseudo-config: (
148151
font-size: $devui-btn-font-size;
149152
height: $devui-btn-height;
150153
line-height: $devui-btn-line-height;
151-
border-radius: $devui-border-radius;
154+
border-radius: $devui-btn-border-radius;
152155
border-width: 1px;
153156
border-color: transparent;
154157
background-color: transparent;
@@ -176,25 +179,25 @@ $devui-btn-pseudo-config: (
176179

177180
&.devui-btn-common {
178181
&:disabled {
179-
color: $devui-disabled-text;
180-
background: $devui-disabled-bg;
182+
color: var(--devui-btn-common-text-disabled, $devui-disabled-text);
183+
background: var(--devui-btn-common-bg-disabled, $devui-disabled-bg);
181184
border-color: var(--devui-btn-common-border-disabled, $devui-disabled-line);
182185
}
183186
}
184187

185188
&.devui-btn-primary {
186189
&:disabled {
187-
color: $devui-light-text;
188-
background: $devui-primary-disabled;
190+
color: $devui-btn-primary-text-disabled;
191+
background: $devui-btn-primary-bg-disabled;
189192
border-color: transparent;
190193
}
191194
}
192195

193196
&.devui-btn-danger {
194197
&:disabled {
195-
color: $devui-disabled-text;
196-
background: $devui-disabled-bg;
197-
border: 1px solid $devui-disabled-line;
198+
color: $devui-light-text;
199+
background: $devui-red-20;
200+
border: 1px solid $devui-red-20;
198201
}
199202
}
200203

devui/button/demo/groups/groups.component.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<div class="btn-wrapper">
22
<d-button-group>
33
<d-button bsStyle="primary">按钮名称</d-button>
4-
<d-button icon="icon-select-arrow" bsStyle="primary"></d-button>
4+
<d-button icon="icon-chevron-down-2" bsStyle="primary"></d-button>
55
</d-button-group>
66

77
<div dDropDown [style.margin-left.px]="8">
88
<d-button-group>
9-
<d-button bsStyle="common" dDropDownToggle>近期发布<span class="icon-select-arrow"></span></d-button>
9+
<d-button bsStyle="common" dDropDownToggle>近期发布<span class="icon-chevron-down-2"></span></d-button>
1010
<d-button icon="icon icon-setting" bsStyle="common"></d-button>
1111
</d-button-group>
1212
<ul dDropDownMenu class="devui-dropdown-menu" role="menu">

devui/button/demo/groups/groups.component.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
display: flex;
55
}
66

7-
.icon-select-arrow {
8-
margin-left: 8px;
7+
.icon-chevron-down-2 {
8+
margin-left: 4px;
99
}
1010

1111
// 为兼容老版本common类型button无边框

devui/carousel/carousel.component.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { CarouselModule } from './carousel.module';
1717
d-carousel-item {
1818
text-align: center;
1919
line-height: 200px;
20-
background: var(--devui-global-bg, #f3f6f8);
20+
background: var(--devui-global-bg, #f5f5f5);
2121
}
2222
`
2323
]

devui/cascader/cascader.component.html

+12-16
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,16 @@
5555
<div class="devui-drop-icon-wrapper" [ngClass]="{ 'dropdown-show-clear': allowClear }">
5656
<span class="devui-drop-icon" [ngClass]="{ 'devui-drop-icon-animation': showAnimation }">
5757
<svg
58-
width="1em"
59-
height="1em"
58+
width="16px"
59+
height="16px"
6060
viewBox="0 0 16 16"
6161
version="1.1"
6262
xmlns="http://www.w3.org/2000/svg"
6363
xmlns:xlink="http://www.w3.org/1999/xlink"
6464
>
6565
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
6666
<path
67-
d="M12.1464466,6.85355339 L8.35355339,10.6464466 C8.15829124,10.8417088 7.84170876,10.8417088 7.64644661,10.6464466 L3.85355339,6.85355339 C3.65829124,6.65829124 3.65829124,6.34170876 3.85355339,6.14644661 C3.94732158,6.05267842 4.07449854,6 4.20710678,6 L11.7928932,6 C12.0690356,6 12.2928932,6.22385763 12.2928932,6.5 C12.2928932,6.63260824 12.2402148,6.7597852 12.1464466,6.85355339 Z"
68-
fill-rule="nonzero"
67+
d="M3.64644661,5.64644661 C3.82001296,5.47288026 4.08943736,5.45359511 4.2843055,5.58859116 L4.35355339,5.64644661 L8,9.293 L11.6464466,5.64644661 C11.820013,5.47288026 12.0894374,5.45359511 12.2843055,5.58859116 L12.3535534,5.64644661 C12.5271197,5.82001296 12.5464049,6.08943736 12.4114088,6.2843055 L12.3535534,6.35355339 L8.35355339,10.3535534 C8.17998704,10.5271197 7.91056264,10.5464049 7.7156945,10.4114088 L7.64644661,10.3535534 L3.64644661,6.35355339 C3.45118446,6.15829124 3.45118446,5.84170876 3.64644661,5.64644661 Z"
6968
></path>
7069
</g>
7170
</svg>
@@ -92,17 +91,16 @@
9291
<div class="devui-single-drop-icon-wrapper" *ngIf="!multiple" [ngClass]="{ 'dropdown-show-clear': allowClear }">
9392
<span class="devui-drop-icon" [ngClass]="{ 'devui-drop-icon-animation': showAnimation }">
9493
<svg
95-
width="1em"
96-
height="1em"
94+
width="16px"
95+
height="16px"
9796
viewBox="0 0 16 16"
9897
version="1.1"
9998
xmlns="http://www.w3.org/2000/svg"
10099
xmlns:xlink="http://www.w3.org/1999/xlink"
101100
>
102101
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
103102
<path
104-
d="M12.1464466,6.85355339 L8.35355339,10.6464466 C8.15829124,10.8417088 7.84170876,10.8417088 7.64644661,10.6464466 L3.85355339,6.85355339 C3.65829124,6.65829124 3.65829124,6.34170876 3.85355339,6.14644661 C3.94732158,6.05267842 4.07449854,6 4.20710678,6 L11.7928932,6 C12.0690356,6 12.2928932,6.22385763 12.2928932,6.5 C12.2928932,6.63260824 12.2402148,6.7597852 12.1464466,6.85355339 Z"
105-
fill-rule="nonzero"
103+
d="M3.64644661,5.64644661 C3.82001296,5.47288026 4.08943736,5.45359511 4.2843055,5.58859116 L4.35355339,5.64644661 L8,9.293 L11.6464466,5.64644661 C11.820013,5.47288026 12.0894374,5.45359511 12.2843055,5.58859116 L12.3535534,5.64644661 C12.5271197,5.82001296 12.5464049,6.08943736 12.4114088,6.2843055 L12.3535534,6.35355339 L8.35355339,10.3535534 C8.17998704,10.5271197 7.91056264,10.5464049 7.7156945,10.4114088 L7.64644661,10.3535534 L3.64644661,6.35355339 C3.45118446,6.15829124 3.45118446,5.84170876 3.64644661,5.64644661 Z"
106104
></path>
107105
</g>
108106
</svg>
@@ -231,17 +229,16 @@
231229
<div class="devui-drop-icon-wrapper" [ngClass]="{ 'dropdown-show-clear': allowClear }">
232230
<span class="devui-drop-icon" [ngClass]="{ 'devui-drop-icon-animation': showAnimation }">
233231
<svg
234-
width="1em"
235-
height="1em"
232+
width="16px"
233+
height="16px"
236234
viewBox="0 0 16 16"
237235
version="1.1"
238236
xmlns="http://www.w3.org/2000/svg"
239237
xmlns:xlink="http://www.w3.org/1999/xlink"
240238
>
241239
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
242240
<path
243-
d="M12.1464466,6.85355339 L8.35355339,10.6464466 C8.15829124,10.8417088 7.84170876,10.8417088 7.64644661,10.6464466 L3.85355339,6.85355339 C3.65829124,6.65829124 3.65829124,6.34170876 3.85355339,6.14644661 C3.94732158,6.05267842 4.07449854,6 4.20710678,6 L11.7928932,6 C12.0690356,6 12.2928932,6.22385763 12.2928932,6.5 C12.2928932,6.63260824 12.2402148,6.7597852 12.1464466,6.85355339 Z"
244-
fill-rule="nonzero"
241+
d="M3.64644661,5.64644661 C3.82001296,5.47288026 4.08943736,5.45359511 4.2843055,5.58859116 L4.35355339,5.64644661 L8,9.293 L11.6464466,5.64644661 C11.820013,5.47288026 12.0894374,5.45359511 12.2843055,5.58859116 L12.3535534,5.64644661 C12.5271197,5.82001296 12.5464049,6.08943736 12.4114088,6.2843055 L12.3535534,6.35355339 L8.35355339,10.3535534 C8.17998704,10.5271197 7.91056264,10.5464049 7.7156945,10.4114088 L7.64644661,10.3535534 L3.64644661,6.35355339 C3.45118446,6.15829124 3.45118446,5.84170876 3.64644661,5.64644661 Z"
245242
></path>
246243
</g>
247244
</svg>
@@ -268,17 +265,16 @@
268265
<div class="devui-single-drop-icon-wrapper" *ngIf="!multiple" [ngClass]="{ 'dropdown-show-clear': allowClear }">
269266
<span class="devui-drop-icon" [ngClass]="{ 'devui-drop-icon-animation': showAnimation }">
270267
<svg
271-
width="1em"
272-
height="1em"
268+
width="16px"
269+
height="16px"
273270
viewBox="0 0 16 16"
274271
version="1.1"
275272
xmlns="http://www.w3.org/2000/svg"
276273
xmlns:xlink="http://www.w3.org/1999/xlink"
277274
>
278275
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
279276
<path
280-
d="M12.1464466,6.85355339 L8.35355339,10.6464466 C8.15829124,10.8417088 7.84170876,10.8417088 7.64644661,10.6464466 L3.85355339,6.85355339 C3.65829124,6.65829124 3.65829124,6.34170876 3.85355339,6.14644661 C3.94732158,6.05267842 4.07449854,6 4.20710678,6 L11.7928932,6 C12.0690356,6 12.2928932,6.22385763 12.2928932,6.5 C12.2928932,6.63260824 12.2402148,6.7597852 12.1464466,6.85355339 Z"
281-
fill-rule="nonzero"
277+
d="M3.64644661,5.64644661 C3.82001296,5.47288026 4.08943736,5.45359511 4.2843055,5.58859116 L4.35355339,5.64644661 L8,9.293 L11.6464466,5.64644661 C11.820013,5.47288026 12.0894374,5.45359511 12.2843055,5.58859116 L12.3535534,5.64644661 C12.5271197,5.82001296 12.5464049,6.08943736 12.4114088,6.2843055 L12.3535534,6.35355339 L8.35355339,10.3535534 C8.17998704,10.5271197 7.91056264,10.5464049 7.7156945,10.4114088 L7.64644661,10.3535534 L3.64644661,6.35355339 C3.45118446,6.15829124 3.45118446,5.84170876 3.64644661,5.64644661 Z"
282278
></path>
283279
</g>
284280
</svg>

devui/cascader/cascader.component.scss

+13-8
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
}
3535

3636
.devui-input {
37-
padding-right: 16px;
37+
padding-right: 36px;
3838
overflow: hidden;
3939
white-space: nowrap;
4040
text-overflow: ellipsis;
@@ -95,10 +95,10 @@
9595
}
9696

9797
.devui-drop-icon {
98-
width: 1em;
99-
height: 1em;
98+
width: 16px;
99+
height: 16px;
100100
display: inline-block;
101-
line-height: 1em;
101+
line-height: 16px;
102102
vertical-align: middle;
103103

104104
svg path {
@@ -142,9 +142,14 @@
142142
position: absolute;
143143
top: 50%;
144144
transform: translateY(-50%);
145-
right: 4px;
146-
width: 1em;
145+
right: 12px;
146+
width: 16px;
147147
display: flex;
148+
149+
.devui-cascader-close-icon {
150+
position: relative;
151+
left: 2px;
152+
}
148153
}
149154

150155
:host:not(.devui-glow-style) .devui-tags-input-wrapper:hover {
@@ -172,8 +177,8 @@
172177
}
173178

174179
.devui-drop-icon-wrapper {
175-
flex: 0 0 20px;
176-
padding: 0;
180+
flex: 0 0 40px;
181+
padding: 0 12px;
177182
display: inline-flex;
178183
align-items: center;
179184
justify-content: center;

0 commit comments

Comments
 (0)