2016-09-19 14:50:32 +08:00
|
|
|
<template>
|
2017-03-13 18:58:31 +08:00
|
|
|
<div>
|
2017-05-31 15:49:41 +08:00
|
|
|
<i-button @click.native="info">显示普通提示</i-button>
|
2017-03-13 18:58:31 +08:00
|
|
|
<i-button @click.native="success">显示成功提示</i-button>
|
|
|
|
<i-button @click.native="warning">显示警告提示</i-button>
|
|
|
|
<i-button @click.native="error">显示错误提示</i-button>
|
2017-04-13 17:11:31 +08:00
|
|
|
<i-button @click.native="destroy">销毁提示</i-button>
|
2017-03-13 18:58:31 +08:00
|
|
|
</div>
|
2016-09-19 14:50:32 +08:00
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
methods: {
|
2017-05-31 15:49:41 +08:00
|
|
|
info () {
|
|
|
|
// this.$Message.info('这是一条普通提示');
|
|
|
|
this.$Message.success({
|
|
|
|
content: '这是一条普通提示2',
|
|
|
|
duration: 500,
|
|
|
|
onClose () {
|
|
|
|
console.log(123)
|
|
|
|
},
|
|
|
|
closable: true
|
|
|
|
})
|
|
|
|
},
|
2017-03-13 18:58:31 +08:00
|
|
|
success () {
|
|
|
|
this.$Message.success('这是一条成功的提示');
|
|
|
|
},
|
|
|
|
warning () {
|
|
|
|
this.$Message.warning('这是一条警告的提示');
|
|
|
|
},
|
|
|
|
error () {
|
|
|
|
this.$Message.error('对方不想说话,并且向你抛出了一个异常');
|
2017-04-13 17:11:31 +08:00
|
|
|
},
|
|
|
|
destroy () {
|
|
|
|
this.$Message.destroy();
|
2016-09-19 14:50:32 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2016-11-09 18:23:17 +08:00
|
|
|
</script>
|