GithubHelp home page GithubHelp logo

jie-dialog's Introduction

Dialog

对话框

  • 可以打开、保存并关闭、不保存并关闭对话框
  • 可以随意添加内容
  • 可以在打开和保存时和内容的数据进行交流

该对话框会:

  • 提供label, confirmlabel, unconfirmlabel, width四个外设特性
  • 自动绑定标签里带有[data-source]的第一个元素的value值
  • 提供open(value), confirm(), unconfirm()三种方法
  • 同时提供save, discard两个事件可供监听

Example

<jie-dialog label="添加网址" width="640">
  请输入你想访问的网址:<br>
  <input type="url" data-source value="http://">
</jie-dialog>
var dialog = document.querySelector('jie-dialog');

dialog.open('http://www.google.com/');

dialog.addEventListener('save', function (e) {...});
// dialog.confirm();

dialog.addEventListener('discard', function (e) {...});
// dialog.unconfirm();

jie-dialog's People

Stargazers

 avatar  avatar  avatar

Watchers

 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.