Skip to content

Commit

Permalink
perf: select key when right click in browser tree
Browse files Browse the repository at this point in the history
  • Loading branch information
tiny-craft committed Jan 11, 2024
1 parent 1a67569 commit dbff8f9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontend/src/components/sidebar/BrowserTree.vue
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ const menuOptions = {
],
}
const handleSelectContextMenu = (key) => {
const handleSelectContextMenu = (action) => {
contextMenuParam.show = false
const selectedKey = get(selectedKeys.value, 0)
if (selectedKey == null) {
Expand All @@ -163,7 +163,7 @@ const handleSelectContextMenu = (key) => {
const { db = 0, key: nodeKey, redisKey: rk = '', redisKeyCode: rkc, label } = node || {}
const redisKey = rkc || rk
const redisKeyName = !!rkc ? label : redisKey
switch (key) {
switch (action) {
case 'key_newkey':
dialogStore.openNewKeyDialog(redisKey, props.server, db)
break
Expand Down Expand Up @@ -226,7 +226,7 @@ const handleSelectContextMenu = (key) => {
break
case 'more_action':
default:
console.warn('TODO: handle context menu:' + key)
console.warn('TODO: handle context menu:' + action)
}
}
Expand Down Expand Up @@ -501,7 +501,7 @@ const nodeProps = ({ option }) => {
contextMenuParam.x = e.clientX
contextMenuParam.y = e.clientY
contextMenuParam.show = true
// onUpdateSelectedKeys([option.key], [option])
onUpdateSelectedKeys([option.key], [option])
})
},
// onMouseover() {
Expand Down

0 comments on commit dbff8f9

Please sign in to comment.