From 6a01af9bb18255a8ccf56ba1b12eaa67e1fd8e89 Mon Sep 17 00:00:00 2001 From: Swanky <413564165@qq.com> Date: Sat, 20 Dec 2025 20:29:18 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=92=8C=E8=A1=A8=E5=8D=95=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E9=87=8D=E7=BD=AE=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加动态配置支持,包括下载链接、网站标题等 - 表单提交成功后自动重置表单内容 - 优化详情页布局和显示逻辑 - 更新联系方式卡片样式和功能 - 修改vite配置允许所有网络接口访问 --- index.html | 4 +- src/components/AchievementList.vue | 49 +++++++---- src/components/DemandList.vue | 51 +++++++----- src/components/SubmitAchievementForm.vue | 6 ++ src/components/SubmitDemandForm.vue | 7 +- src/views/HomeView.vue | 100 +++++++++++++++++------ vite.config.js | 1 + 7 files changed, 155 insertions(+), 63 deletions(-) diff --git a/index.html b/index.html index c232f0f..c599f74 100644 --- a/index.html +++ b/index.html @@ -2,9 +2,9 @@ - + - project-report +
diff --git a/src/components/AchievementList.vue b/src/components/AchievementList.vue index 6e84a4b..3c3f091 100644 --- a/src/components/AchievementList.vue +++ b/src/components/AchievementList.vue @@ -3,6 +3,11 @@ import { ref, reactive, onMounted } from 'vue' import { showToast } from 'vant' import { getAchievementList } from '../services/api' +// 接受父组件传递的配置 +const props = defineProps({ + config: Object +}) + // 搜索关键词 const searchKey = ref('') @@ -84,8 +89,13 @@ const handleDetail = (item) => { } // 下载清单 -const handleDownload = (year) => { - showToast(`${year}清单下载功能开发中`) +const handleDownload = (url) => { + if (url) { + // 直接打开下载链接 + window.open(url, '_blank') + } else { + showToast('下载链接无效') + } } // 页面挂载时获取数据 @@ -98,7 +108,7 @@ onMounted(() => {
-