Przeglądaj źródła

【代码评审】工作流:新发起页的优化

YunaiV 9 miesięcy temu
rodzic
commit
0fae9a4ba4
1 zmienionych plików z 3 dodań i 8 usunięć
  1. 3 8
      src/views/bpm/processInstance/create/index.vue

+ 3 - 8
src/views/bpm/processInstance/create/index.vue

@@ -6,8 +6,8 @@
       class="!w-50% mb-15px"
       placeholder="请输入流程名称"
       clearable
-      @keyup.enter="handleQuery"
-      @clear="handleClear"
+      @input="handleQuery"
+      @clear="handleQuery"
     >
       <template #prefix>
         <Icon icon="ep:search" />
@@ -152,8 +152,8 @@ const getDefinitionList = async () => {
   }
 }
 
+/** 搜索流程 */
 const filteredProcessDefinitionList = ref([]) // 用于存储搜索过滤后的流程定义
-// 直接进行前端搜索
 const handleQuery = () => {
   if (currentSearchKey.value.trim()) {
     // 如果有搜索关键字,进行过滤
@@ -167,11 +167,6 @@ const handleQuery = () => {
   }
 }
 
-// 监听input `clearable` 事件
-const handleClear = () => {
-  filteredProcessDefinitionList.value = processDefinitionList.value
-}
-
 // 流程定义的分组
 const processDefinitionGroup: any = computed(() => {
   if (!processDefinitionList.value?.length) return {}