Giter Site home page Giter Site logo

widget-dialog's Introduction

dialog

js dialog弹窗

用法

demo运行

运行文件

./dist/example/test-dialog.html

扩展方法

添加imgad:首页的弹窗广告,toast,prompt:带输入框的confirm,declare,使用帮助以及用户协议

$.alert('支付成功', true, function () {
    console.log(11);
})

$.alert('支付成功')
$.imgad('http://oankigr4l.bkt.clouddn.com/8192dd88gy1fkekqy1wj6j20q10ecjsz.jpg', function () {
    this.hide();
})
// 不传时间,默认3000ms
$.toast('控制超时', 3000, function () {
    console.log('xxx')
})

$.toast('这是一个控制', 300000, function () {
    console.log(11)
})

$.prompt({bar: "新建价格分组", content: '珠海分组', placeholder: '新建价格分组'}, null, function (type, input, c) {
    if (type == 'yes') {
        $.toast(input, 3000, function () {
            console.log(c)
        })
        this.hide();
    } else {
        $.toast(input, 3000, function () {

            console.log(c)
        })
        this.hide();
    }

})

$.declare({bar: "使用帮助", content: txt}, [{'yes':'确认'}], function(type, input, c) {
    if(type == 'yes') {
        $.toast('完成', 3000, function() {
            console.log(c)
        })
        this.hide();
    } else {

    }

})

widget-dialog's People

Contributors

zhyjor avatar

Stargazers

静静是小花 avatar

Watchers

James Cloos avatar  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.