This package has been deprecated

Author message:

bye~

xsm-msgbox

0.2.0 • Public • Published

xsm-msgbox

A simple Message Box UI component. Based on jQuery.

��װ

With node/npm:

npm install xsm-msgbox

Or download the source code from github: xsm-msgbox.zip

ʹ��

����ű�

1��CMD + browserify

var XsmMsgbox = require('xsm-msgbox');
XsmMsgbox.alert('Something happened!');

2��ֱ������ .js �ļ�

<script src="path/to/xsm-msgbox.min.js" charset="UTF-8"></script>
XsmMsgbox.alert('Something happened!');

������ʽ

1������ .less �ļ�

ͨ�� grunt-less + less-plugin-npm-import ��ʽ��

// if you use "less-plugin-npm-import" with grunt-less:
@import "npm://xsm-msgbox"

��ʹ�ò����

@import "path/to/xsm-msgbox/index";

������� IE6��7����ʹ�ã�

@import "path/to/xsm-msgbox/ie6";

�����ֶ��� images Ŀ¼�µ�ͼƬ����������Ŀ¼����ȷ�� css �ж�ͼƬ����·�����á�

2��ֱ������ .css �ļ�

<link href="path/to/xsm-msgbox.min.css" type="text/css" rel="stylesheet">

�����Ҫ����IE6��7��

<link href="path/to/xsm-msgbox.ie6.min.css" type="text/css" rel="stylesheet">

����Ϣ����

������Ϣ���͵IJ�ͬ��ʹ����Ӧ�ķ�����alert(), success(), error()�� �û��ر���Ϣ����ʱ�����Դ�������ָ���Ļص�������������ע��ص������ķ�ʽ��

// ���ú���ʱ�ṩ�ص�����
Msgbox.alert('Hi', function () {
    console.log('msgbox closed');
});
// ͨ���������ض���� .done() ����ע��ص�����
Msgbox.alert('Hi').done(function () {
    console.log('msgbox closed');
});

�ڸDz�

XsmMsgbox.cover() �û��ڵ�ǰ������ʾһ�����֣���ֹ�û�������ͨ�� XsmMsgbox.close() �ر��ڸDz㡣

api

  • alert(message, callback)
  • notice(message, callback)
  • success(message, callback)
  • error(message, callback)
  • confirm(message, callback)
  • cover(),
  • close(),
  • removeCover()

test

npm test

Readme

Keywords

Package Sidebar

Install

npm i xsm-msgbox

Weekly Downloads

1

Version

0.2.0

License

MIT

Last publish

Collaborators

  • luobo-modules