<template>
	<view class="">
		<view class="order-pay-z" v-if="show_change_moshi" @tap="hide_change_moshi"></view>
		<view class="tika" v-if="show_change_moshi" :style="{height: (show_empty ? '110px' : '60px')}">
			<view class="tika-content">
				<view class="uni-list">
					<view class="uni-list-cell uni-list-cell-pd" v-if="show_empty">
						<view class="uni-list-cell-db">清除答题记录</view>
						<view class="qkbutton" @tap="emptyLog">清空</view>
					</view>
					<view class="uni-list-cell uni-list-cell-pd">
						<view class="uni-list-cell-db">夜间模式</view>
						<switch color="#3c7bfc" :checked="if_theme_dark" @change="set_if_theme_dark" />
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			show_change_moshi: {
				type: Boolean,
				default: false
			},
			if_theme_dark: {
				type: Boolean,
				default: false
			},
			show_empty: {
				type: Boolean,
				default: false
			}
		},
		data() {
			return {

			}
		},
		methods: {
			// 设置是否黑夜模式
			set_if_theme_dark(e) {
				// if_theme_dark
				let if_theme_dark = e.target.value
				this.$emit('set_if_theme_dark', if_theme_dark)
			},
			hide_change_moshi() {
				this.$emit('hide_change_moshi')
			},
			emptyLog() {
				this.$emit('emptyLog')
			},
		}
	}
</script>

<style>
</style>