|
@ -1,22 +1,22 @@ |
|
|
<template> |
|
|
<template> |
|
|
<div class="hotbook-box"> |
|
|
<div class="hotbook-box"> |
|
|
<div class="most-book"> |
|
|
|
|
|
|
|
|
<div class="most-book" @click="handleDetails(0)"> |
|
|
<div class="most-book-img"> |
|
|
<div class="most-book-img"> |
|
|
<img :src="bookdata[0].cover" :onerror="defaultImg"> |
|
|
<img :src="bookdata[0].cover" :onerror="defaultImg"> |
|
|
</div> |
|
|
</div> |
|
|
<div class="most-book-txt book-rack"> |
|
|
<div class="most-book-txt book-rack"> |
|
|
<div class="txt"> |
|
|
<div class="txt"> |
|
|
<h3>书名:{{ bookdata[0].title }}</h3> |
|
|
|
|
|
<p>作者:{{ bookdata[0].author }}</p> |
|
|
|
|
|
<p>出版社:</p> |
|
|
|
|
|
<p>出版日期:</p> |
|
|
|
|
|
|
|
|
<h3>书名:{{ bookdata[0].nbName }}</h3> |
|
|
|
|
|
<p>作者:{{ bookdata[0].nbAuthor }}</p> |
|
|
|
|
|
<p>出版社:{{ bookdata[0].nbAuthor }}</p> |
|
|
|
|
|
<p>出版时间:{{ bookdata[0].nbPublisherdate }}</p> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<ul class="hotbook-list"> |
|
|
<ul class="hotbook-list"> |
|
|
<li v-for="(item,index) in bookList" :key="index" @click="handleDetails(index)"> |
|
|
<li v-for="(item,index) in bookList" :key="index" @click="handleDetails(index)"> |
|
|
<img :src="item.cover" :onerror="defaultImg"> |
|
|
<img :src="item.cover" :onerror="defaultImg"> |
|
|
<p>{{ item.title }}</p> |
|
|
|
|
|
|
|
|
<p class="book-name">{{ item.nbName }}</p> |
|
|
</li> |
|
|
</li> |
|
|
</ul> |
|
|
</ul> |
|
|
<BookDetails ref="detailDom" /> |
|
|
<BookDetails ref="detailDom" /> |
|
@ -110,10 +110,20 @@ export default { |
|
|
li{ |
|
|
li{ |
|
|
margin-bottom: 20px; |
|
|
margin-bottom: 20px; |
|
|
margin-left: 48px; |
|
|
margin-left: 48px; |
|
|
|
|
|
width: 300px; |
|
|
|
|
|
overflow: hidden; |
|
|
|
|
|
// text-align: center; |
|
|
img{ |
|
|
img{ |
|
|
width: 300px; |
|
|
|
|
|
|
|
|
width: 100%; |
|
|
|
|
|
vertical-align: middle; |
|
|
height: 360px; |
|
|
height: 360px; |
|
|
} |
|
|
} |
|
|
|
|
|
.book-name{ |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
overflow: hidden; |
|
|
|
|
|
text-overflow:ellipsis; |
|
|
|
|
|
white-space: nowrap; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
& li:nth-child(3n+1){ |
|
|
& li:nth-child(3n+1){ |
|
|
margin-left: 0; |
|
|
margin-left: 0; |
|
|