perf: optimized keyboard support for context menus

This commit is contained in:
tiny-craft 2023-10-22 18:04:17 +08:00
parent c4e4ed7e79
commit 92ffd6c605
3 changed files with 1 additions and 4 deletions

View File

@ -690,7 +690,6 @@ const handleOutsideContextMenu = () => {
@update:selected-keys="onUpdateSelectedKeys" @update:selected-keys="onUpdateSelectedKeys"
@update:expanded-keys="onUpdateExpanded" /> @update:expanded-keys="onUpdateExpanded" />
<n-dropdown <n-dropdown
:animated="false"
:options="contextMenuParam.options" :options="contextMenuParam.options"
:render-label="renderContextLabel" :render-label="renderContextLabel"
:show="contextMenuParam.show" :show="contextMenuParam.show"

View File

@ -530,10 +530,10 @@ const onCancelOpen = () => {
<!-- context menu --> <!-- context menu -->
<n-dropdown <n-dropdown
:animated="false"
:options="contextMenuParam.options" :options="contextMenuParam.options"
:render-label="renderContextLabel" :render-label="renderContextLabel"
:show="contextMenuParam.show" :show="contextMenuParam.show"
:keyboard="true"
:x="contextMenuParam.x" :x="contextMenuParam.x"
:y="contextMenuParam.y" :y="contextMenuParam.y"
placement="bottom-start" placement="bottom-start"

View File

@ -125,8 +125,6 @@ const openGithub = () => {
<div class="flex-item-expand"></div> <div class="flex-item-expand"></div>
<div class="nav-menu-item flex-box-v"> <div class="nav-menu-item flex-box-v">
<n-dropdown <n-dropdown
:animated="false"
:keyboard="false"
:options="preferencesOptions" :options="preferencesOptions"
:render-label="renderContextLabel" :render-label="renderContextLabel"
trigger="click" trigger="click"