完成适配移动端

This commit is contained in:
2025-03-01 10:52:11 +08:00
parent 1f79c93859
commit 8d19a58e9d
68 changed files with 2117 additions and 847 deletions

View File

@@ -20,15 +20,15 @@
</el-space>
</template>
<el-row :gutter="24" id="container" class="clearfix">
<el-col v-for="(item,index) in list" :key="index" :span="6" class="left">
<el-card shadow="hover" :body-style="{ padding: '0px' }" class=" hover:bg-gray-50 cursor-pointer" @click="navigateTo(`/show/${item.articleId}.html`)">
<el-col v-for="(item,index) in list" :key="index" :span="6" class="left mb-8">
<el-card :body-style="{ padding: '0px' }" class=" hover:bg-gray-50 cursor-pointer" shadow="hover" @click="navigateTo(`/detail/${item.articleId}.html`)">
<el-image
:src="item.image"
fit="cover"
:lazy="true" class="w-full md:h-[166px] h-[199px] cursor-pointer bg-gray-50"/>
<div class="flex-1 px-4 py-5 sm:p-6 !p-4">
<div class="text-gray-700 dark:text-white text-base font-semibold flex flex-col gap-1.5">
<div class="flex-1 text-xl cursor-pointer flex items-center">
<div class="text-xl cursor-pointer items-center line-clamp-1">
{{ item.title }}
</div>
</div>
@@ -89,8 +89,11 @@ const layout = useLayout();
const where = reactive<CmsArticleParam>({
keywords: '',
page: 1,
limit: 20,
limit: 12,
status: 0,
recommend: 1,
order: 'desc',
sort: 'actualViews',
parentId: undefined,
categoryId: undefined,
lang: i18n.locale.value

View File

@@ -53,8 +53,8 @@
</div>
</div>
</div>
<div class="item-image pt-3">
<el-image v-if="item.files" :src="`${JSON.parse(item.files)[0]}`" class="w-full h-1/2 max-h-[220px]"/>
<div class="item-image pt-3 overflow-hidden">
<el-image v-if="item.files" :src="`${JSON.parse(item.files)[0]}`" class="w-full h-1/2 max-h-[220px] transition-transform duration-300 ease-in-out hover:scale-110"/>
<el-image v-else class="w-full h-[220px]"/>
</div>
</div>
@@ -116,7 +116,10 @@ const hideDomain = () => {
// 加载页面数据
const reload = async () => {
await pageCmsWebsiteAll(where).then(response => {
await pageCmsWebsiteAll({
...where,
plugin: false
}).then(response => {
if (response?.list) {
list.value = response?.list;
total.value = response.count;