0.0.5 • Published 7 years ago

bee-dialog v0.0.5

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

bee-dialog

基于weui的移动端弹出框

引入

  • npm
npm install bee-dialog
# or
cnpm install bee-dialog
# or
yarn add bee-dialog
import 'bee-dialog'
  • script
<script src="https://unpkg.com/bee-dialog"></script>

使用

BeeDialog({
  title: '重要操作',
  text: '确定要删除此页面吗?'
}).then(action => {
  // todo
})

参数

属性类型默认值解释
titlestring'提示'弹出框标题
textstring'确认执行此操作?'提示内容
buttonsarray'取消', '确认'按钮

说明

BeeDialog({
  title: '重要操作',
  text: '确定要删除此页面吗?',
  buttons: ['取消', '确认']
}).then(action => {
  /**
   * @action {number} @buttons 中值的索引 index
   *
   * action === 0  >>取消
   * action === 1  >>确定
   */
})

案例

example

更多

需要添加功能或者存在 bug 请提交 issues,在空余时间会尽快处理。

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago