Initial commit

This commit is contained in:
libertyspy
2026-03-13 10:40:44 +08:00
parent 3a086e9405
commit 4980ba2da4
4 changed files with 66 additions and 46 deletions

View File

@@ -1204,7 +1204,7 @@
.ant-tabs-content {
//padding: 15px;
padding: 4px;
background: #041b36db;
background: #041832;
}
&.settings-tab,

View File

@@ -74,6 +74,7 @@ export interface GraphTaskElement extends BaseElement {
templateType: NullableString,
inputs: any;
outputs: any;
order: number;
variables: ElementVariable[];
parameters: ElementParameter[];
children?: GraphTaskElement[],

View File

@@ -14,8 +14,8 @@
</a-space>
</template>
<div class="port port-in" data-port="in-0" magnet="passive">
<div class="triangle-left"></div>
<div class="port port-in">
<div class="triangle-left" data-port="in-0" magnet="passive"></div>
</div>
<div class="w-full ks-designer-node-text">
<a-tooltip v-if="(element?.description ?? (element?.name ?? '-')).length >= 38">
@@ -30,8 +30,8 @@
{{ substring(element?.description ?? (element?.name ?? '-'), 40) }}
</p>
</div>
<div class="port port-out" data-port="out-0" magnet="active">
<div class="triangle-right"></div>
<div class="port port-out">
<div class="triangle-right" data-port="out-0" magnet="active"></div>
</div>
</a-card>
@@ -189,7 +189,7 @@ export default defineComponent({
height: calc(100% - 25px);
border-radius: 0;
font-size: 12px;
padding: 8px 15px !important;
padding: 10px 30px !important;
border-top: 1px solid rgba(108, 99, 255, 0.5);
overflow: hidden;
text-overflow: ellipsis;

View File

@@ -44,6 +44,10 @@
<a-textarea v-model:value="currentElement.description" :placeholder="currentElement.description" size="small" />
</a-form-item>
<a-form-item label="排序">
<a-input-number style="width:100%;" v-model:value="currentElement.order" size="small" />
</a-form-item>
<a-divider />
<a-form-item label="输入">
@@ -54,12 +58,12 @@
<a-textarea v-model:value="currentElement.outputs" size="small" />
</a-form-item>
<a-divider v-if="currentElement.settings && currentElement.parameters.length > 0" />
<!-- <a-divider v-if="currentElement.settings && currentElement.parameters.length > 0" />-->
<a-form-item v-for="setting in currentElement.parameters" :label="setting.description">
<a-input-number v-if="setting.dataType === 'double'" v-model:value="setting.defaultValue" :placeholder="setting.description" size="small" style="width:100%;" />
<a-input v-else v-model:value="setting.defaultValue" :placeholder="setting.description" size="small" />
</a-form-item>
<!-- <a-form-item v-for="setting in currentElement.parameters" :label="setting.description">-->
<!-- <a-input-number v-if="setting.dataType === 'double'" v-model:value="setting.defaultValue" :placeholder="setting.description" size="small" style="width:100%;" />-->
<!-- <a-input v-else v-model:value="setting.defaultValue" :placeholder="setting.description" size="small" />-->
<!-- </a-form-item>-->
</a-form>
</a-tab-pane>
@@ -70,41 +74,56 @@
<span class="ks-model-builder-title-icon icon-input"></span>
</template>
<a-tab-pane key="1" tab="节点变量">
<div class="w-full">
<a-space>
<a-button size="small" type="primary" @click="addVariable">添加</a-button>
</a-space>
<a-table
:columns="actionSpaceColumns"
:dataSource="currentElement.variables"
:pagination="false"
:scroll="{ x: 500 }"
class="mt-1"
row-key="key"
size="small"
style="overflow-y:auto;height:35vh;"
<a-form
v-if="currentElement.parameters && currentElement.parameters.length > 0"
autocomplete="off"
layout="vertical"
name="basic"
style="padding-bottom:15px;"
>
<template #bodyCell="{column, record, index}">
<template v-if="column.dataIndex === 'index'">
{{ index + 1 }}
</template>
<template v-else-if="column.dataIndex === '_actions'">
<a-button
class="btn-link-delete"
danger
size="small"
type="text"
@click="()=> removeVariable(record)"
>
删除
</a-button>
</template>
<template v-else>
<a-input v-model:value="record[column.dataIndex]" size="small" />
</template>
</template>
</a-table>
</div>
<a-form-item v-for="setting in currentElement.parameters" :label="setting.description">
<a-input-number v-if="setting.dataType === 'double'" v-model:value="setting.defaultValue" :placeholder="setting.description" size="small" style="width:100%;" />
<a-input v-else v-model:value="setting.defaultValue" :placeholder="setting.description" size="small" />
</a-form-item>
</a-form>
<a-empty v-else>
</a-empty>
<!-- <div class="w-full">-->
<!-- <a-space>-->
<!-- <a-button size="small" type="primary" @click="addVariable">添加</a-button>-->
<!-- </a-space>-->
<!-- <a-table-->
<!-- :columns="actionSpaceColumns"-->
<!-- :dataSource="currentElement.variables"-->
<!-- :pagination="false"-->
<!-- :scroll="{ x: 500 }"-->
<!-- class="mt-1"-->
<!-- row-key="key"-->
<!-- size="small"-->
<!-- style="overflow-y:auto;height:35vh;"-->
<!-- >-->
<!-- <template #bodyCell="{column, record, index}">-->
<!-- <template v-if="column.dataIndex === 'index'">-->
<!-- {{ index + 1 }}-->
<!-- </template>-->
<!-- <template v-else-if="column.dataIndex === '_actions'">-->
<!-- <a-button-->
<!-- class="btn-link-delete"-->
<!-- danger-->
<!-- size="small"-->
<!-- type="text"-->
<!-- @click="()=> removeVariable(record)"-->
<!-- >-->
<!-- 删除-->
<!-- </a-button>-->
<!-- </template>-->
<!-- <template v-else>-->
<!-- <a-input v-model:value="record[column.dataIndex]" size="small" />-->
<!-- </template>-->
<!-- </template>-->
<!-- </a-table>-->
<!-- </div>-->
</a-tab-pane>
</a-tabs>