Initial commit

This commit is contained in:
libertyspy
2026-02-08 16:01:21 +08:00
parent 9ded6b757c
commit c9d5c38b52
11 changed files with 137 additions and 101 deletions

View File

@@ -7,7 +7,7 @@
</template>
<div class="w-full h-full">
<a-row>
<a-col v-for="nm in controlTemplates" :span="12">
<a-col :span="12" v-for="nm in controlTemplates">
<div
:key="nm.id"
:data-type="nm.type"
@@ -15,7 +15,7 @@
@dragend="handleDragEnd"
@dragstart="handleDragStart($event, nm)"
>
<img :alt="nm.name ?? ''" class="icon" src="@/assets/icons/model-4.svg" />
<img class="icon" src="@/assets/icons/model-4.svg" :alt="nm.name ?? ''" />
<span class="desc">{{ nm.name }}</span>
</div>
</a-col>
@@ -28,7 +28,7 @@
</template>
<div class="w-full h-full">
<a-row>
<a-col v-for="nm in conditionTemplates" :span="12">
<a-col :span="12" v-for="nm in conditionTemplates">
<div
:key="nm.id"
:data-type="nm.type"
@@ -36,7 +36,7 @@
@dragend="handleDragEnd"
@dragstart="handleDragStart($event, nm)"
>
<img :alt="nm.name ?? ''" class="icon" src="@/assets/icons/model-4.svg" />
<img class="icon" src="@/assets/icons/model-4.svg" :alt="nm.name ?? ''" />
<span class="desc">{{ nm.name }}</span>
</div>
</a-col>
@@ -49,7 +49,7 @@
</template>
<div class="w-full h-full">
<a-row>
<a-col v-for="nm in actionsTemplates" :span="12">
<a-col :span="12" v-for="nm in actionsTemplates">
<div
:key="nm.id"
:data-type="nm.type"
@@ -57,7 +57,7 @@
@dragend="handleDragEnd"
@dragstart="handleDragStart($event, nm)"
>
<img :alt="nm.name ?? ''" class="icon" src="@/assets/icons/model-4.svg" />
<img class="icon" src="@/assets/icons/model-4.svg" :alt="nm.name ?? ''" />
<span class="desc">{{ nm.name }}</span>
</div>
</a-col>
@@ -149,7 +149,7 @@ export default defineComponent({
if (r.data.templates) {
r.data.templates.forEach(tpl => {
if (tpl.type === 'action') {
if (tpl.parameter_defs && tpl.parameter_defs.length > 0) {
if(tpl.parameter_defs && tpl.parameter_defs.length>0){
actionsTemplates.value.push(tpl);
}
} else if (tpl.type === 'parallel' || tpl.type === 'sequence' || tpl.type === 'precondition') {
@@ -212,6 +212,6 @@ export default defineComponent({
handleDragEnd,
};
},
});
})
</script>