Skip to content
Amaze UI Modal HTML 模板封装
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist v0.0.2 Jun 22, 2016
docs v0.0.2 Jun 22, 2016
lib v0.0.2 Jun 22, 2016
.editorconfig first commit, resolved amazeui/amazeui#710 Aug 14, 2015
.eslintrc v0.0.2 Jun 22, 2016
.gitignore first commit, resolved amazeui/amazeui#710 Aug 14, 2015
.npmignore first commit, resolved amazeui/amazeui#710 Aug 14, 2015
LICENSE v0.0.2 Jun 22, 2016
README.md first commit, resolved amazeui/amazeui#710 Aug 14, 2015
gulpfile.js first commit, resolved amazeui/amazeui#710 Aug 14, 2015
package.json bump devDependencies Jun 28, 2016

README.md

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: '正文'});
You can’t perform that action at this time.