mirror of
				https://github.com/TeaOSLab/EdgeAdmin.git
				synced 2025-11-04 13:10:26 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			25 lines
		
	
	
		
			563 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			563 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
Vue.component("prior-checkbox", {
 | 
						|
	props: ["v-config"],
 | 
						|
	data: function () {
 | 
						|
		return {
 | 
						|
			isPrior: this.vConfig.isPrior
 | 
						|
		}
 | 
						|
	},
 | 
						|
	watch: {
 | 
						|
		isPrior: function (v) {
 | 
						|
			this.vConfig.isPrior = v
 | 
						|
		}
 | 
						|
	},
 | 
						|
	template: `<tbody>
 | 
						|
	<tr :class="{active:isPrior}">
 | 
						|
		<td class="title">打开独立配置</td>
 | 
						|
		<td>
 | 
						|
			<div class="ui toggle checkbox">
 | 
						|
				<input type="checkbox" v-model="isPrior"/>
 | 
						|
				<label class="red"></label>
 | 
						|
			</div>
 | 
						|
			<p class="comment"><strong v-if="isPrior">[已打开]</strong> 打开后可以覆盖父级配置。</p>
 | 
						|
		</td>
 | 
						|
	</tr>
 | 
						|
</tbody>`
 | 
						|
}) |