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>
|
|
|
|
<router-view />
|
|
|
|
</AppProvider>
|
2020-09-28 20:19:10 +08:00
|
|
|
</ConfigProvider>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import { defineComponent } from 'vue';
|
|
|
|
import { ConfigProvider } from 'ant-design-vue';
|
|
|
|
|
2020-12-29 23:37:40 +08:00
|
|
|
import { initAppConfigStore } from '/@/setup/App';
|
2020-10-15 21:12:38 +08:00
|
|
|
|
2020-11-23 00:35:15 +08:00
|
|
|
import { useLockPage } from '/@/hooks/web/useLockPage';
|
|
|
|
import { useLocale } from '/@/hooks/web/useLocale';
|
2020-10-19 22:56:10 +08:00
|
|
|
|
2020-12-07 21:17:24 +08:00
|
|
|
import { AppProvider } from '/@/components/Application';
|
|
|
|
|
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() {
|
2020-11-18 22:41:59 +08:00
|
|
|
// Initialize vuex internal system configuration
|
|
|
|
initAppConfigStore();
|
|
|
|
|
|
|
|
// Create a lock screen monitor
|
|
|
|
const lockEvent = useLockPage();
|
2020-10-18 21:55:21 +08:00
|
|
|
|
2020-11-23 00:35:15 +08:00
|
|
|
// support Multi-language
|
|
|
|
const { antConfigLocale } = useLocale();
|
|
|
|
|
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>
|