Authored by yyq

article to auther

... ... @@ -130,7 +130,7 @@
},
methods: {
...mapActions(['followArticle', 'praiseArticle', 'praiseComment']),
pxToRem() {
pxToRem(px) {
const rootValue = 40;
if (typeof px !== 'number') {
... ...
<template>
<div class="article-item-header">
<div class="avatar">
<router-link class="avatar" :to="`/author/${data.authorType}/${data.authorUid}`">
<WidgetAvatar :lazy="lazy" class="widget-avatar" :src="data.authorHeadIco" :width="70" :height="70"></WidgetAvatar>
<span class="name">{{data.authorName}}</span>
</div>
</router-link>
<div class="opts">
<WidgetFollow :author-uid="data.authorUid" :follow="data.hasAttention === 'Y'" @on-follow="onFollow"></WidgetFollow>
<i class="iconfont icon-more1" @click="onMore"></i>
... ...
... ... @@ -7,7 +7,7 @@
:class="{'wf-item-default': i._default, 'wf-item-temp': i._temporary}"
:style="`width: ${100 / cols}%;transform: translate(${i.left}px, ${i.top}px)`">
<div class="wf-item-mid">
<router-link :to="'/article/' + i.articleId">
<router-link :to="`/article/${i.articleId}`">
<div class="layer-image" :style="{'height': i.coverHeight + 'px'}">
<ImageFormat v-if="!i._temporary" :src="i[srcKey]" :width="coverImageWidth" :height="i.coverHeight"></ImageFormat>
</div>
... ... @@ -15,7 +15,7 @@
</router-link>
<div class="attribution">
<router-link :to="'/article/' + i.articleId" class="auther">
<router-link :to="`/article/${i.articleId}`" class="auther">
<span class="avatar">
<WidgetAvatar v-if="!i._temporary" :src="i.authorHeadIco" :width="70" :height="70"></WidgetAvatar>
</span>
... ... @@ -90,7 +90,8 @@ export default {
this.timer = setTimeout(this.resetViewList, 0);
},
list(newList, oldList) {
if (oldList.length > newList.length) {
if (oldList.length > newList.length ||
oldList[0].articleId !== newList[0].articleId) {
this.reset();
}
... ...