jeft-vue-confirm

0.2.2 • Public • Published

jeft-vue-confirm

Installation

npm install jeft-vue-confirm --save

Usage

适用于移动端

引入

  • opts参数:
import confirm from 'jeft-vue-confirm'

Vue.use(confirm, {
    title: '标题',
    bg: '...'
})

confirm参数

| 参数 | 描述 |
|-------- | :-----: |
| title | string |
| msg   | string
| type  | alert or confirm |
| alertBtnText | string |
| yesBtnText   | string |
| noBtnText    | string |
| hasMark      | string |
| bg           | imgUrl(可以在opts里面配置也可以传进来) |
this.$confirm({
    title: '确认退出登录',
    msg: '',
    type: 'confirm',
    yesBtnText: '确定',
    noBtnText: '取消'
}).then(() => {
    // 确定操作
    this.userLogoutAsync()
}).catch(() => {
    // 取消操作
})

confirm参数会覆盖opts参数

Object.assign(ConfirmInstance, opts, options)

Package Sidebar

Install

npm i jeft-vue-confirm

Weekly Downloads

0

Version

0.2.2

License

MIT

Unpacked Size

46.2 kB

Total Files

7

Last publish

Collaborators

  • jeft-hai