2020-09-28 20:19:10 +08:00
|
|
|
<template>
|
2020-11-18 22:41:59 +08:00
|
|
|
<ConfigProvider v-bind="lockEvent" :locale="zhCN" :transform-cell-text="transformCellText">
|
2020-09-28 20:19:10 +08:00
|
|
|
<router-view />
|
|
|
|
|
</ConfigProvider>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
|
import { defineComponent } from 'vue';
|
|
|
|
|
import { ConfigProvider } from 'ant-design-vue';
|
|
|
|
|
import { createBreakpointListen } from '/@/hooks/event/useBreakpoint';
|
|
|
|
|
|
|
|
|
|
import zhCN from 'ant-design-vue/es/locale/zh_CN';
|
|
|
|
|
import moment from 'moment';
|
2020-11-06 22:41:00 +08:00
|
|
|
import 'moment/dist/locale/zh-cn';
|
2020-09-28 20:19:10 +08:00
|
|
|
|
2020-11-18 22:52:13 +08:00
|
|
|
import { getConfigProvider, initAppConfigStore } from '/@/setup/App';
|
2020-09-28 20:19:10 +08:00
|
|
|
import { useLockPage } from '/@/hooks/web/useLockPage';
|
2020-10-15 21:12:38 +08:00
|
|
|
|
2020-09-28 20:19:10 +08:00
|
|
|
moment.locale('zh-cn');
|
2020-10-19 22:56:10 +08:00
|
|
|
|
2020-09-28 20:19:10 +08:00
|
|
|
export default defineComponent({
|
2020-10-28 23:00:03 +08:00
|
|
|
name: 'App',
|
2020-09-28 20:19:10 +08:00
|
|
|
components: { ConfigProvider },
|
|
|
|
|
setup() {
|
2020-11-18 22:41:59 +08:00
|
|
|
// Initialize vuex internal system configuration
|
|
|
|
|
initAppConfigStore();
|
|
|
|
|
|
|
|
|
|
// Create a global breakpoint monitor
|
2020-09-28 20:19:10 +08:00
|
|
|
createBreakpointListen();
|
2020-11-18 22:41:59 +08:00
|
|
|
|
2020-10-29 23:01:11 +08:00
|
|
|
// Get ConfigProvider configuration
|
2020-11-18 22:41:59 +08:00
|
|
|
const { transformCellText } = getConfigProvider();
|
2020-10-15 21:12:38 +08:00
|
|
|
|
2020-11-18 22:41:59 +08:00
|
|
|
// Create a lock screen monitor
|
|
|
|
|
const lockEvent = useLockPage();
|
2020-10-18 21:55:21 +08:00
|
|
|
|
2020-09-28 20:19:10 +08:00
|
|
|
return {
|
|
|
|
|
transformCellText,
|
|
|
|
|
zhCN,
|
2020-11-18 22:41:59 +08:00
|
|
|
lockEvent,
|
2020-09-28 20:19:10 +08:00
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
</script>
|