add destroy() for message component

add destroy() for message component
This commit is contained in:
梁灏 2016-09-19 17:12:12 +08:00
parent 47e5839630
commit d367168798
3 changed files with 10 additions and 1 deletions

View file

@ -89,5 +89,10 @@ export default {
if (options.duration) {
defaultDuration = options.duration;
}
},
destroy () {
let instance = getMessageInstance();
messageInstance = null;
instance.destroy();
}
}