Skip to content

Commit

Permalink
release: 10.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
cipchk committed Jul 9, 2020
1 parent 280919b commit 4c59b87
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 14 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# [10.0.0](https://github.com/cipchk/ngx-weui/compare/9.0.0...10.0.0) (2020-07-09)


### Features

* **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))



# [10.0.0-rc.1](https://github.com/cipchk/ngx-weui/compare/9.0.0...10.0.0-rc.1) (2020-07-08)


Expand Down
12 changes: 11 additions & 1 deletion components/actionsheet/actionsheet.service.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Injectable } from '@angular/core';
import { DOCUMENT } from '@angular/common';
import { ApplicationRef, ComponentFactoryResolver, Inject, Injectable, Injector } from '@angular/core';
import { BaseService } from 'ngx-weui/core';
import { Observable } from 'rxjs';
import { ActionSheetComponent } from './actionsheet.component';
Expand All @@ -7,6 +8,15 @@ import { ActionSheetMenuItem } from './actionsheet.types';

@Injectable({ providedIn: 'root' })
export class ActionSheetService extends BaseService {
constructor(
protected readonly resolver: ComponentFactoryResolver,
protected readonly applicationRef: ApplicationRef,
protected readonly injector: Injector,
@Inject(DOCUMENT) protected readonly doc: any,
) {
super();
}

/**
* 创建一个弹出式菜单并显示
*
Expand Down
13 changes: 5 additions & 8 deletions components/core/utils/base.service.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
import { DOCUMENT } from '@angular/common';
import { ApplicationRef, ComponentFactoryResolver, ComponentRef, EmbeddedViewRef, Inject, Injectable, Injector } from '@angular/core';
import { ApplicationRef, ComponentFactoryResolver, ComponentRef, EmbeddedViewRef, Injectable, Injector } from '@angular/core';

@Injectable()
export abstract class BaseService {
protected list: Array<ComponentRef<any>> = [];
constructor(
private resolver: ComponentFactoryResolver,
private applicationRef: ApplicationRef,
private injector: Injector,
@Inject(DOCUMENT) private doc: any,
) {}
protected abstract readonly resolver: ComponentFactoryResolver;
protected abstract readonly applicationRef: ApplicationRef;
protected abstract readonly injector: Injector;
protected abstract readonly doc: Document;

/**
* 销毁
Expand Down
12 changes: 11 additions & 1 deletion components/dialog/dialog.service.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
import { Injectable } from '@angular/core';
import { DOCUMENT } from '@angular/common';
import { ApplicationRef, ComponentFactoryResolver, Inject, Injectable, Injector } from '@angular/core';
import { BaseService } from 'ngx-weui/core';
import { Observable } from 'rxjs';
import { DialogComponent } from './dialog.component';
import { DialogConfig } from './dialog.config';

@Injectable({ providedIn: 'root' })
export class DialogService extends BaseService {
constructor(
protected readonly resolver: ComponentFactoryResolver,
protected readonly applicationRef: ApplicationRef,
protected readonly injector: Injector,
@Inject(DOCUMENT) protected readonly doc: any,
) {
super();
}

/**
* 创建一个对话框并显示
*
Expand Down
12 changes: 11 additions & 1 deletion components/picker/picker.service.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ComponentRef, Injectable } from '@angular/core';
import { DOCUMENT } from '@angular/common';
import { ApplicationRef, ComponentFactoryResolver, ComponentRef, Inject, Injectable, Injector } from '@angular/core';
import { BaseService, NwSafeAny } from 'ngx-weui/core';
import { Observable } from 'rxjs';
import { PickerBaseComponent } from './picker-base.component';
Expand All @@ -25,6 +26,15 @@ import {
*/
@Injectable({ providedIn: 'root' })
export class PickerService extends BaseService {
constructor(
protected readonly resolver: ComponentFactoryResolver,
protected readonly applicationRef: ApplicationRef,
protected readonly injector: Injector,
@Inject(DOCUMENT) protected readonly doc: any,
) {
super();
}

private attachBase(ref: ComponentRef<PickerBaseComponent>, config: PickerBaseConfig): void {
const instance = ref.instance;
const { options, title, placeholder, disabled, value } = config;
Expand Down
12 changes: 11 additions & 1 deletion components/toast/toast.service.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
import { Injectable } from '@angular/core';
import { DOCUMENT } from '@angular/common';
import { ApplicationRef, ComponentFactoryResolver, Inject, Injectable, Injector } from '@angular/core';
import { BaseService } from 'ngx-weui/core';
import { ToastComponent } from './toast.component';

@Injectable({ providedIn: 'root' })
export class ToastService extends BaseService {
constructor(
protected readonly resolver: ComponentFactoryResolver,
protected readonly applicationRef: ApplicationRef,
protected readonly injector: Injector,
@Inject(DOCUMENT) protected readonly doc: any,
) {
super();
}

/**
* 构建toast并显示
*
Expand Down
12 changes: 11 additions & 1 deletion components/toptips/toptips.service.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
import { Injectable } from '@angular/core';
import { DOCUMENT } from '@angular/common';
import { ApplicationRef, ComponentFactoryResolver, Inject, Injectable, Injector } from '@angular/core';
import { BaseService } from 'ngx-weui/core';
import { ToptipsComponent, ToptipsType } from './toptips.component';

@Injectable({ providedIn: 'root' })
export class ToptipsService extends BaseService {
constructor(
protected readonly resolver: ComponentFactoryResolver,
protected readonly applicationRef: ApplicationRef,
protected readonly injector: Injector,
@Inject(DOCUMENT) protected readonly doc: any,
) {
super();
}

/**
* 构建一个Toptips并显示
*
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-weui",
"version": "10.0.0-rc.1",
"version": "10.0.0",
"description": "WeUI for angular",
"repository": {
"type": "git",
Expand Down

0 comments on commit 4c59b87

Please sign in to comment.