AnalysisSystemForRadionucli.../src/App.vue

48 lines
1.1 KiB
Vue
Raw Normal View History

2023-05-06 15:58:45 +08:00
<template>
<a-config-provider :locale="locale">
<div id="app">
<router-view/>
</div>
<template #renderEmpty>
<custom-empty></custom-empty>
</template>
2023-05-06 15:58:45 +08:00
</a-config-provider>
</template>
<script>
2023-05-17 20:10:10 +08:00
// import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN'
import en_GB from 'ant-design-vue/lib/locale-provider/en_GB'
2023-05-06 15:58:45 +08:00
import enquireScreen from '@/utils/device'
export default {
data () {
return {
2023-05-17 20:10:10 +08:00
locale: en_GB,
2023-05-06 15:58:45 +08:00
}
},
created () {
let that = this
enquireScreen(deviceType => {
// tablet
if (deviceType === 0) {
that.$store.commit('TOGGLE_DEVICE', 'mobile')
that.$store.dispatch('setSidebar', false)
}
// mobile
else if (deviceType === 1) {
that.$store.commit('TOGGLE_DEVICE', 'mobile')
that.$store.dispatch('setSidebar', false)
}
else {
that.$store.commit('TOGGLE_DEVICE', 'desktop')
that.$store.dispatch('setSidebar', true)
}
})
}
}
</script>
<style>
#app {
height: 100%;
}
</style>