9 changed files with 403 additions and 321 deletions
@ -0,0 +1,62 @@ |
|||
@import "../c/anime"; |
|||
@import "../c/config"; |
|||
@import "../c/function"; |
|||
|
|||
.m-notice { |
|||
position: fixed; |
|||
z-index: 10000; |
|||
bottom: 0; |
|||
right: 0; |
|||
background-color: #fff; |
|||
box-shadow: 0 0 10px 0 rgba(#000, 0.1); |
|||
width: 500px; |
|||
height: 300px; |
|||
box-sizing: border-box; |
|||
padding: 25px; |
|||
|
|||
.header { |
|||
margin-bottom: 20px; |
|||
font-size: 24px; |
|||
font-weight: bold; |
|||
color: #3e8ef7; |
|||
} |
|||
.type { |
|||
margin-bottom: 10px; |
|||
font-size: 20px; |
|||
font-weight: bold; |
|||
color: #333; |
|||
} |
|||
.content { |
|||
@include toeM(2); |
|||
margin-bottom: 10px; |
|||
font-size: 16px; |
|||
color: #333; |
|||
line-height: 30px; |
|||
} |
|||
.date { |
|||
margin-bottom: 30px; |
|||
font-size: 16px; |
|||
color: #999; |
|||
line-height: 30px; |
|||
} |
|||
.operate { |
|||
display: flex; |
|||
justify-content: space-around; |
|||
|
|||
.btn { |
|||
box-sizing: border-box; |
|||
padding: 0 20px; |
|||
width: 180px; |
|||
text-align: center; |
|||
font-size: 20px; |
|||
color: #3e8ef7; |
|||
line-height: 40px; |
|||
cursor: pointer; |
|||
|
|||
&.z-stress { |
|||
background-color: #3e8ef7; |
|||
color: #fff; |
|||
} |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,103 @@ |
|||
<template> |
|||
<div class="msg-tips" :class="showTips ? 'show-tips' : 'hide-tips'"> |
|||
<el-card class="tips-card"> |
|||
<div class="tips-wr"> |
|||
<div class="tips-wr-title">通知提醒</div> |
|||
<div class="tips-wr-name">{{ info.typeName }}</div> |
|||
<div class="tips-wr-desc">{{ info.content }}</div> |
|||
<div class="tips-wr-time">{{ info.remindTime }}</div> |
|||
<div class="tips-btn"> |
|||
<el-button type="text" size="small" @click="handleClose">我知道了</el-button> |
|||
<el-button class="diy-button--search" size="small" @click="handleLook">查看详情</el-button> |
|||
</div> |
|||
</div> |
|||
</el-card> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
props: { |
|||
show: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
info: { |
|||
type: Object, |
|||
default: () => {} |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
showTips: false |
|||
} |
|||
}, |
|||
created() { |
|||
this.showTips = this.show |
|||
}, |
|||
methods: { |
|||
handleClose() { |
|||
this.showTips = false |
|||
this.$emit('close') |
|||
}, |
|||
handleLook() { |
|||
this.$emit('look') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.msg-tips { |
|||
position: fixed; |
|||
right: 0; |
|||
z-index: 999; |
|||
transition: bottom .5s; |
|||
.tips-card { |
|||
width: 400px; |
|||
height: 200px; |
|||
background: #fff; |
|||
} |
|||
.tips-wr-title { |
|||
font-size: 16px; |
|||
color: #3E8EF7; |
|||
} |
|||
.tips-wr-name { |
|||
margin-top: 10px; |
|||
padding-left: 20px; |
|||
font-weight: bold; |
|||
} |
|||
.tips-wr-desc { |
|||
width: 100%; |
|||
height: 33px; |
|||
margin-top: 10px; |
|||
padding-left: 20px; |
|||
display: -webkit-box; |
|||
-webkit-box-orient: vertical; |
|||
-webkit-line-clamp: 2; |
|||
overflow: hidden; |
|||
|
|||
} |
|||
.tips-wr-time { |
|||
margin-top: 10px; |
|||
padding-left: 20px; |
|||
} |
|||
.tips-btn { |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-around; |
|||
width: 100%; |
|||
box-sizing: border-box; |
|||
margin-top: 10px; |
|||
padding: 0 20px; |
|||
text-align: center; |
|||
} |
|||
} |
|||
.hide-tips { |
|||
bottom: -220px; |
|||
|
|||
} |
|||
.show-tips { |
|||
bottom: 0px; |
|||
} |
|||
</style> |
Loading…
Reference in new issue