Browse Source

refactor(gui-v2): hide view icon when hovering and show drag icon

pull/2837/head
braks 2 years ago
parent
commit
91039750b7
  1. 13
      packages/nc-gui-v2/components/smartsheet/sidebar/RenameableMenuItem.vue

13
packages/nc-gui-v2/components/smartsheet/sidebar/RenameableMenuItem.vue

@ -135,11 +135,14 @@ function onStopEdit() {
<template> <template>
<a-menu-item class="group !flex !items-center !my-0" @dblclick="onDblClick" @click="onClick"> <a-menu-item class="group !flex !items-center !my-0" @dblclick="onDblClick" @click="onClick">
<div v-t="['a:view:open', { view: vModel.type }]" class="text-xs flex items-center w-full gap-2"> <div v-t="['a:view:open', { view: vModel.type }]" class="text-xs flex items-center w-full gap-2">
<MdiDrag <div class="flex w-auto">
:class="`transition-opacity opacity-0 group-hover:opacity-100 text-gray-500 nc-drag-icon cursor-move nc-child-draggable-icon-${vModel.title}`" <MdiDrag
/> class="hidden group-hover:block"
:class="`transition-opacity opacity-0 group-hover:opacity-100 text-gray-500 nc-drag-icon cursor-move nc-child-draggable-icon-${vModel.title}`"
<component :is="viewIcons[vModel.type].icon" :class="`text-${viewIcons[vModel.type].color}`" /> />
<component :is="viewIcons[vModel.type].icon" class="group-hover:hidden" :class="`text-${viewIcons[vModel.type].color}`" />
</div>
<a-input v-if="isEditing" :ref="focusInput" v-model:value="vModel.title" @blur="onCancel" @keydown="onKeyDown($event)" /> <a-input v-if="isEditing" :ref="focusInput" v-model:value="vModel.title" @blur="onCancel" @keydown="onKeyDown($event)" />
<div v-else>{{ vModel.alias || vModel.title }}</div> <div v-else>{{ vModel.alias || vModel.title }}</div>

Loading…
Cancel
Save