mirror of
https://github.com/zclzone/vue-naive-admin.git
synced 2026-01-22 23:50:22 +08:00
Compare commits
16 Commits
5b4b0bd9ad
...
2.x
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
22693b02ee | ||
|
|
cba38db3c9 | ||
|
|
2e03a4b1a6 | ||
|
|
a5a20a30c9 | ||
|
|
9a7170f10c | ||
|
|
fb4d18cc0a | ||
|
|
d078bba63e | ||
|
|
5663f58b6e | ||
|
|
32700aee17 | ||
|
|
e593ba3ca5 | ||
|
|
d9de814074 | ||
|
|
5457c4e70b | ||
|
|
6757e47fb1 | ||
|
|
3fbcfdf0e1 | ||
|
|
d6764158f3 | ||
|
|
4785842629 |
@@ -6,7 +6,7 @@ VITE_PUBLIC_PATH = '/'
|
||||
|
||||
# Axios 基础路径
|
||||
# VITE_AXIOS_BASE_URL = '/api' # 用于代理
|
||||
VITE_AXIOS_BASE_URL = 'https://mock.apipark.cn/m1/3776410-0-default' # apifox云端mock
|
||||
VITE_AXIOS_BASE_URL = 'https://m1.apifoxmock.com/m1/3776410-3408296-default' # apifox云端mock
|
||||
|
||||
# 代理配置-target
|
||||
VITE_PROXY_TARGET = 'http://localhost:8085'
|
||||
|
||||
@@ -4,7 +4,5 @@ VITE_USE_HASH = 'false'
|
||||
# 资源公共路径,需要以 /开头和结尾
|
||||
VITE_PUBLIC_PATH = '/'
|
||||
|
||||
VITE_AXIOS_BASE_URL = '/api' # 用于代理
|
||||
|
||||
# 代理配置-target
|
||||
VITE_PROXY_TARGET = 'http://localhost:8085'
|
||||
# VITE_AXIOS_BASE_URL = '/api' # 用于代理
|
||||
VITE_AXIOS_BASE_URL = 'https://m1.apifoxmock.com/m1/3776410-3408296-default' # apifox云端mock
|
||||
|
||||
@@ -5,12 +5,17 @@
|
||||
</p>
|
||||
<p align="center">
|
||||
<a href="./LICENSE"><img alt="MIT License" src="https://badgen.net/github/license/zclzone/vue-naive-admin"/></a>
|
||||
<a href="https://gitcode.com/zclzone/vue-naive-admin"><img alt="GitCode" src="https://gitcode.com/zclzone/vue-naive-admin/star/badge.svg
|
||||
"/></a>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
<a href="https://hellogithub.com/repository/54f19ba1f9ae4238b3cbd111f3c428b0" target="_blank"><img src="https://abroad.hellogithub.com/v1/widgets/recommend.svg?rid=54f19ba1f9ae4238b3cbd111f3c428b0&claim_uid=jXGayRdJZScqMNr" alt="Featured|HelloGitHub" style="width: 250px; height: 54px;" width="250" height="54" /></a>
|
||||
|
||||
> [!Tip]
|
||||
> 我们提供Web(PC+H5+小程序)的技术支持服务及定制开发,不限前后端,详细需求可联系作者,微信: isme-admin,邮箱: zclzone@outlook.com
|
||||
|
||||
## 简介
|
||||
|
||||
Vue Naive Admin 是一款极简风格的后台管理模板,包含前后端解决方案,前端使用 Vite + Vue3 + Pinia + Unocss,后端使用 Nestjs + TypeOrm + MySql,简单易用,赏心悦目,历经十几次重构和细节打磨,诚意满满!!
|
||||
@@ -55,6 +60,7 @@ Vue Naive Admin 提供一套后端代码,技术栈使用 Nestjs + TypeOrm + My
|
||||
|
||||
- 源码-github: [isme-nest-serve | github](https://github.com/zclzone/isme-nest-serve)
|
||||
- 源码-gitee: [isme-nest-serve | gitee](https://gitee.com/isme-admin/isme-nest-serve)
|
||||
- 源码-gitcode: [isme-nest-serve | gitcode](https://gitcode.com/zclzone/isme-nest-serve)
|
||||
|
||||
## 文档
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ESNext",
|
||||
"jsx": "preserve",
|
||||
"baseUrl": "./",
|
||||
"moduleResolution": "node",
|
||||
"paths": {
|
||||
"@/*": ["src/*"],
|
||||
"~/*": ["./*"]
|
||||
},
|
||||
"jsx": "preserve",
|
||||
"allowJs": true
|
||||
},
|
||||
"exclude": ["node_modules", "dist"]
|
||||
|
||||
66
package.json
66
package.json
@@ -13,46 +13,46 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@arco-design/color": "^0.4.0",
|
||||
"@vueuse/core": "^13.3.0",
|
||||
"axios": "^1.10.0",
|
||||
"dayjs": "^1.11.13",
|
||||
"echarts": "^5.6.0",
|
||||
"lodash-es": "^4.17.21",
|
||||
"naive-ui": "^2.42.0",
|
||||
"pinia": "^3.0.3",
|
||||
"pinia-plugin-persistedstate": "^4.3.0",
|
||||
"vue": "^3.5.17",
|
||||
"vue-echarts": "^7.0.3",
|
||||
"vue-router": "^4.5.1",
|
||||
"@vueuse/core": "^14.1.0",
|
||||
"axios": "^1.13.2",
|
||||
"dayjs": "^1.11.19",
|
||||
"echarts": "^6.0.0",
|
||||
"lodash-es": "^4.17.22",
|
||||
"naive-ui": "^2.43.2",
|
||||
"pinia": "^3.0.4",
|
||||
"pinia-plugin-persistedstate": "^4.7.1",
|
||||
"vue": "^3.5.27",
|
||||
"vue-echarts": "^8.0.1",
|
||||
"vue-router": "^4.6.4",
|
||||
"xlsx": "^0.18.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antfu/eslint-config": "^4.13.1",
|
||||
"@iconify/json": "^2.2.350",
|
||||
"@unocss/eslint-config": "^66.2.3",
|
||||
"@unocss/eslint-plugin": "^66.2.3",
|
||||
"@unocss/preset-rem-to-px": "^66.2.3",
|
||||
"@vitejs/plugin-vue": "^5.2.4",
|
||||
"@vitejs/plugin-vue-jsx": "^4.2.0",
|
||||
"eslint": "^9.29.0",
|
||||
"eslint-plugin-format": "^1.0.1",
|
||||
"@antfu/eslint-config": "^7.0.1",
|
||||
"@iconify/json": "^2.2.430",
|
||||
"@unocss/eslint-config": "^66.6.0",
|
||||
"@unocss/eslint-plugin": "^66.6.0",
|
||||
"@unocss/preset-rem-to-px": "^66.6.0",
|
||||
"@vitejs/plugin-vue": "^6.0.3",
|
||||
"@vitejs/plugin-vue-jsx": "^5.1.3",
|
||||
"eslint": "^9.39.2",
|
||||
"eslint-plugin-format": "^1.3.1",
|
||||
"esno": "^4.8.0",
|
||||
"fs-extra": "^11.3.0",
|
||||
"glob": "^11.0.3",
|
||||
"lint-staged": "^16.1.2",
|
||||
"rollup-plugin-visualizer": "^6.0.3",
|
||||
"simple-git-hooks": "^2.13.0",
|
||||
"taze": "^19.1.0",
|
||||
"unocss": "^66.2.3",
|
||||
"unplugin-auto-import": "^19.3.0",
|
||||
"unplugin-vue-components": "^28.7.0",
|
||||
"vite": "^6.3.5",
|
||||
"vite-plugin-router-warn": "^1.0.0",
|
||||
"vite-plugin-vue-devtools": "^7.7.7",
|
||||
"fs-extra": "^11.3.3",
|
||||
"glob": "^13.0.0",
|
||||
"lint-staged": "^16.2.7",
|
||||
"rollup-plugin-visualizer": "^6.0.5",
|
||||
"simple-git-hooks": "^2.13.1",
|
||||
"taze": "^19.9.2",
|
||||
"unocss": "^66.6.0",
|
||||
"unplugin-auto-import": "^21.0.0",
|
||||
"unplugin-vue-components": "^31.0.0",
|
||||
"vite": "^7.3.1",
|
||||
"vite-plugin-router-warn": "^2.0.0",
|
||||
"vite-plugin-vue-devtools": "^8.0.5",
|
||||
"vue3-intro-step": "^1.0.5"
|
||||
},
|
||||
"simple-git-hooks": {
|
||||
"pre-commit": "pnpm lint-staged"
|
||||
"pre-commit": "npx lint-staged"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*": "eslint --fix"
|
||||
|
||||
5060
pnpm-lock.yaml
generated
5060
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -39,6 +39,7 @@ async function toggleDark({ clientX, clientY }) {
|
||||
duration: 500,
|
||||
easing: 'ease-in',
|
||||
pseudoElement: `::view-transition-${isDark.value ? 'old' : 'new'}(root)`,
|
||||
fill: 'both',
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
@@ -34,8 +34,8 @@ html,
|
||||
-webkit-text-size-adjust: 100%; /* 2 */
|
||||
-moz-tab-size: 4; /* 3 */
|
||||
tab-size: 4; /* 3 */
|
||||
font-family: ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
||||
'Noto Color Emoji'; /* 4 */
|
||||
font-family:
|
||||
ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; /* 4 */
|
||||
font-feature-settings: normal; /* 5 */
|
||||
font-variation-settings: normal; /* 6 */
|
||||
-webkit-tap-highlight-color: transparent; /* 7 */
|
||||
@@ -114,7 +114,8 @@ code,
|
||||
kbd,
|
||||
samp,
|
||||
pre {
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace; /* 1 */
|
||||
font-family:
|
||||
ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace; /* 1 */
|
||||
font-feature-settings: normal; /* 2 */
|
||||
font-variation-settings: normal; /* 3 */
|
||||
font-size: 1em; /* 4 */
|
||||
|
||||
@@ -10,45 +10,34 @@
|
||||
import { useAuthStore } from '@/store'
|
||||
|
||||
let isConfirming = false
|
||||
|
||||
function handleAuthExpired(content, needTip) {
|
||||
if (isConfirming || !needTip)
|
||||
return
|
||||
isConfirming = true
|
||||
$dialog.confirm({
|
||||
title: '提示',
|
||||
type: 'info',
|
||||
content,
|
||||
confirm() {
|
||||
useAuthStore().logout()
|
||||
window.$message?.success('已退出登录')
|
||||
isConfirming = false
|
||||
},
|
||||
cancel() {
|
||||
isConfirming = false
|
||||
},
|
||||
})
|
||||
return false
|
||||
}
|
||||
|
||||
export function resolveResError(code, message, needTip = true) {
|
||||
switch (code) {
|
||||
case 401:
|
||||
if (isConfirming || !needTip)
|
||||
return
|
||||
isConfirming = true
|
||||
$dialog.confirm({
|
||||
title: '提示',
|
||||
type: 'info',
|
||||
content: '登录已过期,是否重新登录?',
|
||||
confirm() {
|
||||
useAuthStore().logout()
|
||||
window.$message?.success('已退出登录')
|
||||
isConfirming = false
|
||||
},
|
||||
cancel() {
|
||||
isConfirming = false
|
||||
},
|
||||
})
|
||||
return false
|
||||
return handleAuthExpired('登录已过期,是否重新登录?', needTip)
|
||||
case 11007:
|
||||
case 11008:
|
||||
if (isConfirming || !needTip)
|
||||
return
|
||||
isConfirming = true
|
||||
$dialog.confirm({
|
||||
title: '提示',
|
||||
type: 'info',
|
||||
content: `${message},是否重新登录?`,
|
||||
confirm() {
|
||||
useAuthStore().logout()
|
||||
window.$message?.success('已退出登录')
|
||||
isConfirming = false
|
||||
},
|
||||
cancel() {
|
||||
isConfirming = false
|
||||
},
|
||||
})
|
||||
return false
|
||||
return handleAuthExpired(`${message},是否重新登录?`, needTip)
|
||||
case 403:
|
||||
message = '请求被拒绝'
|
||||
break
|
||||
|
||||
@@ -62,11 +62,7 @@ defineOptions({ name: 'ImgUpload' })
|
||||
|
||||
const { copy, copied } = useClipboard()
|
||||
|
||||
const imgList = reactive([
|
||||
{ url: 'https://img.isme.top/isme/67208863145ef.jpg' },
|
||||
{ url: 'https://img.isme.top/isme/67208ab2a9de0.jpg' },
|
||||
{ url: 'https://img.isme.top/isme/67208ab4c6596.jpg' },
|
||||
])
|
||||
const imgList = reactive([])
|
||||
|
||||
watch(copied, (val) => {
|
||||
if (val)
|
||||
|
||||
@@ -250,7 +250,7 @@ const skillOption = {
|
||||
},
|
||||
series: [
|
||||
{
|
||||
top: '12%',
|
||||
bottom: '12%',
|
||||
type: 'pie',
|
||||
radius: ['35%', '90%'],
|
||||
avoidLabelOverlap: true,
|
||||
|
||||
@@ -69,6 +69,9 @@ export default defineConfig(({ mode }) => {
|
||||
},
|
||||
},
|
||||
},
|
||||
optimizeDeps: {
|
||||
include: ['vue3-intro-step'],
|
||||
},
|
||||
build: {
|
||||
chunkSizeWarningLimit: 1024, // chunk 大小警告的限制(单位kb)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user