[skip ci] perf(web): improve little performance
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
<div class="author">
|
||||
{{ book.author }}
|
||||
</div>
|
||||
<div class="tags" v-show="isSearch">
|
||||
<div class="tags" v-if="isSearch">
|
||||
<el-tag
|
||||
v-for="tag in book.kind?.split(',').slice(0, 2)"
|
||||
:key="tag"
|
||||
@@ -30,16 +30,16 @@
|
||||
{{ tag }}
|
||||
</el-tag>
|
||||
</div>
|
||||
<div class="update-info" v-show="!isSearch">
|
||||
<div class="update-info" v-if="!isSearch">
|
||||
<div class="dot">•</div>
|
||||
<div class="size">共{{ book.totalChapterNum }}章</div>
|
||||
<div class="dot">•</div>
|
||||
<div class="date">{{ dateFormat(book.lastCheckTime) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="intro" v-show="isSearch">{{ book.intro }}</div>
|
||||
<div class="intro" v-if="isSearch">{{ book.intro }}</div>
|
||||
|
||||
<div class="dur-chapter" v-show="!isSearch">
|
||||
<div class="dur-chapter" v-if="!isSearch">
|
||||
已读:{{ book.durChapterTitle }}
|
||||
</div>
|
||||
<div class="last-chapter">最新:{{ book.latestChapterTitle }}</div>
|
||||
@@ -52,7 +52,7 @@
|
||||
import { dateFormat } from "../plugins/utils";
|
||||
const props = defineProps(["books", "isSearch"]);
|
||||
const emit = defineEmits(["bookClick"]);
|
||||
const handleClick = (book) => emit("bookClick", toRaw(book));
|
||||
const handleClick = (book) => emit("bookClick", book);
|
||||
const getCover = (coverUrl) => {
|
||||
return /^data:/.test(coverUrl)
|
||||
? coverUrl
|
||||
@@ -64,6 +64,7 @@ const getCover = (coverUrl) => {
|
||||
const subJustify = computed(() =>
|
||||
props.isSearch ? "space-between" : "flex-start"
|
||||
);
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Reference in New Issue
Block a user