Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ui/src/components/workflow-dropdown-menu/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ 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'
const workflow_mode = inject('workflowMode') || WorkflowMode.Application
const workflow_mode: WorkflowMode = inject('workflowMode') || WorkflowMode.Application
defineProps({
show: {
type: Boolean,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Line 6: You can remove the || WorkflowMode.Application as TypeScript will infer the type of inject('workflowMode').
  • Line 7: Ensure that $v-model.show, $v-model.workflow_mode, and other reactive properties used in templates have valid bindings to ensure Vue's reactivity system works correctly.
  • Line 9: Since you are using defineProps with types, the line should be updated accordingly based on what values your component expects. For example:
defineProps<{
  mode?: WorkflowMode;
  show?: boolean; // Optional property if desired
}>();

This is assuming that mode might also be provided through props.

Overall, focusing on proper TypeScript inference and ensuring correct data binding within the component template would generally suffice for this piece of code.

Expand Down
Loading