Skip to content

Commit

Permalink
feat(project): 重构载入动画和系统结构样式
Browse files Browse the repository at this point in the history
  • Loading branch information
chansee97 committed Jan 10, 2023
1 parent 264cc11 commit c5705f7
Show file tree
Hide file tree
Showing 18 changed files with 705 additions and 428 deletions.
5 changes: 4 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# 项目根目录
VITE_BASE_URL=/
# 项目名称
VITE_APP_TITLE = Ench Admin
VITE_APP_NAME=EnchAdmin
VITE_APP_TITLE=Ench管理系统
VITE_APP_DESC=EnchAdmin是一个中后台管理系统模版

# 路由模式
VITE_HASH_ROUTE = Y
# 权限路由模式: static | dynamic
Expand Down
18 changes: 9 additions & 9 deletions build/plugins/html.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { createHtmlPlugin } from 'vite-plugin-html'; // https://github.com/vbenjs/vite-plugin-html/blob/main/README.zh_CN.md

export default (env: ImportMetaEnv) => {
return createHtmlPlugin({
minify: true, // 压缩HTML
inject: {
// 注入数据
data: {
title: env.VITE_APP_TITLE,
},
},
});
return createHtmlPlugin({
minify: true, // 压缩HTML
inject: {
// 注入数据
data: {
title: env.VITE_APP_TITLE,
},
},
});
};
32 changes: 10 additions & 22 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/logo.svg" />
<link rel="stylesheet" href="/resource/loading.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title><%= title %></title>
</head>
<body>
<div id="loading-container">
<div class="app-loading">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
<span class="loading-title"><%= title %>管理系统</span>
</div>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/logo.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title><%= title %></title>
</head>
<body>
<div id="app"><div id="appLoading"></div></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
70 changes: 35 additions & 35 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,54 +31,54 @@
"./src/**/*.{vue,js,jsx,ts,tsx,json}": "eslint --fix"
},
"dependencies": {
"@vueuse/core": "^9.3.0",
"@wangeditor/editor": "^5.1.21",
"@vueuse/core": "^9.10.0",
"@wangeditor/editor": "^5.1.23",
"@wangeditor/editor-for-vue": "^5.1.12",
"axios": "^0.27.2",
"echarts": "^5.4.0",
"md-editor-v3": "^2.3.0",
"pinia": "^2.0.20",
"axios": "^1.2.2",
"echarts": "^5.4.1",
"md-editor-v3": "^2.7.2",
"pinia": "^2.0.28",
"pinia-plugin-persist": "^1.0.0",
"vue": "^3.2.37",
"vue": "^3.2.45",
"vue-qr": "^4.0.9",
"vue-router": "^4.1.4"
"vue-router": "^4.1.6"
},
"devDependencies": {
"@commitlint/cli": "^17.0.3",
"@commitlint/config-conventional": "^17.0.3",
"@iconify-json/icon-park-outline": "^1.1.5",
"@iconify/vue": "^3.2.1",
"@types/mockjs": "^1.0.6",
"@types/node": "^18.7.13",
"@typescript-eslint/eslint-plugin": "^5.35.1",
"@typescript-eslint/parser": "^5.35.1",
"@unocss/preset-attributify": "^0.45.18",
"@unocss/preset-uno": "^0.45.18",
"@unocss/vite": "^0.45.18",
"@vitejs/plugin-vue": "^3.0.3",
"@vitejs/plugin-vue-jsx": "^2.0.0",
"@vue/eslint-config-typescript": "^11.0.0",
"commitizen": "^4.2.5",
"@commitlint/cli": "^17.4.1",
"@commitlint/config-conventional": "^17.4.0",
"@iconify-json/icon-park-outline": "^1.1.9",
"@iconify/vue": "^4.0.2",
"@types/mockjs": "^1.0.7",
"@types/node": "^18.11.18",
"@typescript-eslint/eslint-plugin": "^5.48.1",
"@typescript-eslint/parser": "^5.48.1",
"@unocss/preset-attributify": "^0.48.3",
"@unocss/preset-uno": "^0.48.3",
"@unocss/vite": "^0.48.3",
"@vitejs/plugin-vue": "^4.0.0",
"@vitejs/plugin-vue-jsx": "^3.0.0",
"@vue/eslint-config-typescript": "^11.0.2",
"commitizen": "^4.2.6",
"cross-env": "^7.0.3",
"cz-conventional-changelog": "^3.3.0",
"cz-customizable": "^6.9.1",
"eslint": "^8.22.0",
"cz-customizable": "^7.0.0",
"eslint": "^8.31.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-vue": "^9.4.0",
"husky": "^8.0.1",
"lint-staged": "^13.0.3",
"eslint-plugin-vue": "^9.8.0",
"husky": "^8.0.3",
"lint-staged": "^13.1.0",
"mockjs": "^1.1.0",
"naive-ui": "^2.32.2",
"rollup-plugin-visualizer": "^5.8.0",
"typescript": "^4.7.4",
"unplugin-icons": "^0.14.8",
"unplugin-vue-components": "^0.22.4",
"vite": "^3.0.9",
"naive-ui": "^2.34.3",
"rollup-plugin-visualizer": "^5.9.0",
"typescript": "^4.9.4",
"unplugin-icons": "^0.15.1",
"unplugin-vue-components": "^0.22.12",
"vite": "^4.0.4",
"vite-plugin-compression": "^0.5.1",
"vite-plugin-html": "^3.2.0",
"vite-plugin-mock": "^2.9.6",
"vite-plugin-svg-icons": "^2.0.1",
"vue-tsc": "^0.40.1"
"vue-tsc": "^1.0.24"
}
}
74 changes: 0 additions & 74 deletions public/resource/loading.css

This file was deleted.

33 changes: 21 additions & 12 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
<script setup lang="ts">
import { useAppStore } from './store';
import { zhCN, dateZhCN, GlobalThemeOverrides } from 'naive-ui';
import json from './theme.json';
const locale = zhCN;
const dateLocale = dateZhCN;
const appStore = useAppStore();
const themeOverrides: GlobalThemeOverrides = json;
</script>

<template>
<n-config-provider
class="wh-full"
Expand All @@ -22,4 +10,25 @@ const themeOverrides: GlobalThemeOverrides = json;
</n-config-provider>
</template>

<script setup lang="ts">
import { useAppStore } from './store';
import {
zhCN,
dateZhCN,
GlobalThemeOverrides,
useOsTheme,
darkTheme,
} from 'naive-ui';
import themeConfig from './theme.json';
const locale = zhCN;
const dateLocale = dateZhCN;
const appStore = useAppStore();
const osThemeRef = useOsTheme();
appStore.setDarkMode(osThemeRef.value === 'dark');
const themeOverrides: GlobalThemeOverrides = themeConfig;
</script>

<style scoped></style>
Loading

1 comment on commit c5705f7

@vercel
Copy link

@vercel vercel bot commented on c5705f7 Jan 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ench-admin – ./

ench-admin-whyhenin.vercel.app
ench-admin.vercel.app
ench-admin-git-main-whyhenin.vercel.app

Please sign in to comment.