# @beisen-phoenix/message

> >全局展示操作反馈信息。分为基础消息提示、标题+内容提示、及时反馈提示。

Latest version **3.3.55** (published 2019-11-25) · ISC license · 0 weekly downloads

## Install

```sh
npm install @beisen-phoenix/message
pnpm add @beisen-phoenix/message
yarn add @beisen-phoenix/message
bun add @beisen-phoenix/message
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.3.55 |
| Published | 2019-11-25 |
| First published | 2019-04-09 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 125.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | beisencorp |

## Links

- npm: https://www.npmjs.com/package/@beisen-phoenix/message
- Repository: git@gitlab.beisencorp.com:ux-phoenix/message
- npm.io page: https://npm.io/package/@beisen-phoenix/message

## Dependencies (4)

- [@beisen-phoenix/icon](https://npm.io/package/@beisen-phoenix/icon.md) ^3.2.54
- [@beisen-phoenix/button](https://npm.io/package/@beisen-phoenix/button.md) ^3.3.55
- [@beisen-phoenix/style-token](https://npm.io/package/@beisen-phoenix/style-token.md) ^3.3.55
- [@beisen-phoenix/common-utils](https://npm.io/package/@beisen-phoenix/common-utils.md) ^3.3.55

## Recent versions

- 3.3.55 (latest) — 2019-11-25
- 3.2.44-rc.1 (rc) — 2019-10-24
- 3.3.54 — 2019-11-25
- 3.3.53 — 2019-11-25
- 3.3.52 — 2019-11-24
- 3.3.51 — 2019-11-23
- 3.3.50 — 2019-11-22
- 3.3.49 — 2019-11-22
- 3.3.48 — 2019-11-22
- 3.3.47 — 2019-11-22
- 3.3.46 — 2019-11-22
- 3.3.45 — 2019-11-21
- 3.3.43 — 2019-11-21
- 3.3.42 — 2019-11-21
- 3.3.41-beta.1 — 2019-11-21
- … 395 more at https://npm.io/package/@beisen-phoenix/message/versions

## README

## Message 全局操作提示
>全局展示操作反馈信息。分为基础消息提示、标题+内容提示、及时反馈提示。

可提供 成功、错误、警告、提醒 四种类型。

### API

| 参数 | 说明 | 类型 | 默认值 | 是否必传 |
| --- | --- | --- | --- | --- |
| type | 指定警告提示的样式，有四种选择 `success` `error` `info` `warning` | string | 无 | 是 |
| message | 警告提示标题 | string | 无 | 是 |
| description | 警告提示内容 | string 或者 array | 无 | 否 |
| showCloseButton | 是否显示关闭按钮,  | boolean | error和info默认为 true, 其他默认为 false |  否 |
| container | 指定渲染到的Dom容器 | DOM | 无 |  否 | 
| duration | 自动消失时间 | number | 3000 |  否 | 
| top | 上偏移量， 根据组件的默认位置，可以是负数  (正数向下移，负数向上移) | number | 无 |  否 | 
| left | 左偏移量， 根据组件的默认位置，可以是负数 (正数向左移，负数向右移) | number | 无 |  否 | 
| onClose | 关闭时触发的回调函数 | ()=>{} | 无 |  否 | 
| size | 提示尺寸可选`small`为轻提示 `big` | string | big | 否 |

## 1.0.8
 
默认的zIndex使用styleToken里messageZindex


## 1.0.7
 
 样式冲突导致的图标位置不正确，图标与位置的对起

### 2019-07-29
### Message.xxx()

包括：

- `Message.info`
- `Message.success`
- `Message.error`
- `Message.warning`

以上均为一个函数，参数为 object，具体属性如下：

| 参数 | 说明 | 类型 | 默认值 | 是否必传 |
| --- | --- | --- | --- | --- |
| type | 指定警告提示的样式，有四种选择 `success` `error` `info` `warning` | string | 无 | 是 |
| message | 警告提示标题 | string | 无 | 是 |
| description | 警告提示内容 | string 或者 array | 无 | 否 |
| showCloseButton | 是否显示关闭按钮,  | boolean | error和info默认为 true, 其他默认为 false |  否 |
| duration | 自动消失时间 | number | 3000 |  否 | 
| top | 上偏移量， 根据组件的默认位置，可以是负数  (正数向下移，负数向上移) | number | 无 |  否 | 
| left | 左偏移量， 根据组件的默认位置，可以是负数 (正数向左移，负数向右移) | number | 无 |  否 | 
| size | 提示尺寸可选`small`为轻提示 `big` | string | big | 否 |

返回值为一个object，具体属性如下：
 - `close` :  一个用于关闭当前dialog的function

 使用方法：
```javascript
 const infoMs = Message.info({message: '这里是标题'})
 infoMs.close() // 关闭当前对话框
```

 ### 2019-09-02
 新增小号轻提示
 http://nature.beisen.co/NaturedesignSpec/Naturedesign3.0/NaturedesignSpec-PC/preview/%5bPC%5dNaturedesign3.0.5/8Feedback-01-Message/

### 2019-09-25

增加多语言

| 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| translation | 语言包 用于翻译组件内置常量 | {more: string,iSee: string} | {more: '查看更多',iSee: '我知道了'} |

---
_Source: https://npm.io/package/@beisen-phoenix/message · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
