mirror of
				https://github.com/TeaOSLab/EdgeAdmin.git
				synced 2025-11-04 13:10:26 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			41 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			41 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
Vue.component("ns-access-log-ref-box", {
 | 
						|
	props: ["v-access-log-ref", "v-is-parent"],
 | 
						|
	data: function () {
 | 
						|
		let config = this.vAccessLogRef
 | 
						|
		if (config == null) {
 | 
						|
			config = {
 | 
						|
				isOn: false,
 | 
						|
				isPrior: false,
 | 
						|
				logMissingDomains: false
 | 
						|
			}
 | 
						|
		}
 | 
						|
		if (typeof (config.logMissingDomains) == "undefined") {
 | 
						|
			config.logMissingDomains = false
 | 
						|
		}
 | 
						|
		return {
 | 
						|
			config: config
 | 
						|
		}
 | 
						|
	},
 | 
						|
	template: `<div>
 | 
						|
	<input type="hidden" name="accessLogJSON" :value="JSON.stringify(config)"/>
 | 
						|
	<table class="ui table definition selectable">
 | 
						|
		<prior-checkbox :v-config="config" v-if="!vIsParent"></prior-checkbox>
 | 
						|
		<tbody v-show="vIsParent || config.isPrior">
 | 
						|
			<tr>
 | 
						|
				<td class="title">启用</td>
 | 
						|
				<td>
 | 
						|
					<checkbox name="isOn" value="1" v-model="config.isOn"></checkbox>
 | 
						|
				</td>
 | 
						|
			</tr>
 | 
						|
			<tr>
 | 
						|
				<td>记录所有访问</td>
 | 
						|
				<td>
 | 
						|
					<checkbox name="logMissingDomains" value="1" v-model="config.logMissingDomains"></checkbox>
 | 
						|
					<p class="comment">包括对没有在系统里创建的域名访问。</p>
 | 
						|
				</td>
 | 
						|
			</tr>
 | 
						|
		</tbody>
 | 
						|
	</table>
 | 
						|
	<div class="margin"></div>
 | 
						|
</div>`
 | 
						|
}) |