11<template >
22 <div v-show =" show" class =" workflow-dropdown-menu border border-r-6" >
33 <el-tabs v-model =" activeName" class =" workflow-dropdown-tabs" >
4- <div style =" display : flex ; width : 100% ; justify-content : center ;" class =" mb-12" >
5- <el-input v-model =" search_text" class =" mr-12 ml-12"
6- :placeholder =" $t('views.applicationWorkflow.searchBar.placeholder')" >
4+ <div style =" display : flex ; width : 100% ; justify-content : center " class =" mb-12" >
5+ <el-input
6+ v-model =" search_text"
7+ class =" mr-12 ml-12"
8+ :placeholder =" $t('views.applicationWorkflow.searchBar.placeholder')"
9+ >
710 <template #suffix >
811 <el-icon class =" el-input__icon" ><search /></el-icon >
912 </template >
1417 <el-scrollbar height =" 400" >
1518 <div v-if =" filter_menu_nodes.length > 0" >
1619 <template v-for =" (node , index ) in filter_menu_nodes " :key =" index " >
17- <el-text type =" info" size =" small" class =" color-secondary ml-12" >{{ node.label }}</el-text >
20+ <el-text type =" info" size =" small" class =" color-secondary ml-12" >{{
21+ node.label
22+ }}</el-text >
1823 <div class =" flex-wrap mt-8" >
1924 <template v-for =" (item , index ) in node .list " :key =" index " >
2025 <el-popover placement =" right" :width =" 280" >
2126 <template #reference >
22- <div class =" flex align-center border border-r-6 mb-12 p-8-12 cursor ml-12" style =" width : 39% ; " @click.stop =" clickNodes(item)"
23- @mousedown.stop =" onmousedown(item)" >
24- <component :is =" iconComponent(`${item.type}-icon`)" class =" mr-8" :size =" 32" />
27+ <div
28+ class =" flex align-center border border-r-6 mb-12 p-8-12 cursor ml-12"
29+ style =" width : 39% "
30+ @click.stop =" clickNodes(item)"
31+ @mousedown.stop =" onmousedown(item)"
32+ >
33+ <component
34+ :is =" iconComponent(`${item.type}-icon`)"
35+ class =" mr-8"
36+ :size =" 32"
37+ />
2538 <div class =" lighter" >{{ item.label }}</div >
2639 </div >
2740 </template >
2841 <template #default >
2942 <div class =" flex align-center mb-8" >
30- <component :is =" iconComponent(`${item.type}-icon`)" class =" mr-8" :size =" 32" />
43+ <component
44+ :is =" iconComponent(`${item.type}-icon`)"
45+ class =" mr-8"
46+ :size =" 32"
47+ />
3148 <div class =" lighter color-text-primary" >{{ item.label }}</div >
3249 </div >
33- <el-text type =" info" size =" small" class =" color-secondary lighter" >{{ item.text }}</el-text >
50+ <el-text type =" info" size =" small" class =" color-secondary lighter" >{{
51+ item.text
52+ }}</el-text >
3453 </template >
3554 </el-popover >
3655 </template >
@@ -174,21 +193,21 @@ const filter_application_list = computed(() => {
174193})
175194
176195const filter_menu_nodes = computed (() => {
177- if (! search_text .value ) return menuNodes ;
178- const searchTerm = search_text .value .toLowerCase ();
179-
196+ if (! search_text .value ) return menuNodes
197+ const searchTerm = search_text .value .toLowerCase ()
198+
180199 return menuNodes .reduce ((result : any [], item ) => {
181- const filteredList = item .list .filter (listItem =>
182- listItem .label .toLowerCase ().includes (searchTerm )
183- );
184-
200+ const filteredList = item .list .filter (( listItem ) =>
201+ listItem .label .toLowerCase ().includes (searchTerm ),
202+ )
203+
185204 if (filteredList .length ) {
186- result .push ({ ... item , list: filteredList });
205+ result .push ({ ... item , list: filteredList })
187206 }
188-
189- return result ;
190- }, []);
191- });
207+
208+ return result
209+ }, [])
210+ })
192211function clickNodes(item : any , data ? : any , type ? : string ) {
193212 if (data ) {
194213 item [' properties' ][' stepName' ] = data .name
@@ -215,10 +234,10 @@ function clickNodes(item: any, data?: any, type?: string) {
215234 ... (! fileUploadSetting
216235 ? {}
217236 : {
218- ... (fileUploadSetting .document ? { document_list: [] } : {}),
219- ... (fileUploadSetting .image ? { image_list: [] } : {}),
220- ... (fileUploadSetting .audio ? { audio_list: [] } : {}),
221- }),
237+ ... (fileUploadSetting .document ? { document_list: [] } : {}),
238+ ... (fileUploadSetting .image ? { image_list: [] } : {}),
239+ ... (fileUploadSetting .audio ? { audio_list: [] } : {}),
240+ }),
222241 }
223242 } else {
224243 item [' properties' ][' node_data' ] = {
@@ -260,10 +279,10 @@ function onmousedown(item: any, data?: any, type?: string) {
260279 ... (! fileUploadSetting
261280 ? {}
262281 : {
263- ... (fileUploadSetting .document ? { document_list: [] } : {}),
264- ... (fileUploadSetting .image ? { image_list: [] } : {}),
265- ... (fileUploadSetting .audio ? { audio_list: [] } : {}),
266- }),
282+ ... (fileUploadSetting .document ? { document_list: [] } : {}),
283+ ... (fileUploadSetting .image ? { image_list: [] } : {}),
284+ ... (fileUploadSetting .audio ? { audio_list: [] } : {}),
285+ }),
267286 }
268287 } else {
269288 item [' properties' ][' node_data' ] = {
@@ -301,7 +320,7 @@ onMounted(() => {
301320 user-select : none ; /* CSS3属性 */
302321 position : absolute ;
303322 top : 49px ;
304- right : 122 px ;
323+ right : 16 px ;
305324 z-index : 99 ;
306325 width : 400px ;
307326 box-shadow : 0px 4px 8px 0px var (--app-text-color-light-1 );
0 commit comments