feat: UI: lazy load (#266)

This commit is contained in:
Dream Hunter
2024-05-23 12:23:43 +08:00
committed by GitHub
parent aa04dc4efa
commit c976664f4e
5 changed files with 6 additions and 16 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "cloudflare_temp_email",
"version": "0.4.4",
"version": "0.4.5",
"private": true,
"type": "module",
"scripts": {

View File

@@ -1,8 +1,6 @@
import { createRouter, createWebHistory } from 'vue-router'
import Index from '../views/Index.vue'
import User from '../views/User.vue'
import Admin from '../views/Admin.vue'
import TelegramMail from '../views/telegram/Mail.vue'
const router = createRouter({
history: createWebHistory(),
@@ -17,11 +15,11 @@ const router = createRouter({
},
{
path: '/admin',
component: Admin
component: () => import('../views/Admin.vue')
},
{
path: '/telegram_mail',
component: TelegramMail
component: () => import('../views/telegram/Mail.vue')
},
]
})

View File

@@ -1,4 +1,5 @@
<script setup>
import { defineAsyncComponent } from 'vue'
import { useI18n } from 'vue-i18n'
import { useGlobalState } from '../store'
@@ -8,11 +9,11 @@ import AddressBar from './index/AddressBar.vue';
import MailBox from '../components/MailBox.vue';
import SendBox from '../components/SendBox.vue';
import AutoReply from './index/AutoReply.vue';
import SendMail from './index/SendMail.vue';
import AccountSettings from './index/AccountSettings.vue';
import WenHook from './index/Webhook.vue';
import About from './common/About.vue';
const SendMail = defineAsyncComponent(() => import('./index/SendMail.vue'));
const { localeCache, settings, openSettings, indexTab, globalTabplacement } = useGlobalState()
const { t } = useI18n({

View File

@@ -13,15 +13,6 @@ import topLevelAwait from "vite-plugin-top-level-await";
export default defineConfig({
build: {
outDir: './dist',
rollupOptions: {
output: {
manualChunks(id) {
if (id.includes('wangeditor')) {
return 'vendor-wangeditor';
}
}
}
}
},
plugins: [
vue(),

View File

@@ -1,5 +1,5 @@
export const CONSTANTS = {
VERSION: 'v0.4.4',
VERSION: 'v0.4.5',
// DB settings
ADDRESS_BLOCK_LIST_KEY: 'address_block_list',