Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
14a47bb74f | ||
|
|
411314e1f8 | ||
|
|
317a938a21 | ||
|
|
77c1c1f292 | ||
|
|
80d559df13 | ||
|
|
6b6aee7604 | ||
|
|
9bc81c1427 | ||
|
|
f24153c95a | ||
|
|
4ba5ea2db2 | ||
|
|
86d05f4cfc | ||
|
|
df9fd2ae65 | ||
|
|
d12e9794f3 | ||
|
|
0ef3af7914 | ||
|
|
f3cc0b0ecb | ||
|
|
3eb65f6da4 | ||
|
|
1e2b21f841 | ||
|
|
e1db00ce95 | ||
|
|
1359cafa08 | ||
|
|
2c1dfe3a80 | ||
|
|
027b4f07d7 | ||
|
|
e889f38bb1 | ||
|
|
6a0b659750 | ||
|
|
b3a590d92d | ||
|
|
9feab1ebdb | ||
|
|
4c0bc769c3 | ||
|
|
5747a35913 | ||
|
|
31c3a28c3d | ||
|
|
9893b905db | ||
|
|
9d858bbe22 | ||
|
|
474aaa7bb1 | ||
|
|
04d358878e |
@@ -0,0 +1,2 @@
|
||||
dist
|
||||
node_modules
|
||||
@@ -1,6 +1,10 @@
|
||||
{
|
||||
"extends": "@antfu",
|
||||
"rules": {
|
||||
"curly": ["error", "all"]
|
||||
"eslint-comments/no-unlimited-disable": "off",
|
||||
"curly": ["error", "all"],
|
||||
"vue/component-tags-order": ["error", {
|
||||
"order": ["route", "script", "template", "style"]
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{
|
||||
"src/**/*.{js,jsx,ts,tsx}": "eslint --cache --fix",
|
||||
"src/**/*.{css,scss}": "stylelint --cache --fix --allow-empty-input",
|
||||
"src/**/*.vue": ["eslint --cache --fix", "stylelint --cache --fix --allow-empty-input"]
|
||||
"src/**/*.{ts,tsx,vue}": "eslint --cache --fix --no-ignore --no-error-on-unmatched-pattern",
|
||||
"src/**/*.{css,scss,vue}": "stylelint --cache --fix --allow-empty-input"
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
dist/
|
||||
node_modules/
|
||||
src/assets/sprites/
|
||||
dist
|
||||
node_modules
|
||||
src/assets/sprites
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
"property-no-unknown": null,
|
||||
"font-family-no-missing-generic-family-keyword": null,
|
||||
"selector-class-pattern": null,
|
||||
"max-line-length": null,
|
||||
"scss/double-slash-comment-empty-line-before": null,
|
||||
"scss/no-global-function-names": null
|
||||
}
|
||||
|
||||
@@ -43,6 +43,8 @@
|
||||
- `vue2` Vue2 版本框架源码分支,不含示例代码,可直接用于实际开发(停止维护)
|
||||
- `vue2-example` Vue2 版本演示源码分支,包含大量示例,可用于参考学习(停止维护)
|
||||
|
||||
如果你更注重使用时的稳定性,推荐去 [Github Releases](https://github.com/hooray/fantastic-admin/releases) 页面下载最新稳定版本的压缩包。
|
||||
|
||||
## 预览
|
||||
|
||||
> 预览截图为 Vue3 专业版
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<link rel="stylesheet" href="/loading.css" />
|
||||
<link rel="stylesheet" href="/browser_upgrade/index.css" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title><%= title %></title>
|
||||
<%- copyrightScript %>
|
||||
<title>%VITE_APP_TITLE%</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
@@ -17,7 +17,7 @@
|
||||
<div class="square"></div>
|
||||
<div class="square"></div>
|
||||
</div>
|
||||
<div class="text"><%= title %>载入中…</div>
|
||||
<div class="text">载入中</div>
|
||||
</div>
|
||||
<div id="browser-upgrade">
|
||||
<div class="title">为了您的体验,推荐使用以下浏览器</div>
|
||||
@@ -33,8 +33,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%- loadingScript %>
|
||||
<script>
|
||||
if (!!window.ActiveXObject || 'ActiveXObject' in window) {
|
||||
document.getElementById('browser-upgrade').style.display = 'block'
|
||||
}
|
||||
</script>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
<%- devtoolScript %>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "2.6.2",
|
||||
"version": "2.10.0",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build:test": "vue-tsc --noEmit && vite build --mode test",
|
||||
@@ -10,20 +10,21 @@
|
||||
"new": "plop",
|
||||
"lint": "npm-run-all -s lint:tsc lint:eslint lint:stylelint",
|
||||
"lint:tsc": "vue-tsc --noEmit",
|
||||
"lint:eslint": "eslint src/**/*.{ts,tsx,vue} --cache --fix",
|
||||
"lint:stylelint": "stylelint src/**/*.{css,scss,vue} --cache --fix",
|
||||
"lint:eslint": "eslint src/**/*.{ts,tsx,vue} --cache --fix --no-ignore --no-error-on-unmatched-pattern",
|
||||
"lint:stylelint": "stylelint src/**/*.{css,scss,vue} --cache --fix --allow-empty-input",
|
||||
"postinstall": "simple-git-hooks && esno scripts/prepare.js",
|
||||
"preinstall": "npx only-allow pnpm",
|
||||
"commit": "git cz",
|
||||
"release": "bumpp"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tinymce/tinymce-vue": "^5.0.0",
|
||||
"@vueuse/core": "^9.10.0",
|
||||
"@vueuse/integrations": "^9.10.0",
|
||||
"axios": "^1.2.1",
|
||||
"@tinymce/tinymce-vue": "^5.0.1",
|
||||
"@vueuse/core": "^9.13.0",
|
||||
"@vueuse/integrations": "^9.13.0",
|
||||
"axios": "^1.3.4",
|
||||
"dayjs": "^1.11.7",
|
||||
"element-plus": "^2.2.28",
|
||||
"element-plus": "^2.3.1",
|
||||
"eruda": "^2.11.3",
|
||||
"hotkeys-js": "^3.10.1",
|
||||
"lodash-es": "^4.17.21",
|
||||
"mitt": "^3.0.0",
|
||||
@@ -31,55 +32,56 @@
|
||||
"nprogress": "^0.2.0",
|
||||
"path-browserify": "^1.0.1",
|
||||
"path-to-regexp": "^6.2.1",
|
||||
"pinia": "^2.0.28",
|
||||
"qs": "^6.11.0",
|
||||
"tinymce": "^6.3.1",
|
||||
"vue": "^3.2.45",
|
||||
"pinia": "^2.0.33",
|
||||
"qs": "^6.11.1",
|
||||
"tinymce": "^6.4.0",
|
||||
"vconsole": "^3.15.0",
|
||||
"vue": "^3.2.47",
|
||||
"vue-router": "^4.1.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antfu/eslint-config": "^0.34.1",
|
||||
"@iconify-json/ep": "^1.1.8",
|
||||
"@iconify/vue": "^4.0.2",
|
||||
"@antfu/eslint-config": "^0.37.0",
|
||||
"@iconify-json/ep": "^1.1.10",
|
||||
"@iconify/vue": "^4.1.0",
|
||||
"@types/nprogress": "^0.2.0",
|
||||
"@types/path-browserify": "^1.0.0",
|
||||
"@types/qs": "^6.9.7",
|
||||
"@vitejs/plugin-vue": "^4.0.0",
|
||||
"@vitejs/plugin-vue-jsx": "^3.0.0",
|
||||
"autoprefixer": "^10.4.13",
|
||||
"bumpp": "^8.2.1",
|
||||
"cz-git": "^1.4.1",
|
||||
"eslint": "^8.32.0",
|
||||
"@vitejs/plugin-vue": "^4.1.0",
|
||||
"@vitejs/plugin-vue-jsx": "^3.0.1",
|
||||
"autoprefixer": "^10.4.14",
|
||||
"bumpp": "^9.0.0",
|
||||
"cz-git": "^1.6.1",
|
||||
"eslint": "^8.36.0",
|
||||
"esno": "^0.16.3",
|
||||
"fs-extra": "^11.1.0",
|
||||
"fs-extra": "^11.1.1",
|
||||
"http-server": "^14.1.1",
|
||||
"lint-staged": "^13.1.0",
|
||||
"lint-staged": "^13.2.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"plop": "^3.1.1",
|
||||
"plop": "^3.1.2",
|
||||
"postcss-html": "^1.5.0",
|
||||
"sass": "^1.57.1",
|
||||
"sass": "^1.60.0",
|
||||
"simple-git-hooks": "^2.8.1",
|
||||
"stylelint": "^14.16.1",
|
||||
"stylelint-config-standard": "^29.0.0",
|
||||
"stylelint-config-standard-scss": "^6.1.0",
|
||||
"stylelint": "^15.3.0",
|
||||
"stylelint-config-standard": "^31.0.0",
|
||||
"stylelint-config-standard-scss": "^7.0.1",
|
||||
"stylelint-config-standard-vue": "^1.0.0",
|
||||
"stylelint-scss": "^4.3.0",
|
||||
"stylelint-scss": "^4.6.0",
|
||||
"svgo": "^3.0.2",
|
||||
"typescript": "^4.9.4",
|
||||
"unplugin-auto-import": "^0.12.1",
|
||||
"unplugin-vue-components": "^0.22.12",
|
||||
"vite": "^4.0.4",
|
||||
"terser": "^5.16.8",
|
||||
"typescript": "^5.0.2",
|
||||
"unplugin-auto-import": "^0.15.2",
|
||||
"unplugin-vue-components": "^0.24.1",
|
||||
"vite": "^4.2.1",
|
||||
"vite-plugin-banner": "^0.7.0",
|
||||
"vite-plugin-compression": "^0.5.1",
|
||||
"vite-plugin-html": "^3.2.0",
|
||||
"vite-plugin-mock": "^2.9.6",
|
||||
"vite-plugin-pages": "^0.28.0",
|
||||
"vite-plugin-pages": "^0.29.0",
|
||||
"vite-plugin-spritesmith": "^0.1.1",
|
||||
"vite-plugin-svg-icons": "^2.0.1",
|
||||
"vite-plugin-vue-inspector": "^3.1.2",
|
||||
"vite-plugin-vue-layouts": "^0.6.0",
|
||||
"vite-plugin-vue-inspector": "^3.4.0",
|
||||
"vite-plugin-vue-layouts": "^0.8.0",
|
||||
"vite-plugin-vue-setup-extend": "^0.4.0",
|
||||
"vue-tsc": "^1.0.24"
|
||||
"vue-tsc": "^1.2.0"
|
||||
},
|
||||
"simple-git-hooks": {
|
||||
"pre-commit": "pnpm lint-staged",
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
{{#if isFilesystem}}
|
||||
<route lang="yaml">
|
||||
meta:
|
||||
title: 页面标题
|
||||
</route>
|
||||
{{/if}}
|
||||
|
||||
<script lang="ts" setup name="{{ properCase componentName }}">
|
||||
// 逻辑代码
|
||||
</script>
|
||||
|
||||
@@ -36,6 +36,12 @@ module.exports = {
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'confirm',
|
||||
name: 'isFilesystem',
|
||||
message: '是否为基于文件系统的路由页面',
|
||||
default: false,
|
||||
},
|
||||
],
|
||||
actions: (data) => {
|
||||
const relativePath = path.relative('src/views', data.path)
|
||||
|
||||
@@ -1,119 +1,49 @@
|
||||
#app {
|
||||
height: 100%;
|
||||
}
|
||||
.fantastic-admin-home {
|
||||
position: absolute;
|
||||
z-index: 10000;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
user-select: none;
|
||||
color: #736477;
|
||||
background-color: snow;
|
||||
}
|
||||
.fantastic-admin-home .loading {
|
||||
height: 40px;
|
||||
width: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.fantastic-admin-home .square {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
}
|
||||
.fantastic-admin-home .square::before {
|
||||
content: "";
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-radius: 15%;
|
||||
border: 3px solid #8c858f;
|
||||
}
|
||||
.fantastic-admin-home .loading.animate .square::before {
|
||||
animation: square-to-dot-animation 1.2s linear;
|
||||
}
|
||||
.fantastic-admin-home .loading.animate .square:nth-child(1)::before {
|
||||
animation-delay: calc(100ms * 1);
|
||||
}
|
||||
.fantastic-admin-home .loading.animate .square:nth-child(2)::before {
|
||||
animation-delay: calc(100ms * 2);
|
||||
}
|
||||
.fantastic-admin-home .loading.animate .square:nth-child(3)::before {
|
||||
animation-delay: calc(100ms * 3);
|
||||
}
|
||||
.fantastic-admin-home .loading.animate .square:nth-child(4)::before {
|
||||
animation-delay: calc(100ms * 4);
|
||||
}
|
||||
@keyframes square-to-dot-animation {
|
||||
15%,
|
||||
55% {
|
||||
border-radius: 100%;
|
||||
width: 0;
|
||||
height: 0;
|
||||
margin: 5px;
|
||||
border-width: 5px;
|
||||
}
|
||||
70% {
|
||||
border-radius: 15%;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
margin: initial;
|
||||
border-width: 3px;
|
||||
}
|
||||
}
|
||||
.fantastic-admin-home .text {
|
||||
font-size: 24px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
#browser-upgrade {
|
||||
position: absolute;
|
||||
z-index: 10001;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: none;
|
||||
user-select: none;
|
||||
color: #736477;
|
||||
background-color: snow;
|
||||
position: absolute;
|
||||
z-index: 10001;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: none;
|
||||
user-select: none;
|
||||
color: #736477;
|
||||
background-color: snow;
|
||||
}
|
||||
|
||||
#browser-upgrade .title {
|
||||
margin: 40px 0;
|
||||
text-align: center;
|
||||
font-size: 24px;
|
||||
margin: 40px 0;
|
||||
text-align: center;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
#browser-upgrade .browsers {
|
||||
text-align: center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#browser-upgrade .browsers .browser {
|
||||
display: inline-block;
|
||||
margin: 0 20px;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
margin: 0 20px;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#browser-upgrade .browsers .browser .browser-icon {
|
||||
display: block;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
margin: 0 auto;
|
||||
border: none;
|
||||
display: block;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
margin: 0 auto;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#browser-upgrade .browsers .browser .browser-name {
|
||||
text-align: center;
|
||||
margin-top: 10px;
|
||||
padding-bottom: 2px;
|
||||
color: #736477;
|
||||
border-bottom: 1px solid transparent;
|
||||
text-align: center;
|
||||
margin-top: 10px;
|
||||
padding-bottom: 2px;
|
||||
color: #736477;
|
||||
border-bottom: 1px solid transparent;
|
||||
}
|
||||
|
||||
#browser-upgrade .browsers .browser:hover .browser-name {
|
||||
border-bottom: 1px solid #736477;
|
||||
border-bottom: 1px solid #736477;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
#app {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.fantastic-admin-home {
|
||||
position: absolute;
|
||||
z-index: 10000;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
user-select: none;
|
||||
color: #736477;
|
||||
background-color: snow;
|
||||
}
|
||||
|
||||
.fantastic-admin-home .loading {
|
||||
height: 40px;
|
||||
width: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.fantastic-admin-home .loading .square {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
.fantastic-admin-home .loading .square::before {
|
||||
content: "";
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-radius: 15%;
|
||||
border: 3px solid #8c858f;
|
||||
animation: square-to-dot-animation 2s linear infinite;
|
||||
}
|
||||
|
||||
.fantastic-admin-home .loading .square:nth-child(1)::before {
|
||||
animation-delay: calc(150ms * 1);
|
||||
}
|
||||
|
||||
.fantastic-admin-home .loading .square:nth-child(2)::before {
|
||||
animation-delay: calc(150ms * 2);
|
||||
}
|
||||
|
||||
.fantastic-admin-home .loading .square:nth-child(3)::before {
|
||||
animation-delay: calc(150ms * 3);
|
||||
}
|
||||
|
||||
.fantastic-admin-home .loading .square:nth-child(4)::before {
|
||||
animation-delay: calc(150ms * 4);
|
||||
}
|
||||
|
||||
@keyframes square-to-dot-animation {
|
||||
15%,
|
||||
25% {
|
||||
border-radius: 100%;
|
||||
width: 0;
|
||||
height: 0;
|
||||
margin: 5px;
|
||||
border-width: 5px;
|
||||
}
|
||||
|
||||
40% {
|
||||
border-radius: 15%;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
margin: initial;
|
||||
border-width: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
.fantastic-admin-home .text {
|
||||
position: relative;
|
||||
font-size: 24px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.fantastic-admin-home .text::after {
|
||||
content: '…';
|
||||
position: absolute;
|
||||
padding-left: 5px;
|
||||
}
|
||||
@@ -1,11 +1,13 @@
|
||||
<script lang="ts" setup>
|
||||
import eruda from 'eruda'
|
||||
import VConsole from 'vconsole'
|
||||
import zhCn from 'element-plus/es/locale/lang/zh-cn'
|
||||
import hotkeys from 'hotkeys-js'
|
||||
import eventBus from './utils/eventBus'
|
||||
import useSettingsStore from '@/store/modules/settings'
|
||||
import useMenuStore from '@/store/modules/menu'
|
||||
|
||||
const settingsStore = useSettingsStore()
|
||||
const { auth } = useAuth()
|
||||
|
||||
const buttonConfig = ref({
|
||||
autoInsertSpace: true,
|
||||
@@ -40,6 +42,8 @@ watch([
|
||||
else {
|
||||
document.title = import.meta.env.VITE_APP_TITLE
|
||||
}
|
||||
}, {
|
||||
immediate: true,
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
@@ -51,16 +55,23 @@ onMounted(() => {
|
||||
eventBus.emit('global-system-info-toggle')
|
||||
})
|
||||
})
|
||||
|
||||
import.meta.env.VITE_APP_DEBUG_TOOL === 'eruda' && eruda.init()
|
||||
import.meta.env.VITE_APP_DEBUG_TOOL === 'vconsole' && new VConsole()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<el-config-provider :locale="zhCn" :size="settingsStore.settings.app.elementSize" :button="buttonConfig">
|
||||
<RouterView
|
||||
v-slot="{ Component, route }"
|
||||
:style="{
|
||||
'--g-main-sidebar-actual-width': mainSidebarActualWidth,
|
||||
'--g-sub-sidebar-actual-width': subSidebarActualWidth,
|
||||
}"
|
||||
/>
|
||||
>
|
||||
<component :is="Component" v-if="auth(route.meta.auth ?? '')" />
|
||||
<not-allowed v-else />
|
||||
</RouterView>
|
||||
<system-info />
|
||||
</el-config-provider>
|
||||
</template>
|
||||
|
||||
@@ -16,7 +16,7 @@ const toLogin = () => {
|
||||
}
|
||||
|
||||
const api = axios.create({
|
||||
baseURL: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL,
|
||||
baseURL: (import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true') ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL,
|
||||
timeout: 1000 * 60,
|
||||
responseType: 'json',
|
||||
})
|
||||
|
||||
|
After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
@@ -1 +1 @@
|
||||
<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M768 298.667h170.667V384h-256V128H768v170.667zM341.333 384h-256v-85.333H256V128h85.333v256zM768 725.333V896h-85.333V640h256v85.333H768zM341.333 640v256H256V725.333H85.333V640h256z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" class="icon" viewBox="0 0 1024 1024"><path d="M768 298.667h170.667V384h-256V128H768v170.667zM341.333 384h-256v-85.333H256V128h85.333v256zM768 725.333V896h-85.333V640h256v85.333H768zM341.333 640v256H256V725.333H85.333V640h256z"/></svg>
|
||||
|
Before Width: | Height: | Size: 299 B After Width: | Height: | Size: 299 B |
@@ -1 +1 @@
|
||||
<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M682.667 128h256v256h-85.334V213.333H682.667V128zm-597.334 0h256v85.333H170.667V384H85.333V128zm768 682.667V640h85.334v256h-256v-85.333h170.666zm-682.666 0h170.666V896h-256V640h85.334v170.667z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" class="icon" viewBox="0 0 1024 1024"><path d="M682.667 128h256v256h-85.334V213.333H682.667V128zm-597.334 0h256v85.333H170.667V384H85.333V128zm768 682.667V640h85.334v256h-256v-85.333h170.666zm-682.666 0h170.666V896h-256V640h85.334v170.667z"/></svg>
|
||||
|
Before Width: | Height: | Size: 312 B After Width: | Height: | Size: 312 B |
@@ -1 +1 @@
|
||||
<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M704 328a72 72 0 1 0 144 0 72 72 0 1 0-144 0z"/><path d="M999.904 116.608a32 32 0 0 0-21.952-10.912L521.76 73.792a31.552 31.552 0 0 0-27.2 11.904l-92.192 114.848a32 32 0 0 0 .672 40.896l146.144 169.952-147.456 194.656 36.48-173.376a32 32 0 0 0-11.136-31.424L235.616 245.504l79.616-125.696a32 32 0 0 0-29.28-49.024L45.76 87.552a32 32 0 0 0-29.696 34.176l55.808 798.016a32.064 32.064 0 0 0 34.304 29.696l176.512-13.184c17.632-1.312 30.848-16.672 29.504-34.272s-16.576-31.04-34.304-29.536L133.44 883.232l-6.432-92.512 125.312-12.576a32 32 0 0 0 28.672-35.04 32.16 32.16 0 0 0-35.04-28.672L122.56 726.848 82.144 149.184l145.152-10.144-60.96 96.224a32 32 0 0 0 6.848 41.952l198.4 161.344-58.752 279.296a30.912 30.912 0 0 0 .736 14.752 31.68 31.68 0 0 0 1.408 11.04l51.52 154.56a31.968 31.968 0 0 0 27.456 21.76l523.104 47.552a32.064 32.064 0 0 0 34.848-29.632l55.776-798.048a32.064 32.064 0 0 0-7.776-23.232zm-98.912 630.848-412.576-39.648a31.52 31.52 0 0 0-34.912 28.768 32 32 0 0 0 28.8 34.912l414.24 39.808-6.272 89.536-469.728-42.72-39.584-118.72 234.816-310.016a31.936 31.936 0 0 0-1.248-40.192L468.896 219.84l65.088-81.056 407.584 28.48-40.576 580.192z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" class="icon" viewBox="0 0 1024 1024"><path d="M704 328a72 72 0 1 0 144 0 72 72 0 1 0-144 0z"/><path d="M999.904 116.608a32 32 0 0 0-21.952-10.912L521.76 73.792a31.552 31.552 0 0 0-27.2 11.904l-92.192 114.848a32 32 0 0 0 .672 40.896l146.144 169.952-147.456 194.656 36.48-173.376a32 32 0 0 0-11.136-31.424L235.616 245.504l79.616-125.696a32 32 0 0 0-29.28-49.024L45.76 87.552a32 32 0 0 0-29.696 34.176l55.808 798.016a32.064 32.064 0 0 0 34.304 29.696l176.512-13.184c17.632-1.312 30.848-16.672 29.504-34.272s-16.576-31.04-34.304-29.536L133.44 883.232l-6.432-92.512 125.312-12.576a32 32 0 0 0 28.672-35.04 32.16 32.16 0 0 0-35.04-28.672L122.56 726.848 82.144 149.184l145.152-10.144-60.96 96.224a32 32 0 0 0 6.848 41.952l198.4 161.344-58.752 279.296a30.912 30.912 0 0 0 .736 14.752 31.68 31.68 0 0 0 1.408 11.04l51.52 154.56a31.968 31.968 0 0 0 27.456 21.76l523.104 47.552a32.064 32.064 0 0 0 34.848-29.632l55.776-798.048a32.064 32.064 0 0 0-7.776-23.232zm-98.912 630.848-412.576-39.648a31.52 31.52 0 0 0-34.912 28.768 32 32 0 0 0 28.8 34.912l414.24 39.808-6.272 89.536-469.728-42.72-39.584-118.72 234.816-310.016a31.936 31.936 0 0 0-1.248-40.192L468.896 219.84l65.088-81.056 407.584 28.48-40.576 580.192z"/></svg>
|
||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
@@ -1 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1629577492940" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7817" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><defs><style type="text/css"></style></defs><path d="M512.213359 958.989357 63.594899 510.930645l84.024695-84.023672L448.20351 729.129202 448.20351 63.546292l127.940904 0L576.144414 729.129202l299.651684-302.222229 84.009346 84.023672L512.213359 958.989357z" p-id="7818"></path></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" class="icon" viewBox="0 0 1024 1024"><path d="M512.213 958.99 63.595 510.93l84.025-84.023 300.584 302.222V63.546h127.94V729.13l299.652-302.222 84.01 84.024-447.593 448.058z"/></svg>
|
||||
|
Before Width: | Height: | Size: 606 B After Width: | Height: | Size: 244 B |
@@ -1 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1629616013600" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3179" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><defs><style type="text/css"></style></defs><path d="M916.210526 242.526316v215.578947H204.8l194.021053-194.021052-75.452632-75.452632-323.368421 323.368421 323.368421 323.368421 75.452632-75.452632-194.021053-194.021052h819.2v-323.368421z" p-id="3180"></path></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" class="icon" viewBox="0 0 1024 1024"><path d="M916.21 242.526v215.58H204.8l194.021-194.022-75.453-75.452L0 512l323.368 323.368 75.453-75.452L204.8 565.895H1024V242.526z"/></svg>
|
||||
|
Before Width: | Height: | Size: 588 B After Width: | Height: | Size: 240 B |
@@ -1 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1629577505039" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8607" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><defs><style type="text/css"></style></defs><path d="M959.804421 511.603981l-84.009346 84.023672L576.143391 293.406446l0 665.582911L448.20351 958.989357 448.20351 293.406446 147.619594 595.628676l-84.024695-84.023672L512.213359 63.546292 959.804421 511.603981z" p-id="8608"></path></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" class="icon" viewBox="0 0 1024 1024"><path d="m959.804 511.604-84.009 84.024-299.652-302.222V958.99h-127.94V293.406L147.62 595.63l-84.025-84.024L512.213 63.546l447.591 448.058z"/></svg>
|
||||
|
Before Width: | Height: | Size: 609 B After Width: | Height: | Size: 248 B |
@@ -1 +1 @@
|
||||
<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M165.415 827.077c-11.815 0-19.692-7.877-19.692-19.692V214.646c0-11.815 7.877-19.692 19.692-19.692h159.508c7.877 0 17.723 3.938 23.63 9.846l228.432 287.508c7.877 9.846 7.877 25.6 0 37.415l-230.4 287.508c-5.908 7.877-15.754 11.815-25.6 11.815l-155.57-1.97zm706.954-334.77L641.97 206.77c-9.846-11.815-27.569-15.754-41.354-3.938l-45.292 37.415c-13.785 9.846-15.754 29.539-3.938 41.354L738.462 512 551.385 744.37c-9.847 11.815-7.877 31.507 3.938 41.353l45.292 37.415c13.785 9.847 29.539 7.877 41.354-3.938l230.4-287.508c7.877-15.754 7.877-29.538 0-39.384z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" class="icon" viewBox="0 0 1024 1024"><path d="M165.415 827.077c-11.815 0-19.692-7.877-19.692-19.692V214.646c0-11.815 7.877-19.692 19.692-19.692h159.508c7.877 0 17.723 3.938 23.63 9.846l228.432 287.508c7.877 9.846 7.877 25.6 0 37.415l-230.4 287.508c-5.908 7.877-15.754 11.815-25.6 11.815l-155.57-1.97zm706.954-334.77L641.97 206.77c-9.846-11.815-27.569-15.754-41.354-3.938l-45.292 37.415c-13.785 9.846-15.754 29.539-3.938 41.354L738.462 512 551.385 744.37c-9.847 11.815-7.877 31.507 3.938 41.353l45.292 37.415c13.785 9.847 29.539 7.877 41.354-3.938l230.4-287.508c7.877-15.754 7.877-29.538 0-39.384z"/></svg>
|
||||
|
Before Width: | Height: | Size: 670 B After Width: | Height: | Size: 670 B |
@@ -1 +1 @@
|
||||
<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M487 71.425a75 75 0 0 1 72.575 0l335.7 185.5a75 75 0 0 1 38.75 65.65V690.85a75 75 0 0 1-38.75 65.625l-335.7 185.55a75 75 0 0 1-72.55 0l-335.7-185.5a75 75 0 0 1-38.75-65.675V322.6a75 75 0 0 1 38.75-65.6L487 71.4v.025zM859 322.6 523.275 137.1l-335.7 185.5v368.25l335.7 185.5 335.75-185.5V322.6zm-601.75 37.1A37.5 37.5 0 0 1 308.2 345l215.1 118.875L738.45 345a37.5 37.5 0 0 1 36.25 65.625l-213.9 118.25V764.55a37.5 37.5 0 0 1-75 0v-235.7l-213.9-118.2a37.5 37.5 0 0 1-14.65-51v.05z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" class="icon" viewBox="0 0 1024 1024"><path d="M487 71.425a75 75 0 0 1 72.575 0l335.7 185.5a75 75 0 0 1 38.75 65.65V690.85a75 75 0 0 1-38.75 65.625l-335.7 185.55a75 75 0 0 1-72.55 0l-335.7-185.5a75 75 0 0 1-38.75-65.675V322.6a75 75 0 0 1 38.75-65.6L487 71.4v.025zM859 322.6 523.275 137.1l-335.7 185.5v368.25l335.7 185.5 335.75-185.5V322.6zm-601.75 37.1A37.5 37.5 0 0 1 308.2 345l215.1 118.875L738.45 345a37.5 37.5 0 0 1 36.25 65.625l-213.9 118.25V764.55a37.5 37.5 0 0 1-75 0v-235.7l-213.9-118.2a37.5 37.5 0 0 1-14.65-51v.05z"/></svg>
|
||||
|
Before Width: | Height: | Size: 597 B After Width: | Height: | Size: 597 B |
@@ -1 +1 @@
|
||||
<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M913.6 135.2H380.2c-26.7 0-44.4 17.8-44.4 44.4V224c0 26.7 17.8 44.4 44.4 44.4h533.3c26.7 0 44.4-17.8 44.4-44.4v-44.4c.1-26.6-17.7-44.4-44.3-44.4zm-755.6 0h-44.4c-22.2 0-44.4 22.2-44.4 44.4V224c0 22.2 22.2 44.4 44.4 44.4H158c22.2 0 44.4-22.2 44.4-44.4v-44.4c.1-22.2-22.1-44.4-44.4-44.4zm0 311.1h-44.4c-22.2 0-44.4 22.2-44.4 44.4v44.4c0 22.2 22.2 44.4 44.4 44.4H158c22.2 0 44.4-22.2 44.4-44.4v-44.4c.1-22.2-22.1-44.4-44.4-44.4zm755.6 0H380.2c-26.7 0-44.4 17.8-44.4 44.4v44.4c0 26.7 17.8 44.4 44.4 44.4h533.3c26.7 0 44.4-17.8 44.4-44.4v-44.4c.1-26.6-17.7-44.4-44.3-44.4zM158 757.4h-44.4c-22.2 0-44.4 22.2-44.4 44.4v44.4c0 22.2 22.2 44.4 44.4 44.4H158c22.2 0 44.4-22.2 44.4-44.4v-44.4c.1-22.2-22.1-44.4-44.4-44.4zm755.6 0H380.2c-26.7 0-44.4 17.8-44.4 44.4v44.4c0 26.7 17.8 44.4 44.4 44.4h533.3c26.7 0 44.4-17.8 44.4-44.4v-44.4c.1-26.6-17.7-44.4-44.3-44.4z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" class="icon" viewBox="0 0 1024 1024"><path d="M913.6 135.2H380.2c-26.7 0-44.4 17.8-44.4 44.4V224c0 26.7 17.8 44.4 44.4 44.4h533.3c26.7 0 44.4-17.8 44.4-44.4v-44.4c.1-26.6-17.7-44.4-44.3-44.4zm-755.6 0h-44.4c-22.2 0-44.4 22.2-44.4 44.4V224c0 22.2 22.2 44.4 44.4 44.4H158c22.2 0 44.4-22.2 44.4-44.4v-44.4c.1-22.2-22.1-44.4-44.4-44.4zm0 311.1h-44.4c-22.2 0-44.4 22.2-44.4 44.4v44.4c0 22.2 22.2 44.4 44.4 44.4H158c22.2 0 44.4-22.2 44.4-44.4v-44.4c.1-22.2-22.1-44.4-44.4-44.4zm755.6 0H380.2c-26.7 0-44.4 17.8-44.4 44.4v44.4c0 26.7 17.8 44.4 44.4 44.4h533.3c26.7 0 44.4-17.8 44.4-44.4v-44.4c.1-26.6-17.7-44.4-44.3-44.4zM158 757.4h-44.4c-22.2 0-44.4 22.2-44.4 44.4v44.4c0 22.2 22.2 44.4 44.4 44.4H158c22.2 0 44.4-22.2 44.4-44.4v-44.4c.1-22.2-22.1-44.4-44.4-44.4zm755.6 0H380.2c-26.7 0-44.4 17.8-44.4 44.4v44.4c0 26.7 17.8 44.4 44.4 44.4h533.3c26.7 0 44.4-17.8 44.4-44.4v-44.4c.1-26.6-17.7-44.4-44.3-44.4z"/></svg>
|
||||
|
Before Width: | Height: | Size: 971 B After Width: | Height: | Size: 971 B |
@@ -1 +1 @@
|
||||
<svg class="icon" viewBox="0 0 1028 1024" xmlns="http://www.w3.org/2000/svg" width="200.781" height="200"><path d="M989.867 234.667H499.2c-17.067 0-34.133-21.334-34.133-42.667 0-25.6 12.8-42.667 34.133-42.667h490.667c17.066 0 34.133 17.067 34.133 42.667 0 21.333-12.8 42.667-34.133 42.667zm-473.6 128h465.066c25.6 0 46.934 21.333 46.934 42.666 0 25.6-21.334 42.667-46.934 42.667H516.267c-25.6 0-46.934-17.067-46.934-42.667s21.334-42.666 46.934-42.666zm0 298.666c-25.6 0-46.934-21.333-46.934-42.666 0-25.6 21.334-42.667 46.934-42.667h465.066c25.6 0 46.934 17.067 46.934 42.667s-21.334 42.666-46.934 42.666H516.267zm4.266 128H972.8c29.867 0 51.2 17.067 51.2 42.667s-21.333 42.667-51.2 42.667H520.533c-29.866 0-51.2-17.067-51.2-42.667s21.334-42.667 51.2-42.667zm-192 25.6c-17.066 17.067-46.933 17.067-64 0L12.8 541.867c-17.067-17.067-17.067-51.2 0-68.267l251.733-273.067c17.067-17.066 46.934-17.066 64 0s17.067 51.2 0 68.267L106.667 507.733l221.866 238.934c17.067 21.333 17.067 51.2 0 68.266z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="200.781" height="200" class="icon" viewBox="0 0 1028 1024"><path d="M989.867 234.667H499.2c-17.067 0-34.133-21.334-34.133-42.667 0-25.6 12.8-42.667 34.133-42.667h490.667c17.066 0 34.133 17.067 34.133 42.667 0 21.333-12.8 42.667-34.133 42.667zm-473.6 128h465.066c25.6 0 46.934 21.333 46.934 42.666 0 25.6-21.334 42.667-46.934 42.667H516.267c-25.6 0-46.934-17.067-46.934-42.667s21.334-42.666 46.934-42.666zm0 298.666c-25.6 0-46.934-21.333-46.934-42.666 0-25.6 21.334-42.667 46.934-42.667h465.066c25.6 0 46.934 17.067 46.934 42.667s-21.334 42.666-46.934 42.666H516.267zm4.266 128H972.8c29.867 0 51.2 17.067 51.2 42.667s-21.333 42.667-51.2 42.667H520.533c-29.866 0-51.2-17.067-51.2-42.667s21.334-42.667 51.2-42.667zm-192 25.6c-17.066 17.067-46.933 17.067-64 0L12.8 541.867c-17.067-17.067-17.067-51.2 0-68.267l251.733-273.067c17.067-17.066 46.934-17.066 64 0s17.067 51.2 0 68.267L106.667 507.733l221.866 238.934c17.067 21.333 17.067 51.2 0 68.266z"/></svg>
|
||||
|
Before Width: | Height: | Size: 998 B After Width: | Height: | Size: 998 B |
@@ -47,7 +47,7 @@ body {
|
||||
font-family: Lato, "PingFang SC", "Microsoft YaHei", sans-serif;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
|
||||
&.hidden {
|
||||
&.overflow-hidden {
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ const defaultSetting = ref({
|
||||
'%H:%M:%S',
|
||||
],
|
||||
// https://www.tiny.cloud/docs/tinymce/6/file-image-upload/#images_upload_handler
|
||||
images_upload_handler: (blobInfo: any, progress: any) => new Promise((resolve, reject) => {
|
||||
images_upload_handler: (blobInfo: any) => new Promise((resolve) => {
|
||||
const img = `data:image/jpeg;base64,${blobInfo.base64()}`
|
||||
resolve(img)
|
||||
}),
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
<script lang="ts" setup>
|
||||
const router = useRouter()
|
||||
|
||||
const data = ref({
|
||||
inter: NaN,
|
||||
countdown: 5,
|
||||
})
|
||||
|
||||
onUnmounted(() => {
|
||||
data.value.inter && window.clearInterval(data.value.inter)
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
data.value.inter = window.setInterval(() => {
|
||||
data.value.countdown--
|
||||
if (data.value.countdown === 0) {
|
||||
data.value.inter && window.clearInterval(data.value.inter)
|
||||
goBack()
|
||||
}
|
||||
}, 1000)
|
||||
})
|
||||
|
||||
function goBack() {
|
||||
router.push('/')
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="notallowed">
|
||||
<svg-icon name="403" class="icon" />
|
||||
<div class="content">
|
||||
<h1>403</h1>
|
||||
<div class="desc">
|
||||
抱歉,你无权访问该页面
|
||||
</div>
|
||||
<el-button type="primary" @click="goBack">
|
||||
{{ data.countdown }} 秒后,返回首页
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.notallowed {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 700px;
|
||||
|
||||
@include position-center(xy);
|
||||
|
||||
.icon {
|
||||
width: 400px;
|
||||
height: 400px;
|
||||
}
|
||||
|
||||
.content {
|
||||
h1 {
|
||||
margin: 0;
|
||||
font-size: 72px;
|
||||
color: var(--el-text-color-primary);
|
||||
}
|
||||
|
||||
.desc {
|
||||
margin: 20px 0 30px;
|
||||
font-size: 20px;
|
||||
color: var(--el-text-color-secondary);
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,7 +1,6 @@
|
||||
<script lang="ts" setup name="AppSetting">
|
||||
import { useClipboard } from '@vueuse/core'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { cloneDeep } from 'lodash-es'
|
||||
import eventBus from '@/utils/eventBus'
|
||||
import useSettingsStore from '@/store/modules/settings'
|
||||
import useMenuStore from '@/store/modules/menu'
|
||||
|
||||
@@ -18,15 +18,15 @@ onMounted(() => {
|
||||
<el-drawer v-model="isShow" title="快捷键介绍" direction="rtl" :size="360">
|
||||
<el-descriptions title="全局" :column="1" border>
|
||||
<el-descriptions-item label="查看系统信息">
|
||||
Alt + I
|
||||
{{ settingsStore.os === 'mac' ? '⌥' : 'Alt' }} + I
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item v-if="settingsStore.settings.navSearch.enable && settingsStore.settings.navSearch.enableHotkeys" label="唤起导航搜索">
|
||||
Alt + S
|
||||
{{ settingsStore.os === 'mac' ? '⌥' : 'Alt' }} + S
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions v-if="settingsStore.settings.menu.enableHotkeys && ['side', 'head'].includes(settingsStore.settings.menu.menuMode)" title="主导航" :column="1" border>
|
||||
<el-descriptions-item label="激活下一个主导航">
|
||||
Alt + `
|
||||
{{ settingsStore.os === 'mac' ? '⌥' : 'Alt' }} + `
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-drawer>
|
||||
|
||||
@@ -6,7 +6,7 @@ import eventBus from '@/utils/eventBus'
|
||||
import useSettingsStore from '@/store/modules/settings'
|
||||
import useRouteStore from '@/store/modules/route'
|
||||
import useMenuStore from '@/store/modules/menu'
|
||||
import type { Menu, Route } from '#/global'
|
||||
import type { Menu } from '#/global'
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
@@ -248,7 +248,7 @@ function pageJump(path: listTypes['path'], link: listTypes['link']) {
|
||||
<div v-if="settingsStore.mode === 'pc'" class="tips">
|
||||
<div class="tip">
|
||||
<el-tag type="info" size="large">
|
||||
Alt + S
|
||||
{{ settingsStore.os === 'mac' ? '⌥' : 'Alt' }} + S
|
||||
</el-tag>
|
||||
<el-tag type="info" size="large">
|
||||
唤醒搜索面板
|
||||
|
||||
@@ -36,9 +36,6 @@ function userCommand(command: 'home' | 'setting' | 'hotkeys' | 'logout') {
|
||||
break
|
||||
}
|
||||
}
|
||||
function pro() {
|
||||
window.open('https://hooray.gitee.io/fantastic-admin-pro-example/', '_blank')
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
@@ -23,10 +23,10 @@ const isLink = computed(() => !!routeInfo.meta.link)
|
||||
watch(() => settingsStore.settings.menu.subMenuCollapse, (val) => {
|
||||
if (settingsStore.mode === 'mobile') {
|
||||
if (!val) {
|
||||
document.body.classList.add('hidden')
|
||||
document.body.classList.add('overflow-hidden')
|
||||
}
|
||||
else {
|
||||
document.body.classList.remove('hidden')
|
||||
document.body.classList.remove('overflow-hidden')
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { createApp } from 'vue'
|
||||
import './utils/system.copyright'
|
||||
import ElementPlus from 'element-plus'
|
||||
import App from './App.vue'
|
||||
import pinia from './store'
|
||||
|
||||
@@ -120,7 +120,7 @@ router.afterEach((to, from) => {
|
||||
settingsStore.settings.app.enableProgress && (isLoading.value = false)
|
||||
// 设置页面 title
|
||||
if (settingsStore.settings.app.routeBaseOn !== 'filesystem') {
|
||||
settingsStore.setTitle(to.meta.breadcrumbNeste?.at(-1)?.title)
|
||||
settingsStore.setTitle(to.meta.breadcrumbNeste?.at(-1)?.title ?? to.meta.title)
|
||||
}
|
||||
else {
|
||||
settingsStore.setTitle(to.meta.title)
|
||||
|
||||
@@ -99,11 +99,15 @@ const useMenuStore = defineStore(
|
||||
let isAuth = false
|
||||
if (menu.meta && menu.meta.auth) {
|
||||
isAuth = permissions.some((auth) => {
|
||||
return typeof menu.meta?.auth === 'string'
|
||||
? menu.meta.auth === auth
|
||||
: typeof menu.meta?.auth === 'object'
|
||||
? menu.meta.auth.includes(auth)
|
||||
: false
|
||||
if (typeof menu.meta?.auth === 'string') {
|
||||
return menu.meta.auth !== '' ? menu.meta.auth === auth : true
|
||||
}
|
||||
else if (typeof menu.meta?.auth === 'object') {
|
||||
return menu.meta.auth.length > 0 ? menu.meta.auth.includes(auth) : true
|
||||
}
|
||||
else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { cloneDeep } from 'lodash-es'
|
||||
import type { RouteRecordRaw } from 'vue-router'
|
||||
import type { RouteMeta, RouteRecordRaw } from 'vue-router'
|
||||
import useSettingsStore from './settings'
|
||||
import useUserStore from './user'
|
||||
import api from '@/api'
|
||||
@@ -15,26 +15,27 @@ const useRouteStore = defineStore(
|
||||
const userStore = useUserStore()
|
||||
|
||||
const isGenerate = ref(false)
|
||||
const routes = ref<Route.recordMainRaw[]>([])
|
||||
const fileSystemRoutes = ref<RouteRecordRaw[]>([])
|
||||
const routesRaw = ref<Route.recordMainRaw[]>([])
|
||||
const filesystemRoutesRaw = ref<RouteRecordRaw[]>([])
|
||||
const currentRemoveRoutes = ref<Function[]>([])
|
||||
|
||||
// 将多层嵌套路由处理成两层,保留顶层和最子层路由,中间层级将被拍平
|
||||
function flatAsyncRoutes<T extends RouteRecordRaw>(routes: T): T {
|
||||
if (routes.children) {
|
||||
routes.children = flatAsyncRoutesRecursive(routes.children, [{
|
||||
path: routes.path,
|
||||
title: routes.meta?.title,
|
||||
hide: !routes.meta?.breadcrumb && routes.meta?.breadcrumb === false,
|
||||
}], routes.path)
|
||||
function flatAsyncRoutes<T extends RouteRecordRaw>(route: T): T {
|
||||
if (route.children) {
|
||||
route.children = flatAsyncRoutesRecursive(route.children, [{
|
||||
path: route.path,
|
||||
title: route.meta?.title,
|
||||
hide: !route.meta?.breadcrumb && route.meta?.breadcrumb === false,
|
||||
}], route.path, route.meta?.auth)
|
||||
}
|
||||
return routes
|
||||
return route
|
||||
}
|
||||
function flatAsyncRoutesRecursive(routes: RouteRecordRaw[], breadcrumb: Route.breadcrumb[] = [], baseUrl = ''): RouteRecordRaw[] {
|
||||
function flatAsyncRoutesRecursive(routes: RouteRecordRaw[], breadcrumb: Route.breadcrumb[] = [], baseUrl = '', baseAuth: RouteMeta['auth']): RouteRecordRaw[] {
|
||||
const res: RouteRecordRaw[] = []
|
||||
routes.forEach((route) => {
|
||||
if (route.children) {
|
||||
const childrenBaseUrl = resolveRoutePath(baseUrl, route.path)
|
||||
const childrenBaseAuth = baseAuth ?? route.meta?.auth
|
||||
const tmpBreadcrumb = cloneDeep(breadcrumb)
|
||||
tmpBreadcrumb.push({
|
||||
path: childrenBaseUrl,
|
||||
@@ -46,10 +47,11 @@ const useRouteStore = defineStore(
|
||||
if (!tmpRoute.meta) {
|
||||
tmpRoute.meta = {}
|
||||
}
|
||||
tmpRoute.meta.auth = childrenBaseAuth
|
||||
tmpRoute.meta.breadcrumbNeste = tmpBreadcrumb
|
||||
delete tmpRoute.children
|
||||
res.push(tmpRoute)
|
||||
const childrenRoutes = flatAsyncRoutesRecursive(route.children, tmpBreadcrumb, childrenBaseUrl)
|
||||
const childrenRoutes = flatAsyncRoutesRecursive(route.children, tmpBreadcrumb, childrenBaseUrl, childrenBaseAuth)
|
||||
childrenRoutes.forEach((item) => {
|
||||
// 如果 path 一样则覆盖,因为子路由的 path 可能设置为空,导致和父路由一样,直接注册会提示路由重复
|
||||
if (res.some(v => v.path === item.path)) {
|
||||
@@ -77,6 +79,7 @@ const useRouteStore = defineStore(
|
||||
if (!tmpRoute.meta) {
|
||||
tmpRoute.meta = {}
|
||||
}
|
||||
tmpRoute.meta.auth = baseAuth ?? tmpRoute.meta?.auth
|
||||
tmpRoute.meta.breadcrumbNeste = tmpBreadcrumb
|
||||
res.push(tmpRoute)
|
||||
}
|
||||
@@ -87,15 +90,23 @@ const useRouteStore = defineStore(
|
||||
const flatRoutes = computed(() => {
|
||||
const settingsStore = useSettingsStore()
|
||||
const returnRoutes: RouteRecordRaw[] = []
|
||||
if (routes.value) {
|
||||
if (routesRaw.value) {
|
||||
if (settingsStore.settings.app.routeBaseOn !== 'filesystem') {
|
||||
routes.value.forEach((item) => {
|
||||
returnRoutes.push(...cloneDeep(item.children))
|
||||
routesRaw.value.forEach((item) => {
|
||||
const tmpRoutes = cloneDeep(item.children) as RouteRecordRaw[]
|
||||
tmpRoutes.map((v) => {
|
||||
if (!v.meta) {
|
||||
v.meta = {}
|
||||
}
|
||||
v.meta.auth = item.meta?.auth ?? v.meta?.auth
|
||||
return v
|
||||
})
|
||||
returnRoutes.push(...tmpRoutes)
|
||||
})
|
||||
returnRoutes.forEach(item => flatAsyncRoutes(item))
|
||||
}
|
||||
else {
|
||||
returnRoutes.push(...cloneDeep(fileSystemRoutes.value))
|
||||
returnRoutes.push(...cloneDeep(filesystemRoutesRaw.value))
|
||||
}
|
||||
}
|
||||
return returnRoutes
|
||||
@@ -111,11 +122,15 @@ const useRouteStore = defineStore(
|
||||
let isAuth = false
|
||||
if (route.meta?.auth) {
|
||||
isAuth = permissions.some((auth) => {
|
||||
return typeof route.meta?.auth === 'string'
|
||||
? route.meta.auth === auth
|
||||
: typeof route.meta?.auth === 'object'
|
||||
? route.meta.auth.includes(auth)
|
||||
: false
|
||||
if (typeof route.meta?.auth === 'string') {
|
||||
return route.meta.auth !== '' ? route.meta.auth === auth : true
|
||||
}
|
||||
else if (typeof route.meta?.auth === 'object') {
|
||||
return route.meta.auth.length > 0 ? route.meta.auth.includes(auth) : true
|
||||
}
|
||||
else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
}
|
||||
else {
|
||||
@@ -140,20 +155,26 @@ const useRouteStore = defineStore(
|
||||
})
|
||||
return res
|
||||
}
|
||||
// 根据权限动态生成路由(前端生成)
|
||||
async function generateRoutesAtFront(asyncRoutes: Route.recordMainRaw[]) {
|
||||
let accessedRoutes
|
||||
const routes = computed(() => {
|
||||
let returnRoutes: Route.recordMainRaw[]
|
||||
// 如果权限功能开启,则需要对路由数据进行筛选过滤
|
||||
if (settingsStore.settings.app.enablePermission) {
|
||||
const permissions = await userStore.getPermissions()
|
||||
accessedRoutes = filterAsyncRoutes(asyncRoutes, permissions)
|
||||
returnRoutes = filterAsyncRoutes(routesRaw.value as any, userStore.permissions)
|
||||
}
|
||||
else {
|
||||
accessedRoutes = cloneDeep(asyncRoutes)
|
||||
returnRoutes = cloneDeep(routesRaw.value) as any
|
||||
}
|
||||
return returnRoutes
|
||||
})
|
||||
|
||||
// 根据权限动态生成路由(前端生成)
|
||||
async function generateRoutesAtFront(asyncRoutes: Route.recordMainRaw[]) {
|
||||
// 设置 routes 数据
|
||||
routesRaw.value = cloneDeep(asyncRoutes) as any
|
||||
if (settingsStore.settings.app.enablePermission) {
|
||||
await userStore.getPermissions()
|
||||
}
|
||||
isGenerate.value = true
|
||||
routes.value = accessedRoutes.filter(item => item.children?.length !== 0) as any
|
||||
}
|
||||
// 格式化后端路由数据
|
||||
function formatBackRoutes(routes: any, views = import.meta.glob('../../views/**/*.vue')): Route.recordMainRaw[] {
|
||||
@@ -178,35 +199,23 @@ const useRouteStore = defineStore(
|
||||
await api.get('route/list', {
|
||||
baseURL: '/mock/',
|
||||
}).then(async (res) => {
|
||||
const asyncRoutes = formatBackRoutes(res.data)
|
||||
let accessedRoutes
|
||||
// 如果权限功能开启,则需要对路由数据进行筛选过滤
|
||||
if (settingsStore.settings.app.enablePermission) {
|
||||
const permissions = await userStore.getPermissions()
|
||||
accessedRoutes = filterAsyncRoutes(asyncRoutes, permissions)
|
||||
}
|
||||
else {
|
||||
accessedRoutes = cloneDeep(asyncRoutes)
|
||||
}
|
||||
// 设置 routes 数据
|
||||
routesRaw.value = formatBackRoutes(res.data)
|
||||
if (settingsStore.settings.app.enablePermission) {
|
||||
userStore.getPermissions()
|
||||
}
|
||||
isGenerate.value = true
|
||||
routes.value = accessedRoutes.filter(item => item.children.length !== 0) as any
|
||||
}).catch(() => {})
|
||||
}
|
||||
// 根据权限动态生成路由(文件系统生成)
|
||||
async function generateRoutesAtFilesystem(asyncRoutes: RouteRecordRaw[]) {
|
||||
let accessedRoutes
|
||||
// 设置 routes 数据
|
||||
filesystemRoutesRaw.value = cloneDeep(asyncRoutes) as any
|
||||
// 如果权限功能开启,则需要对路由数据进行筛选过滤
|
||||
if (settingsStore.settings.app.enablePermission) {
|
||||
const permissions = await userStore.getPermissions()
|
||||
accessedRoutes = filterAsyncRoutes(asyncRoutes, permissions)
|
||||
await userStore.getPermissions()
|
||||
}
|
||||
else {
|
||||
accessedRoutes = cloneDeep(asyncRoutes)
|
||||
}
|
||||
// 设置 routes 数据
|
||||
isGenerate.value = true
|
||||
fileSystemRoutes.value = accessedRoutes.filter(item => item.children?.length !== 0) as any
|
||||
}
|
||||
// 记录 accessRoutes 路由,用于登出时删除路由
|
||||
function setCurrentRemoveRoutes(routes: Function[]) {
|
||||
@@ -215,7 +224,8 @@ const useRouteStore = defineStore(
|
||||
// 清空动态路由
|
||||
function removeRoutes() {
|
||||
isGenerate.value = false
|
||||
routes.value = []
|
||||
routesRaw.value = []
|
||||
filesystemRoutesRaw.value = []
|
||||
currentRemoveRoutes.value.forEach((removeRoute) => {
|
||||
removeRoute()
|
||||
})
|
||||
@@ -225,7 +235,7 @@ const useRouteStore = defineStore(
|
||||
return {
|
||||
isGenerate,
|
||||
routes,
|
||||
fileSystemRoutes,
|
||||
currentRemoveRoutes,
|
||||
flatRoutes,
|
||||
flatSystemRoutes,
|
||||
generateRoutesAtFront,
|
||||
|
||||
@@ -31,6 +31,21 @@ const useSettingsStore = defineStore(
|
||||
immediate: true,
|
||||
})
|
||||
|
||||
// 操作系统
|
||||
const os = ref<'mac' | 'windows' | 'linux' | 'other'>('other')
|
||||
const agent = navigator.userAgent.toLowerCase()
|
||||
switch (true) {
|
||||
case agent.includes('mac os'):
|
||||
os.value = 'mac'
|
||||
break
|
||||
case agent.includes('windows'):
|
||||
os.value = 'windows'
|
||||
break
|
||||
case agent.includes('linux'):
|
||||
os.value = 'linux'
|
||||
break
|
||||
}
|
||||
|
||||
// 页面标题
|
||||
const title = ref<RouteMeta['title']>()
|
||||
// 设置网页标题
|
||||
@@ -92,6 +107,7 @@ const useSettingsStore = defineStore(
|
||||
|
||||
return {
|
||||
settings,
|
||||
os,
|
||||
title,
|
||||
setTitle,
|
||||
mode,
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
// Generated by 'unplugin-auto-import'
|
||||
/* eslint-disable */
|
||||
/* prettier-ignore */
|
||||
// @ts-nocheck
|
||||
// Generated by unplugin-auto-import
|
||||
export {}
|
||||
declare global {
|
||||
const EffectScope: typeof import('vue')['EffectScope']
|
||||
@@ -47,7 +50,6 @@ declare global {
|
||||
const readonly: typeof import('vue')['readonly']
|
||||
const ref: typeof import('vue')['ref']
|
||||
const resolveComponent: typeof import('vue')['resolveComponent']
|
||||
const resolveDirective: typeof import('vue')['resolveDirective']
|
||||
const setActivePinia: typeof import('pinia')['setActivePinia']
|
||||
const setMapStoreSuffix: typeof import('pinia')['setMapStoreSuffix']
|
||||
const shallowReactive: typeof import('vue')['shallowReactive']
|
||||
@@ -75,3 +77,8 @@ declare global {
|
||||
const watchPostEffect: typeof import('vue')['watchPostEffect']
|
||||
const watchSyncEffect: typeof import('vue')['watchSyncEffect']
|
||||
}
|
||||
// for type re-export
|
||||
declare global {
|
||||
// @ts-ignore
|
||||
export type { Component, ComponentPublicInstance, ComputedRef, InjectionKey, PropType, Ref, VNode } from 'vue'
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// generated by unplugin-vue-components
|
||||
// We suggest you to commit this file into source control
|
||||
/* eslint-disable */
|
||||
/* prettier-ignore */
|
||||
// @ts-nocheck
|
||||
// Generated by unplugin-vue-components
|
||||
// Read more: https://github.com/vuejs/core/pull/3399
|
||||
import '@vue/runtime-core'
|
||||
|
||||
@@ -17,6 +19,7 @@ declare module '@vue/runtime-core' {
|
||||
ImagePreview: typeof import('./../components/ImagePreview/index.vue')['default']
|
||||
ImagesUpload: typeof import('./../components/ImagesUpload/index.vue')['default']
|
||||
ImageUpload: typeof import('./../components/ImageUpload/index.vue')['default']
|
||||
NotAllowed: typeof import('./../components/NotAllowed/index.vue')['default']
|
||||
PageHeader: typeof import('./../components/PageHeader/index.vue')['default']
|
||||
PageMain: typeof import('./../components/PageMain/index.vue')['default']
|
||||
PcasCascader: typeof import('./../components/PcasCascader/index.vue')['default']
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import type { StyleValue } from "vue"
|
||||
import type { RouteRecordRaw, RouteMeta, NavigationGuard } from 'vue-router'
|
||||
import type { RouteRecordRaw } from 'vue-router'
|
||||
|
||||
type RecursiveRequired<T> = {
|
||||
[P in keyof T]-?: RecursiveRequired<T[P]>
|
||||
@@ -234,7 +233,7 @@ declare namespace Route {
|
||||
icon?: string
|
||||
auth?: string | string[]
|
||||
}
|
||||
children: recordRaw[]
|
||||
children: RouteRecordRaw[]
|
||||
}
|
||||
interface breadcrumb {
|
||||
path: string
|
||||
|
||||
@@ -16,21 +16,16 @@ export default function useAuth() {
|
||||
function auth(value: string | string[]) {
|
||||
let auth
|
||||
if (typeof value === 'string') {
|
||||
auth = hasPermission(value)
|
||||
auth = value !== '' ? hasPermission(value) : true
|
||||
}
|
||||
else {
|
||||
auth = value.some((item) => {
|
||||
return hasPermission(item)
|
||||
})
|
||||
auth = value.length > 0 ? value.some(item => hasPermission(item)) : true
|
||||
}
|
||||
return auth
|
||||
}
|
||||
|
||||
function authAll(value: string[]) {
|
||||
const auth = value.every((item) => {
|
||||
return hasPermission(item)
|
||||
})
|
||||
return auth
|
||||
return value.length > 0 ? value.every(item => hasPermission(item)) : true
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
/* eslint-disable no-console */
|
||||
// 请勿删除
|
||||
if (import.meta.env.PROD) {
|
||||
const copyright_common_style = 'font-size: 14px; margin-bottom: 2px; padding: 6px 8px; color: #fff;'
|
||||
const copyright_main_style = `${copyright_common_style} background: #e24329;`
|
||||
const copyright_sub_style = `${copyright_common_style} background: #707070;`
|
||||
if ((navigator.language).toLowerCase() === 'zh-cn') {
|
||||
console.info('%c由%cFantastic-admin%c驱动', copyright_sub_style, copyright_main_style, copyright_sub_style, '\nhttps://gitee.com/hooray/fantastic-admin')
|
||||
}
|
||||
else {
|
||||
console.info('%cPowered by%cFantastic-admin', copyright_sub_style, copyright_main_style, '\nhttps://github.com/hooray/fantastic-admin')
|
||||
}
|
||||
}
|
||||
|
||||
export {}
|
||||
@@ -220,7 +220,7 @@ function testAccount(account: string) {
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="captcha">
|
||||
<el-input ref="captcha" v-model="registerForm.captcha" placeholder="验证码" tabindex="2" autocomplete="on">
|
||||
<el-input v-model="registerForm.captcha" placeholder="验证码" tabindex="2" autocomplete="on">
|
||||
<template #prefix>
|
||||
<el-icon>
|
||||
<svg-icon name="ep:key" />
|
||||
@@ -277,7 +277,7 @@ function testAccount(account: string) {
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="captcha">
|
||||
<el-input ref="captcha" v-model="resetForm.captcha" placeholder="验证码" tabindex="2" autocomplete="on">
|
||||
<el-input v-model="resetForm.captcha" placeholder="验证码" tabindex="2" autocomplete="on">
|
||||
<template #prefix>
|
||||
<el-icon>
|
||||
<svg-icon name="ep:key" />
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
import { createHtmlPlugin } from 'vite-plugin-html'
|
||||
|
||||
export default function createHtml(env, isBuild) {
|
||||
const { VITE_APP_TITLE, VITE_APP_DEBUG_TOOL } = env
|
||||
let copyrightScript = ''
|
||||
if (isBuild) {
|
||||
const copyright_common_style = 'font-size: 14px; margin-bottom: 2px; padding: 6px 8px; color: #fff;'
|
||||
const copyright_main_style = `${copyright_common_style} background: #e24329;`
|
||||
const copyright_sub_style = `${copyright_common_style} background: #707070;`
|
||||
copyrightScript += `
|
||||
<script>
|
||||
if ((navigator.language || navigator.browserLanguage).toLowerCase() === 'zh-cn') {
|
||||
console.info('%c由%cFantastic-admin%c驱动', '${copyright_sub_style}', '${copyright_main_style}', '${copyright_sub_style}', '\\nhttps://gitee.com/hooray/fantastic-admin');
|
||||
} else {
|
||||
console.info('%cPowered by%cFantastic-admin', '${copyright_sub_style}', '${copyright_main_style}', '\\nhttps://github.com/hooray/fantastic-admin');
|
||||
}
|
||||
</script>
|
||||
`
|
||||
}
|
||||
let devtoolScript = ''
|
||||
switch (VITE_APP_DEBUG_TOOL) {
|
||||
case 'eruda':
|
||||
devtoolScript = `
|
||||
<script src="//unpkg.com/eruda/eruda.js"></script>
|
||||
<script>
|
||||
eruda.init()
|
||||
</script>
|
||||
`
|
||||
break
|
||||
case 'vconsole':
|
||||
devtoolScript = `
|
||||
<script src="//unpkg.com/vconsole/dist/vconsole.min.js"></script>
|
||||
<script>
|
||||
new VConsole()
|
||||
</script>
|
||||
`
|
||||
break
|
||||
}
|
||||
const loadingScript = `
|
||||
<script>
|
||||
(function(){
|
||||
if(!!window.ActiveXObject || "ActiveXObject" in window) {
|
||||
document.getElementById('browser-upgrade').style.display = 'block'
|
||||
} else {
|
||||
var Loading = document.querySelector('.loading')
|
||||
Loading.classList.add('animate')
|
||||
Loading.addEventListener('animationend', function() {
|
||||
setTimeout(function() {
|
||||
Loading.classList.remove('animate')
|
||||
}, 600)
|
||||
setTimeout(function() {
|
||||
Loading.classList.add('animate')
|
||||
}, 1000)
|
||||
})
|
||||
}
|
||||
})()
|
||||
</script>
|
||||
`
|
||||
return createHtmlPlugin({
|
||||
inject: {
|
||||
data: {
|
||||
title: VITE_APP_TITLE,
|
||||
copyrightScript,
|
||||
loadingScript,
|
||||
devtoolScript,
|
||||
},
|
||||
},
|
||||
minify: isBuild,
|
||||
})
|
||||
}
|
||||
@@ -3,7 +3,6 @@ import vue from '@vitejs/plugin-vue'
|
||||
import vueJsx from '@vitejs/plugin-vue-jsx'
|
||||
|
||||
import createInspector from './inspector'
|
||||
import createHtml from './html'
|
||||
import createAutoImport from './auto-import'
|
||||
import createComponents from './components'
|
||||
import createSetupExtend from './setup-extend'
|
||||
@@ -17,13 +16,10 @@ import createBanner from './banner'
|
||||
|
||||
export default function createVitePlugins(viteEnv, isBuild = false) {
|
||||
const vitePlugins: (PluginOption | PluginOption[])[] = [
|
||||
vue({
|
||||
reactivityTransform: true,
|
||||
}),
|
||||
vue(),
|
||||
vueJsx(),
|
||||
]
|
||||
vitePlugins.push(createInspector())
|
||||
vitePlugins.push(createHtml(viteEnv, isBuild))
|
||||
vitePlugins.push(createAutoImport())
|
||||
vitePlugins.push(createComponents())
|
||||
vitePlugins.push(createSetupExtend())
|
||||
|
||||