@interaction/message
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

快速上手

前提

@interaction/message依赖ng-zorro-antd,所以在使用之前,必须安装ng-zorro-antd

备注:后期重构message,取消对ng-zorro-antd的依赖,前期先这样用。

ng add ng-zorro-antd

介绍

ModalService包括三个方法

方法名 参数 默认值 含义
alert title(必填):string
type(选填): 'success' | 'warning' | 'error' | 'info'
content(选填): string
placement(选填): 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight'
placement的默认值为"bottomRight"
其他参数无默认值
弹出框
confirm msg(必填): string 确认框(点击确认后无回调)
confirmed msg(必填): string 确认框(点击确认后有回调)

安装

npm install @interaction/message

导入

import { ModalService } from '@interaction/message';

使用

export class AppComponent {
 constructor(
  private modal: ModalService
 ){
  this.modal.alert('111', 'error');
 }
}

Readme

Keywords

none

Package Sidebar

Install

npm i @interaction/message

Weekly Downloads

2

Version

0.2.0

License

none

Unpacked Size

85 kB

Total Files

20

Last publish

Collaborators

  • gongbei
  • iecy
  • maxuelong
  • miyoko0505
  • nuonuoge
  • ruowang