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

amazeui-dialog

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amazeui-dialog

Amaze UI Modal 模板封装。

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Amaze UI dialog


NPM version Dependency Status devDependency Status

Amaze UI Modal 插件 HTML 模板封装。

使用说明:

  1. 获取 Amaze UI dialog
  • 直接下载
  • 使用 NPM: npm install amazeui-dialog
  1. 在 Amaze UI 样式之后引入 dialog 样式(dist 目录下的 CSS):

Amaze UI dialog 依赖 Amaze UI 样式。

<link rel="stylesheet" href="path/to/amazeui.min.css"/>
  1. 引入 dialog 插件(dist 目录下的 JS):
<script src="path/to/jquery.min.js"></script>
<script src="path/to/amazeui.min.js"></script>
<script src="path/to/amazeui.dialog.min.js"></script>
  1. 调用 dialog:
AMUI.dialog.alert({
    title: '错误提示',
    content: '你的家还好吧',
    onConfirm: function() {
        console.log('close');
      }
});

AMUI.dialog.confirm({
    title: '错误提示',
    content: '正文内容',
    onConfirm: function() {
      console.log('onConfirm');
    },
    onCancel: function() {
      console.log('onCancel')
    }
});

var $loading = AMUI.dialog.loading();
setTimeout(function() {
    $loading.modal('close');
}, 3000);

var $actions = AMUI.dialog.actions({
    title: '标题啊',
    items: [
      {content: '<a href="#"><span class="am-icon-wechat"></span> 分享到微信</a>'},
      {content: '<a href="#"><i class="am-icon-mobile"></i> 短信分享</a>'},
      {content: '<a href="#"><i class="am-icon-twitter"></i> 分享到 XX 萎跛</a>'}
    ],
    onSelected: function(index, target) {
      console.log(index);
      $actions.close();
    }
});

$actions.show();

AMUI.dialog.popup({title: '标题', content: '正文'});

Keywords

FAQs

Package last updated on 28 Jun 2016

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