opt: 请求方式采用固定下拉框
This commit is contained in:
@@ -15,10 +15,11 @@
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="请求方法" name="apiMethod">
|
||||
<a-input
|
||||
<a-select
|
||||
v-model:value="formData.apiMethod"
|
||||
placeholder="请输入请求方法:GET, POST, PUT, DELETE"
|
||||
placeholder="请选择请求方法"
|
||||
allow-clear
|
||||
:options="apiMethodOptions"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -86,6 +87,13 @@
|
||||
const submitLoading = ref(false)
|
||||
const isEnabledOptions = ref([])
|
||||
const jsonError = ref('')
|
||||
// HTTP请求方法选项
|
||||
const apiMethodOptions = [
|
||||
{ label: 'GET', value: 'GET' },
|
||||
{ label: 'POST', value: 'POST' },
|
||||
{ label: 'PUT', value: 'PUT' },
|
||||
{ label: 'DELETE', value: 'DELETE' }
|
||||
]
|
||||
|
||||
// 打开抽屉
|
||||
const onOpen = (record) => {
|
||||
|
||||
@@ -9,7 +9,12 @@
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-form-item label="请求方法" name="apiMethod">
|
||||
<a-input v-model:value="searchFormState.apiMethod" placeholder="请输入请求方法:GET, POST, PUT, DELETE" />
|
||||
<a-select
|
||||
v-model:value="searchFormState.apiMethod"
|
||||
placeholder="请选择请求方法"
|
||||
allow-clear
|
||||
:options="apiMethodOptions"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
@@ -160,5 +165,12 @@
|
||||
tableRef.value.clearRefreshSelected()
|
||||
})
|
||||
}
|
||||
// HTTP请求方法选项
|
||||
const apiMethodOptions = [
|
||||
{ label: 'GET', value: 'GET' },
|
||||
{ label: 'POST', value: 'POST' },
|
||||
{ label: 'PUT', value: 'PUT' },
|
||||
{ label: 'DELETE', value: 'DELETE' }
|
||||
]
|
||||
const isEnabledOptions = tool.dictList('IS_USED')
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user