2025-05-30 15:21:20 +00:00
|
|
|
<script setup>
|
|
|
|
import { computed } from 'vue'
|
|
|
|
import { useWindowSize } from '@vueuse/core'
|
|
|
|
|
2025-05-30 15:45:58 +00:00
|
|
|
import size375 from '@/components/customEcharts/size375Echarts/index.vue'
|
|
|
|
import size768 from '@/components/customEcharts/size375Echarts/index.vue'
|
|
|
|
import size1440 from '@/components/customEcharts/size1920Echarts/index.vue'
|
|
|
|
import size1920 from '@/components/customEcharts/size1920Echarts/index.vue'
|
2025-05-30 15:21:20 +00:00
|
|
|
import { useRouter } from 'vue-router'
|
|
|
|
import { useI18n } from 'vue-i18n'
|
|
|
|
|
|
|
|
const router = useRouter()
|
|
|
|
const { width } = useWindowSize()
|
|
|
|
const { t } = useI18n()
|
|
|
|
|
|
|
|
const viewComponent = computed(() => {
|
|
|
|
const viewWidth = width.value
|
|
|
|
if (viewWidth <= 500) {
|
|
|
|
return size375
|
|
|
|
} else if (viewWidth <= 960) {
|
|
|
|
return size768
|
|
|
|
} else if (viewWidth <= 1500) {
|
|
|
|
return size1440
|
|
|
|
} else if (viewWidth <= 1920 || viewWidth > 1920) {
|
|
|
|
return size1920
|
|
|
|
}
|
|
|
|
})
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<component :is="viewComponent" />
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<style scoped lang="scss"></style>
|