2024-08-05 11:36:27 +00:00
|
|
|
<script setup>
|
2024-08-06 09:07:36 +00:00
|
|
|
import {useAdaptation} from "@/utils/self-adaption.js";
|
|
|
|
import {sizes} from "@/dict/index.js";
|
|
|
|
import size375 from '@/views/login/size375/index.vue'
|
2024-08-06 11:58:33 +00:00
|
|
|
import size768 from '@/views/login/size768/index.vue'
|
2024-08-07 03:51:02 +00:00
|
|
|
import size1440 from '@/views/login/size1440/index.vue'
|
|
|
|
import size1920 from '@/views/login/size1920/index.vue'
|
2024-08-06 09:07:36 +00:00
|
|
|
import {computed} from "vue";
|
2024-08-06 12:43:08 +00:00
|
|
|
const {currentRange }= useAdaptation([ {minWidth:'0px',maxWidth:'768px'}, {minWidth:'768px',maxWidth:'1440px'}, {minWidth:'1440px',maxWidth: '1920px'}, {minWidth:'1920px'}])
|
2024-08-06 09:07:36 +00:00
|
|
|
const viewComponent = computed(()=>{
|
2024-08-06 12:43:08 +00:00
|
|
|
switch (currentRange.value?.minWidth){
|
|
|
|
case '0px':
|
2024-08-06 09:07:36 +00:00
|
|
|
return size375
|
2024-08-06 11:58:33 +00:00
|
|
|
case '768px':
|
|
|
|
return size768
|
2024-08-07 03:51:02 +00:00
|
|
|
case '1440px':
|
|
|
|
return size1440
|
|
|
|
case '1920px':
|
|
|
|
return size1920
|
2024-08-06 09:07:36 +00:00
|
|
|
}
|
|
|
|
})
|
2024-08-05 11:36:27 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2024-08-06 12:43:08 +00:00
|
|
|
<component :is="viewComponent"></component>
|
2024-08-05 11:36:27 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
|
|
|
</style>
|