From 20865d53c37cfa1e6edbacb9baeda5a85a502358 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Thu, 6 Feb 2025 16:40:15 +0800 Subject: [PATCH] fix: 1050996 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1050996 --user=王孝刚 【函数库】-编辑函数后,函数的创建者显示为空,刷新后恢复 https://www.tapd.cn/57709429/s/1651111 --- ui/src/views/function-lib/index.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ui/src/views/function-lib/index.vue b/ui/src/views/function-lib/index.vue index 3188ad00f..8ba9e7fb6 100644 --- a/ui/src/views/function-lib/index.vue +++ b/ui/src/views/function-lib/index.vue @@ -264,6 +264,11 @@ function getList() { function refresh(data: any) { if (data) { const index = functionLibList.value.findIndex((v) => v.id === data.id) + if (user.userInfo && data.user_id === user.userInfo.id) { + data.username = user.userInfo.username + } else { + data.username = userOptions.value.find((v) => v.value === data.user_id)?.label + } functionLibList.value.splice(index, 1, data) } else { paginationConfig.total = 0