From f60b6fb3bf264abb72c822b1a69d8d12c538e34f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Fri, 6 Mar 2026 17:37:51 +0800 Subject: [PATCH] =?UTF-8?q?feat(help):=20=E6=B7=BB=E5=8A=A0PDF=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E5=8A=9F=E8=83=BD=E5=B9=B6=E4=BC=98=E5=8C=96=E5=B8=AE?= =?UTF-8?q?=E5=8A=A9=E9=A1=B5=E9=9D=A2=E8=A1=A8=E6=A0=BC=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在表格中添加PDF下载按钮,支持点击下载文件 - 引入openUrl工具函数处理URL打开逻辑 - 将文章标题列重命名为标题列 - 新增立即下载列用于显示PDF链接 - 移除创建时间列的宽度限制和排序功能 - 注释掉行点击编辑事件避免重复操作 - 临时注释开发环境API地址配置 --- .env.development | 2 +- src/views/cms/help/index.vue | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.env.development b/.env.development index 3249194..476efd7 100644 --- a/.env.development +++ b/.env.development @@ -1,5 +1,5 @@ VITE_APP_NAME=后台管理(开发环境) -VITE_API_URL=http://127.0.0.1:9200/api +#VITE_API_URL=http://127.0.0.1:9200/api #VITE_SERVER_API_URL=http://127.0.0.1:8000/api diff --git a/src/views/cms/help/index.vue b/src/views/cms/help/index.vue index fc6fe10..163c01c 100644 --- a/src/views/cms/help/index.vue +++ b/src/views/cms/help/index.vue @@ -34,6 +34,9 @@ fallback="https://file.wsdns.cn/20230218/550e610d43334dd2a7f66d5b20bd58eb.svg" /> + @@ -76,7 +79,7 @@ import router from '@/router'; import { toTreeData } from 'ele-admin-pro'; import { toDateString } from 'ele-admin-pro'; - import { detail, getPageTitle } from '@/utils/common'; + import {detail, getPageTitle, openUrl} from '@/utils/common'; import { listCmsNavigation } from '@/api/cms/cmsNavigation'; import { CmsNavigation } from '@/api/cms/cmsNavigation/model'; import { CmsArticleCategory } from '@/api/cms/cmsArticleCategory/model'; @@ -138,10 +141,15 @@ // align: 'center' // }, { - title: '文章标题', + title: '标题', dataIndex: 'title', key: 'title' }, + { + title: '立即下载', + dataIndex: 'pdfUrl', + key: 'pdfUrl' + }, // { // title: '栏目名称', // dataIndex: 'categoryName', @@ -201,9 +209,7 @@ dataIndex: 'createTime', key: 'createTime', align: 'center', - width: 180, - customRender: ({ text }) => toDateString(text, 'yyyy-MM-dd'), - sorter: true + customRender: ({ text }) => toDateString(text, 'yyyy-MM-dd') } // { // title: '操作', @@ -309,7 +315,7 @@ return { // 行点击事件 onClick: () => { - openEdit(record); + // openEdit(record); }, // 行双击事件 onDblclick: () => {