App.vue 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <template>
  2. <AdaptiveContainer :options="{ width: width, height: height }" style="overflow-y: hidden">
  3. <ConfigProvider :locale="getAntdLocale" prefixCls="zxm">
  4. <AppProvider>
  5. <RouterView />
  6. </AppProvider>
  7. </ConfigProvider>
  8. </AdaptiveContainer>
  9. </template>
  10. <script lang="ts" setup>
  11. import { ref } from 'vue';
  12. import { ConfigProvider } from 'ant-design-vue';
  13. import { AppProvider } from '/@/components/Application';
  14. import { useTitle } from '/@/hooks/web/useTitle';
  15. import { useLocale } from '/@/locales/useLocale';
  16. import AdaptiveContainer from '/@/components/Container/src/Adaptive.vue';
  17. // 解决日期时间国际化问题
  18. import 'dayjs/locale/zh-cn';
  19. // support Multi-language
  20. const { getAntdLocale } = useLocale();
  21. const width = ref(1920);
  22. const height = ref(929);
  23. const body = document.body.getBoundingClientRect();
  24. if (screen.height === body.height && screen.width === body.width) {
  25. height.value = 1080;
  26. }
  27. useTitle();
  28. </script>
  29. <style lang="less" scoped>
  30. #app {
  31. overflow: hidden;
  32. }
  33. @font-face {
  34. font-family: 'douyuFont';
  35. src: url('/@/assets/font/douyuFont.otf');
  36. font-weight: normal;
  37. font-style: normal;
  38. }
  39. @font-face {
  40. font-family: 'numberFont';
  41. src: url('/@/assets/font/yjsz.TTF');
  42. font-weight: normal;
  43. font-style: normal;
  44. }
  45. @font-face {
  46. font-family: 'electronicFont';
  47. src: url('/@/assets/font/DS-DIGIT.TTF');
  48. font-weight: normal;
  49. font-style: normal;
  50. }
  51. </style>