Skip to content

Commit 903501d

Browse files
feat: protal
1 parent b9d93cb commit 903501d

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

‎ui/src/views/system/chat-management/portal-setting/PortalSettingView.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ onMounted(() => loadPortalSetting())
111111
<h4 class="truncate" :title="previewName">{{ previewName }}</h4>
112112
</div>
113113
<!-- 编辑门户名称与 Logo -->
114-
<ButtonEditPortal :setting="portalSetting" :save="savePortalSetting" />
114+
<ButtonEditPortal :setting="portalSetting" :saving="saving" :save="savePortalSetting" />
115115
</div>
116116
</el-card>
117117
<el-card shadow="never">

‎ui/src/views/system/chat-management/portal-setting/components/ButtonEditPortal.vue‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type { FormInstance, FormRules } from 'element-plus'
44
import type { PortalSetting } from '@/api/types'
55
import MkEditAvatar from '@/components/mk-edit-avatar/index.vue'
66
7-
const props = defineProps<{ setting: PortalSetting; save: (payload: FormData) => Promise<void> }>()
7+
const props = defineProps<{ setting: PortalSetting; saving: boolean; save: (payload: FormData) => Promise<void> }>()
88
99
/* 门户名称与 Logo */
1010
const editVisible = ref(false)
@@ -31,8 +31,9 @@ function handleLogoChange(icon: string, file: File | null) {
3131
}
3232
3333
function handleSavePortalInfo() {
34+
if (props.saving) return
3435
portalFormRef.value?.validate((valid) => {
35-
if (!valid) return
36+
if (!valid || props.saving) return
3637
const payload = new FormData()
3738
payload.append('name', portalForm.name.trim())
3839
if (logoChanged.value) payload.append('logo', logoFile.value || '')
@@ -71,9 +72,9 @@ function handleClosePortalEdit() {
7172
</el-form>
7273
<template #footer>
7374
<!-- 取消编辑 -->
74-
<el-button plain @click="editVisible = false">取消</el-button>
75+
<el-button plain :disabled="saving" @click="editVisible = false">取消</el-button>
7576
<!-- 保存门户信息 -->
76-
<el-button type="primary" @click="handleSavePortalInfo">保存</el-button>
77+
<el-button type="primary" :loading="saving" @click="handleSavePortalInfo">保存</el-button>
7778
</template>
7879
</MkDialog>
7980
</template>

0 commit comments

Comments
 (0)