<template>
	<div class="error">
		<div class="error-flex">
			<img :src="imgUrl()" alt="" style="width: 400px" srcset="" />
			<div class="left-item-title">{{ $t('message.notFound.notFoundTitle') }}</div>
			<div class="left-item-animation left-item-btn">
				<el-button type="primary" round @click="onGoHome">{{ $t('message.notFound.foundBtn') }}</el-button>
			</div>
		</div>
	</div>
</template>

<script lang="ts">
import { useRouter } from 'vue-router';
import noQxUrl from '/@/assets/imgs/noQuanXian.png';
export default {
	name: '404',
	setup() {
		const router = useRouter();
		const onGoHome = () => {
			router.push('/');
		};

		const imgUrl = () => {
			return noQxUrl;
		};
		return {
			onGoHome,
			imgUrl,
		};
	},
};
</script>

<style scoped lang="scss">
.error {
	// height: 100%;
	// background-color: var(--el-color-white);
	display: flex;
	.error-flex {
		margin: auto;
		display: flex;
		// height: 350px;
		width: 900px;
		flex-direction: column;
		align-items: center;
		.left-item-title {
			font-size: 20px;
			color: var(--el-text-color-primary);
			margin: 15px 0 5px 0;
			animation-delay: 0.1s;
			margin-bottom: 20px;
		}
		.left {
			flex: 1;
			height: 100%;
			align-items: center;
			display: flex;
			.left-item {
				.left-item-animation {
					opacity: 0;
					animation-name: error-num;
					animation-duration: 0.5s;
					animation-fill-mode: forwards;
				}
				.left-item-num {
					color: var(--el-color-info);
					font-size: 55px;
				}

				.left-item-msg {
					color: var(--el-text-color-secondary);
					font-size: 12px;
					margin-bottom: 30px;
					animation-delay: 0.2s;
				}
				.left-item-btn {
					animation-delay: 0.2s;
				}
			}
		}
		.right {
			flex: 1;
			opacity: 0;
			animation-name: error-img;
			animation-duration: 2s;
			animation-fill-mode: forwards;
			img {
				width: 100%;
				height: 100%;
			}
		}
	}
}
</style>
