opt: 请求方式采用固定下拉框

This commit is contained in:
2026-02-04 16:19:33 +08:00
parent c271bce942
commit 898d67422c
2 changed files with 23 additions and 3 deletions

View File

@@ -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) => {

View File

@@ -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>