mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-30 17:52:48 +00:00
fix: 修复修改名称 数据也跟随修改
This commit is contained in:
parent
a8927a055e
commit
85ac7002d9
|
|
@ -38,9 +38,9 @@
|
|||
|
||||
<div>
|
||||
<slot></slot>
|
||||
<template v-if="props.nodeModel.properties.fields?.length > 0">
|
||||
<template v-if="paramsFileds?.length > 0">
|
||||
<h5 class="title-decoration-1 mb-8 mt-8">参数输出</h5>
|
||||
<template v-for="(item, index) in props.nodeModel.properties.fields" :key="index">
|
||||
<template v-for="(item, index) in paramsFileds" :key="index">
|
||||
<div
|
||||
class="flex-between border-r-4 p-8-12 mb-8 layout-bg lighter"
|
||||
@mouseenter="showicon = index"
|
||||
|
|
@ -66,7 +66,7 @@
|
|||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { ref, computed } from 'vue'
|
||||
import { set } from 'lodash'
|
||||
import { iconComponent } from '../icons/utils'
|
||||
import { copyClick } from '@/utils/clipboard'
|
||||
|
|
@ -84,7 +84,19 @@ const height = ref<{
|
|||
})
|
||||
|
||||
const showEditIcon = ref(false)
|
||||
|
||||
const paramsFileds = computed(() => {
|
||||
if (props.nodeModel.properties.fields) {
|
||||
return props.nodeModel.properties.fields?.map((field: any) => {
|
||||
return {
|
||||
label: field.label,
|
||||
value: field.value,
|
||||
globeLabel: `{{${props.nodeModel.properties.stepName}.${field.value}}}`,
|
||||
globeValue: `{{context['${props.nodeModel.id}'].${field.value}}}`
|
||||
}
|
||||
})
|
||||
}
|
||||
return []
|
||||
})
|
||||
function editName(val: string) {
|
||||
if (val.trim() && val.trim() !== props.nodeModel.properties.stepName) {
|
||||
if (
|
||||
|
|
|
|||
|
|
@ -43,12 +43,6 @@ class AppNode extends HtmlResize.view {
|
|||
props.model.properties.stepName = props.model.properties.stepName + (filterNodes.length - 1)
|
||||
}
|
||||
}
|
||||
if (props.model.properties?.fields?.length > 0) {
|
||||
props.model.properties.fields.map((item: any) => {
|
||||
item['globeLabel'] = `{{${props.model.properties.stepName}.${item.value}}}`
|
||||
item['globeValue'] = `{{context['${props.model.id}'].${item.value}}}`
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
getAnchorShape(anchorData: any) {
|
||||
|
|
@ -140,7 +134,7 @@ class AppNodeModel extends HtmlResize.model {
|
|||
getControlPointStyle() {
|
||||
const style = super.getControlPointStyle()
|
||||
style.stroke = 'none'
|
||||
style.fill= 'none'
|
||||
style.fill = 'none'
|
||||
return style
|
||||
}
|
||||
getNodeStyle() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue