Commit f2392546 by 李嘉林

评论位置

parent 8a2079f8
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
v-if="info.liveBroadcastState<2&&guestBookList" v-if="info.liveBroadcastState<2&&guestBookList"
:guestBookList="guestBookList" :guestBookList="guestBookList"
:updateVal="updateVal" :updateVal="updateVal"
:isSend="isSend"
:fixedHeight="getBottom"
></livedIsMsg> ></livedIsMsg>
<!-- 带货商品层 --> <!-- 带货商品层 -->
<livedExplainingCommodities <livedExplainingCommodities
...@@ -58,7 +60,7 @@ ...@@ -58,7 +60,7 @@
</div> </div>
</template> </template>
<template v-else> <template v-else>
<div class="sendOut" :style="{'bottom':getBottom}"> <div class="sendOut" :style="{'bottom':getBottom+'px'}">
<input <input
class="sendIpt" class="sendIpt"
:adjust-position="false" :adjust-position="false"
...@@ -275,7 +277,7 @@ export default { ...@@ -275,7 +277,7 @@ export default {
}, },
// 获取焦点 // 获取焦点
onFocus(e){ onFocus(e){
this.getBottom=(e.mp.detail.height-10)+'px'; this.getBottom=(e.mp.detail.height-10);
}, },
// 点击发送留言 // 点击发送留言
toSend() { toSend() {
......
<template> <template>
<!-- 评论模块 --> <!-- 评论模块 -->
<div class="livedIsMsg" v-if="list.length>0"> <div class="livedIsMsg" v-if="list.length>0" :class="{'livedIsMsgFixed':isSend}" :style="{'bottom':isSend?(fixedHeight+50)+'px':''}">
<div class="list"> <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">
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
export default { export default {
props:["guestBookList","updateVal"], props:["guestBookList","updateVal","isSend","fixedHeight"],
name: "", name: "",
data() { data() {
return { return {
...@@ -61,13 +61,14 @@ export default { ...@@ -61,13 +61,14 @@ export default {
padding: 8px; padding: 8px;
margin-bottom: 10px; margin-bottom: 10px;
position: relative; position: relative;
width: 60vw;
.list { .list {
width: 50vw; width: 60vw;
max-height: 24vh; max-height: 24vh;
overflow: hidden; overflow: hidden;
bottom: 0; bottom: 0;
.item { .item {
width: 50vw; width: 60vw;
padding: 4px 0; padding: 4px 0;
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
...@@ -85,4 +86,9 @@ export default { ...@@ -85,4 +86,9 @@ export default {
} }
} }
} }
.livedIsMsgFixed{
position: absolute;
margin: 0;
left: 12px;
}
</style> </style>
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