You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
<template> <div> <div v-for="item in listData" :key="item.ranking" class="list-item"> <img :src="item.img"> <div class="book-info"> <h4 :class="['book-title', {'title-item': !isOtherBook}]">{{ item.title }}</h4> <p class="book-author">{{ item.author }}</p> <div v-if="!isNewBook" class="book-num"> <svg class="icon" aria-hidden="true"> <use xlink:href="#icon-remen" /> </svg> <p>{{ item.num }}</p> </div> </div> </div> </div> </template>
<script> export default { name: 'BookListItem', props: { listData: { type: Array, default: function() { return [] } }, isOtherBook: { type: Boolean, default: function() { return false } }, isNewBook: { type: Boolean, default: function() { return false } } }, data() { return { } }, watch: { listData: function(newValue, oldValue) { }, isOtherBook: function(newValue, oldValue) { }, isNewBook: function(newValue, oldValue) { } }, created() { console.log(this.listData) }, mounted() { }, methods: { } } </script>
<style lang="scss"> @import "~@/assets/styles/index.scss"; </style>
|