Commit 5c60b60e by 李嘉林

优化

parent 4b433665
<template> <template>
<!-- 公告组件 --> <!-- 公告组件 -->
<div class="livedAnnouncement" v-show="isShow"> <div class="livedAnnouncement" v-show="isShow">
<scroll-view :style="{'max-height': '20vh','width':'40vw'}" :scroll-y="true" :scroll-top="scrollTop" :scroll-with-animation="true">
<div class="label"> <div class="label">
<span class="labelTit">公告:</span><span class="test">{{liveNotice}}</span> <span class="labelTit">公告:</span><span class="test">{{liveNotice}}</span>
</div> </div>
</scroll-view>
</div> </div>
</template> </template>
...@@ -14,6 +16,7 @@ export default { ...@@ -14,6 +16,7 @@ export default {
data() { data() {
return { return {
isShow:true, isShow:true,
scrollTop:0,
}; };
}, },
components: {}, components: {},
...@@ -23,8 +26,11 @@ export default { ...@@ -23,8 +26,11 @@ export default {
console.log('----公告') console.log('----公告')
this.isShow=true; this.isShow=true;
setTimeout(() => { setTimeout(() => {
this.scrollTop=1000;
}, 2000);
setTimeout(() => {
this.isShow=false; this.isShow=false;
}, 8000); }, 7000);
}, },
mounted() {}, mounted() {},
methods: {} methods: {}
...@@ -35,20 +41,17 @@ export default { ...@@ -35,20 +41,17 @@ export default {
.livedAnnouncement{ .livedAnnouncement{
margin-left:12px; margin-left:12px;
width: 40vw; width: 40vw;
max-height: 20vh;
overflow-y: auto;
background: rgba(#000,0.4); background: rgba(#000,0.4);
border-radius: 10px; border-radius: 10px;
padding: 8px; padding: 6px;
margin-bottom: 10px; margin-bottom: 10px;
animation:toLeft 7s linear; animation:toLeft 6s linear;
opacity: 0; opacity: 0;
span{ span{
font-size: 14px; font-size: 14px;
color: #f1f1f1; color: #f1f1f1;
} }
.label{ .label{
padding-right: 4px;
.labelTit{ .labelTit{
color: #f9a93c; color: #f9a93c;
} }
...@@ -59,7 +62,7 @@ export default { ...@@ -59,7 +62,7 @@ export default {
opacity: 1; opacity: 1;
} }
80%{ 80%{
opacity: 0.3; opacity: 0.6;
} }
100%{ 100%{
opacity: 0; opacity: 0;
......
...@@ -267,7 +267,7 @@ export default { ...@@ -267,7 +267,7 @@ export default {
} }
.livedControls { .livedControls {
position: absolute; position: absolute;
bottom: 10px; bottom: 20px;
left: 0; left: 0;
width: 100vw; width: 100vw;
.userComing { .userComing {
...@@ -354,15 +354,18 @@ export default { ...@@ -354,15 +354,18 @@ export default {
.like { .like {
position: absolute; position: absolute;
top: 0; top: 0;
left: 20%; left: 50%;
margin-left: -16px;
} }
.heardNum { .heardNum {
text-align: center; text-align: center;
transform: translateY(-5px); transform: translateY(-18px);
background: rgba(#e60012, 0.5); background: rgba(#e60012, 0.5);
border-radius: 4px; border-radius: 8px;
padding: 1px 2px; padding: 1px 2px;
font-size: 12px; font-size: 12px;
color: #fff;
min-width: 30px;
} }
.box { .box {
width: 100px; width: 100px;
...@@ -420,11 +423,11 @@ export default { ...@@ -420,11 +423,11 @@ export default {
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
background: rgba(#000, 0.4); background: rgba(#000, 0.4);
padding: 0 12px; padding: 0 6px;
width: 100%; width: 100%;
height: 38px; height: 40px;
border-radius: 38px; border-radius: 40px;
line-height: 38px; line-height: 40px;
font-size: 16px; font-size: 16px;
.sendIpt { .sendIpt {
width: 60vw; width: 60vw;
...@@ -434,7 +437,7 @@ export default { ...@@ -434,7 +437,7 @@ export default {
.send { .send {
color: #fff; color: #fff;
height: 30px; height: 30px;
width: 80px; width: 70px;
text-align: center; text-align: center;
line-height: 30px; line-height: 30px;
border-radius: 30px; border-radius: 30px;
......
<template> <template>
<!-- 评论模块 --> <!-- 评论模块 -->
<div class="livedIsMsg"> <div class="livedIsMsg" v-if="list.length>0">
<div class="list" v-if="list.length>0"> <div class="list">
<scroll-view :style="{'height': '24vh','width':'52vw'}" :scroll-y="true" :scroll-top="scrollTop" :scroll-with-animation="true" @scrolltolower="scrolltolower"> <scroll-view :style="{'height': '24vh','width':'52vw'}" :scroll-y="true" :scroll-top="scrollTop" :scroll-with-animation="true" @scrolltolower="scrolltolower">
<div class="item flex" v-for="(item,index) in list" :key="index"> <div class="item flex" v-for="(item,index) in list" :key="index">
<div class="user"> <div class="user">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment