From 14e565a0045236ed855fda5aedfc312f0f009025 Mon Sep 17 00:00:00 2001 From: erio Date: Mon, 30 Mar 2026 17:50:48 +0800 Subject: [PATCH] =?UTF-8?q?fix(channel):=20=E5=88=86=E7=BB=84=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E6=97=B6=E5=BA=8F=E4=BF=AE=E5=A4=8D=20=E2=80=94=20?= =?UTF-8?q?=E9=A2=84=E5=8A=A0=E8=BD=BD=20+=20await=20=E7=A1=AE=E4=BF=9D?= =?UTF-8?q?=E5=88=86=E7=BB=84=E6=95=B0=E6=8D=AE=E5=B0=B1=E7=BB=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/admin/ChannelsView.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/src/views/admin/ChannelsView.vue b/frontend/src/views/admin/ChannelsView.vue index cd67aed0..127a9f17 100644 --- a/frontend/src/views/admin/ChannelsView.vue +++ b/frontend/src/views/admin/ChannelsView.vue @@ -839,14 +839,14 @@ function resetForm() { showPlatformMenu.value = false } -function openCreateDialog() { +async function openCreateDialog() { editingChannel.value = null resetForm() - loadGroups() + await loadGroups() showDialog.value = true } -function openEditDialog(channel: Channel) { +async function openEditDialog(channel: Channel) { editingChannel.value = channel form.name = channel.name form.description = channel.description || '' @@ -854,9 +854,8 @@ function openEditDialog(channel: Channel) { form.restrict_models = channel.restrict_models || false form.billing_model_source = channel.billing_model_source || 'requested' // Must load groups first so apiToForm can map groupID → platform - loadGroups().then(() => { - form.platforms = apiToForm(channel) - }) + await loadGroups() + form.platforms = apiToForm(channel) showDialog.value = true } @@ -948,6 +947,7 @@ async function confirmDelete() { // ── Lifecycle ── onMounted(() => { loadChannels() + loadGroups() }) onUnmounted(() => {