|
@@ -3,27 +3,27 @@
|
|
|
:class="['layout-comment-'+size]"
|
|
|
@click="triggerGoDetail"
|
|
|
>
|
|
|
- <image :src="item.user_avatar" class="comment-avatar"></image>
|
|
|
+ <v-image :src="vItem.user_avatar" class="comment-avatar overflow"></v-image>
|
|
|
<view class="flex-all-1 layout-comment-content">
|
|
|
<view class="row">
|
|
|
<view class="flex-all-1">
|
|
|
<view v-if="skeleton" class="layout-comment-skeleton layout-comment-skeleton-title"></view>
|
|
|
- <view v-else class="line-1">{{item.user_nickname}}</view>
|
|
|
+ <view v-else class="line-1">{{vItem.user_nickname}}</view>
|
|
|
|
|
|
<view v-if="skeleton" class="layout-comment-skeleton layout-comment-skeleton-time comment-time"></view>
|
|
|
<view v-else class="line-1 comment-time">{{item.createtime}}</view>
|
|
|
</view>
|
|
|
- <uni-rate v-if="rate" :disabled="true" :value="item.rate"></uni-rate>
|
|
|
+ <uni-rate v-if="vItem.rate" :disabled="true" :value="vItem.rate || 0"></uni-rate>
|
|
|
</view>
|
|
|
|
|
|
<view v-if="skeleton" class="layout-comment-skeleton layout-comment-skeleton-context layout-comment-context"></view>
|
|
|
- <view v-else class="layout-comment-context">{{item.comment}}</view>
|
|
|
+ <view v-else class="layout-comment-context">{{vItem.comment}}</view>
|
|
|
<view v-if="image" class="layout-comment-images row wrap aCenter">
|
|
|
<view class="layout-comment-image overflow"
|
|
|
- v-for="(item,index) in skeleton?3:item.images"
|
|
|
- :key="index"
|
|
|
+ v-for="(cItem,cIndex) in skeleton?3:vItem.images"
|
|
|
+ :key="cIndex"
|
|
|
>
|
|
|
- <v-image :src="skeleton?item:''" class="screen_all"></v-image>
|
|
|
+ <v-image :src="skeleton?'':cItem" class="screen_all"></v-image>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view v-if="control" class="layout-comment-control-footer row jEnd">
|
|
@@ -60,7 +60,7 @@ export default {
|
|
|
|
|
|
watch:{
|
|
|
item:function (){
|
|
|
- this.setVItem();
|
|
|
+ this.setVItem(this.item);
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -82,9 +82,13 @@ export default {
|
|
|
|
|
|
setVItem(item){
|
|
|
if (item) {
|
|
|
+
|
|
|
+ item = JSON.parse(JSON.stringify(item));
|
|
|
+
|
|
|
if (item.is_tutop && item.tutop<=0) {
|
|
|
item.tutop = 1;
|
|
|
}
|
|
|
+ console.log(item);
|
|
|
|
|
|
this.vItem = item;
|
|
|
}
|