New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

amazeui-dialog

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amazeui-dialog

Amaze UI Modal 模板封装。


Version published
Weekly downloads
1
decreased by-92.31%
Maintainers
1
Weekly downloads
 
Created

Amaze UI dialog


NPM version Dependency Status devDependency Status

Amaze UI Modal 插件 HTML 模板封装。

使用说明:

  1. 获取 Amaze UI 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: '正文'});

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