Skip to content

Commit

Permalink
chore(release): release 10.0.0 (#71)
Browse files Browse the repository at this point in the history
Co-authored-by: huaweidevcloud <[email protected]>
  • Loading branch information
wangyaju and huaweidevcloud authored Nov 10, 2020
1 parent e78ae0d commit d310bad
Show file tree
Hide file tree
Showing 411 changed files with 4,905 additions and 1,964 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ To see more in [devui.design](https://devui.design/home).

## Angular Support

Now supports Angular <font color=red>`^9.0.0`</font>
Now supports Angular <font color=red>`^10.0.0`</font>

## Getting Started

Expand Down
2 changes: 1 addition & 1 deletion README_zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ DevUI Design设计系统包含了DevUI规则、设计语言和最佳实践的资

## Angular版本

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

## 快速开始

Expand Down
3 changes: 1 addition & 2 deletions devui/accordion/demo/accordion-demo.moudule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ import { DDemoNavModule } from 'src/app/component/d-demo-nav.module';
ChangeKeyComponent,
],
providers: [],
entryComponents: [
]

})
export class AccordionDemoModule {
}
2 changes: 1 addition & 1 deletion devui/accordion/demo/template/template.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
width: 16px;
height: 16px;
border-radius: 8px;
font-size: 12px;
font-size: $devui-font-size;
line-height: 12px;
padding: 2px;
color: $devui-light-text;
Expand Down
5 changes: 3 additions & 2 deletions devui/alert/alert.component.scss
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
@import '../style/mixins/index';
@import '../style/theme/color';
@import '../style/theme/shadow';
@import '../style/core/_font';

:host {
display: block;
}

.devui-alert {
color: $devui-text;
font-size: 12px;
font-size: $devui-font-size;
border: 1px solid transparent;
padding: 10px;
line-height: 20px;
Expand All @@ -26,7 +27,7 @@

span {
color: $devui-text;
font-size: 12px;
font-size: $devui-font-size;
font-weight: bold;
}
}
Expand Down
4 changes: 1 addition & 3 deletions devui/alert/demo/alert-demo.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ import { DDemoNavModule } from 'src/app/component/d-demo-nav.module';
BasicComponent,
CloseComponent,
],
entryComponents: [
AlertDemoComponent,
],

})
export class AlertDemoModule {
}
Expand Down
4 changes: 1 addition & 3 deletions devui/anchor/demo/anchor-demo.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ import { ScrollTargetComponent } from './scroll-target/scroll-target.component';
HashComponent,
ScrollTargetComponent
],
entryComponents: [
AnchorDemoComponent,
],

})
export class AnchorDemoModule {
}
Expand Down
2 changes: 1 addition & 1 deletion devui/anchor/demo/async/async.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
cursor: pointer;
height: 30px;
line-height: 1.5;
font-size: 12px;
font-size: $devui-font-size;
color: $devui-text-weak;
position: relative;
display: flex;
Expand Down
3 changes: 1 addition & 2 deletions devui/anchor/demo/basic/basic.component.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
@import '~ng-devui/styles-var/devui-var.scss';


/* 序号 */
.step-nav {
padding-top: 10px;
Expand All @@ -14,7 +13,7 @@
cursor: pointer;
height: 30px;
line-height: 1.5;
font-size: 12px;
font-size: $devui-font-size;
color: $devui-text-weak;
position: relative;
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion devui/anchor/demo/hash/hash.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
cursor: pointer;
height: 30px;
line-height: 1.5;
font-size: 12px;
font-size: $devui-font-size;
color: $devui-text-weak;
position: relative;
display: flex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
cursor: pointer;
height: 30px;
line-height: 1.5;
font-size: 12px;
font-size: $devui-font-size;
color: $devui-text-weak;
position: relative;
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion devui/auto-complete/auto-complete.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export class AutoCompleteDirective implements OnInit, OnDestroy, OnChanges, Cont
let tempSource = [];
if (this.latestSource && this.latestSource.length > 0) {
this.searchFn('').subscribe(source => {
const t = this.latestSource.slice(-5); // 最近输入只支持最多5个,截取后5项
const t = this.latestSource;
tempSource = t.filter(data => {
if (!data.label) {
return source.find(item => item === data);
Expand Down
12 changes: 5 additions & 7 deletions devui/auto-complete/auto-complete.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,17 @@ import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { OverlayModule } from '@angular/cdk/overlay';
import { PositioningModule } from 'ng-devui/position';
import { LazyLoadModule } from 'ng-devui/utils';
import { HighlightModule, LazyLoadModule } from 'ng-devui/utils';
import { LoadingModule } from 'ng-devui/loading';

import { AutoCompleteConfig } from './auto-complete-config';
import { AutoCompleteDirective } from './auto-complete.directive';
import { AutoCompletePopupComponent } from './auto-complete-popup.component';
import { HighlightComponent } from './highlight.component';

@NgModule({
imports: [CommonModule, FormsModule, OverlayModule, LazyLoadModule, LoadingModule, PositioningModule],
exports: [AutoCompleteDirective, AutoCompletePopupComponent, HighlightComponent],
declarations: [AutoCompleteDirective, AutoCompletePopupComponent, HighlightComponent],
imports: [CommonModule, FormsModule, OverlayModule, LazyLoadModule, LoadingModule, PositioningModule, HighlightModule],
exports: [AutoCompleteDirective, AutoCompletePopupComponent],
declarations: [AutoCompleteDirective, AutoCompletePopupComponent],
providers: [AutoCompleteConfig],
entryComponents: [AutoCompletePopupComponent]

})
export class AutoCompleteModule { }
29 changes: 0 additions & 29 deletions devui/auto-complete/highlight.component.ts

This file was deleted.

1 change: 0 additions & 1 deletion devui/auto-complete/public-api.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export * from './highlight.component';
export * from './auto-complete.directive';
export * from './auto-complete.module';
export * from './auto-complete-popup.component';
Expand Down
8 changes: 7 additions & 1 deletion devui/badge/badge.component.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
<span #contentProjection><ng-content></ng-content></span>
<span class="devui-badge-count devui-badge-count-{{ status }}" *ngIf="!showDot && !hasContent">
<span
class="devui-badge-count devui-badge-count-{{ status }}"
*ngIf="!showDot && !hasContent"
[style.background]="bgColor"
[style.color]="textColor"
>
{{ count }}
</span>
<span class="devui-badge-status devui-badge-status-{{ status }}" *ngIf="showDot && !hasContent"></span>
<span
class="devui-badge-content devui-badge-content-{{ status }} devui-badge-content-{{ badgePos }}"
*ngIf="hasContent"
[style.background]="bgColor"
[style.color]="textColor"
[style.right.px]="offsetXY && offsetXY[0] ? -offsetXY[0] : null"
[style.top.px]="offsetXY && offsetXY[1] ? offsetXY[1] : null"
[ngClass]="{ 'devui-badge-content-count': !showDot, 'devui-badge-content-dot': showDot }"
Expand Down
15 changes: 9 additions & 6 deletions devui/badge/badge.component.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import '../style/theme/color';
@import '../style/core/_font';

@mixin status-color {
&-danger {
Expand Down Expand Up @@ -33,13 +34,14 @@
z-index: auto;

&-count {
background: $devui-placeholder;
background: $devui-brand;
color: $devui-light-text;
min-width: 16px;
height: 16px;
line-height: 16px;
font-size: $devui-font-size;
line-height: 12px;
text-align: center;
padding: 0 4px;
padding: 2px 4px;
border-radius: 8px;
}

Expand Down Expand Up @@ -79,13 +81,14 @@
.devui-badge-count {
position: relative;
right: 0;
background: $devui-placeholder;
background: $devui-brand;
color: $devui-light-text;
min-width: 16px;
height: 16px;
line-height: 16px;
font-size: $devui-font-size;
line-height: 12px;
text-align: center;
padding: 2px 8px;
padding: 2px 4px;
border-radius: 8px;
@include status-color;
}
Expand Down
1 change: 1 addition & 0 deletions devui/badge/badge.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export class BadgeComponent implements AfterViewInit {
@Input() badgePos: BadgePositionType = 'top-right';
@Input() offsetXY: [number, number];
@Input() bgColor: string;
@Input() textColor: string;

hasContentProjection() {
const nodes = this.contentProjection?.nativeElement;
Expand Down
8 changes: 4 additions & 4 deletions devui/badge/demo/basic/basic.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<section>
<h4>标准徽章,通过count参数设置徽章展示的数目,通过status参数可设置徽章状态色</h4>
<div class="badge-group">
<d-badge count="6" status="success">
<div class="demo-card">未读消息</div>
Expand All @@ -12,19 +13,19 @@
<d-badge count="14" status="warning">
<div class="demo-card">未读消息</div>
</d-badge>
<h5>标准徽章,通过count参数设置徽章展示的数目,通过status参数可设置徽章状态色</h5>
</div>

<h4>可通过maxCount参数设置徽章展示的数目最大值,默认为99</h4>
<div class="badge-group">
<d-badge count="114">
<div class="demo-card">未读消息</div>
</d-badge>
<d-badge count="114" maxCount="10">
<div class="demo-card">未读消息</div>
</d-badge>
<h5>可通过maxCount参数设置徽章展示的数目最大值,默认为99</h5>
</div>

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

<h4>通过badgePos参数设置徽章位置</h4>
<div class="badge-group">
<d-badge count="8" badgePos="top-left">
<i class="demo icon icon-infomation"></i>
Expand All @@ -44,6 +45,5 @@ <h5>通过bgColor参数设置徽章展示状态色,通过offsetXY参数可设
<d-badge count="8" badgePos="top-right">
<i class="demo icon icon-desk-notice"></i>
</d-badge>
<h5>通过badgePos参数设置徽章位置</h5>
</div>
</section>
4 changes: 2 additions & 2 deletions devui/badge/demo/basic/basic.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@

.demo {
vertical-align: middle;
font-size: 20px;
font-size: $devui-font-size-page-title;

&-card {
width: 90px;
height: 42px;
line-height: 42px;
border-radius: 4px;
background: $devui-global-bg;
font-size: 14px;
font-size: $devui-font-size-card-title;
text-align: center;
display: inline-block;
}
Expand Down
6 changes: 6 additions & 0 deletions devui/badge/demo/count/count.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,10 @@
</li>
</ul>
</div>

<div>
<h4>通过textColor、bgColor自定义文字、背景颜色</h4>
<strong><span>代码</span></strong>
<d-badge class="span-space" count="2.3k" bgColor="#F2F2F3" textColor="#7A7E87"> </d-badge>
</div>
</section>
8 changes: 6 additions & 2 deletions devui/badge/demo/count/count.component.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@import '~ng-devui/styles-var/devui-var.scss';

.title {
font-size: 14px;
font-size: $devui-font-size-card-title;
margin-bottom: 10px;
font-weight: bold;
}
Expand All @@ -24,7 +24,7 @@

.item-title {
color: $devui-text;
font-size: 14px;
font-size: $devui-font-size-card-title;
}
}

Expand All @@ -37,3 +37,7 @@
}
}
}

.span-space {
left: 5px;
}
4 changes: 3 additions & 1 deletion devui/badge/demo/dot/dot.component.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@import '~ng-devui/styles-var/devui-var.scss';

:host {
font-size: 16px;
font-size: $devui-font-size-icon;
}

.badge-group d-badge {
Expand Down
4 changes: 2 additions & 2 deletions devui/badge/doc/api.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### d-badge 参数

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

| textColor | `string` | -- | 可选, 可自定义徽标文字颜色 | [计数徽章](/components/badge/demo#badge-count) |
Loading

0 comments on commit d310bad

Please sign in to comment.