Skip to content

Commit 4c59b87

Browse files
committed
release: 10.0.0
1 parent 280919b commit 4c59b87

File tree

8 files changed

+70
-14
lines changed

8 files changed

+70
-14
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# [10.0.0](https://github.com/cipchk/ngx-weui/compare/9.0.0...10.0.0) (2020-07-09)
2+
3+
4+
### Features
5+
6+
* **module:picker:** add `className` property of options ([#164](https://github.com/cipchk/ngx-weui/issues/164)) ([e4e6f0e](https://github.com/cipchk/ngx-weui/commit/e4e6f0e5490944b3a22d6fe8db6019ba22b74e0b))
7+
8+
9+
110
# [10.0.0-rc.1](https://github.com/cipchk/ngx-weui/compare/9.0.0...10.0.0-rc.1) (2020-07-08)
211

312

components/actionsheet/actionsheet.service.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { Injectable } from '@angular/core';
1+
import { DOCUMENT } from '@angular/common';
2+
import { ApplicationRef, ComponentFactoryResolver, Inject, Injectable, Injector } from '@angular/core';
23
import { BaseService } from 'ngx-weui/core';
34
import { Observable } from 'rxjs';
45
import { ActionSheetComponent } from './actionsheet.component';
@@ -7,6 +8,15 @@ import { ActionSheetMenuItem } from './actionsheet.types';
78

89
@Injectable({ providedIn: 'root' })
910
export class ActionSheetService extends BaseService {
11+
constructor(
12+
protected readonly resolver: ComponentFactoryResolver,
13+
protected readonly applicationRef: ApplicationRef,
14+
protected readonly injector: Injector,
15+
@Inject(DOCUMENT) protected readonly doc: any,
16+
) {
17+
super();
18+
}
19+
1020
/**
1121
* 创建一个弹出式菜单并显示
1222
*

components/core/utils/base.service.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
1-
import { DOCUMENT } from '@angular/common';
2-
import { ApplicationRef, ComponentFactoryResolver, ComponentRef, EmbeddedViewRef, Inject, Injectable, Injector } from '@angular/core';
1+
import { ApplicationRef, ComponentFactoryResolver, ComponentRef, EmbeddedViewRef, Injectable, Injector } from '@angular/core';
32

43
@Injectable()
54
export abstract class BaseService {
65
protected list: Array<ComponentRef<any>> = [];
7-
constructor(
8-
private resolver: ComponentFactoryResolver,
9-
private applicationRef: ApplicationRef,
10-
private injector: Injector,
11-
@Inject(DOCUMENT) private doc: any,
12-
) {}
6+
protected abstract readonly resolver: ComponentFactoryResolver;
7+
protected abstract readonly applicationRef: ApplicationRef;
8+
protected abstract readonly injector: Injector;
9+
protected abstract readonly doc: Document;
1310

1411
/**
1512
* 销毁

components/dialog/dialog.service.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
1-
import { Injectable } from '@angular/core';
1+
import { DOCUMENT } from '@angular/common';
2+
import { ApplicationRef, ComponentFactoryResolver, Inject, Injectable, Injector } from '@angular/core';
23
import { BaseService } from 'ngx-weui/core';
34
import { Observable } from 'rxjs';
45
import { DialogComponent } from './dialog.component';
56
import { DialogConfig } from './dialog.config';
67

78
@Injectable({ providedIn: 'root' })
89
export class DialogService extends BaseService {
10+
constructor(
11+
protected readonly resolver: ComponentFactoryResolver,
12+
protected readonly applicationRef: ApplicationRef,
13+
protected readonly injector: Injector,
14+
@Inject(DOCUMENT) protected readonly doc: any,
15+
) {
16+
super();
17+
}
18+
919
/**
1020
* 创建一个对话框并显示
1121
*

components/picker/picker.service.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { ComponentRef, Injectable } from '@angular/core';
1+
import { DOCUMENT } from '@angular/common';
2+
import { ApplicationRef, ComponentFactoryResolver, ComponentRef, Inject, Injectable, Injector } from '@angular/core';
23
import { BaseService, NwSafeAny } from 'ngx-weui/core';
34
import { Observable } from 'rxjs';
45
import { PickerBaseComponent } from './picker-base.component';
@@ -25,6 +26,15 @@ import {
2526
*/
2627
@Injectable({ providedIn: 'root' })
2728
export class PickerService extends BaseService {
29+
constructor(
30+
protected readonly resolver: ComponentFactoryResolver,
31+
protected readonly applicationRef: ApplicationRef,
32+
protected readonly injector: Injector,
33+
@Inject(DOCUMENT) protected readonly doc: any,
34+
) {
35+
super();
36+
}
37+
2838
private attachBase(ref: ComponentRef<PickerBaseComponent>, config: PickerBaseConfig): void {
2939
const instance = ref.instance;
3040
const { options, title, placeholder, disabled, value } = config;

components/toast/toast.service.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
1-
import { Injectable } from '@angular/core';
1+
import { DOCUMENT } from '@angular/common';
2+
import { ApplicationRef, ComponentFactoryResolver, Inject, Injectable, Injector } from '@angular/core';
23
import { BaseService } from 'ngx-weui/core';
34
import { ToastComponent } from './toast.component';
45

56
@Injectable({ providedIn: 'root' })
67
export class ToastService extends BaseService {
8+
constructor(
9+
protected readonly resolver: ComponentFactoryResolver,
10+
protected readonly applicationRef: ApplicationRef,
11+
protected readonly injector: Injector,
12+
@Inject(DOCUMENT) protected readonly doc: any,
13+
) {
14+
super();
15+
}
16+
717
/**
818
* 构建toast并显示
919
*

components/toptips/toptips.service.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
1-
import { Injectable } from '@angular/core';
1+
import { DOCUMENT } from '@angular/common';
2+
import { ApplicationRef, ComponentFactoryResolver, Inject, Injectable, Injector } from '@angular/core';
23
import { BaseService } from 'ngx-weui/core';
34
import { ToptipsComponent, ToptipsType } from './toptips.component';
45

56
@Injectable({ providedIn: 'root' })
67
export class ToptipsService extends BaseService {
8+
constructor(
9+
protected readonly resolver: ComponentFactoryResolver,
10+
protected readonly applicationRef: ApplicationRef,
11+
protected readonly injector: Injector,
12+
@Inject(DOCUMENT) protected readonly doc: any,
13+
) {
14+
super();
15+
}
16+
717
/**
818
* 构建一个Toptips并显示
919
*

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-weui",
3-
"version": "10.0.0-rc.1",
3+
"version": "10.0.0",
44
"description": "WeUI for angular",
55
"repository": {
66
"type": "git",

0 commit comments

Comments
 (0)