vue-vben-admin/src/App.vue

44 lines
1.0 KiB
Vue
Raw Normal View History

2020-09-28 20:19:10 +08:00
<template>
2020-11-23 00:35:15 +08:00
<ConfigProvider
v-bind="lockEvent"
:locale="antConfigLocale"
: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';
2020-11-18 22:52:13 +08:00
import { getConfigProvider, 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-09-28 20:19:10 +08:00
export default defineComponent({
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();
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-11-23 00:35:15 +08:00
// support Multi-language
const { antConfigLocale } = useLocale();
2020-09-28 20:19:10 +08:00
return {
transformCellText,
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>