优化代码

This commit is contained in:
刘祥超
2022-09-25 10:33:10 +08:00
parent ac11ab0431
commit 7bbe44f5d2
6 changed files with 24 additions and 7 deletions

View File

@@ -42,7 +42,7 @@ Vue.component("http-cache-refs-box", {
<th class="width10">缓存时间</th>
</tr>
<tr v-for="(cacheRef, index) in refs">
<td :class="{'color-border': cacheRef.conds.connector == 'and', disabled: !cacheRef.isOn}" :style="{'border-left':cacheRef.isReverse ? '1px #db2828 solid' : ''}">
<td :class="{'color-border': cacheRef.conds != null && cacheRef.conds.connector == 'and', disabled: !cacheRef.isOn}" :style="{'border-left':cacheRef.isReverse ? '1px #db2828 solid' : ''}">
<http-request-conds-view :v-conds="cacheRef.conds" :class="{disabled: !cacheRef.isOn}" v-if="cacheRef.conds != null && cacheRef.conds.groups != null"></http-request-conds-view>
<http-request-cond-view :v-cond="cacheRef.simpleCond" v-if="cacheRef.simpleCond != null"></http-request-cond-view>
@@ -61,8 +61,11 @@ Vue.component("http-cache-refs-box", {
<grey-label v-if="cacheRef.enableIfModifiedSince">If-Modified-Since</grey-label>
</td>
<td :class="{disabled: !cacheRef.isOn}">
<span v-if="cacheRef.conds.connector == 'and'">和</span>
<span v-if="cacheRef.conds.connector == 'or'"></span>
<span v-if="cacheRef.conds != null">
<span v-if="cacheRef.conds.connector == 'and'"></span>
<span v-if="cacheRef.conds.connector == 'or'">或</span>
</span>
<span v-else>或</span>
</td>
<td :class="{disabled: !cacheRef.isOn}">
<span v-if="!cacheRef.isReverse">{{cacheRef.life.count}} {{timeUnitName(cacheRef.life.unit)}}</span>