0.0.7 • Published 5 years ago

ego-dialog v0.0.7

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

vue插件(alert,confirm弹框)

功能

  • alert弹框
  • confirm弹框

引入

  import EgoDialog from 'ego-dialog'
  Vue.use(EgoDialog)

代码演示

// 调用alert弹框
  this.$dialog.alert({
    title: '支付失败',
    content: '请重试',
    confirmButtonText: '我知道了',
    confirmButtonColor: '#fb3e44'
  }).then(() => {
    console.log('您点击了确定')
  })

// 调用confirm弹框
  this.$dialog.confirm({
    title: '你确定吗?',
    content: '再好好想想哦!',
    confirmButtonText: '我确定',// 默认值: '确定'
    confirmButtonColor: '#333',//默认值: '#2886d7'
    cancelButtonText: '我取消',// 默认值: '取消'
    cancelButtonColor: '#fb3e44'//默认值: '#999'
  }).then(() => {
    console.log('确定')
  }).catch(() => {
    console.log('取消')
  })

  Vue.prototype.$dialog.setDefaultOptions(options)   // 修改默认配置,对所有 Dialog 生效
  Vue.prototype.$dialog.resetDefaultOptions(options) // 重置默认配置,对所有 Dialog 生效
0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago