You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
717 B
43 lines
717 B
|
6 years ago
|
<template>
|
||
|
|
<transition name="notice">
|
||
|
|
<div v-if="show" class="notice">
|
||
|
|
{{ content }}
|
||
|
|
</div>
|
||
|
|
</transition>
|
||
|
|
</template>
|
||
|
|
|
||
|
|
<script>
|
||
|
|
export default {
|
||
|
|
name: 'ExampleNotice',
|
||
|
|
data() {
|
||
|
|
return {
|
||
|
|
show: false,
|
||
|
|
content: ''
|
||
|
|
}
|
||
|
|
},
|
||
|
|
mounted() {
|
||
|
|
this.show = true
|
||
|
|
setTimeout(() => {
|
||
|
|
this.show = false
|
||
|
|
}, 2000)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<style lang="scss" scoped>
|
||
|
|
.notice {
|
||
|
|
padding: 10px;
|
||
|
|
background-color: #eee;
|
||
|
|
border-radius: 10px;
|
||
|
|
@include position-center(xy);
|
||
|
|
}
|
||
|
|
.notice-leave-active,
|
||
|
|
.notice-enter-active {
|
||
|
|
transition: all 0.3s;
|
||
|
|
}
|
||
|
|
.notice-enter,
|
||
|
|
.notice-leave-to {
|
||
|
|
opacity: 0;
|
||
|
|
}
|
||
|
|
</style>
|