1.0.4 • Published 3 years ago

great-ui v1.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

消息弹窗

 <dialog id='dialog' 
      title='Great-UI' 
      content='Great-UI' 
      cancelText='cancel' 
      confirmText='OK'
      bind:cancelEvent="_cancelEvent"  
      bind:confirmEvent="_confirmEvent">
    </dialog>
    
    <button type="primary" bindtap="showDialog"> 点我!! </button>
Page({
  data:{
    functions:{}
  },
  onReady: function () {
    let a = this.selectComponent("#dialog");
    this.setData({
      functions:a
    })
  },
  showDialog(){
    let dialog=this.data.functions
    dialog.showDialog();
  },
   //取消事件
  _cancelEvent(){
    console.log('你点击了取消');
    let dialog=this.data.functions
    dialog.hideDialog();
  },
  //确认事件
  _confirmEvent(){
    console.log('你点击了确定');
    let dialog=this.data.functions
    dialog.hideDialog();
  }

title:标题

content:内容

cancelText:取消

confirmText:确定

bindcancelEvent:取消后的回调

bindconfirmEvent:点击确定后的回调

消息提示

<Notify id="notif" text="提示成功"Notify>
<button bindtap="onshow">提示</button>
 data:{
    shows:{}
  },
   onReady: function () {
    let b=this.selectComponent("#notif")
    this.setData({
      shows:b
    })
  },
 // 显示提示
  onshow(){
    let show=this.data.shows
    show.notify()
  }

text:提示内容

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago