fix(confirm): modal hide emit cancel function

This commit is contained in:
glenn 2019-09-05 14:30:41 +08:00
parent 44dacb017b
commit d9de4f97d5
2 changed files with 8 additions and 6 deletions

View File

@ -1,6 +1,6 @@
{
"name": "naive-ui",
"version": "0.4.13",
"version": "0.4.14",
"description": "",
"main": "index.js",
"scripts": {

View File

@ -2,7 +2,7 @@
<n-modal
v-model="isActive"
:activate-event="activateEvent"
@toggle="toggle"
@input="toggle"
>
<!-- <transition name="n-modal-content--transition"> -->
<div class="n-confirm">
@ -82,9 +82,9 @@ export default {
computed: {
iconType () {
const colors = {
'error': { type: 'ios-close-circle', color: '#FF92A4' },
'confirm': { type: 'md-alert', color: '#FF92A4' },
'success': { type: 'ios-checkmark-circle', color: '#63E2B7' }
error: { type: 'ios-close-circle', color: '#FF92A4' },
confirm: { type: 'md-alert', color: '#FF92A4' },
success: { type: 'ios-checkmark-circle', color: '#63E2B7' }
}
return colors[this.type]
}
@ -110,7 +110,9 @@ export default {
},
handleOk () {
this.onOk()
if (this.loading !== true) { this.isActive = false }
if (this.loading !== true) {
this.isActive = false
}
}
}
}