|
@@ -17,7 +17,7 @@
|
|
|
<view class="bottom-message">
|
|
|
<!-- 对话信息 -->
|
|
|
<!-- <view class="jhim-message-box"> -->
|
|
|
- <scroll-view scroll-y="true" v-if="showIm" class="jhim-message-box">
|
|
|
+ <scroll-view :scroll-top="imScrollTop" scroll-y="true" v-if="showIm" class="jhim-message-box">
|
|
|
<view class="jhim-message" v-for="(item, index) in imMsgs.slice(-10)" :key="index">
|
|
|
<view class="jhim-message-show" >
|
|
|
<!-- <text class="jhim-message-text2">{{item.name}}:</text> -->
|
|
@@ -82,6 +82,7 @@
|
|
|
//#endif
|
|
|
data() {
|
|
|
return {
|
|
|
+ imScrollTop: 0,
|
|
|
imgs,
|
|
|
imInput: '',
|
|
|
userSig: '',
|
|
@@ -126,6 +127,11 @@
|
|
|
unmounted() {
|
|
|
this.destroy();
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ imMsgs() {
|
|
|
+ this.imScrollTop = 10000+this.imMsgs.length;
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
init() {
|
|
|
console.log(LOGTAG + 'init');
|