mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-19 08:19:15 +08:00
fix: 解决表单回车导致页面刷新的问题 (#664)
This commit is contained in:
parent
256c04f3b8
commit
05b7fd1f63
@ -18,7 +18,7 @@
|
||||
<span v-if="row.isDefault">({{ $t('website.default') }})</span>
|
||||
</div>
|
||||
|
||||
<el-form ref="groupForm" v-if="row.edit" :model="row">
|
||||
<el-form @submit.prevent ref="groupForm" v-if="row.edit" :model="row">
|
||||
<el-form-item prop="name" v-if="row.edit" :rules="Rules.name">
|
||||
<div style="margin-top: 20px; width: 100%"><el-input v-model="row.name" /></div>
|
||||
</el-form-item>
|
||||
|
@ -13,6 +13,7 @@
|
||||
<el-row v-loading="loading">
|
||||
<el-col :span="22" :offset="1">
|
||||
<el-form
|
||||
@submit.prevent
|
||||
ref="paramForm"
|
||||
label-position="top"
|
||||
:model="form"
|
||||
|
@ -17,7 +17,7 @@
|
||||
<el-row v-else v-loading="loading">
|
||||
<el-col :span="22" :offset="1">
|
||||
<el-alert :title="$t('app.updateHelper')" type="warning" :closable="false" />
|
||||
<el-form ref="paramForm" :model="paramModel" label-position="top" :rules="rules">
|
||||
<el-form @submit.prevent ref="paramForm" :model="paramModel" label-position="top" :rules="rules">
|
||||
<div v-for="(p, index) in params" :key="index">
|
||||
<el-form-item :prop="p.key" :label="getLabel(p)">
|
||||
<el-input
|
||||
|
@ -5,7 +5,14 @@
|
||||
</template>
|
||||
<el-row>
|
||||
<el-col :span="22" :offset="1">
|
||||
<el-form ref="updateRef" :rules="rules" label-position="top" :model="operateReq" v-loading="loading">
|
||||
<el-form
|
||||
@submit.prevent
|
||||
ref="updateRef"
|
||||
:rules="rules"
|
||||
label-position="top"
|
||||
:model="operateReq"
|
||||
v-loading="loading"
|
||||
>
|
||||
<el-form-item :label="$t('app.versioneSelect')" prop="detailId">
|
||||
<el-select v-model="operateReq.detailId">
|
||||
<el-option
|
||||
|
@ -9,7 +9,7 @@
|
||||
<template #header>
|
||||
<DrawerHeader :header="$t('container.monitor')" :back="handleClose" />
|
||||
</template>
|
||||
<el-form label-position="top">
|
||||
<el-form label-position="top" @submit.prevent>
|
||||
<el-form-item :label="$t('container.refreshTime')">
|
||||
<el-select v-model="timeInterval" @change="changeTimer">
|
||||
<el-option label="1s" :value="1" />
|
||||
|
@ -3,7 +3,7 @@
|
||||
<template #header>
|
||||
<DrawerHeader :header="$t('container.rename')" :back="handleClose" />
|
||||
</template>
|
||||
<el-form ref="newNameRef" v-loading="loading" :model="renameForm" label-position="top">
|
||||
<el-form @submit.prevent ref="newNameRef" v-loading="loading" :model="renameForm" label-position="top">
|
||||
<el-row type="flex" justify="center">
|
||||
<el-col :span="22">
|
||||
<el-form-item :label="$t('container.newName')" :rules="Rules.volumeName" prop="newName">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<template #header>
|
||||
<DrawerHeader :header="$t('container.imageDelete')" :back="handleClose" />
|
||||
</template>
|
||||
<el-form :model="deleteForm" label-position="top">
|
||||
<el-form @submit.prevent :model="deleteForm" label-position="top">
|
||||
<el-row type="flex" justify="center">
|
||||
<el-col :span="22">
|
||||
<el-form-item :label="$t('container.tag')" prop="tagName">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<template #header>
|
||||
<DrawerHeader :header="$t('container.importImage')" :back="handleClose" />
|
||||
</template>
|
||||
<el-form v-loading="loading" ref="formRef" :model="form" label-position="top">
|
||||
<el-form @submit.prevent v-loading="loading" ref="formRef" :model="form" label-position="top">
|
||||
<el-row type="flex" justify="center">
|
||||
<el-col :span="22">
|
||||
<el-form-item :label="$t('container.path')" :rules="Rules.requiredSelect" prop="path">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<template #header>
|
||||
<DrawerHeader :header="$t('database.remoteAccess')" :back="handleClose" />
|
||||
</template>
|
||||
<el-form v-loading="loading" ref="formRef" :model="form" label-position="top">
|
||||
<el-form @submit.prevent v-loading="loading" ref="formRef" :model="form" label-position="top">
|
||||
<el-row type="flex" justify="center">
|
||||
<el-col :span="22">
|
||||
<el-form-item :label="$t('database.remoteAccess')" :rules="Rules.requiredInput" prop="privilege">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<template #header>
|
||||
<DrawerHeader :header="$t('database.databaseConnInfo')" :back="handleClose" />
|
||||
</template>
|
||||
<el-form v-loading="loading" ref="formRef" :model="form" label-position="top">
|
||||
<el-form @submit.prevent v-loading="loading" ref="formRef" :model="form" label-position="top">
|
||||
<el-row type="flex" justify="center">
|
||||
<el-col :span="22">
|
||||
<el-form-item :label="$t('database.rootPassword')" :rules="Rules.requiredInput" prop="password">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<template #header>
|
||||
<DrawerHeader :header="$t('database.databaseConnInfo')" :back="handleClose" />
|
||||
</template>
|
||||
<el-form v-loading="loading" ref="formRef" :model="form" label-position="top">
|
||||
<el-form @submit.prevent v-loading="loading" ref="formRef" :model="form" label-position="top">
|
||||
<el-row type="flex" justify="center">
|
||||
<el-col :span="22">
|
||||
<el-form-item :label="$t('database.requirepass')" :rules="Rules.requiredInput" prop="password">
|
||||
|
@ -11,7 +11,14 @@
|
||||
</template>
|
||||
<el-row>
|
||||
<el-col :span="22" :offset="1">
|
||||
<el-form ref="fileForm" label-position="top" :model="addForm" :rules="rules" v-loading="loading">
|
||||
<el-form
|
||||
@submit.prevent
|
||||
ref="fileForm"
|
||||
label-position="top"
|
||||
:model="addForm"
|
||||
:rules="rules"
|
||||
v-loading="loading"
|
||||
>
|
||||
<el-form-item :label="$t('file.path')" prop="newPath">
|
||||
<el-input v-model="addForm.newPath">
|
||||
<template #prepend><FileList @choose="getPath" :dir="true"></FileList></template>
|
||||
|
@ -6,7 +6,7 @@
|
||||
</template>
|
||||
<el-row type="flex" justify="center">
|
||||
<el-col :span="22">
|
||||
<el-form ref="hostInfoRef" label-position="top" :model="dialogData" :rules="rules">
|
||||
<el-form @submit.prevent ref="hostInfoRef" label-position="top" :model="dialogData" :rules="rules">
|
||||
<el-form-item :label="$t('commons.table.group')" prop="group">
|
||||
<el-select filterable v-model="dialogData.groupID" clearable style="width: 100%">
|
||||
<div v-for="item in groupList" :key="item.id">
|
||||
|
@ -8,7 +8,7 @@
|
||||
>
|
||||
<el-row v-loading="loading">
|
||||
<el-col :span="22" :offset="1">
|
||||
<el-form ref="accountForm" label-position="top" :model="account" :rules="rules" @submit.enter.prevent>
|
||||
<el-form @submit.prevent ref="accountForm" label-position="top" :model="account" :rules="rules">
|
||||
<el-form-item :label="$t('website.email')" prop="email">
|
||||
<el-input v-model.trim="account.email"></el-input>
|
||||
</el-form-item>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-row :gutter="20" v-loading="loading">
|
||||
<el-col :span="8" :offset="1">
|
||||
<el-form ref="defaultForm" label-position="top" :model="defaultModel" :rules="rules">
|
||||
<el-form @submit.prevent ref="defaultForm" label-position="top" :model="defaultModel" :rules="rules">
|
||||
<el-form-item :label="$t('website.defaultDoc')" prop="index">
|
||||
<el-input
|
||||
v-model="defaultModel.index"
|
||||
|
@ -5,7 +5,7 @@
|
||||
</template>
|
||||
<el-row v-loading="loading">
|
||||
<el-col :span="22" :offset="1">
|
||||
<el-form label-position="top">
|
||||
<el-form @submit.prevent label-position="top">
|
||||
<el-form-item :label="$t('website.defaultServer')">
|
||||
<el-select v-model="defaultId" style="width: 100%">
|
||||
<el-option :value="0" :key="-1" :label="$t('website.noDefaulServer')"></el-option>
|
||||
|
Loading…
x
Reference in New Issue
Block a user