|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
<script lang="ts" setup> |
|
|
|
|
import { notification } from 'ant-design-vue' |
|
|
|
|
import { extractSdkResponseErrorMsg } from '~/utils' |
|
|
|
|
import { useApi, useNuxtApp, useVModel } from '#imports' |
|
|
|
|
import { onKeyStroke, useApi, useNuxtApp, useVModel } from '#imports' |
|
|
|
|
|
|
|
|
|
interface Props { |
|
|
|
|
modelValue: boolean |
|
|
|
@ -23,6 +23,10 @@ const { api, isLoading } = useApi()
|
|
|
|
|
|
|
|
|
|
const { $e } = useNuxtApp() |
|
|
|
|
|
|
|
|
|
onKeyStroke('Escape', () => (vModel.value = false)) |
|
|
|
|
|
|
|
|
|
onKeyStroke('Enter', () => onDelete()) |
|
|
|
|
|
|
|
|
|
/** Delete a view */ |
|
|
|
|
async function onDelete() { |
|
|
|
|
if (!props.view) return |
|
|
|
|