From a330903625dc34eb92eb027bc268b5956364d6a4 Mon Sep 17 00:00:00 2001 From: zlwu <704541015@qq.com> Date: Wed, 5 Aug 2026 14:39:25 +0800 Subject: [PATCH] fix(web-admin): skip auto-icon on post name list links MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Post names containing 查看 were matched by global button auto-icon rules. Co-authored-by: Cursor --- web-admin/src/App.vue | 3 ++- web-admin/src/assets/styles/core/el-ui.scss | 8 ++++++-- web-admin/src/views/system/post/index.vue | 7 ++++++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/web-admin/src/App.vue b/web-admin/src/App.vue index ece08165..f300d9a3 100644 --- a/web-admin/src/App.vue +++ b/web-admin/src/App.vue @@ -55,8 +55,9 @@ const buttons = document.querySelectorAll(selectors.join(',')) buttons.forEach((button) => { autoIconClassList.forEach((className) => button.classList.remove(className)) - // 区域/状态 Tab 仅展示文案,不参与按钮自动图标 + // 区域/状态 Tab、列表名称快捷链接等仅展示文案,不参与按钮自动图标 if (button.classList.contains('region-tab-btn')) return + if (button.classList.contains('no-auto-icon')) return const text = (button.textContent || '').replace(/\s+/g, '') const matched = iconClassByText.find(([rule]) => rule.test(text)) if (matched) button.classList.add(matched[1]) diff --git a/web-admin/src/assets/styles/core/el-ui.scss b/web-admin/src/assets/styles/core/el-ui.scss index b33941c9..679c8c54 100644 --- a/web-admin/src/assets/styles/core/el-ui.scss +++ b/web-admin/src/assets/styles/core/el-ui.scss @@ -1028,10 +1028,14 @@ body .el-table thead { } .page-container - .el-button[class*='auto-icon-']:not(.is-circle):not(.el-button--text):not(:has(.el-icon)) + .el-button[class*='auto-icon-']:not(.is-circle):not(.el-button--text):not(.no-auto-icon):not( + :has(.el-icon) + ) > span::before, .console-container - .el-button[class*='auto-icon-']:not(.is-circle):not(.el-button--text):not(:has(.el-icon)) + .el-button[class*='auto-icon-']:not(.is-circle):not(.el-button--text):not(.no-auto-icon):not( + :has(.el-icon) + ) > span::before { content: ''; width: 14px; diff --git a/web-admin/src/views/system/post/index.vue b/web-admin/src/views/system/post/index.vue index 287d8e62..71a0dde3 100644 --- a/web-admin/src/views/system/post/index.vue +++ b/web-admin/src/views/system/post/index.vue @@ -74,7 +74,12 @@ header-align="center" >