feat: 修改文章卡片样式

This commit is contained in:
ilhamtahir committed 2024-12-25 16:24:03 +08:00
1 parent ab5aeef018
commit 8bc5c2892a
5 files changed
+19 -25

No files matched your search

+1
View File
@@ -24,6 +24,7 @@ export interface Article {
content: string
status: string
title: string
description: string
updatedTime?: string
imageUrl?: string
}
+9 -9
View File
@@ -37,25 +37,25 @@ function handleLoadMore() {
</script>
<template>
<view
v-for="(item, index) in props.cardList" :key="index" class="bg-[white] rounded-md shadow-lg mx-4 mb-4 w-[calc(100% - 32px)] mt-3"
>
<view class="flex">
<image class="w-28 h-28 rounded-l-md" :src="item?.imageUrl || titleBg" />
<view class="p-4">
<view class="flex flex-col gap-4 px-4">
<view
v-for="(item, index) in props.cardList" :key="index" class="bg-[white] rounded-md shadow-lg flex w-full h-[120px] overflow-hidden"
>
<image class="w-[120px] h-[120px] rounded-l-md shrink-0" :src="item?.imageUrl || titleBg" />
<view class="p-4 flex flex-col">
<view class="text-[14px]">
{{ item.title }}
</view>
<view class="mt-2 text-[11px] text-[#999] whitespace-pre-line">
{{ item.content }}
<view class="mt-2 flex-1 text-[11px] text-[#999] whitespace-pre-line">
{{ item.description }}
</view>
<view class="mt-3 text-[10px] text-[#D8D8D8]">
{{ item.updatedTime }}
</view>
</view>
</view>
<uni-load-more :status="loadMoreStatus" :content-text="contentText" @click-load-more="handleLoadMore" />
</view>
<uni-load-more :status="loadMoreStatus" :content-text="contentText" @click-load-more="handleLoadMore" />
</template>
<style scoped>
+1 -1
View File
@@ -208,7 +208,7 @@ init()
养宠贴士
</view>
<view class="mx-4 sticky top-0 bg-[#f5f6f7]">
<scroll-view class="scroll mt-2" scroll-x="auto">
<scroll-view class="scroll mt-2" :scroll-x="true">
<view class="group h-[40px] mt-1">
<view
v-for="(item, index) in typeList" :key="index" class="item h-[30px] w-[28%] rounded-15px relative" style="border: 1px solid #E7E7E7"