feat: 增加首页组件

- 添加 Survry 和 Template 组件
This commit is contained in:
Huangzhe
2025-03-04 11:45:01 +08:00
parent 08e6107b72
commit 1c6c0867fb
4 changed files with 177 additions and 6 deletions

75
src/views/Home/Index.vue Normal file
View File

@@ -0,0 +1,75 @@
<script setup>
import Survey from './components/Suvrey/Index.vue';
import Template from './components/Template/Index.vue';
const func = [{
title: '报名签到',
icon: 'https://files.axshare.com/gsc/DR6075/de/a0/49/dea049d6ad3e4c2c80af44258c6c76d6/images/%E9%A6%96%E9%A1%B5_1/u48.png?pageId=74b3e5b2-848e-4258-8a34-9e220127c8a6'
},
{
title: '问卷调查',
icon: 'https://files.axshare.com/gsc/DR6075/de/a0/49/dea049d6ad3e4c2c80af44258c6c76d6/images/%E9%A6%96%E9%A1%B5_1/u51.png?pageId=74b3e5b2-848e-4258-8a34-9e220127c8a6'
},
{
title: '活动模板',
icon: 'https://files.axshare.com/gsc/DR6075/de/a0/49/dea049d6ad3e4c2c80af44258c6c76d6/images/%E9%A6%96%E9%A1%B5_1/u54.png?pageId=74b3e5b2-848e-4258-8a34-9e220127c8a6'
},
{
title: '活动管理',
icon: 'https://files.axshare.com/gsc/DR6075/de/a0/49/dea049d6ad3e4c2c80af44258c6c76d6/images/%E9%A6%96%E9%A1%B5_1/u57.png?pageId=74b3e5b2-848e-4258-8a34-9e220127c8a6'
}];
</script>
<template>
<!-- title 标题和搜索栏 -->
<div class="header">
<div class="title">首页</div>
<van-search placeholder="请输入搜索关键词" background="#B9F8CF" />
</div>
<div class="container">
<div>
<div v-for="card in func" :key="card.title">
</div>
</div>
<Survey />
<Template />
</div>
</template>
<style scoped lang="scss">
.header {
background-color: #B9F8CF;
.title {
display: flex;
align-items: end;
justify-content: center;
}
}
.container {
padding-top: 20px;
background: linear-gradient(0deg,
#f5f5f5 0%,
#f5f5f5 84%,
rgba(185, 248, 207, 1) 100%);
&>:first-child {
display: flex;
justify-content: space-around;
border-radius: 6px;
background-color: white;
&>div {
display: flex;
flex-direction: column;
width: 50px;
height: 50px;
margin: 10px;
background-color: #B9F8CF;
}
}
}
</style>