请求条件支持参数匹配

This commit is contained in:
刘祥超
2021-06-09 17:14:31 +08:00
parent dda1e3054a
commit 33f45dfc92
10 changed files with 349 additions and 22 deletions

View File

@@ -15,14 +15,19 @@
{$ end}
</td>
</tr>
<tr>
<tr v-if="condType != 'params'">
<td>{{paramsTitle}}</td>
<td>
{$ range .components}
<{$ .Component} v-if="condType == '{$ .Type}'" :v-cond="cond"></{$ .Component}>
{$if not (eq .Type "params") }
<{$ .Component} v-if="condType == '{$ .Type}'" :v-cond="cond"></{$ .Component}>
{$end}
{$ end}
</td>
</tr>
<!-- 变量相关 -->
<tbody is="http-cond-params" :v-cond="cond" v-if="condType == 'params'"></tbody>
</table>
<submit-btn>确定</submit-btn>
</form>

View File

@@ -11,8 +11,8 @@
<div v-if="group.conds.length > 0">
<var v-for="(cond, index) in group.conds" style="font-style: normal;display: inline-block; margin-bottom:0.5em">
<span class="ui label small">
<var v-if="cond.type.length == 0" style="font-style: normal">{{cond.param}} <var>{{cond.operator}}</var></var>
<var v-if="cond.type.length > 0" style="font-style: normal">{{typeName(cond)}}: </var>
<var v-if="cond.type.length == 0 || cond.type == 'params'" style="font-style: normal">{{cond.param}} <var>{{cond.operator}}</var></var>
<var v-if="cond.type.length > 0 && cond.type != 'params'" style="font-style: normal">{{typeName(cond)}}: </var>
{{cond.value}}
<a href="" title="修改" @click.prevent="updateCond(index, cond)"><i class="icon pencil small"></i></a> <a href="" title="删除" @click.prevent="removeCond(index)"><i class="icon remove"></i></a> </span>
<var v-if="index < group.conds.length - 1"> {{group.connector}} &nbsp;</var>