Giter Club home page Giter Club logo

bnq-common-dialog's Introduction

Install

npm i bnq-common-dialog

use 见demo

支持:detail/radio/textarea/select/number/rangedatepicker/treeSelect/cascader/dialogContent为表格内容,titles&&values的结构 DialogForm.propTypes = { title:'弹窗标题', formData:[{ id: 'verifyResult', type:'radio', //radio name:'审核结果', data:[{name:'通过',id:2},{name:'拒绝',id:3}], initialValue:2, isRequired:true },{ id: 'remark', type:'textarea', //textarea name:'原因描述' },{ id: 'closeReason', //select type:'select', data:[{name:'原因1',id:2},{name:'原因2',id:3}], name:'关闭原因', initialValue:3, isRequired:true, isHidePleaseSelect:true },{ id: 'subscriptionAmount', //number name: '金额', type: 'number', min:0, max:1000000, formatter:(value) => ${value}元, parse:value => value.replace(/[^\d.]/g,"").replace(/^./g,"").replace(/.{2,}/g,".").replace(".","$#$").replace(/./g,"").replace("$#$",".").replace(/^(-)(\d+).(\d\d).$/,'$1$2.$3'), },{ id: 'time', //rangedatepicker type:'rangedatepicker', name:'选择时间', initialValue:moment('2018-09-20','YYYY-MM-DD'), showTime:true },{ //树形选择器 id:'treeSelect', type:'treeSelect', treeData:treeData,//treeData参考demo里面的数据结构 showSearch:false, allowClear:true, name:'树形选择器', placeholder:'请选择', initialValue:'0-0-2', multiple:true },{ //cascader id: 'cardTypeList', name: '指定卡类型', type:'cascader', className:'block-div cascader-div', placeholder:'请选择', options:cascaderData, changeOnSelect:false,//是否允许选中父级 onChange :(value, selectedOptions)=>{}, loadData:(selectedOptions)=>{} expandTrigger:"click" //click||hover }], dialogWidth:500, dialogHeight:550, dialogButton:[{ text: '取消', clickHandle: () => { console.log('close') } }, { text: '确认', type: 'primary', clickHandle: (values) => { console.log(values) } }] }

##test npm run test

##demo cd demo npm start

##build npm run bulid

##publish npm publish

bnq-common-dialog's People

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.