feat: mock动态开关

This commit is contained in:
taoran
2023-11-30 14:23:32 +08:00
parent 7279a85274
commit f3bdf85c93
6 changed files with 32 additions and 24 deletions
+2 -2
View File
@@ -30,10 +30,10 @@ onMounted(() => {
<div class="mr-3 flex justify-between flex-wrap self-card-div" :gutter="10">
<router-link v-for="(item, index) in toolsStore.list" :key="index" :to="item.url" class="flex flex-col mt-3 border-solid rounded border-gray border w-[32.5%] p-2 bg-gray-50 hover:shadow-md">
<div class="flex items-center border-b pb-2">
<el-image :src="item.img" class="w-10 h-10 min-h-[2.5rem] min-w-[2.5rem] rounded-full"></el-image>
<el-image :src="item.logo" class="w-10 h-10 min-h-[2.5rem] min-w-[2.5rem] rounded-full"></el-image>
<div class="flex flex-col ml-2 w-full">
<div class="flex">
<div class="font-semibold text-lg ">{{ item.value }}</div>
<div class="font-semibold text-lg ">{{ item.title }}</div>
</div>
<div class="flex justify-between">
<el-text size="small">{{ item.cate }}</el-text>
+8 -1
View File
@@ -84,12 +84,19 @@ onMounted(() => {
<!-- cates -->
<div class="mr-3">
<ul class="flex bg-gray-100 h-10 rounded leading-10 pl-3">
<li class="flex items-center mr-3">
<el-text></el-text>
<div
class="hover:text-blue-400 hover:underline hover:decoration-2 hover:underline-offset-[6px] text-sm" :class="searchParam.cateId == 0 ? 'text-blue-400 underline decoration-2 underline-offset-[6px]' : ''"
@click="chooseCate(0)"
>全部工具</div>
</li>
<li v-for="(item, index) in toolsStore.cates" :key="index" class="flex items-center">
<el-text>{{ index != 0 ? '&nbsp;&nbsp;&nbsp;&nbsp;' : '' }} </el-text>
<div
class="hover:text-blue-400 hover:underline hover:decoration-2 hover:underline-offset-[6px] text-sm" :class="searchParam.cateId == item.id ? 'text-blue-400 underline decoration-2 underline-offset-[6px]' : ''"
@click="chooseCate(item.id)"
>{{ item.value }}</div>
>{{ item.title }}</div>
</li>
</ul>
</div>