This commit is contained in:
唐明明
2022-01-13 15:01:19 +08:00
27 changed files with 1294 additions and 315 deletions

View File

@@ -12,7 +12,15 @@
{{ item.name }}
</view>
<view class="nowrap menu--text">
{{ isType ? item.weight + '克' : item.sub_title }}
<block v-if="isType == 'rank'">
{{ item.heat }}
</block>
<block v-else-if="isType == 'det'">
{{ item.weight }}
</block>
<block v-else>
{{ item.sub_title }}
</block>
</view>
</view>
</view>
@@ -41,14 +49,16 @@
default: false
},
// 是否是详情
// det是详情 rank为排行
isType: {
type: Boolean,
default: false
type:'',
default : () => {
return {}
}
}
},
mounted() {
// console.log(this.$props)
}
}
</script>

View File

@@ -1,11 +1,11 @@
<template>
<view>
<view class="new-item" v-for="(item, index) in lists" :key="index" @click="$emit('onTopic', item)">
<image class="new-cover" :src="item.cover" mode="aspectFill"></image>
<view class="new-title">{{ item.title }}</view>
<image class="new-cover" :src="item.cover ? item.cover : '/static/find/default_img.png'" mode="aspectFill"></image>
<view class="new-title">{{ item.name }}</view>
<view class="new-tool">
<text>阅读{{ item.read }}</text>
<text>{{ item.praise }}</text>
<text>阅读 {{ item.clicks }}</text>
<text> {{ item.favorites }}</text>
</view>
</view>
</view>