32 lines
881 B
Vue
32 lines
881 B
Vue
<script setup>
|
|
import { computed } from 'vue';
|
|
import { useWindowSize } from '@vueuse/core';
|
|
import { useAuth } from '@/store/auth/index.js';
|
|
import size375 from '@/views/login/size375/index.vue';
|
|
import size768 from '@/views/login/size768/index.vue';
|
|
import size1440 from '@/views/login/size1440/index.vue';
|
|
import size1920 from '@/views/login/size1920/index.vue';
|
|
const { clickSendCode } = useAuth();
|
|
const { width } = useWindowSize();
|
|
const viewComponent = computed(() => {
|
|
const viewWidth = width.value;
|
|
if (viewWidth <= 450) {
|
|
return size375;
|
|
} else if (viewWidth <= 1100) {
|
|
return size768;
|
|
} else if (viewWidth <= 1500) {
|
|
return size1440;
|
|
} else if (viewWidth <= 1920) {
|
|
return size1920;
|
|
}
|
|
})
|
|
localStorage.clear()
|
|
</script>
|
|
|
|
<template>
|
|
<component @sendCode="clickSendCode" :is="viewComponent" />
|
|
</template>
|
|
|
|
<style scoped lang="scss">
|
|
</style>
|