mirror of
https://github.com/fawney19/Aether.git
synced 2026-01-03 00:02:28 +08:00
个性化处理
1. 为所有抽屉和对话框添加 ESC 键关闭功能; 2. 为`使用记录`表格添加自动刷新开关; 3. 为后端 API 请求增加 User-Agent 头部; 4. 修改启动命令支持从.env中读取数据库和Redis配置。
This commit is contained in:
@@ -698,6 +698,7 @@ import {
|
||||
Layers,
|
||||
BarChart3
|
||||
} from 'lucide-vue-next'
|
||||
import { useEscapeKey } from '@/composables/useEscapeKey'
|
||||
import { useToast } from '@/composables/useToast'
|
||||
import Card from '@/components/ui/card.vue'
|
||||
import Badge from '@/components/ui/badge.vue'
|
||||
@@ -833,6 +834,16 @@ watch(() => props.open, (newOpen) => {
|
||||
detailTab.value = 'basic'
|
||||
}
|
||||
})
|
||||
|
||||
// 添加 ESC 键监听
|
||||
useEscapeKey(() => {
|
||||
if (props.open) {
|
||||
handleClose()
|
||||
}
|
||||
}, {
|
||||
disableOnInput: true,
|
||||
once: false
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user