File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
ui/src/views/trigger/component Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 258258 </span >
259259 <span class =" mr-4" >
260260 <el-button text >
261- <el-icon ><Close /></el-icon >
261+ <el-icon ><Close @click = " deleteTask(item) " /></el-icon >
262262 </el-button >
263263 </span >
264264 </div >
290290 </div >
291291 </div >
292292 <div class =" w-full" v-if =" collapseData.tool" >
293- <template v-for =" (item , index ) in toolDetailsDict " :key =" index " >
293+ <template v-for =" (item , index ) in toolTask " :key =" index " >
294294 <div class =" border border-r-6 white-bg mb-4" style =" padding : 2px 8px 5px " >
295295 <div class =" flex-between" >
296296 <div class =" flex align-center" style =" line-height : 20px " >
325325 </span >
326326 <span class =" mr-4" >
327327 <el-button text >
328- <el-icon ><Close /></el-icon >
328+ <el-icon ><Close @click = " deleteTask(item) " /></el-icon >
329329 </el-button >
330330 </span >
331331 </div >
@@ -422,6 +422,11 @@ const applicationTask = computed(() => {
422422const toolTask = computed (() => {
423423 return form .value .trigger_task .filter ((task : any ) => task .source_type === ' TOOL' )
424424})
425+ const deleteTask = (task : any ) => {
426+ form .value .trigger_task = form .value .trigger_task .filter (
427+ (t : any ) => ! (t .source_type === task .source_type && t .source_id === task .source_id ),
428+ )
429+ }
425430const applicationParameterRef = ref <Array <InstanceType <typeof ApplicationParameter >>>()
426431const toolParameterRef = ref <Array <InstanceType <typeof ToolParameter >>>()
427432const toolRefresh = (tool_selected : any ) => {
You can’t perform that action at this time.
0 commit comments