Skip to content

Commit 4955748

Browse files
chore(release): release 18.0.0 (#360)
Co-authored-by: huaweidevcloud <[email protected]>
1 parent 1bc4dca commit 4955748

File tree

322 files changed

+5265
-4286
lines changed

Some content is hidden

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

322 files changed

+5265
-4286
lines changed

README.md

Lines changed: 1 addition & 1 deletion
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>`^17.0.0`</font>
26+
Now supports Angular <font color=red>`^18.0.0`</font>
2727

2828
## Getting Started
2929

README_zh_CN.md

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

2424
## Angular版本
2525

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

2828
## 快速开始
2929

devui-commons/src/constant.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export const LinkMap: Record<string, string> = {
2+
codesandbox: 'https://codesandbox.io/api/v1/sandboxes/define?module=/src/app/app.component.ts',
3+
versionRelease: 'https://github.com/DevCloudFE/ng-devui/releases',
4+
gitcodeLink: 'https://gitcode.com/DevCloudFE',
5+
vueDevuiLink: 'https://vue-devui.github.io',
6+
};

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,13 @@
4747
<div class="menu-item">
4848
<ng-content select="d-header-language-switch"></ng-content>
4949
</div>
50+
<div class="menu-item">
51+
<a [href]="gitcodeLink" rel="noopener noreferrer" target="blank">
52+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
53+
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.4791 4.97677C15.6201 4.89789 15.7691 4.8145 15.93 4.72314C15.9494 4.82848 15.9683 4.92046 15.9854 5.00383C16.0157 5.15091 16.0406 5.2719 16.0525 5.39144C16.1479 6.4296 16.6697 7.1933 17.4093 7.36527C18.4908 7.61639 19.5106 7.20133 20.06 6.28555C20.72 5.18673 20.4334 3.84099 19.3097 3.03098C16.1851 0.777435 12.7523 0.155888 9.05448 1.24127C1.08137 3.59371 -1.64675 13.3884 4.01196 19.3949C6.43292 21.9642 9.50695 23.0727 12.9963 22.9889C17.4663 22.8839 20.6857 20.6563 22.7408 16.7954C24.1978 14.0561 22.6139 11.0619 19.5805 10.4396C17.8481 10.0908 16.0765 9.97757 14.3137 10.103C13.7272 10.1594 13.1579 10.3325 12.6394 10.6124C12.0592 10.9135 11.8915 11.5383 11.9565 12.1575C12.0171 12.7217 12.4498 13.0601 12.965 13.1453C14.0024 13.3077 15.0522 13.402 16.1 13.4881C16.4032 13.5136 16.7093 13.5166 17.0149 13.5197C17.4534 13.5241 17.8912 13.5285 18.3187 13.5991C19.5385 13.8007 19.9574 14.7905 19.33 15.8495C19.1763 16.1041 18.9971 16.3424 18.7951 16.5607C17.9745 17.4632 16.9014 18.0981 15.7152 18.3827C13.55 18.9127 11.3827 18.9425 9.22755 18.2617C6.77347 17.4875 5.31042 15.6849 5.25902 13.2584C5.2398 11.7619 5.61972 10.2874 6.35969 8.9865C6.69401 8.38013 6.87751 7.75562 6.82593 7.06851C6.80422 6.77557 6.79219 6.48231 6.77927 6.16716C6.77239 5.99944 6.76526 5.82551 6.75628 5.64214C7.00484 5.69431 7.25032 5.76016 7.49161 5.83943C8.43027 6.21622 9.35415 6.38812 10.3702 6.11155C10.9482 5.97335 11.5455 5.93511 12.1363 5.9985C13.0877 6.07606 14.0387 5.84361 14.847 5.33586C15.0488 5.2176 15.2539 5.10279 15.4791 4.97677Z" fill="#DA203E"/>
54+
</svg>
55+
</a>
56+
</div>
5057
<div class="menu-item">
5158
<a [href]="githubLink" rel="noopener noreferrer" target="blank">
5259
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
44
import { DevuiCommonsService } from '../devui-commons.service';
55
import { I18nUtil } from '../i18n/i18n.util';
66
import { LogoComponent } from './logo/logo.component';
7+
import { LinkMap } from '../constant';
78

89
@Component({
910
selector: 'd-common-header',
@@ -21,6 +22,7 @@ export class HeaderComponent implements OnInit {
2122

2223
repoLink!: SafeResourceUrl;
2324
githubLink;
25+
gitcodeLink = LinkMap.gitcodeLink;
2426

2527
@ContentChildren(LogoComponent) subLogo: QueryList<LogoComponent> = new QueryList<LogoComponent>();
2628

@@ -130,4 +132,4 @@ export class HeaderComponent implements OnInit {
130132
this.showHamburger = !this.showHamburger;
131133
this.cdr.detectChanges();
132134
}
133-
}
135+
}

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { Component, EventEmitter, Input, OnInit, Output, Inject, ChangeDetectorR
33
import { DevuiCommonsService } from '../../devui-commons.service';
44
import { I18nUtil } from '../../i18n/i18n.util';
55
import { componentSvg, designSvg, ecologySvg, logoSvg, vueDevUISvg } from './icon';
6+
import { LinkMap } from 'devui-commons/src/constant';
67

78
@Component({
89
selector: "d-header-menu",
@@ -45,7 +46,7 @@ export class MenuComponent implements OnInit {
4546
enDescription:
4647
"Cross-End component library based on Vue3 and DevUI design style",
4748
enName: "Vue DevUI",
48-
href: "https://vue-devui.github.io/",
49+
href: LinkMap.vueDevuiLink,
4950
icon: vueDevUISvg,
5051
menuName: "vue",
5152
},
@@ -123,4 +124,4 @@ export class MenuComponent implements OnInit {
123124
changeLanguage(lang): void {
124125
this.curLanguage = lang;
125126
}
126-
}
127+
}

devui-commons/src/header/theme-picker/theme-picker.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ export class ThemePickerComponent implements OnInit, OnDestroy {
3939

4040
ngOnInit() {
4141
if (typeof window !== 'undefined') {
42-
this.themeService = window['devuiThemeService'];
43-
this.themes = window['devuiThemes'];
44-
this.theme = window['devuiCurrentTheme'];
42+
this.themeService = (window as any).devuiThemeService;
43+
this.themes = (window as any).devuiThemes;
44+
this.theme = (window as any).devuiCurrentTheme;
4545
}
4646
const themeName = localStorage.getItem('user-custom-theme')?.split('-')[0];
4747
this.currentAdvancedTheme = this.advancedThemeList.find(theme => theme.value === themeName) ? themeName : 'infinity';
@@ -115,7 +115,7 @@ export class ThemePickerComponent implements OnInit, OnDestroy {
115115

116116
themeFontSizeChange() {
117117
if (typeof window !== 'undefined' && this.largeFontSizeMode) {
118-
this.largeFontTheme.data = { ...this.themes[window['devuiCurrentTheme']].data, ...LargeFontSize};
118+
this.largeFontTheme.data = { ...this.themes[(window as any).devuiCurrentTheme].data, ...LargeFontSize};
119119
this.theme = `devui-large-font-theme`;
120120
} else {
121121
this.theme = `${this.themePrefix}-${this.themeMode}-theme`;

devui-commons/src/sidebar/sidebar.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { Subject } from 'rxjs';
55
import { filter, takeUntil } from 'rxjs/operators';
66
import { DevuiCommonsService } from '../devui-commons.service';
77
import { I18nUtil } from '../i18n/i18n.util';
8+
import { LinkMap } from '../constant';
89

910
interface navItem {
1011
name: string;
@@ -70,7 +71,7 @@ export class SidebarComponent implements OnInit, AfterViewInit, OnDestroy {
7071
}
7172
rotateDegrees = 0;
7273
docLinkMap = {
73-
'opensource': 'https://github.com/DevCloudFE/ng-devui/releases',
74+
'opensource': LinkMap.versionRelease,
7475
};
7576
get navData() {
7677
return this._navData;
@@ -86,7 +87,7 @@ export class SidebarComponent implements OnInit, AfterViewInit, OnDestroy {
8687
this.commonsService.on<any>('searchEvent').subscribe((term) => {
8788
this.filterData(term);
8889
});
89-
this.changelogLink = this.docLinkMap['opensource'];
90+
this.changelogLink = this.docLinkMap.opensource;
9091
if(this.showVersions){
9192
this.currentOption = this.versionOptions[0];
9293
}

devui/accordion/accordion-item-routerlink.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export class AccordionItemRouterlinkComponent extends AccordionBaseLinkComponent
4646
}
4747

4848
ngOnChanges(changes: SimpleChanges): void {
49-
if (changes['item']) {
49+
if (changes.item) {
5050
if (this.link) {
5151
this.urlTree = this.router.parseUrl(this.link);
5252
const handelPath = (url: string) => {

devui/accordion/accordion-item.component.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
<div class="devui-accordion-splitter" [ngClass]="{ 'devui-parent-list': deepth === 0 }" [ngStyle]="{ left: deepth * 20 + 10 + 'px' }"></div>
21
<ng-container *ngIf="!itemTemplate">
32
{{ title }}
43
</ng-container>

0 commit comments

Comments
 (0)