jeft-vue-confirm
Version:
vue-confirm-plugin
59 lines (45 loc) • 942 B
Markdown
from 'jeft-vue-confirm'
Vue.use(confirm, {
title: '标题',
bg: '...'
})
```
| 参数 | 描述 |
|-------- | :-----: |
| title | string |
| msg | string
| type | alert or confirm |
| alertBtnText | string |
| yesBtnText | string |
| noBtnText | string |
| hasMark | string |
| bg | imgUrl(可以在opts里面配置也可以传进来) |
``` js
this.$confirm({
title: '确认退出登录',
msg: '',
type: 'confirm',
yesBtnText: '确定',
noBtnText: '取消'
}).then(() => {
// 确定操作
this.userLogoutAsync()
}).catch(() => {
// 取消操作
})
```
``` js
Object.assign(ConfirmInstance, opts, options)
```
``` js
npm install jeft-vue-confirm --save
```
- opts参数:
``` js
import confirm