mirror of
				https://github.com/TeaOSLab/EdgeAdmin.git
				synced 2025-11-04 13:10:26 +08:00 
			
		
		
		
	取消内容压缩中的级别设置
This commit is contained in:
		@@ -15,7 +15,7 @@ Vue.component("http-compression-config-box", {
 | 
				
			|||||||
				isOn: false,
 | 
									isOn: false,
 | 
				
			||||||
				useDefaultTypes: true,
 | 
									useDefaultTypes: true,
 | 
				
			||||||
				types: ["brotli", "gzip", "zstd", "deflate"],
 | 
									types: ["brotli", "gzip", "zstd", "deflate"],
 | 
				
			||||||
				level: 5,
 | 
									level: 3,
 | 
				
			||||||
				decompressData: false,
 | 
									decompressData: false,
 | 
				
			||||||
				gzipRef: null,
 | 
									gzipRef: null,
 | 
				
			||||||
				deflateRef: null,
 | 
									deflateRef: null,
 | 
				
			||||||
@@ -85,19 +85,6 @@ Vue.component("http-compression-config-box", {
 | 
				
			|||||||
			allTypes: configTypes
 | 
								allTypes: configTypes
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	watch: {
 | 
					 | 
				
			||||||
		"config.level": function (v) {
 | 
					 | 
				
			||||||
			let level = parseInt(v)
 | 
					 | 
				
			||||||
			if (isNaN(level)) {
 | 
					 | 
				
			||||||
				level = 1
 | 
					 | 
				
			||||||
			} else if (level < 1) {
 | 
					 | 
				
			||||||
				level = 1
 | 
					 | 
				
			||||||
			} else if (level > 10) {
 | 
					 | 
				
			||||||
				level = 10
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			this.config.level = level
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	},
 | 
					 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
		isOn: function () {
 | 
							isOn: function () {
 | 
				
			||||||
			return ((!this.vIsLocation && !this.vIsGroup) || this.config.isPrior) && this.config.isOn
 | 
								return ((!this.vIsLocation && !this.vIsGroup) || this.config.isPrior) && this.config.isOn
 | 
				
			||||||
@@ -173,15 +160,6 @@ Vue.component("http-compression-config-box", {
 | 
				
			|||||||
			</tr>
 | 
								</tr>
 | 
				
			||||||
		</tbody>
 | 
							</tbody>
 | 
				
			||||||
		<tbody v-show="isOn()">
 | 
							<tbody v-show="isOn()">
 | 
				
			||||||
			<tr>
 | 
					 | 
				
			||||||
				<td>压缩级别</td>
 | 
					 | 
				
			||||||
				<td>
 | 
					 | 
				
			||||||
					<select class="ui dropdown auto-width" v-model="config.level">
 | 
					 | 
				
			||||||
						<option v-for="i in 10" :value="i">{{i}}</option>	
 | 
					 | 
				
			||||||
					</select>
 | 
					 | 
				
			||||||
					<p class="comment">级别越高,压缩比例越大。</p>
 | 
					 | 
				
			||||||
				</td>
 | 
					 | 
				
			||||||
			</tr>
 | 
					 | 
				
			||||||
			<tr>
 | 
								<tr>
 | 
				
			||||||
				<td>支持的扩展名</td>
 | 
									<td>支持的扩展名</td>
 | 
				
			||||||
				<td>
 | 
									<td>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user