mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-12 00:16:37 +08:00
feat: Support Enter key to confirm in the delete application dialog (#9758)
Refs https://github.com/1Panel-dev/1Panel/issues/9754
This commit is contained in:
parent
22f5a975c3
commit
78f280c88f
1 changed files with 14 additions and 2 deletions
|
@ -1,6 +1,12 @@
|
|||
<template>
|
||||
<DialogPro v-model="open" :title="$t('commons.button.uninstall') + ' - ' + appInstallName" @close="handleClose">
|
||||
<el-form ref="deleteForm" label-position="left" v-loading="loading">
|
||||
<el-form
|
||||
ref="deleteForm"
|
||||
label-position="left"
|
||||
v-loading="loading"
|
||||
@submit.prevent="handleFormSubmit"
|
||||
@keyup.enter="handleFormSubmit"
|
||||
>
|
||||
<el-form-item>
|
||||
<el-checkbox v-model="deleteReq.forceDelete" :label="$t('app.forceUninstall')" />
|
||||
<span class="input-help">
|
||||
|
@ -27,7 +33,7 @@
|
|||
</el-form-item>
|
||||
<el-form-item>
|
||||
<span v-html="deleteHelper"></span>
|
||||
<el-input v-model="deleteInfo" :placeholder="appInstallName" />
|
||||
<el-input v-model="deleteInfo" :placeholder="appInstallName" @keyup.enter="handleFormSubmit" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
|
@ -79,6 +85,12 @@ const handleClose = () => {
|
|||
em('close', open);
|
||||
};
|
||||
|
||||
const handleFormSubmit = () => {
|
||||
if (!loading.value && deleteInfo.value === appInstallName.value) {
|
||||
submit();
|
||||
}
|
||||
};
|
||||
|
||||
const acceptParams = async (app: App.AppInstallDto) => {
|
||||
const config = await getAppStoreConfig();
|
||||
deleteReq.value = {
|
||||
|
|
Loading…
Add table
Reference in a new issue