diff --git a/src/components/Upload/index.vue b/src/components/Upload/index.vue index 32e10ec6c0142fd5fd6b4e556f93cacddb3efac2..41f12c1193580b21a55e303563af202fb9887f94 100644 --- a/src/components/Upload/index.vue +++ b/src/components/Upload/index.vue @@ -81,6 +81,7 @@ const uploadtype = ref(props.type); const getServiceYaml = ref(''); const yamlToJsonContent = ref(''); const getServiceJson = ref(''); +const activeServiceName = ref(''); const imageUrl = ref(''); const progressVal = ref(0); const uploadDone = ref(false); @@ -181,6 +182,10 @@ watch( () => { getServiceJson.value = props.getServiceJson; getServiceYaml.value = props.getServiceYaml; + console.log(props, 'props---result') + if (getServiceJson.value?.length) { + activeServiceName.value = getServiceJson.value?.[0]?.name; + } if (props.type === 'edit' && props) { getServiceYamlFun(props.serviceId); } @@ -251,7 +256,7 @@ watch( />