优化缓存条件设置,支持不缓存条件设置,支持条件排序等

This commit is contained in:
GoEdgeLab
2021-06-08 22:46:08 +08:00
parent 294ac2d2a2
commit e8603c8742
17 changed files with 319 additions and 115 deletions

View File

@@ -1,3 +1,4 @@
// 缓存条件列表
Vue.component("http-cache-refs-box", {
props: ["v-cache-refs"],
data: function () {
@@ -36,15 +37,23 @@ Vue.component("http-cache-refs-box", {
<table class="ui table selectable celled">
<thead>
<tr>
<th>缓存条件</th>
<th>条件</th>
<th class="two">分组关系</th>
<th class="width10">缓存时间</th>
<th class="two op">操作</th>
</tr>
<tr v-for="(cacheRef, index) in refs">
<td>
<td :class="{'color-border': cacheRef.conds.connector == 'and'}" :style="{'border-left':cacheRef.isReverse ? '1px #db2828 solid' : ''}">
<http-request-conds-view :v-conds="cacheRef.conds"></http-request-conds-view>
</td>
<td>{{cacheRef.life.count}} {{timeUnitName(cacheRef.life.unit)}}</td>
<td>
<span v-if="cacheRef.conds.connector == 'and'">和</span>
<span v-if="cacheRef.conds.connector == 'or'">或</span>
</td>
<td>
<span v-if="!cacheRef.isReverse">{{cacheRef.life.count}} {{timeUnitName(cacheRef.life.unit)}}</span>
<span v-else class="red">不缓存</span>
</td>
<td>
<a href="" @click.prevent="updateRef(index, cacheRef)">修改</a> &nbsp;
<a href="" @click.prevent="removeRef(index)">删除</a>