update
This commit is contained in:
@@ -109,8 +109,9 @@ const closeStyleCustomizer = () => {
|
|||||||
appearanceStore.toggleStyleCustomizer(false);
|
appearanceStore.toggleStyleCustomizer(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
// +++ 修改:处理 Alt 键按下的事件处理函数,并记录快捷键 +++
|
// +++ 处理 Alt 键按下的事件处理函数,并记录快捷键 +++
|
||||||
const handleAltKeyDown = async (event: KeyboardEvent) => { // +++ 改为 async +++
|
const handleAltKeyDown = async (event: KeyboardEvent) => { // +++ 改为 async +++
|
||||||
|
if (!isWorkspaceRoute.value) return; // 只在 workspace 路由下执行
|
||||||
// 只在 Alt 键首次按下时设置状态
|
// 只在 Alt 键首次按下时设置状态
|
||||||
if (event.key === 'Alt' && !event.repeat) {
|
if (event.key === 'Alt' && !event.repeat) {
|
||||||
isAltPressed.value = true;
|
isAltPressed.value = true;
|
||||||
@@ -161,8 +162,9 @@ const handleAltKeyDown = async (event: KeyboardEvent) => { // +++ 改为 async +
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// +++ 修改:全局键盘事件处理函数,监听 keyup,优先处理快捷键 +++
|
// +++ 全局键盘事件处理函数,监听 keyup,优先处理快捷键 +++
|
||||||
const handleGlobalKeyUp = async (event: KeyboardEvent) => {
|
const handleGlobalKeyUp = async (event: KeyboardEvent) => {
|
||||||
|
if (!isWorkspaceRoute.value) return; // 只在 workspace 路由下执行
|
||||||
if (event.key === 'Alt') {
|
if (event.key === 'Alt') {
|
||||||
const altWasPressed = isAltPressed.value;
|
const altWasPressed = isAltPressed.value;
|
||||||
const triggeredShortcutKey = altShortcutKey.value; // 记录松开时是否有记录的快捷键
|
const triggeredShortcutKey = altShortcutKey.value; // 记录松开时是否有记录的快捷键
|
||||||
|
|||||||
@@ -1703,7 +1703,7 @@ const handleOpenEditorClick = () => {
|
|||||||
<div class="flex flex-col h-full overflow-hidden bg-background text-foreground text-sm font-sans">
|
<div class="flex flex-col h-full overflow-hidden bg-background text-foreground text-sm font-sans">
|
||||||
<div class="flex items-center justify-between flex-wrap gap-2 p-2 bg-header flex-shrink-0">
|
<div class="flex items-center justify-between flex-wrap gap-2 p-2 bg-header flex-shrink-0">
|
||||||
<!-- Wrapper for Path Actions and Path Bar -->
|
<!-- Wrapper for Path Actions and Path Bar -->
|
||||||
<div class="flex items-center gap-2 flex-shrink"> <!-- Added gap-2 -->
|
<div class="flex items-center gap-2 flex-grow min-w-0"> <!-- Added gap-2, flex-grow, min-w-0 -->
|
||||||
<!-- Path Actions -->
|
<!-- Path Actions -->
|
||||||
<div class="flex items-center flex-shrink-0"> <!-- Removed mr-auto -->
|
<div class="flex items-center flex-shrink-0"> <!-- Removed mr-auto -->
|
||||||
<!-- CD 到终端按钮 -->
|
<!-- CD 到终端按钮 -->
|
||||||
@@ -1784,8 +1784,9 @@ const handleOpenEditorClick = () => {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div ref="pathInputWrapperRef" class="relative flex items-center bg-background border border-border rounded px-1.5 py-0.5 w-fit flex-shrink">
|
<div ref="pathInputWrapperRef" class="relative flex items-center bg-background border border-border rounded px-1.5 py-0.5"
|
||||||
<span v-show="!isEditingPath && !showPathHistoryDropdown" @click="startPathEdit" class="text-text-secondary whitespace-nowrap overflow-x-auto pr-2 cursor-text">
|
:class="{ 'flex-grow min-w-0': isEditingPath || showPathHistoryDropdown, 'w-fit max-w-full': !isEditingPath && !showPathHistoryDropdown }">
|
||||||
|
<span v-show="!isEditingPath && !showPathHistoryDropdown" @click="startPathEdit" class="text-text-secondary pr-2 cursor-text truncate">
|
||||||
<strong
|
<strong
|
||||||
:title="t('fileManager.editPathTooltip')"
|
:title="t('fileManager.editPathTooltip')"
|
||||||
class="font-medium text-link px-1 rounded transition-colors duration-200"
|
class="font-medium text-link px-1 rounded transition-colors duration-200"
|
||||||
|
|||||||
Reference in New Issue
Block a user