2023-09-15 09:40:35 +00:00
|
|
|
<template>
|
2023-10-12 08:36:16 +00:00
|
|
|
<div class="login-warp flex-center">
|
|
|
|
|
<div class="login-container w-full h-full">
|
|
|
|
|
<el-row class="container w-full h-full">
|
|
|
|
|
<el-col
|
2023-12-12 03:32:45 +00:00
|
|
|
:xs="0"
|
|
|
|
|
:sm="0"
|
|
|
|
|
:md="10"
|
|
|
|
|
:lg="10"
|
|
|
|
|
:xl="10"
|
2023-10-12 08:36:16 +00:00
|
|
|
class="left-container"
|
|
|
|
|
v-if="screenWidth && screenWidth >= 990"
|
|
|
|
|
>
|
|
|
|
|
<div class="login-image"></div>
|
|
|
|
|
</el-col>
|
2023-12-12 03:32:45 +00:00
|
|
|
<el-col :xs="24" :sm="24" :md="14" :lg="14" :xl="14" class="right-container flex-center">
|
2023-10-12 08:36:16 +00:00
|
|
|
<slot></slot>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
2023-09-15 09:40:35 +00:00
|
|
|
</div>
|
2023-10-12 08:36:16 +00:00
|
|
|
</div>
|
2023-09-15 09:40:35 +00:00
|
|
|
</template>
|
|
|
|
|
<script setup lang="ts">
|
2023-10-12 08:36:16 +00:00
|
|
|
import { ref, onMounted } from 'vue'
|
|
|
|
|
import type { Ref } from 'vue'
|
|
|
|
|
defineOptions({ name: 'LoginLayout' })
|
|
|
|
|
const screenWidth: Ref<number | null> = ref(null)
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
screenWidth.value = document.body.clientWidth
|
|
|
|
|
window.onresize = () => {
|
|
|
|
|
return (() => {
|
|
|
|
|
screenWidth.value = document.body.clientWidth
|
|
|
|
|
})()
|
|
|
|
|
}
|
|
|
|
|
})
|
2023-09-15 09:40:35 +00:00
|
|
|
</script>
|
|
|
|
|
<style lang="scss" scope>
|
|
|
|
|
.login-warp {
|
2023-10-12 08:36:16 +00:00
|
|
|
height: 100vh;
|
2023-09-15 09:40:35 +00:00
|
|
|
|
2023-10-12 08:36:16 +00:00
|
|
|
.login-image {
|
|
|
|
|
background: url(@/assets/login.png) no-repeat;
|
|
|
|
|
background-size: 100% 100%;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
}
|
2023-09-15 09:40:35 +00:00
|
|
|
}
|
|
|
|
|
</style>
|