"实现主题配置和作品集上传功能的优化"
parent
c753fb96fc
commit
2f615b36c1
@ -1 +1 @@
|
||||
export const sizes = [ {minWidth:'0px',maxWidth:'768px'}, {minWidth:'768px',maxWidth:'1440px'}, {minWidth:'1440px',maxWidth: '1920px'}, {minWidth:'1920px'}]
|
||||
export const sizes = [ {minWidth:'0px',maxWidth:'768px'}, {minWidth:'0px',maxWidth:'768px'}, {minWidth:'768px',maxWidth:'1440px'}, {minWidth:'1440px',maxWidth: '1920px'}, {minWidth:'1920px'}]
|
||||
|
@ -1,42 +1,30 @@
|
||||
<script setup>
|
||||
import {useAuth} from "@/store/auth/index.js";
|
||||
|
||||
import {useAdaptation} from "@/utils/self-adaption.js";
|
||||
import {sizes} from "@/dict/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'
|
||||
import {computed} from "vue";
|
||||
import { computed } from 'vue';
|
||||
import { useWindowSize } from '@vueuse/core';
|
||||
const {clickSendCode}= useAuth()
|
||||
const { width, height } = useWindowSize()
|
||||
const isLandscape = computed(() => width.value > height.value)
|
||||
const {currentRange }= useAdaptation(sizes)
|
||||
localStorage.clear()
|
||||
console.log('执行1111')
|
||||
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(() => {
|
||||
switch (currentRange.value?.minWidth){
|
||||
case '0px':
|
||||
return size375
|
||||
case '768px':
|
||||
// 如果是ipad 横屏
|
||||
if (isLandscape.value){
|
||||
return size1440
|
||||
}
|
||||
return size768
|
||||
case '1440px':
|
||||
return size1440
|
||||
case '1920px':
|
||||
return size1920
|
||||
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;
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<component @sendCode="clickSendCode" :is="viewComponent"></component>
|
||||
<component @sendCode="clickSendCode" :is="viewComponent" />
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue