Skip to content

Commit 2d6d16e

Browse files
feat: Optimize the interface when there are too many interface parameters.(#2795)
* perf: Optimization drag sorting condition nodes * feat: Optimize the interface when there are too many interface parameters.(#2795
1 parent 919a3ee commit 2d6d16e

File tree

4 files changed

+42
-6
lines changed

4 files changed

+42
-6
lines changed

ui/src/assets/sort.svg

Lines changed: 1 addition & 0 deletions
Loading

ui/src/workflow/nodes/base-node/component/ApiInputFieldTable.vue

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,20 @@
1515
ref="tableRef"
1616
row-key="field"
1717
>
18-
<el-table-column prop="variable" :label="$t('dynamicsForm.paramForm.field.label')" />
19-
<el-table-column prop="default_value" :label="$t('dynamicsForm.default.label')" />
18+
<el-table-column prop="variable" :label="$t('dynamicsForm.paramForm.field.label')">
19+
<template #default="{ row }">
20+
<span class="ellipsis-1" :title="row.variable">
21+
{{ row.variable }}
22+
</span>
23+
</template>
24+
</el-table-column>
25+
<el-table-column prop="default_value" :label="$t('dynamicsForm.default.label')">
26+
<template #default="{ row }">
27+
<span class="ellipsis-1" :title="row.default_value">
28+
{{ row.default_value }}
29+
</span>
30+
</template>
31+
</el-table-column>
2032
<el-table-column :label="$t('common.required')">
2133
<template #default="{ row }">
2234
<div @click.stop>

ui/src/workflow/nodes/condition-node/index.vue

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,15 @@
2222
<el-card
2323
v-resize="(wh: any) => resizeCondition(wh, item, index)"
2424
shadow="never"
25-
class="card-never mb-8"
25+
class="drag-card card-never mb-8"
2626
:class="{ 'no-drag': index === form_data.branch.length - 1 }"
2727
style="--el-card-padding: 12px"
2828
>
2929
<div class="handle flex-between lighter">
30-
{{ item.type }}
30+
<span class="flex align-center">
31+
<img src="@/assets/sort.svg" alt="" height="15" class="handle-img mr-4" />
32+
{{ item.type }}
33+
</span>
3134
<div class="info" v-if="item.conditions.length > 1">
3235
<span>{{
3336
$t('views.applicationWorkflow.nodes.conditionNode.conditions.info')
@@ -337,4 +340,24 @@ onMounted(() => {
337340
set(props.nodeModel, 'validate', validate)
338341
})
339342
</script>
340-
<style lang="scss" scoped></style>
343+
<style lang="scss" scoped>
344+
.drag-card.no-drag {
345+
.handle {
346+
.handle-img {
347+
display: none;
348+
}
349+
}
350+
}
351+
.drag-card:not(.no-drag) {
352+
.handle {
353+
.handle-img {
354+
display: none;
355+
}
356+
&:hover {
357+
.handle-img {
358+
display: block;
359+
}
360+
}
361+
}
362+
}
363+
</style>

ui/src/workflow/nodes/start-node/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
@mouseenter="showicon = true"
99
@mouseleave="showicon = false"
1010
>
11-
<span>{{ item.label }} {{ '{' + item.value + '}' }}</span>
11+
<span class="break-all">{{ item.label }} {{ '{' + item.value + '}' }}</span>
1212
<el-tooltip
1313
effect="dark"
1414
:content="$t('views.applicationWorkflow.setting.copyParam')"

0 commit comments

Comments
 (0)