support Notice
support Notice
This commit is contained in:
parent
6cadeba44f
commit
833501a4fa
7 changed files with 32 additions and 25 deletions
|
@ -1,19 +1,21 @@
|
|||
<template>
|
||||
<i-button @click="pop">Pop</i-button>
|
||||
<i-button type="primary" @click.native="time">打开提醒</i-button>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
methods: {
|
||||
pop () {
|
||||
for (let i = 0; i < 6; i++) {
|
||||
setTimeout(() => {
|
||||
this.$Notice.open({
|
||||
title: 'test',
|
||||
duration: 1.5 + i
|
||||
});
|
||||
}, i * 500);
|
||||
}
|
||||
time () {
|
||||
this.$Notice.open({
|
||||
title: '这是通知标题',
|
||||
desc: '这条通知不会自动关闭,需要点击关闭按钮才可以关闭。'
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.$Notice.config({
|
||||
top: 150,
|
||||
duration: 3
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue