介紹:
這是一款結(jié)合了alert彈出框與confirm彈出框綜合的一款組件羊赵,可以定義參數(shù)改變彈出框的樣式以及點擊事件等
展示:
使用代碼:
自定義參數(shù):
/**
* animationType:動畫類型 使用Modal組件 ’none,fade,slide‘? ---string
* title:頭部標題文字? ? ? ? ? ? ? ? ---string
* thide:true|false 是否隱藏頭部? ? ---boolean
* headStyle:頭部樣式? ? ? ? ? ? ? ? ---object
* messText:中間提示文字? ? ? ? ? ? ---string
* clickScreen:點擊屏幕是否隱藏彈出框 ---boolean
* innersWidth:彈出框的寬度? ---number
* innersHeight:彈出框的高度 ---number
* buttons:按鈕數(shù)組? ? ? ? ? ---array
* buttons:[
* {
* txt:'按鈕文字',? ? ---string
* btnStyle:{backgroundColor:'transparent'}, 按鈕的樣式對象---object
* txtStyle:{color:'#ff6600'},? ? 按鈕的文字樣式? ? ? ? ? ---object
* onpress:this.cancels.bind(this) 按鈕的點擊事件? ? ? ? ? ---function
* }
* ...
*? ? ? ? ]
*/
事件:
show(options):顯示
hide(): 隱藏