|
|
@ -1,7 +1,10 @@ |
|
|
|
<template> |
|
|
|
<view class="book-item" :class="{'horizontal': horizontal}" @click="$emit('click')"> |
|
|
|
<image class="book-cover" :src="book.image |
|
|
|
&& book.image.split(',')[0]" mode="aspectFill"></image> |
|
|
|
<view class="cover-wrapper"> |
|
|
|
<image class="book-cover" :src="book.image |
|
|
|
&& book.image.split(',')[0]" mode="aspectFill"></image> |
|
|
|
<view class="tag original" v-if="book.isOriginal == 'Y'">原创</view> |
|
|
|
</view> |
|
|
|
<view class="book-info"> |
|
|
|
<view class="book-title">{{book.name}}</view> |
|
|
|
<view class="book-author" v-if="book.author && !horizontal">{{book.author}}</view> |
|
|
@ -75,12 +78,32 @@ |
|
|
|
border-bottom: none; |
|
|
|
} |
|
|
|
|
|
|
|
.book-cover { |
|
|
|
.cover-wrapper { |
|
|
|
position: relative; |
|
|
|
width: 160rpx; |
|
|
|
height: 210rpx; |
|
|
|
border-radius: 16rpx; |
|
|
|
margin-right: 20rpx; |
|
|
|
box-shadow: 0 4rpx 8rpx rgba(0,0,0,0.1); |
|
|
|
|
|
|
|
.book-cover { |
|
|
|
width: 100%; |
|
|
|
height: 100%; |
|
|
|
border-radius: 16rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.tag { |
|
|
|
position: absolute; |
|
|
|
top: 0; |
|
|
|
left: 0; |
|
|
|
font-size: 20rpx; |
|
|
|
color: #fff; |
|
|
|
padding: 2rpx 8rpx; |
|
|
|
|
|
|
|
&.original { |
|
|
|
background-color: #ffa502; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.book-info { |
|
|
@ -161,11 +184,30 @@ |
|
|
|
padding: 10rpx; |
|
|
|
border: none; |
|
|
|
|
|
|
|
.book-cover { |
|
|
|
.cover-wrapper { |
|
|
|
position: relative; |
|
|
|
width: 100%; |
|
|
|
height: 300rpx; |
|
|
|
margin-right: 0; |
|
|
|
margin-bottom: 10rpx; |
|
|
|
|
|
|
|
.book-cover { |
|
|
|
width: 100%; |
|
|
|
height: 100%; |
|
|
|
} |
|
|
|
|
|
|
|
.tag { |
|
|
|
position: absolute; |
|
|
|
top: 0; |
|
|
|
left: 0; |
|
|
|
font-size: 20rpx; |
|
|
|
color: #fff; |
|
|
|
padding: 2rpx 8rpx; |
|
|
|
|
|
|
|
&.original { |
|
|
|
background-color: #ffa502; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.book-info { |
|
|
|