Skip to content

Commit bf99182

Browse files
committed
refactor: conditionally load shared tools for EE users in DropdownMenu
1 parent 85afde5 commit bf99182

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

ui/src/views/application-workflow/component/DropdownMenu.vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
<el-tab-pane :label="$t('views.tool.title')" name="tool">
6161
<el-scrollbar height="400">
6262
<!-- 共享工具 -->
63-
<el-collapse expand-icon-position="left">
63+
<el-collapse expand-icon-position="left" v-if="user.isEE()">
6464
<el-collapse-item name="shared" :icon="CaretRight">
6565
<template #title>
6666
<div class="flex align-center">
@@ -110,7 +110,7 @@ import { SourceTypeEnum } from '@/enums/common'
110110
import sharedWorkspaceApi from '@/api/shared-workspace'
111111
import { CaretRight } from '@element-plus/icons-vue'
112112
import ApplicationApi from '@/api/application/application'
113-
113+
const {user} = useStore()
114114
const search_text = ref<string>('')
115115
const props = defineProps({
116116
show: {
@@ -269,7 +269,7 @@ const loadNode = async (node: any, resolve: (children: any[]) => void) => {
269269
270270
resolve(children)
271271
} catch (e: any) {
272-
resolve([]) // 失败也要 resolve,否则树会卡住
272+
resolve([]) // 失败也要 resolve,否则树会卡住
273273
}
274274
}
275275
@@ -298,7 +298,9 @@ function getApplicationFolder() {
298298
}
299299
300300
onMounted(() => {
301-
getShareTool()
301+
if (user.isEE()) {
302+
getShareTool()
303+
}
302304
getToolFolder()
303305
getApplicationFolder()
304306
})

0 commit comments

Comments
 (0)