市北互联平台前端仓库
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.

97 lines
2.1 KiB

3 years ago
<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">工作日志</div>
<div class="tips-wr-desc">内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容</div>
<div class="tips-wr-time">2022-03-15</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
}
},
data() {
return {
showTips: false
}
},
created() {
this.showTips = this.show
},
methods: {
handleClose() {
this.showTips = false
},
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%;
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>