Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

m-dialog

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

m-dialog

m-dialog 移动端模态对话框

  • 1.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
increased by100%
Maintainers
2
Weekly downloads
 
Created
Source

m-dialog


移动端模态对话框。

何时使用

需要用户处理事务,又不希望跳转页面以致打断工作流程时,可以使用 Dialog 在当前页面正中打开一个浮层,承载相应的操作。

另外当需要一个简洁的确认框询问用户时,可以使用封装好的 Dialog.confirm() 等方法。

API

对话框容器<Dialog>的属性说明如下:

参数说明类型默认值
visible对话框是否可见Boolean
title标题React.Element
onOk点击确定回调functionfunction() {}
onCancel点击遮罩层或右上角叉或取消按钮的回调functionfunction() {}
hasFoot是否有底部内容 (确定取消按钮)Booleantrue
okText确认按钮文字String确定
cancelText取消按钮文字String取消
withCloseIcon是否显示右上角的关闭按钮Booleanfalse
content内容React.Element
dialogMarginTop弹框顶部的margin值Number0
transitionStart弹框出现和消失的时候是否有过渡效果Booleanfalse

Dialog.xxx()

包括:

  • const obj = Dialog.alert
  • const obj = Dialog.confirm

以上均为一个函数,参数为 object,具体属性上

obj为对象实例,可以直接调用obj.destroy()关闭对话框

Keywords

FAQs

Package last updated on 23 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc