前端域名和服务器详情页状态字段改用Badge显示背景色和不同的字体颜色

This commit is contained in:
jingrow 2025-08-09 23:53:42 +08:00
parent 4d95116696
commit de5d51d203
2 changed files with 10 additions and 2 deletions

View File

@ -85,7 +85,11 @@
<div v-if="info.prefix">
<component :is="info.prefix" />
</div>
<span>
<!-- 状态字段使用Badge组件 -->
<div v-if="info.label === '状态'">
<Badge :label="info.value" />
</div>
<span v-else>
{{ info.value }}
</span>
<div v-if="info.suffix">

View File

@ -87,8 +87,12 @@
<div v-if="info.prefix">
<component :is="info.prefix" />
</div>
<!-- 状态字段使用Badge组件 -->
<div v-if="info.label === '状态'">
<Badge :label="info.value" />
</div>
<!-- 服务器名称特殊处理 - 支持内联编辑 -->
<div v-if="info.label === '服务器名称'" class="flex-1 min-w-0">
<div v-else-if="info.label === '服务器名称'" class="flex-1 min-w-0">
<div v-if="!editingServerName"
@click="startEditServerName"
class="group flex items-center cursor-pointer rounded-md px-2 py-1 -mx-2 -my-1 hover:bg-gray-100 transition-colors duration-200"