From f754e915ff3b14d7d30aae43c8dd3d0c22b11ee5 Mon Sep 17 00:00:00 2001 From: Guoyuanqiang Date: Tue, 8 Jan 2019 15:45:17 +0800 Subject: [PATCH 1/2] perf(module: actionsheet): perf actionsheet with cdk --- .../action-sheet-options.provider.ts | 5 +- .../action-sheet/action-sheet.component.html | 82 +++++++++---------- .../action-sheet.component.spec.ts | 50 ++++++----- .../action-sheet/action-sheet.component.ts | 25 ++---- .../action-sheet/action-sheet.service.ts | 53 ++++++------ components/modal/modal.module.ts | 1 - 6 files changed, 106 insertions(+), 110 deletions(-) diff --git a/components/action-sheet/action-sheet-options.provider.ts b/components/action-sheet/action-sheet-options.provider.ts index 14f12f65..48fcdf65 100644 --- a/components/action-sheet/action-sheet-options.provider.ts +++ b/components/action-sheet/action-sheet-options.provider.ts @@ -2,8 +2,8 @@ import { Injectable, TemplateRef } from '@angular/core'; @Injectable() export class ActionSheetOptions { - prefixCls?: string; - maskClosable?: boolean; + prefixCls?: string = 'am-action-sheet'; + maskClosable?: boolean = true; cancelButtonIndex?: number; destructiveButtonIndex?: number; title?: string | TemplateRef; @@ -22,6 +22,7 @@ export class ShareOption { @Injectable() export class ShareActionSheetWithOptions extends ActionSheetOptions { options: ShareOption[] | ShareOption[][]; + cancelButtonText?: string = 'Cancel'; } @Injectable() diff --git a/components/action-sheet/action-sheet.component.html b/components/action-sheet/action-sheet.component.html index c1fc6bf1..442a9983 100644 --- a/components/action-sheet/action-sheet.component.html +++ b/components/action-sheet/action-sheet.component.html @@ -1,74 +1,74 @@ -
-
+
+