feat: add default article image

This commit is contained in:
merlin
2025-11-04 11:30:25 +08:00
parent 480ae20db5
commit 5247401ab0
4 changed files with 15 additions and 3 deletions

BIN
src/assets/backend.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 KiB

View File

@@ -40,6 +40,16 @@
max-width: 130px; max-width: 130px;
height: 100%; height: 100%;
} }
.newspic img{
width: 100%;
height: 100%;
}
.articlespic img{
width: 100%;
height: 100%;
}
.newscontent, .articlescontent{ .newscontent, .articlescontent{
margin-right: auto; margin-right: auto;
display: inline-block; display: inline-block;

View File

@@ -22,7 +22,8 @@
<el-col :span="24" style="height: 100%;"> <el-col :span="24" style="height: 100%;">
<div class="articles" v-for="item in filteredArticles" @click="openDetails(item)"> <div class="articles" v-for="item in filteredArticles" @click="openDetails(item)">
<div class="articlespic"> <div class="articlespic">
<img :src="item.pic" alt="芜湖" /> <!-- <img :src="item.pic" alt="芜湖" /> -->
<img src="@/assets/backend.jpg" alt="芜湖">
</div> </div>
<div class="articlescontent"> <div class="articlescontent">
<h2>{{ item.title }}</h2> <h2>{{ item.title }}</h2>

View File

@@ -22,7 +22,8 @@
<el-col :span="24" style="height: 100%;"> <el-col :span="24" style="height: 100%;">
<div class="news" v-for="item in filteredNews" @click="openDetails(item)"> <div class="news" v-for="item in filteredNews" @click="openDetails(item)">
<div class="newspic"> <div class="newspic">
<img :src="item.pic" alt="芜湖" /> <!-- <img :src="item.pic" alt="芜湖" /> -->
<img src="@/assets/backend.jpg" alt="芜湖">
</div> </div>
<div class="newscontent"> <div class="newscontent">
<h2>{{ item.title }}</h2> <h2>{{ item.title }}</h2>
@@ -62,7 +63,7 @@ const details = viewDetailsStore()
const router = useRouter() const router = useRouter()
const dialogVisible = ref(true); const dialogVisible = ref(false);
const search_text = ref('') const search_text = ref('')