mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-23 09:38:02 +00:00
fix(admin-spa): 修复确认弹窗层级和关闭按钮响应问题
- 提高ConfirmDialog的z-index到100,确保显示在最上层 - 修改确认弹窗样式,使用amber色调作为警告色 - 为API Key弹窗X按钮添加单独的handleDirectClose方法 - 解决确认弹窗被API Key弹窗遮挡的问题
This commit is contained in:
@@ -13,8 +13,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
@click="handleClose"
|
||||
@click="handleDirectClose"
|
||||
class="text-gray-400 hover:text-gray-600 transition-colors"
|
||||
title="直接关闭(不推荐)"
|
||||
>
|
||||
<i class="fas fa-times text-xl"></i>
|
||||
</button>
|
||||
@@ -158,7 +159,7 @@ const copyApiKey = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
// 关闭弹窗
|
||||
// 关闭弹窗(带确认)
|
||||
const handleClose = async () => {
|
||||
if (window.showConfirm) {
|
||||
const confirmed = await window.showConfirm(
|
||||
@@ -180,6 +181,29 @@ const handleClose = async () => {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 直接关闭(不带确认)
|
||||
const handleDirectClose = async () => {
|
||||
if (window.showConfirm) {
|
||||
const confirmed = await window.showConfirm(
|
||||
'确定要关闭吗?',
|
||||
'您还没有保存API Key,关闭后将无法再次查看。\n\n建议您先复制API Key再关闭。',
|
||||
'仍然关闭',
|
||||
'返回复制'
|
||||
)
|
||||
if (confirmed) {
|
||||
emit('close')
|
||||
}
|
||||
} else {
|
||||
// 降级方案
|
||||
const confirmed = confirm(
|
||||
'您还没有保存API Key,关闭后将无法再次查看。\n\n确定要关闭吗?'
|
||||
)
|
||||
if (confirmed) {
|
||||
emit('close')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user