<template>
	<div class="hengxl">
		<div class="toubu">{{$t('route.biaoti')}}</div>
		<div style="display: flex;align-items: center;">
			<div style="display: flex;align-items: center;font-size: 13px;justify-content: space-between; margin-right: 20px;">
				<div style="margin-right: 20px;">{{$t('loding.lang')}}</div>
				<i18n-select></i18n-select>
			</div>
			<div @click="tuichudenglu">{{$t('route.degnlu')}}</div>
		</div>
	</div>
</template>

<script>
	import i18nSelect from "./i18n.vue"
	export default{
		components: { i18nSelect },
		name:"Header",
		methods:{
			tuichudenglu(){
				this.$confirm(this.$t('route.qttuicu'), this.$t('route.tishi'), {
				  confirmButtonText:this.$t('route.tued'),
				  cancelButtonText: this.$t('route.quxiao'),
				  type: 'warning'
				}).then(() => {
					localStorage.removeItem('token');
					localStorage.removeItem('user');
					this.$router.push('/');
				}).catch(() => {
       
				});
			}
		}
	}
</script>

<style>
	.toubu{
		font-size: 15px;
		font-weight: 600;
	}
	.hengxl{
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding-left: 20px;
	}
</style>