管理后台公告中心优化

This commit is contained in:
yml
2026-06-05 21:02:50 +08:00
parent 7b456bafdd
commit 2df097ccd3
2 changed files with 44 additions and 7 deletions
@@ -241,19 +241,19 @@ function getStatusType(status: string): '' | 'success' | 'info' | 'warning' {
{{ row.published_at ? formatDateTime(row.published_at) : '-' }}
</template>
</el-table-column>
<el-table-column label="操作" width="250" fixed="right">
<el-table-column label="操作" width="280" fixed="right">
<template #default="{ row }">
<el-button link type="primary" size="small" @click="handleEdit(row)">
<el-button type="primary" size="small" @click="handleEdit(row)" text style="color: #1d6fd6; font-weight: 700;">
<el-icon><Edit /></el-icon>
编辑
</el-button>
<el-button v-if="row.status === 'draft'" link type="success" size="small" @click="handlePublish(row)">
<el-button v-if="row.status === 'draft'" type="success" size="small" @click="handlePublish(row)" text style="color: #4caf50; font-weight: 700;">
发布
</el-button>
<el-button v-if="row.status === 'published'" link type="warning" size="small" @click="handleArchive(row)">
<el-button v-if="row.status === 'published'" type="warning" size="small" @click="handleArchive(row)" text style="color: #d97706; font-weight: 700;">
归档
</el-button>
<el-button link type="danger" size="small" @click="handleDelete(row)">
<el-button type="danger" size="small" @click="handleDelete(row)" text style="color: #dc2626; font-weight: 700;">
<el-icon><Delete /></el-icon>
删除
</el-button>
@@ -327,4 +327,41 @@ function getStatusType(status: string): '' | 'success' | 'info' | 'warning' {
justify-content: center;
margin-top: 20px;
}
/* 按钮样式 - 使用 :deep() 穿透 */
:deep(.el-button.is-text.el-button--primary) {
color: #409eff !important;
font-weight: 600;
}
:deep(.el-button.is-text.el-button--primary:hover) {
color: #66b1ff !important;
}
:deep(.el-button.is-text.el-button--success) {
color: #67c23a !important;
font-weight: 600;
}
:deep(.el-button.is-text.el-button--success:hover) {
color: #85ce61 !important;
}
:deep(.el-button.is-text.el-button--warning) {
color: #e6a23c !important;
font-weight: 600;
}
:deep(.el-button.is-text.el-button--warning:hover) {
color: #ebb563 !important;
}
:deep(.el-button.is-text.el-button--danger) {
color: #f56c6c !important;
font-weight: 600;
}
:deep(.el-button.is-text.el-button--danger:hover) {
color: #f78989 !important;
}
</style>
+2 -2
View File
@@ -339,14 +339,14 @@
}
/* ========== Button Enhancements ========== */
.el-button--primary {
.el-button--primary:not(.is-text) {
font-weight: 700 !important;
--el-button-text-color: #ffffff;
--el-button-hover-text-color: #ffffff;
--el-button-active-text-color: #ffffff;
}
.el-button--primary span {
.el-button--primary:not(.is-text) span {
color: #ffffff !important;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
font-weight: 700;