Skip to content

Commit 1522e6c

Browse files
committed
feat/model-driven
1 parent 6b3c6d6 commit 1522e6c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

packages/configurator/src/model-api-configurator/ModelApiConfigurator.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ const activeNames = ref(['request', 'response'])
136136
const ruleFormRef = ref(null)
137137
const methodBasicData = reactive({
138138
url: '',
139-
method: '',
139+
method: 'post',
140140
options: [
141141
{
142142
label: 'GET',
@@ -174,6 +174,7 @@ const closePopover = () => {
174174
175175
const getModel = (data) => {
176176
selectedModel.value = data
177+
methodBasicData.method = 'post'
177178
}
178179
179180
const setModelFunction = async () => {
@@ -185,7 +186,6 @@ const setModelFunction = async () => {
185186
position: 'top-right'
186187
})
187188
} else {
188-
methodBasicData.url = `${selectedModel.value.baseUrl}/${selectedFunction.value.nameEn}`
189189
modelValue.value.push({
190190
modelName: selectedModel.value.nameCn,
191191
url: methodBasicData.url,
@@ -207,6 +207,7 @@ const removeApi = (apiItem) => {
207207
208208
const selectModelFunction = (data) => {
209209
selectedFunction.value = data.row
210+
methodBasicData.url = `${selectedModel.value.baseUrl}/${selectedFunction.value.nameEn}`
210211
}
211212
</script>
212213

0 commit comments

Comments
 (0)