-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Expand file tree
/
Copy pathindex.vue
More file actions
35 lines (35 loc) · 1.17 KB
/
index.vue
File metadata and controls
35 lines (35 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<template>
<component :is="kw[workflow_mode]" :show="show" :id="id" :workflow-ref="workflowRef"></component>
</template>
<script setup lang="ts">
import { inject } from 'vue'
import { WorkflowMode } from '@/enums/application'
import ApplicationDropdownMenu from '@/components/workflow-dropdown-menu/application/index.vue'
import KnowledgeDropdownMenu from '@/components/workflow-dropdown-menu/knowledge/index.vue'
import KnowledgeDropdownInnerMenu from '@/components/workflow-dropdown-menu/knowledge-inner/index.vue'
const workflow_mode: WorkflowMode = inject('workflowMode') || WorkflowMode.Application
const props = defineProps({
show: {
type: Boolean,
default: false,
},
id: {
type: String,
default: '',
},
workflowRef: Object,
inner: {
type: Boolean,
default: false,
},
})
const kw: any = {
[WorkflowMode.Application]: ApplicationDropdownMenu,
[WorkflowMode.ApplicationLoop]: ApplicationDropdownMenu,
[WorkflowMode.Knowledge]: props.inner ? KnowledgeDropdownInnerMenu : KnowledgeDropdownMenu,
[WorkflowMode.KnowledgeLoop]: props.inner ? KnowledgeDropdownInnerMenu : KnowledgeDropdownMenu,
}
</script>
<style lang="scss">
@use './index.scss';
</style>