# icsoc-rc-modal

> 基于antd的react组件扩展

Latest version **1.2.5** (published 2019-11-07) · ISC license · 0 weekly downloads

## Install

```sh
npm install icsoc-rc-modal
pnpm add icsoc-rc-modal
yarn add icsoc-rc-modal
bun add icsoc-rc-modal
```

## 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 | 1.2.5 |
| Published | 2019-11-07 |
| First published | 2019-08-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 27 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | icsoc |

## Links

- npm: https://www.npmjs.com/package/icsoc-rc-modal
- npm.io page: https://npm.io/package/icsoc-rc-modal

## Dependencies (1)

- [icsoc-rc-button](https://npm.io/package/icsoc-rc-button.md) ^1.2.5

## Recent versions

- 1.2.5 (latest) — 2019-11-07
- 1.2.0 — 2019-08-01

## README

---
category: Components
type: 信息反馈
title: Modal
subtitle: 对话框
modifiedJs: 1
order: 1
---

在 Ant Design 的 `Modal` 组件上进行的扩展。不同之处主要在于：

1. 增加了 `size` 属性，设置了 `width` 属性的默认值。
   > `size` 可用来设置弹框的大小尺寸，
   > `width` 可用来修改弹框的宽度（详情请查看代码演示与 API）。
2. 增加了 `mode` `type` 属性，设置了 `okText` `width` 属性的默认值。
   > `mode` 表示简短提示框或者是普通提示框，
   > `type` 表示提示框的类型，
   > `okText` 可设置提示框确认按钮的文字，
   > `width` 可设置提示框的宽度。

## API

### ModalSize

| 参数  | 说明                                        | 类型            | 默认值    |
| ----- | ------------------------------------------- | --------------- | --------- |
| size  | 弹框尺寸，可选值为 `small` `large` 或者不设 | string          | `default` |
| width | 宽度                                        | string\| number | 600       |

`size` 属性表示弹框的尺寸。`small` 宽度 450px，`middle` 宽度 600px，`large` 宽度 900px。`width` 属性可以覆盖 `size` 属性。

### modalTips()

modalTips 为一个函数，参数为 object；

| 参数   | 说明                                                                  | 类型             | 默认值                                   |
| ------ | --------------------------------------------------------------------- | ---------------- | ---------------------------------------- |
| mode   | 提示框模式，可选值为 `simple` 或者不设                                | string           | `default`                                |
| type   | 提示框提示类型，可选值为 `info` `success` `error` `warning` `confirm` | string           | `warning`                                |
| okText | 确认按钮文字                                                          | string           | 简短提示框 `我知道了`，普通提示框 `确定` |
| width  | 宽度                                                                  | string \| number | 简短提示框 `260`，普通提示框 `434`       |

### EditDrawer

| 参数            | 说明                                                                                     | 类型        | 默认值 |
| --------------- | ---------------------------------------------------------------------------------------- | ----------- | ------ |
| shwBottomBtn    | 是否展示底部按钮                                                                         | boolean     | true   |
| bottombtnConfig | 配置底部按钮。`text` 表示按钮文字，`onClick` 表示按钮事件。默认展示 `保存` `取消` 按钮。 | array       |        |
| onSave          | 点击保存按钮的回调                                                                       | function(e) | 无     |
| onClose         | 点击取消按钮或左上角或遮罩层的回调                                                       | function(e) | 无     |

其余参数请参考 ant-design 的 Drawer 组件；

---
_Source: https://npm.io/package/icsoc-rc-modal · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
