fix(web-admin): skip auto-icon on post name list links
Post names containing 查看 were matched by global button auto-icon rules. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
3e60ed56f0
commit
a330903625
3 files changed
+14
-4
No files matched your search
@@ -55,8 +55,9 @@
|
||||
const buttons = document.querySelectorAll<HTMLElement>(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])
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -74,7 +74,12 @@
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-button link type="primary" @click="handleView(row)">
|
||||
<el-button
|
||||
class="no-auto-icon"
|
||||
link
|
||||
type="primary"
|
||||
@click="handleView(row)"
|
||||
>
|
||||
{{ row.postName || '-' }}
|
||||
</el-button>
|
||||
</template>
|
||||
|
||||
Reference in new issue
Block a user