...
|
...
|
@@ -9,7 +9,7 @@ |
|
|
<div class="wf-item-mid">
|
|
|
<router-link :to="link(i)">
|
|
|
<div class="layer-image" :style="{'height': i.coverHeight + 'px'}">
|
|
|
<ImageFormat v-if="!i._temporary" :src="i[srcKey]" :width="coverImageWidth" :height="i.coverHeight"></ImageFormat>
|
|
|
<ImageFormat v-if="!i._temporary" :mode="1" :src="i[srcKey]" :width="coverImageWidth" :height="i.coverHeight"></ImageFormat>
|
|
|
</div>
|
|
|
<div class="description">
|
|
|
<p>{{i.content}}</p>
|
...
|
...
|
@@ -35,6 +35,7 @@ |
|
|
|
|
|
<script>
|
|
|
import {assign, get, forEach} from 'lodash';
|
|
|
import {getArticleImageSize} from 'utils/image-handler';
|
|
|
|
|
|
export default {
|
|
|
data() {
|
...
|
...
|
@@ -121,6 +122,12 @@ export default { |
|
|
for (let i = this.calcIndex; i < this.list.length; i++) {
|
|
|
let item = this.list[i];
|
|
|
|
|
|
let {width, height} = getArticleImageSize({
|
|
|
width: item.imageWidth,
|
|
|
height: item.imageHeight
|
|
|
});
|
|
|
|
|
|
item = assign(item, {imageWidth: width, imageHeight: height});
|
|
|
item.coverHeight = Math.floor(item.imageHeight / item.imageWidth * this.coverImageWidth);
|
|
|
|
|
|
nlist.push(assign({_temporary: true}, item));
|
...
|
...
|
|