fix: esc exit formEdit
This commit is contained in:
parent
e682485bce
commit
9d81097b4c
4 changed files with 47 additions and 19 deletions
|
|
@ -2,7 +2,7 @@
|
|||
import { computed, ref } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import type { QTableProps } from 'quasar'
|
||||
import { useTreeDataStore } from '@/stores/tree-data'
|
||||
import { useTreeDataStore, type TreeDataFolder } from '@/stores/tree-data'
|
||||
import { useFileInfoStore } from '@/stores/file-info-data'
|
||||
import FromEdit from '@/components/FromEdit.vue'
|
||||
import FileIcon from '@/components/FileIcon.vue'
|
||||
|
|
@ -113,6 +113,10 @@ const columnsFile: QTableProps['columns'] = [
|
|||
style: 'width: 20px',
|
||||
},
|
||||
]
|
||||
|
||||
const onRowClick = (evt: Event, row: TreeDataFolder, index: number) => {
|
||||
getFolder(row.pathname)
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -153,15 +157,11 @@ const columnsFile: QTableProps['columns'] = [
|
|||
row-key="name"
|
||||
hide-bottom
|
||||
:rows-per-page-options="[0]"
|
||||
@row-click="onRowClick"
|
||||
class="cursor"
|
||||
>
|
||||
<template v-slot:body-cell-name="nameRow">
|
||||
<q-td
|
||||
@click="
|
||||
() => {
|
||||
getFolder(nameRow.row.pathname)
|
||||
}
|
||||
"
|
||||
>
|
||||
<q-td>
|
||||
<q-icon :name="currentIcon" size="2em" color="primary" />
|
||||
{{ nameRow.row.name }}
|
||||
</q-td>
|
||||
|
|
@ -191,7 +191,7 @@ const columnsFile: QTableProps['columns'] = [
|
|||
color="positive"
|
||||
dense
|
||||
icon="edit"
|
||||
@click="
|
||||
@click.stop="
|
||||
() => {
|
||||
drawer = !drawer
|
||||
drawerStatus = 'edit'
|
||||
|
|
@ -204,7 +204,7 @@ const columnsFile: QTableProps['columns'] = [
|
|||
color="negative"
|
||||
dense
|
||||
icon="delete"
|
||||
@click="() => deleteFolder(actionsRow.row.pathname)"
|
||||
@click.stop="() => deleteFolder(actionsRow.row.pathname)"
|
||||
/>
|
||||
</div>
|
||||
</q-td>
|
||||
|
|
@ -250,7 +250,7 @@ const columnsFile: QTableProps['columns'] = [
|
|||
}
|
||||
"
|
||||
>
|
||||
<file-icon size="list" :fileMimeType="nameRow.row.fileType" />
|
||||
<file-icon size="list" :fileMimeType="nameRow.row.fileType" />
|
||||
{{ nameRow.row.fileName }}
|
||||
</q-td>
|
||||
</template>
|
||||
|
|
@ -286,6 +286,7 @@ const columnsFile: QTableProps['columns'] = [
|
|||
</div>
|
||||
|
||||
<from-edit
|
||||
v-if="drawer"
|
||||
:drawer="drawer"
|
||||
:drawerStatus="drawerStatus"
|
||||
:DEPT_NAME="DEPT_NAME"
|
||||
|
|
@ -301,4 +302,8 @@ const columnsFile: QTableProps['columns'] = [
|
|||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.cursor {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue