多处增加是否独立配置选项

This commit is contained in:
刘祥超
2020-09-23 18:43:38 +08:00
parent 6d6fb22d78
commit 94cdd7abb8
50 changed files with 615 additions and 267 deletions

View File

@@ -1,5 +1,5 @@
Vue.component("http-gzip-box", {
props: ["v-gzip-config"],
props: ["v-gzip-config", "v-gzip-ref", "v-is-location"],
data: function () {
let gzip = this.vGzipConfig
if (gzip == null) {
@@ -16,31 +16,35 @@ Vue.component("http-gzip-box", {
}
},
template: `<div>
<input type="hidden" name="gzipRefJSON" :value="JSON.stringify(vGzipRef)"/>
<table class="ui table selectable definition">
<tr>
<td class="title">压缩级别</td>
<td>
<select class="dropdown auto-width" name="level" v-model="gzip.level">
<option value="0">不压缩</option>
<option v-for="i in 9" :value="i">{{i}}</option>
</select>
<p class="comment">级别越高,压缩比例越大。</p>
</td>
</tr>
<tr>
<td>Gzip内容最小长度</td>
<td>
<size-capacity-box :v-name="'minLength'" :v-value="gzip.minLength" :v-unit="'kb'"></size-capacity-box>
<p class="comment">0表示不限制内容长度从文件尺寸或Content-Length中获取。</p>
</td>
</tr>
<tr>
<td>Gzip内容最大长度</td>
<td>
<size-capacity-box :v-name="'maxLength'" :v-value="gzip.maxLength" :v-unit="'mb'"></size-capacity-box>
<p class="comment">0表示不限制内容长度从文件尺寸或Content-Length中获取。</p>
</td>
</tr>
<prior-checkbox :v-config="vGzipRef" v-if="vIsLocation"></prior-checkbox>
<tbody v-show="!vIsLocation || vGzipRef.isPrior">
<tr>
<td class="title">压缩级别</td>
<td>
<select class="dropdown auto-width" name="level" v-model="gzip.level">
<option value="0">不压缩</option>
<option v-for="i in 9" :value="i">{{i}}</option>
</select>
<p class="comment">级别越高,压缩比例越大。</p>
</td>
</tr>
<tr>
<td>Gzip内容最小长度</td>
<td>
<size-capacity-box :v-name="'minLength'" :v-value="gzip.minLength" :v-unit="'kb'"></size-capacity-box>
<p class="comment">0表示不限制内容长度从文件尺寸或Content-Length中获取。</p>
</td>
</tr>
<tr>
<td>Gzip内容最大长度</td>
<td>
<size-capacity-box :v-name="'maxLength'" :v-value="gzip.maxLength" :v-unit="'mb'"></size-capacity-box>
<p class="comment">0表示不限制内容长度从文件尺寸或Content-Length中获取。</p>
</td>
</tr>
</tbody>
</table>
</div>`
})