mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 14:08:06 +08:00
fix: 备份账号类型切换时清空表单信息
This commit is contained in:
parent
4dc1b516f4
commit
ba77f2853f
@ -63,7 +63,12 @@
|
||||
<div v-loading="loading">
|
||||
<el-form ref="formRef" label-position="left" :model="form" label-width="160px">
|
||||
<el-form-item :label="$t('commons.table.type')" prop="type" :rules="Rules.requiredSelect">
|
||||
<el-select style="width: 100%" v-model="form.type" :disabled="operation === 'edit'">
|
||||
<el-select
|
||||
style="width: 100%"
|
||||
v-model="form.type"
|
||||
@change="changeType"
|
||||
:disabled="operation === 'edit'"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in typeOptions"
|
||||
:key="item.label"
|
||||
@ -254,6 +259,13 @@ const onEdit = (row: Backup.BackupInfo) => {
|
||||
backupVisiable.value = true;
|
||||
};
|
||||
|
||||
const changeType = async (val: string) => {
|
||||
let itemType = val;
|
||||
restForm();
|
||||
buckets.value = [];
|
||||
form.type = itemType;
|
||||
};
|
||||
|
||||
const onSubmit = async (formEl: FormInstance | undefined) => {
|
||||
if (!formEl) return;
|
||||
formEl.validate(async (valid) => {
|
||||
@ -290,10 +302,10 @@ const getBuckets = async () => {
|
||||
credential: form.credential,
|
||||
})
|
||||
.then((res) => {
|
||||
loading.value = true;
|
||||
loading.value = false;
|
||||
buckets.value = res.data;
|
||||
})
|
||||
.finally(() => {
|
||||
.catch(() => {
|
||||
buckets.value = [];
|
||||
loading.value = false;
|
||||
});
|
||||
|
2
go.mod
2
go.mod
@ -5,7 +5,6 @@ go 1.18
|
||||
require (
|
||||
github.com/aliyun/aliyun-oss-go-sdk v2.2.5+incompatible
|
||||
github.com/aws/aws-sdk-go v1.44.99
|
||||
github.com/cenkalti/backoff/v4 v4.1.3
|
||||
github.com/compose-spec/compose-go v1.6.0
|
||||
github.com/dgraph-io/badger/v3 v3.2103.2
|
||||
github.com/docker/docker v20.10.18+incompatible
|
||||
@ -64,6 +63,7 @@ require (
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
|
||||
github.com/aliyun/alibaba-cloud-sdk-go v1.61.1755 // indirect
|
||||
github.com/andybalholm/brotli v1.0.4 // indirect
|
||||
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
|
||||
github.com/cespare/xxhash v1.1.0 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.1.2 // indirect
|
||||
github.com/cloudflare/cloudflare-go v0.49.0 // indirect
|
||||
|
Loading…
x
Reference in New Issue
Block a user