You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
770 B
Vue

<template>
<el-config-provider :locale="appStore.locale" :size="appStore.size">
<router-view />
</el-config-provider>
<PrintView ref="printView" />
</template>
<script setup lang="ts">
import useSettingsStore from '@/store/modules/settings';
import { handleThemeStyle } from '@/utils/theme';
import useAppStore from '@/store/modules/app';
import PrintView from '@/views/print/view.vue';
const appStore = useAppStore();
const printView = ref();
const internalInstance = getCurrentInstance();
onMounted(() => {
nextTick(() => {
// 初始化主题样式
handleThemeStyle(useSettingsStore().theme);
if (internalInstance) {
internalInstance.appContext.config.globalProperties.$openPrint = printView.value.openPrint;
}
});
});
</script>