bugfix
This commit is contained in:
@@ -27,11 +27,20 @@ const selectedFunction = () => {
|
||||
|
||||
}
|
||||
if (selectOption(selectedOption.value) === 'Remove Param') {
|
||||
const currentIndex = options.value.indexOf(selectedOption.value)
|
||||
options.value.splice(currentIndex, 1);
|
||||
selectedOption.value= options.value[0].name
|
||||
valueInput.value = ""
|
||||
nameInput.value = ""
|
||||
const foundOption = options.value.find(option => option.name === selectedOption.value);
|
||||
if (foundOption) {
|
||||
const currentIndex = options.value.indexOf(foundOption);
|
||||
if (currentIndex !== -1) {
|
||||
options.value.splice(currentIndex, 1);
|
||||
}
|
||||
}
|
||||
if (options.value.length > 0) {
|
||||
selectedOption.value = options.value[0].name;
|
||||
} else {
|
||||
selectedOption.value = "";
|
||||
}
|
||||
valueInput.value = "";
|
||||
nameInput.value = "";
|
||||
}
|
||||
sendToParent()
|
||||
/*
|
||||
|
||||
@@ -63,7 +63,7 @@ function readFile(file: any) {
|
||||
const handleUpdateValue = (options: { name: string }[]) => {
|
||||
console.log("from parent" +options.length)
|
||||
params.value = options
|
||||
updateParams(params)
|
||||
updateParams(params.value)
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
@@ -127,10 +127,10 @@ function selectRequestBodyType() : string {
|
||||
return prepareRequestBodySingleXml(props.xml!);
|
||||
}
|
||||
function formatParams() {
|
||||
return props.params.map(param => {
|
||||
return props.params?.slice(1).map(param => {
|
||||
const [key, value] = param.name.split(" = ");
|
||||
return {key, value};
|
||||
});
|
||||
return { key, value };
|
||||
}) ?? [];
|
||||
}
|
||||
|
||||
function prepareRequestBodySingleXml(data: string):string {
|
||||
|
||||
Reference in New Issue
Block a user