feat: update ui
This commit is contained in:
@@ -37,11 +37,12 @@ const showArticle = (article) => {
|
|||||||
:alt="article.title" />
|
:alt="article.title" />
|
||||||
</div>
|
</div>
|
||||||
<div class="p-4">
|
<div class="p-4">
|
||||||
<h3 class="text-lg break-all font-medium text-gray-800 line-clamp-1">
|
<h3 class="text-lg break-all font-medium text-gray-800 line-clamp-2">
|
||||||
{{ article.title }}
|
{{ article.title }}
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<p v-if="article.description" class="text-gray-600 text-sm mb-2 line-clamp-2">{{ article.description }}
|
<p v-if="article.description" class="text-gray-600 text-sm mb-2 line-clamp-2">
|
||||||
|
{{ article.description }}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="py-2 flex items-center gap-2">
|
<div class="py-2 flex items-center gap-2">
|
||||||
|
|||||||
@@ -105,8 +105,6 @@ const fetchArticle = async () => {
|
|||||||
const { id } = route.params;
|
const { id } = route.params;
|
||||||
const { data } = await postApi.show(id);
|
const { data } = await postApi.show(id);
|
||||||
article.value = data;
|
article.value = data;
|
||||||
document.title = article.value.title;
|
|
||||||
|
|
||||||
|
|
||||||
// 调用微信 JS SDK 分享接口
|
// 调用微信 JS SDK 分享接口
|
||||||
wx.setShareInfo({
|
wx.setShareInfo({
|
||||||
@@ -163,7 +161,7 @@ onUnmounted(() => {
|
|||||||
<BsChevronLeft class="w-6 h-6" />
|
<BsChevronLeft class="w-6 h-6" />
|
||||||
</button>
|
</button>
|
||||||
<template v-if="article">
|
<template v-if="article">
|
||||||
<h1 class="text-lg font-semibold text-gray-800 ml-4">
|
<h1 class="text-lg font-semibold text-gray-800 ml-4 line-clamp-1 break-all">
|
||||||
{{ article.title }}
|
{{ article.title }}
|
||||||
</h1>
|
</h1>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user