change sync to loading
This commit is contained in:
parent
325243d30a
commit
9f45c24f2e
5 changed files with 36 additions and 46 deletions
|
@ -1,54 +1,16 @@
|
|||
<template>
|
||||
<div>
|
||||
<i-button @click.native="info">显示普通提示</i-button>
|
||||
<i-button @click.native="success">显示成功提示</i-button>
|
||||
<i-button @click.native="warning">显示警告提示</i-button>
|
||||
<i-button @click.native="error">显示错误提示</i-button>
|
||||
<i-button @click.native="destroy">销毁提示</i-button>
|
||||
</div>
|
||||
<Button @click="loading">Display loading...</Button>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
methods: {
|
||||
info () {
|
||||
// this.$Message.info('这是一条普通提示');
|
||||
this.$Message.success({
|
||||
content: '这是一条普通提示2',
|
||||
duration: 500,
|
||||
onClose () {
|
||||
// console.log(123)
|
||||
},
|
||||
closable: true,
|
||||
render (h) {
|
||||
return h('Button',{
|
||||
props: {
|
||||
type: 'primary'
|
||||
}
|
||||
}, '这是render出来的');
|
||||
}
|
||||
})
|
||||
},
|
||||
success () {
|
||||
this.$Message.success({
|
||||
content: '这是一条成功的提示',
|
||||
duration: 4
|
||||
loading () {
|
||||
const msg = this.$Message.loading({
|
||||
content: 'Loading...',
|
||||
duration: 0
|
||||
});
|
||||
setTimeout(msg, 103000);
|
||||
},
|
||||
warning () {
|
||||
this.$Message.warning('这是一条警告的提示');
|
||||
},
|
||||
error () {
|
||||
this.$Message.error('对方不想说话,并且向你抛出了一个异常');
|
||||
},
|
||||
destroy () {
|
||||
this.$Message.destroy();
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
// this.$Message.config({
|
||||
// top: 50,
|
||||
// duration: 3
|
||||
// });
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue