style: 调整提示信息位置

This commit is contained in:
tbphp
2025-07-15 22:31:27 +08:00
parent d3f0861de4
commit 96c8943dc1
5 changed files with 20 additions and 12 deletions

View File

@@ -71,7 +71,7 @@ const Message = defineComponent({
<template>
<n-config-provider :theme-overrides="themeOverrides">
<n-loading-bar-provider>
<n-message-provider>
<n-message-provider placement="top-right">
<n-dialog-provider>
<slot />
<loading-bar />

View File

@@ -136,10 +136,10 @@ function handleClose() {
<style scoped>
.global-task-progress {
position: fixed;
top: 20px;
right: 20px;
bottom: 62px;
right: 10px;
z-index: 9999;
width: 360px;
width: 350px;
background: white;
border-radius: var(--border-radius-md);
box-shadow: var(--shadow-lg);

View File

@@ -176,7 +176,11 @@ async function testKey(_key: KeyRow) {
if (curValid.is_valid) {
window.$message.success("密钥测试成功");
} else {
window.$message.error(curValid.error || "密钥测试失败: 无效的API密钥");
window.$message.error(curValid.error || "密钥测试失败: 无效的API密钥", {
keepAliveOnHover: true,
duration: 5000,
closable: true,
});
}
} catch (_error) {
console.error("测试失败");

View File

@@ -72,7 +72,11 @@ const loadLogs = async () => {
} else {
logs.value = [];
total.value = 0;
window.$message.error(res.message || "加载日志失败");
window.$message.error(res.message || "加载日志失败", {
keepAliveOnHover: true,
duration: 5000,
closable: true,
});
}
} catch (_error) {
window.$message.error("加载日志请求失败");