GithubHelp home page GithubHelp logo

liuliu24 / notify Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 18 KB

layui消息通知插件 6种样式,可手动关闭层,支持回调方法,可设置弹出位置,兼容主流浏览器,兼容至ie9 (ie没有svg动画)

License: MIT License

JavaScript 85.21% HTML 14.79%

notify's Introduction

功能说明:layui消息通知插件 6种样式,可手动关闭层,支持回调方法,可设置弹出位置,兼容主流浏览器,兼容至ie9 (ie没有svg动画) 输入图片说明

1、6种调用方法:

普通:info

警告:warning

成功:success

错误:error

加载:loading

关闭:destroyAll

2、layui使用方法

layui.use(['notify'],function(){
     var notify=layui.notify;
     notify.info("自定义消息")
})

基本用法

参数说明:对参数没有顺序要求,会根据参数的数据类型进行解析

        msg: "", //文字内容
        position: 'topCenter', // 弹出位置bottomRight, bottomLeft, topRight, topLeft, topCenter, bottomCenter, center
        duration: 2000, //默认2秒关闭
        showClose: true //显示关闭按钮
    1、notify.info("提示消息");
    2、notify.warning("警告消息");
    3、notify.success("操作成功");
    4、notify.loading("加载中");
    5、notify.error("操作失败");
    6、notify.error("不显示关闭按钮", false);
    7、notify.info("提示消息", function () {
        alert("回调成功");
    });
    8、notify.destroyAll(); 全部关闭
    9、notify.info("位置显示", "topLeft"); 参数:topLeft、topCenter、topRight、bottomLeft、bottomCenter、bottomRight、center

notify's People

Contributors

liuliu24 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.