From 7568638bc2d9215403933451c63e77aba206b63d Mon Sep 17 00:00:00 2001 From: wangyan Date: Fri, 13 Mar 2026 14:13:19 +0800 Subject: [PATCH] =?UTF-8?q?refactor(notice):=20=E7=A7=BB=E9=99=A4=E4=B8=B4?= =?UTF-8?q?=E6=97=B6=E6=9D=83=E9=99=90=E5=87=BD=E6=95=B0=E5=B9=B6=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E8=A1=A8=E6=A0=BC=E6=93=8D=E4=BD=9C=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除了临时假权限函数_hasPermission - 简化了新增按钮的权限控制逻辑 - 统一了编辑和删除按钮的显示方式 - 更新了删除确认对话框的提示文案 - 调整了发布范围选择的数据结构 --- src/pages/Container/Notice/List/index.js | 84 ++++++++++-------------- 1 file changed, 34 insertions(+), 50 deletions(-) diff --git a/src/pages/Container/Notice/List/index.js b/src/pages/Container/Notice/List/index.js index a5f75f3..1b7cb9b 100644 --- a/src/pages/Container/Notice/List/index.js +++ b/src/pages/Container/Notice/List/index.js @@ -18,17 +18,6 @@ function List(props) { form, }); - // 临时假权限函数,用于开发测试 - const _hasPermission = (permissionCode) => { - // 在开发环境中返回true,生产环境可以根据实际权限系统调整 - const fakePermissions = [ - "notice-add", - "notice-edit", - "notice-remove", - ]; - return fakePermissions.includes(permissionCode); - }; - return ( ( - {_hasPermission("notice-add") && ( - - )} + )} columns={[ @@ -104,35 +91,32 @@ function List(props) { > 查看 - {_hasPermission("notice-edit") && ( - - )} - {_hasPermission("notice-remove") && ( - - )} + + + ), },