mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-08-28 11:37:42 +08:00
feat: UI: lazy load (#266)
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "cloudflare_temp_email",
|
"name": "cloudflare_temp_email",
|
||||||
"version": "0.4.4",
|
"version": "0.4.5",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
import { createRouter, createWebHistory } from 'vue-router'
|
import { createRouter, createWebHistory } from 'vue-router'
|
||||||
import Index from '../views/Index.vue'
|
import Index from '../views/Index.vue'
|
||||||
import User from '../views/User.vue'
|
import User from '../views/User.vue'
|
||||||
import Admin from '../views/Admin.vue'
|
|
||||||
import TelegramMail from '../views/telegram/Mail.vue'
|
|
||||||
|
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
history: createWebHistory(),
|
history: createWebHistory(),
|
||||||
@@ -17,11 +15,11 @@ const router = createRouter({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/admin',
|
path: '/admin',
|
||||||
component: Admin
|
component: () => import('../views/Admin.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/telegram_mail',
|
path: '/telegram_mail',
|
||||||
component: TelegramMail
|
component: () => import('../views/telegram/Mail.vue')
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
|
import { defineAsyncComponent } from 'vue'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
|
|
||||||
import { useGlobalState } from '../store'
|
import { useGlobalState } from '../store'
|
||||||
@@ -8,11 +9,11 @@ import AddressBar from './index/AddressBar.vue';
|
|||||||
import MailBox from '../components/MailBox.vue';
|
import MailBox from '../components/MailBox.vue';
|
||||||
import SendBox from '../components/SendBox.vue';
|
import SendBox from '../components/SendBox.vue';
|
||||||
import AutoReply from './index/AutoReply.vue';
|
import AutoReply from './index/AutoReply.vue';
|
||||||
import SendMail from './index/SendMail.vue';
|
|
||||||
import AccountSettings from './index/AccountSettings.vue';
|
import AccountSettings from './index/AccountSettings.vue';
|
||||||
import WenHook from './index/Webhook.vue';
|
import WenHook from './index/Webhook.vue';
|
||||||
import About from './common/About.vue';
|
import About from './common/About.vue';
|
||||||
|
|
||||||
|
const SendMail = defineAsyncComponent(() => import('./index/SendMail.vue'));
|
||||||
const { localeCache, settings, openSettings, indexTab, globalTabplacement } = useGlobalState()
|
const { localeCache, settings, openSettings, indexTab, globalTabplacement } = useGlobalState()
|
||||||
|
|
||||||
const { t } = useI18n({
|
const { t } = useI18n({
|
||||||
|
|||||||
@@ -13,15 +13,6 @@ import topLevelAwait from "vite-plugin-top-level-await";
|
|||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
build: {
|
build: {
|
||||||
outDir: './dist',
|
outDir: './dist',
|
||||||
rollupOptions: {
|
|
||||||
output: {
|
|
||||||
manualChunks(id) {
|
|
||||||
if (id.includes('wangeditor')) {
|
|
||||||
return 'vendor-wangeditor';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
vue(),
|
vue(),
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
export const CONSTANTS = {
|
export const CONSTANTS = {
|
||||||
VERSION: 'v0.4.4',
|
VERSION: 'v0.4.5',
|
||||||
|
|
||||||
// DB settings
|
// DB settings
|
||||||
ADDRESS_BLOCK_LIST_KEY: 'address_block_list',
|
ADDRESS_BLOCK_LIST_KEY: 'address_block_list',
|
||||||
|
|||||||
Reference in New Issue
Block a user