npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

icsoc-rc-modal

v1.2.5

Published

基于antd的react组件扩展

Downloads

2

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 组件;