feat: pinia结合mock实现按分类和标题搜索工具,布局和样式调整

This commit is contained in:
taoran
2023-11-29 18:32:18 +08:00
parent 33301ff6e1
commit a3f5cf6f2d
34 changed files with 561 additions and 327 deletions
+49
View File
@@ -0,0 +1,49 @@
<script setup lang="ts">
import { Tools } from '@element-plus/icons-vue'
import { reactive } from 'vue';
const info = reactive({
hotTools: [
{
id: 1,
value: '时间戳转换'
},
{
id: 1,
value: 'MD5在线加密'
},
{
id: 1,
value: 'Json在线转换'
},
{
id: 1,
value: '正则测试工具'
},
{
id: 1,
value: '在线图片处理'
}
]
})
</script>
<template>
<div>
<!-- hot tools -->
<div class="mt-3 border-solid rounded border-gray border p-3">
<div class="text-xl text-gray-400 font-bold">热门工具</div>
<ul class="mt-3">
<li class="flex items-center hover:bg-gray-200 p-1 rounded" v-for="(item, index) in info.hotTools" :key="index">
<el-icon class="mr-1"><Tools /></el-icon>
<div>{{ item.value }}</div>
</li>
</ul>
</div>
</div>
</template>
<style scoped>
</style>