2020-09-28 20:19:10 +08:00
|
|
|
<template>
|
2020-12-29 23:37:40 +08:00
|
|
|
<ConfigProvider v-bind="lockEvent" :locale="antConfigLocale">
|
2020-12-07 21:17:24 +08:00
|
|
|
<AppProvider>
|
2021-02-17 22:07:22 +08:00
|
|
|
<RouterView />
|
2020-12-07 21:17:24 +08:00
|
|
|
</AppProvider>
|
2020-09-28 20:19:10 +08:00
|
|
|
</ConfigProvider>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import { defineComponent } from 'vue';
|
|
|
|
import { ConfigProvider } from 'ant-design-vue';
|
2021-02-10 00:53:47 +08:00
|
|
|
import { AppProvider } from '/@/components/Application';
|
2020-09-28 20:19:10 +08:00
|
|
|
|
2021-01-10 21:23:21 +08:00
|
|
|
import { initAppConfigStore } from '/@/logics/initAppConfig';
|
2020-10-15 21:12:38 +08:00
|
|
|
|
2020-11-23 00:35:15 +08:00
|
|
|
import { useLockPage } from '/@/hooks/web/useLockPage';
|
2021-01-09 23:28:52 +08:00
|
|
|
import { useLocale } from '/@/locales/useLocale';
|
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-12-07 21:17:24 +08:00
|
|
|
components: { ConfigProvider, AppProvider },
|
2020-09-28 20:19:10 +08:00
|
|
|
setup() {
|
2021-01-19 22:38:43 +08:00
|
|
|
// support Multi-language
|
2021-01-09 23:28:52 +08:00
|
|
|
const { antConfigLocale, setLocale } = useLocale();
|
2021-02-22 00:01:03 +08:00
|
|
|
|
2021-01-09 23:28:52 +08:00
|
|
|
setLocale();
|
|
|
|
|
2020-11-18 22:41:59 +08:00
|
|
|
// Initialize vuex internal system configuration
|
|
|
|
initAppConfigStore();
|
2021-02-22 00:01:03 +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 {
|
2020-11-23 00:35:15 +08:00
|
|
|
antConfigLocale,
|
2020-11-18 22:41:59 +08:00
|
|
|
lockEvent,
|
2020-09-28 20:19:10 +08:00
|
|
|
};
|
|
|
|
},
|
|
|
|
});
|
|
|
|
</script>
|