iview/examples/routers/notice.vue

22 lines
554 B
Vue
Raw Normal View History

<template>
2017-03-09 22:32:57 +08:00
<i-button type="primary" @click.native="time">打开提醒</i-button>
</template>
<script>
export default {
methods: {
2017-03-09 22:32:57 +08:00
time () {
this.$Notice.open({
title: '这是通知标题',
desc: '这条通知不会自动关闭,需要点击关闭按钮才可以关闭。'
});
}
2017-03-09 22:32:57 +08:00
},
mounted () {
this.$Notice.config({
top: 150,
2017-05-26 17:29:58 +08:00
duration: 30
2017-03-09 22:32:57 +08:00
});
}
}
</script>