refactor(UpdateModal): 调整下载进度和操作按钮的布局位置

This commit is contained in:
Yuhang Wu
2026-10-26 15:15:49 +08:00
parent 04f6d3f851
commit 8082c69d22
+13 -6
View File
@@ -27,15 +27,15 @@
<p v-else class="m-0 opacity-80">{{ t("update.emptyLog") }}</p> <p v-else class="m-0 opacity-80">{{ t("update.emptyLog") }}</p>
</div> </div>
<!-- 下载 / 安装进度 --> <!-- 底部操作:忽略该版本 / 取消 / 确认更新 -->
<template #footer>
<div class="update-footer">
<!-- 下载进度固定在 footer 的按钮操作上方 -->
<div v-if="store.installing" class="update-progress"> <div v-if="store.installing" class="update-progress">
<a-progress :percent="store.progress" :stroke-color="'#6366f1'" /> <a-progress :percent="store.progress" :stroke-color="'#6366f1'" />
<p class="m-0 text-xs opacity-60">{{ t("update.downloading") }}</p> <p class="m-0 text-xs opacity-60">{{ t("update.downloading") }}</p>
</div> </div>
<div class="update-footer-actions">
<!-- 底部操作:忽略该版本 / 取消 / 确认更新 -->
<template #footer>
<div class="update-footer">
<a-button v-if="!store.installing" type="text" size="small" @click="onIgnore"> <a-button v-if="!store.installing" type="text" size="small" @click="onIgnore">
{{ t("update.ignore") }} {{ t("update.ignore") }}
</a-button> </a-button>
@@ -48,6 +48,7 @@
</a-button> </a-button>
</div> </div>
</div> </div>
</div>
</template> </template>
</a-modal> </a-modal>
</template> </template>
@@ -135,10 +136,16 @@ function onConfirm() {
} }
.update-progress { .update-progress {
margin-top: 14px; width: 100%;
} }
.update-footer { .update-footer {
display: flex;
flex-direction: column;
gap: 12px;
}
.update-footer-actions {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 8px; gap: 8px;