feat: http节点
This commit is contained in:
parent
e438d41afe
commit
39460cb74c
@ -102,6 +102,22 @@ const audioOptions = () => {
|
|||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const httpMethodOptions = () => {
|
||||||
|
return [{
|
||||||
|
value: 'POST',
|
||||||
|
label: 'POST'
|
||||||
|
}, {
|
||||||
|
value: 'GET',
|
||||||
|
label: 'GET'
|
||||||
|
}, {
|
||||||
|
value: 'PUT',
|
||||||
|
label: 'PUT'
|
||||||
|
}, {
|
||||||
|
value: 'DELETE',
|
||||||
|
label: 'DELETE'
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
|
||||||
const expressOptions = () => {
|
const expressOptions = () => {
|
||||||
return [{
|
return [{
|
||||||
value: 1,
|
value: 1,
|
||||||
@ -256,6 +272,23 @@ export const collapseList = [
|
|||||||
],
|
],
|
||||||
outputType: 'json'
|
outputType: 'json'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
icon: expressionSvg,
|
||||||
|
name: "HTTP请求",
|
||||||
|
type: "serviceNode",
|
||||||
|
desc: "HTTP请求",
|
||||||
|
action: 'HTTP',
|
||||||
|
nodeType: "HTTP",
|
||||||
|
nodeParams: [
|
||||||
|
{ name: "url", type: "input", input: "", disabled: true, required: true },
|
||||||
|
{ name: "method", type: "input", input: "POST", componentType: 'select', selectOptions: httpMethodOptions(), disabled: true },
|
||||||
|
{ name: "timeout", type: "input", input: "10000", componentType: 'number', required: false },
|
||||||
|
{ name: "headers", type: "input", input: "", disabled: true, required: false },
|
||||||
|
{ name: "body", type: "input", input: "", disabled: true, required: true },
|
||||||
|
],
|
||||||
|
outputType: 'json',
|
||||||
|
outputParams: [{ name: 'result', type: 'Object', children: [], desc: 'HTTP请求结果'}]
|
||||||
|
}
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -114,6 +114,7 @@
|
|||||||
:step-strictly="true"
|
:step-strictly="true"
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
clearable
|
clearable
|
||||||
|
@keydown="handleInputKeydown"
|
||||||
/>
|
/>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="property.input"
|
v-model="property.input"
|
||||||
|
|||||||
@ -36,7 +36,7 @@ export default defineConfig(({mode, command}) => {
|
|||||||
//赵 http://10.148.108.58:13080
|
//赵 http://10.148.108.58:13080
|
||||||
// dev http://10.148.20.34:13080
|
// dev http://10.148.20.34:13080
|
||||||
// target: VITE_API_URL,
|
// target: VITE_API_URL,
|
||||||
target: command === 'build' ? VITE_API_URL : 'http://192.168.0.21:13081',
|
target: command === 'build' ? VITE_API_URL : 'http://192.168.0.10:13080',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (p) => p.replace(/^\/dev-api/, '')
|
rewrite: (p) => p.replace(/^\/dev-api/, '')
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user