* Add array type for params type.

This commit is contained in:
zhujinyong
2021-11-22 09:55:20 +08:00
parent da9dee64bc
commit 0d7c8a5e2d
3 changed files with 5 additions and 12 deletions
+1 -1
View File
@@ -250,7 +250,7 @@ try {
<input type="text" :placeholder="langDesc" autocomplete="off" class="form-control" v-model="value.desc">
</td>
<td>
<button class="btn btn-link" type="button" @click="addSub" v-if="value.structType != 'formData' && value.paramsType == 'object'">${addSubField}</button>
<button class="btn btn-link" type="button" @click="addSub" v-if="value.structType != 'formData' && ['object', 'array'].indexOf(value.paramsType) != -1">${addSubField}</button>
<button class="btn btn-link" type="button" @click="add">${structAdd}</button>
<button class="btn btn-link" type="button" @click="del">${structDelete}</button>
</td>
+1
View File
@@ -176,6 +176,7 @@ $lang->api->paramsScopeOptions = array(
/* Api global common params */
$lang->api->paramsTypeOptions = array(
'object' => 'object',
'array' => 'array',
'string' => 'string',
'date' => 'date',
'datetime' => 'datetime',
+3 -11
View File
@@ -88,17 +88,11 @@ js::set('api', $api);
</tr>
<tr>
<th><?php echo $lang->api->method;?></th>
<td>
<span
id='moduleBox'><?php echo html::select('method', $lang->api->methodOptions, $api->method ? $api->method : 'GET', "class='form-control chosen'");?></span>
</td>
<td><span id='moduleBox'><?php echo html::select('method', $lang->api->methodOptions, $api->method ? $api->method : 'GET', "class='form-control chosen'");?></span></td>
</tr>
<tr>
<th><?php echo $lang->api->requestType;?></th>
<td>
<span
id='moduleBox'><?php echo html::select('requestType', $lang->api->requestTypeOptions, $api->requestType ? $api->requestType : 'application/json', "class='form-control chosen'");?></span>
</td>
<td><span id='moduleBox'><?php echo html::select('requestType', $lang->api->requestTypeOptions, $api->requestType ? $api->requestType : 'application/json', "class='form-control chosen'");?></span></td>
</tr>
<tr>
<th><?php echo $lang->api->status;?></th>
@@ -168,9 +162,7 @@ js::set('api', $api);
</td>
<td class="w-50px">
<div class="checkbox">
<label>
<input type="checkbox" v-model="item.required">
</label>
<label><input type="checkbox" v-model="item.required"></label>
</div>
</td>
<td class="w-500px">