* Adjust code for Api doc.

This commit is contained in:
zhujinyong
2021-10-19 11:00:55 +08:00
parent e667a33996
commit 4bb27b624e
13 changed files with 91 additions and 140 deletions
+3 -13
View File
@@ -136,12 +136,7 @@
</tr>
</thead>
<tbody>
<?php
foreach($api->params['params'] as $item)
{
echo parseTree($item);
}
?>
<?php foreach($api->params['params'] as $item) echo parseTree($item);?>
</tbody>
</table>
<?php endif;?>
@@ -151,7 +146,7 @@
<?php endif;?>
<?php if($api->response):?>
<h3 class="title"><?php echo $lang->api->response;?></h3>
<table class="table">
<table class="table table-data">
<thead>
<tr>
<th><?php echo $lang->api->req->name;?></th>
@@ -161,12 +156,7 @@
</tr>
</thead>
<tbody>
<?php
foreach($api->response as $item)
{
echo parseTree($item);
}
?>
<?php foreach($api->response as $item) echo parseTree($item);?>
</tbody>
</table>
<?php endif;?>
+8 -8
View File
@@ -121,8 +121,8 @@ js::set('struct_paramsType', $lang->struct->paramsType);
<thead>
<tr>
<th class="w-300px"><?php echo $lang->struct->field;?></th>
<th class="w-80px"><?php echo $lang->struct->required;?></th>
<th class="w-300px"><?php echo $lang->struct->desc;?></th>
<th class="w-50px"><?php echo $lang->struct->required;?></th>
<th class="w-500px"><?php echo $lang->struct->desc;?></th>
<th><?php echo $lang->struct->action;?></th>
</tr>
</thead>
@@ -131,14 +131,14 @@ js::set('struct_paramsType', $lang->struct->paramsType);
<td class="w-300px">
<input type="text" placeholder="<?php echo $lang->struct->field;?>" autocomplete="off" class="form-control" v-model="item.field">
</td>
<td class="w-80px">
<td class="w-50px">
<div class="checkbox">
<label>
<input type="checkbox" v-model="item.required">
</label>
</div>
</td>
<td class="w-300px">
<td class="w-500px">
<input type="text" placeholder="<?php echo $lang->struct->desc;?>" autocomplete="off" class="form-control" v-model="item.desc">
</td>
<td>
@@ -156,8 +156,8 @@ js::set('struct_paramsType', $lang->struct->paramsType);
<thead>
<tr>
<th class="w-300px"><?php echo $lang->struct->field;?></th>
<th class="w-80px"><?php echo $lang->struct->required;?></th>
<th class="w-300px"><?php echo $lang->struct->desc;?></th>
<th class="w-50px"><?php echo $lang->struct->required;?></th>
<th class="w-500px"><?php echo $lang->struct->desc;?></th>
<th><?php echo $lang->struct->action;?></th>
</tr>
</thead>
@@ -166,14 +166,14 @@ js::set('struct_paramsType', $lang->struct->paramsType);
<td class="w-300px">
<input type="text" placeholder="<?php echo $lang->struct->field;?>" autocomplete="off" class="form-control" v-model="item.field">
</td>
<td class="w-80px">
<td class="w-50px">
<div class="checkbox">
<label>
<input type="checkbox" v-model="item.required">
</label>
</div>
</td>
<td class="w-300px">
<td class="w-500px">
<input type="text" placeholder="<?php echo $lang->struct->desc;?>" autocomplete="off" class="form-control" v-model="item.desc">
</td>
<td>
+10 -11
View File
@@ -122,8 +122,8 @@ js::set('api', $api);
<thead>
<tr>
<th class="w-300px"><?php echo $lang->struct->field;?></th>
<th class="w-80px"><?php echo $lang->struct->required;?></th>
<th class="w-200px"><?php echo $lang->struct->desc;?></th>
<th class="w-50px"><?php echo $lang->struct->required;?></th>
<th class="w-500px"><?php echo $lang->struct->desc;?></th>
<th><?php echo $lang->struct->action;?></th>
</tr>
</thead>
@@ -132,14 +132,14 @@ js::set('api', $api);
<td class="w-300px">
<input type="text" placeholder="<?php echo $lang->struct->field;?>" autocomplete="off" class="form-control" v-model="item.field">
</td>
<td class="w-80px">
<td class="w-50px">
<div class="checkbox">
<label>
<input type="checkbox" v-model="item.required">
</label>
</div>
</td>
<td class="w-200px">
<td class="w-500px">
<input type="text" placeholder="<?php echo $lang->struct->desc;?>" autocomplete="off" class="form-control" v-model="item.desc">
</td>
<td>
@@ -157,8 +157,8 @@ js::set('api', $api);
<thead>
<tr>
<th class="w-300px"><?php echo $lang->struct->field;?></th>
<th class="w-80px"><?php echo $lang->struct->required;?></th>
<th class="w-200px"><?php echo $lang->struct->desc;?></th>
<th class="w-50px"><?php echo $lang->struct->required;?></th>
<th class="w-500px"><?php echo $lang->struct->desc;?></th>
<th><?php echo $lang->struct->action;?></th>
</tr>
</thead>
@@ -167,14 +167,14 @@ js::set('api', $api);
<td class="w-300px">
<input type="text" placeholder="<?php echo $lang->struct->field;?>" autocomplete="off" class="form-control" v-model="item.field">
</td>
<td class="w-80px">
<td class="w-50px">
<div class="checkbox">
<label>
<input type="checkbox" v-model="item.required">
</label>
</div>
</td>
<td class="w-200px">
<td class="w-500px">
<input type="text" placeholder="<?php echo $lang->struct->desc;?>" autocomplete="off" class="form-control" v-model="item.desc">
</td>
<td>
@@ -222,8 +222,7 @@ js::set('api', $api);
<tr id='contentBox'>
<th><?php echo $lang->api->desc; ?></th>
<td colspan='2'>
<div
class='contenthtml'><?php echo html::textarea('desc', $api->desc, "style='width:100%;height:200px'"); ?></div>
<div class='contenthtml'><?php echo html::textarea('desc', $api->desc, "style='width:100%;height:200px'"); ?></div>
</td>
</tr>
<tr>
@@ -239,4 +238,4 @@ js::set('api', $api);
</div>
</div>
<?php js::set('noticeAcl', $lang->noticeAcl); ?>
<?php include '../../common/view/footer.html.php'; ?>
<?php include '../../common/view/footer.html.php'; ?>