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

@ -4,6 +4,7 @@
<Button @click="error">error</Button>
<Button @click="warning">warning</Button>
<Button @click="loading">手动消失</Button>
<Button @click="destroy">destroy</Button>
</template>
<script>
import { Message, Button } from 'iview';
@ -45,6 +46,9 @@
const hide = Message.loading('我是loading', 0);
setTimeout(hide, 5000);
},
destroy () {
Message.destroy();
}
},
ready () {