+2
-2
@@ -1,6 +1,6 @@
|
||||
// 运行项目前通过node执行此脚本 (此脚本与 node_modules 目录同级)
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
const wfPath = path.resolve(__dirname, './node_modules/.bin')
|
||||
|
||||
fs.readdir(wfPath, (err, files) => {
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
未经授权的商用使用可能会被我们的资产搜索引擎爬取,并可能导致后续索赔。索赔金额将不低于高级授权费的十倍。请您遵守版权法律法规,尊重知识产权。
|
||||
*/
|
||||
|
||||
var child_process = require('child_process')
|
||||
import child_process from 'child_process'
|
||||
|
||||
var url = 'https://www.gin-vue-admin.com'
|
||||
var cmd = ''
|
||||
|
||||
+7
-3
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "gin-vue-admin",
|
||||
"version": "2.8.4",
|
||||
"version": "2.8.5",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "node openDocument.js && vite --host --mode development",
|
||||
@@ -9,10 +9,12 @@
|
||||
"preview": "vite preview",
|
||||
"fix-memory-limit": "cross-env LIMIT=4096 increase-memory-limit"
|
||||
},
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@element-plus/icons-vue": "^2.3.1",
|
||||
"@form-create/designer": "^3.2.6",
|
||||
"@form-create/element-ui": "^3.2.10",
|
||||
"@unocss/transformer-directives": "^66.4.2",
|
||||
"@vue-office/docx": "^1.6.2",
|
||||
"@vue-office/excel": "^1.7.11",
|
||||
"@vue-office/pdf": "^2.0.2",
|
||||
@@ -39,10 +41,9 @@
|
||||
"screenfull": "^6.0.2",
|
||||
"sortablejs": "^1.15.3",
|
||||
"spark-md5": "^3.0.2",
|
||||
"tailwindcss": "^3.4.10",
|
||||
"universal-cookie": "^7",
|
||||
"vform3-builds": "^3.0.10",
|
||||
"vite-auto-import-svg": "^1.7.0",
|
||||
"vite-auto-import-svg": "^1.9.0",
|
||||
"vue": "^3.5.7",
|
||||
"vue-cropper": "^1.1.4",
|
||||
"vue-echarts": "^7.0.3",
|
||||
@@ -55,6 +56,8 @@
|
||||
"devDependencies": {
|
||||
"@babel/eslint-parser": "^7.25.1",
|
||||
"@eslint/js": "^8.56.0",
|
||||
"@unocss/extractor-svelte": "^66.4.2",
|
||||
"@unocss/preset-wind3": "^66.4.2",
|
||||
"@vitejs/plugin-legacy": "^6.0.0",
|
||||
"@vitejs/plugin-vue": "^5.0.3",
|
||||
"@vue/cli-plugin-babel": "~5.0.8",
|
||||
@@ -71,6 +74,7 @@
|
||||
"eslint-plugin-vue": "^9.19.2",
|
||||
"sass": "^1.78.0",
|
||||
"terser": "^5.31.6",
|
||||
"unocss": "^66.4.2",
|
||||
"vite": "^6.2.3",
|
||||
"vite-plugin-banner": "^0.8.0",
|
||||
"vite-plugin-importer": "^0.2.5",
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
module.exports = {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {}
|
||||
}
|
||||
}
|
||||
@@ -7,13 +7,13 @@
|
||||
<!-- 弹窗头部 -->
|
||||
<div class="p-5 border-b border-gray-100 flex justify-between items-center">
|
||||
<h3 class="text-lg font-semibold text-gray-800">{{ displayData.title }}</h3>
|
||||
<button class="text-gray-400 hover:text-gray-600 transition-colors" @click="closeModal">
|
||||
<close />
|
||||
</button>
|
||||
<div class="text-gray-400 hover:text-gray-600 transition-colors cursor-pointer" @click="closeModal">
|
||||
<close class="h-6 w-6" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 弹窗内容 -->
|
||||
<div class="p-6">
|
||||
<div class="p-6 pt-0">
|
||||
<!-- 错误类型 -->
|
||||
<div class="mb-4">
|
||||
<div class="text-xs font-medium text-gray-500 uppercase mb-2">错误类型</div>
|
||||
@@ -45,16 +45,16 @@
|
||||
|
||||
<!-- 弹窗底部 -->
|
||||
<div class="py-2 px-4 border-t border-gray-100 flex justify-end">
|
||||
<button class="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors font-medium text-sm shadow-sm" @click="handleConfirm">
|
||||
<div class="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors font-medium text-sm shadow-sm cursor-pointer" @click="handleConfirm">
|
||||
确定
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { defineProps, defineEmits, ref, computed, onMounted } from 'vue';
|
||||
import { defineProps, defineEmits, computed } from 'vue';
|
||||
|
||||
const props = defineProps({
|
||||
errorData: {
|
||||
|
||||
@@ -17,7 +17,7 @@ export const viteLogo = (env) => {
|
||||
`> 欢迎使用Gin-Vue-Admin,开源地址:https://github.com/flipped-aurora/gin-vue-admin`
|
||||
)
|
||||
)
|
||||
console.log(greenText(`> 当前版本:v2.8.4`))
|
||||
console.log(greenText(`> 当前版本:v2.8.5`))
|
||||
console.log(greenText(`> 加群方式:微信:shouzi_1994 QQ群:470239250`))
|
||||
console.log(
|
||||
greenText(`> 项目地址:https://github.com/flipped-aurora/gin-vue-admin`)
|
||||
|
||||
@@ -10,7 +10,7 @@ export default {
|
||||
register(app)
|
||||
console.log(`
|
||||
欢迎使用 Gin-Vue-Admin
|
||||
当前版本:v2.8.4
|
||||
当前版本:v2.8.5
|
||||
加群方式:微信:shouzi_1994 QQ群:622360840
|
||||
项目地址:https://github.com/flipped-aurora/gin-vue-admin
|
||||
插件市场:https://plugin.gin-vue-admin.com
|
||||
@@ -22,6 +22,7 @@ export default {
|
||||
** 版权所有方:flipped-aurora开源团队 **
|
||||
** 版权持有公司:北京翻转极光科技有限责任公司 **
|
||||
** 剔除授权标识需购买商用授权:https://gin-vue-admin.com/empower/index.html **
|
||||
** 感谢您对Gin-Vue-Admin的支持与关注 合法授权使用更有利于项目的长久发展**
|
||||
`)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import './style/element_visiable.scss'
|
||||
import 'element-plus/theme-chalk/dark/css-vars.css'
|
||||
import 'uno.css';
|
||||
import { createApp } from 'vue'
|
||||
import ElementPlus from 'element-plus'
|
||||
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
@use '@/style/main.scss';
|
||||
@use '@/style/reset';
|
||||
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
.el-button {
|
||||
font-weight: 400;
|
||||
|
||||
@@ -17,7 +17,15 @@
|
||||
}
|
||||
|
||||
.gva-btn-list {
|
||||
@apply mb-3 flex items-center;
|
||||
@apply mb-3 flex items-center flex-wrap gap-2;
|
||||
.el-button+.el-button{
|
||||
@apply ml-0 !important;
|
||||
}
|
||||
.el-upload{
|
||||
.el-button{
|
||||
@apply ml-0 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#nprogress .bar {
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
<script setup>
|
||||
import { useUserStore } from '@/pinia/modules/user'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { emitter } from '@/utils/bus'
|
||||
|
||||
defineOptions({
|
||||
name: 'Error'
|
||||
@@ -32,6 +33,17 @@
|
||||
const userStore = useUserStore()
|
||||
const router = useRouter()
|
||||
const toDashboard = () => {
|
||||
router.push({ name: userStore.userInfo.authority.defaultRouter })
|
||||
try {
|
||||
router.push({ name: userStore.userInfo.authority.defaultRouter })
|
||||
} catch (error) {
|
||||
emitter.emit('show-error', {
|
||||
code: '401',
|
||||
message: "检测到其他用户修改了路由权限,请重新登录",
|
||||
fn: () => {
|
||||
userStore.ClearStorage()
|
||||
router.push({ name: 'Login', replace: true })
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
// @ts-ignore
|
||||
import { initDB } from '@/api/initdb'
|
||||
import { reactive, ref } from 'vue'
|
||||
import { ElLoading, ElMessage } from 'element-plus'
|
||||
import { ElLoading, ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
defineOptions({
|
||||
@@ -274,7 +274,25 @@
|
||||
type: 'success',
|
||||
message: res.msg
|
||||
})
|
||||
router.push({ name: 'Login' })
|
||||
|
||||
// 显示AI助手配置提示弹窗
|
||||
ElMessageBox.confirm(
|
||||
'已经完成基础数据库初始化!建议先进行编辑器AI助手配置,以获得更好的开发体验。',
|
||||
'配置完成',
|
||||
{
|
||||
confirmButtonText: '查看AI配置文档',
|
||||
cancelButtonText: '稍后配置',
|
||||
type: 'success',
|
||||
center: true
|
||||
}
|
||||
).then(() => {
|
||||
// 点击确认按钮,打开AI配置文档
|
||||
window.open('https://www.gin-vue-admin.com/guide/server/mcp.html', '_blank')
|
||||
router.push({ name: 'Login' })
|
||||
}).catch(() => {
|
||||
// 点击取消按钮或关闭弹窗,直接跳转到登录页
|
||||
router.push({ name: 'Login' })
|
||||
})
|
||||
}
|
||||
loading.close()
|
||||
} catch (_) {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<el-menu
|
||||
:default-active="routerStore.topActive"
|
||||
mode="horizontal"
|
||||
class="border-r-0 border-b-0 w-full flex gap-1 items-center box-border h-[calc(100%-1px)]"
|
||||
class="!border-r-0 border-b-0 w-full flex gap-1 items-center box-border h-[calc(100%-1px)]"
|
||||
unique-opened
|
||||
@select="(index, _, ele) => selectMenuItem(index, _, ele, true)"
|
||||
>
|
||||
@@ -34,7 +34,7 @@
|
||||
:collapse="isCollapse"
|
||||
:collapse-transition="false"
|
||||
:default-active="active"
|
||||
class="border-r-0 w-full"
|
||||
class="!border-r-0 w-full"
|
||||
unique-opened
|
||||
@select="(index, _, ele) => selectMenuItem(index, _, ele, false)"
|
||||
>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<el-menu
|
||||
:default-active="active"
|
||||
mode="horizontal"
|
||||
class="border-r-0 w-full flex gap-1 items-center box-border h-[calc(100%-1px)]"
|
||||
class="!border-r-0 w-full flex gap-1 items-center box-border h-[calc(100%-1px)]"
|
||||
unique-opened
|
||||
:ellipsis="shouldEllipsis"
|
||||
@select="selectMenuItem"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
:collapse="isCollapse"
|
||||
:collapse-transition="false"
|
||||
:default-active="active"
|
||||
class="border-r-0 w-full"
|
||||
class="!border-r-0 w-full"
|
||||
unique-opened
|
||||
@select="selectMenuItem"
|
||||
>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="flex h-full">
|
||||
<!-- 一级菜单常驻侧边栏 -->
|
||||
<div
|
||||
class="relative h-full bg-white text-slate-700 dark:text-slate-300 dark:bg-slate-900 border-r shadow dark:shadow-gray-700"
|
||||
class="relative !h-full bg-white text-slate-700 dark:text-slate-300 dark:bg-slate-900 border-r shadow dark:shadow-gray-700"
|
||||
:style="{
|
||||
width: config.layout_side_collapsed_width + 'px'
|
||||
}"
|
||||
@@ -12,7 +12,7 @@
|
||||
:collapse="true"
|
||||
:collapse-transition="false"
|
||||
:default-active="topActive"
|
||||
class="border-r-0 w-full"
|
||||
class="!border-r-0 w-full"
|
||||
unique-opened
|
||||
@select="selectTopMenuItem"
|
||||
>
|
||||
@@ -74,7 +74,7 @@
|
||||
:collapse="isCollapse"
|
||||
:collapse-transition="false"
|
||||
:default-active="active"
|
||||
class="border-r-0 w-full"
|
||||
class="!border-r-0 w-full"
|
||||
unique-opened
|
||||
@select="selectMenuItem"
|
||||
>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<el-tooltip class="" effect="dark" content="视频教程" placement="bottom">
|
||||
<el-dropdown @command="toDoc">
|
||||
<el-icon
|
||||
class="w-8 h-8 shadow rounded-full border border-gray-200 dark:border-gray-600 cursor-pointer border-solid"
|
||||
class="w-8 h-8 p-2 shadow rounded-full border border-gray-200 dark:border-gray-600 cursor-pointer border-solid"
|
||||
>
|
||||
<Film />
|
||||
</el-icon>
|
||||
@@ -29,7 +29,7 @@
|
||||
<el-tooltip class="" effect="dark" content="搜索" placement="bottom">
|
||||
<el-icon
|
||||
@click="handleCommand"
|
||||
class="w-8 h-8 shadow rounded-full border border-gray-200 dark:border-gray-600 cursor-pointer border-solid"
|
||||
class="w-8 h-8 p-2 shadow rounded-full border border-gray-200 dark:border-gray-600 cursor-pointer border-solid"
|
||||
>
|
||||
<Search />
|
||||
</el-icon>
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
<el-tooltip class="" effect="dark" content="系统设置" placement="bottom">
|
||||
<el-icon
|
||||
class="w-8 h-8 shadow rounded-full border border-gray-200 dark:border-gray-600 cursor-pointer border-solid"
|
||||
class="w-8 h-8 p-2 shadow rounded-full border border-gray-200 dark:border-gray-600 cursor-pointer border-solid"
|
||||
@click="toggleSetting"
|
||||
>
|
||||
<Setting />
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
<el-tooltip class="" effect="dark" content="刷新" placement="bottom">
|
||||
<el-icon
|
||||
class="w-8 h-8 shadow rounded-full border border-gray-200 dark:border-gray-600 cursor-pointer border-solid"
|
||||
class="w-8 h-8 p-2 shadow rounded-full border border-gray-200 dark:border-gray-600 cursor-pointer border-solid"
|
||||
:class="showRefreshAnmite ? 'animate-spin' : ''"
|
||||
@click="toggleRefresh"
|
||||
>
|
||||
@@ -61,14 +61,14 @@
|
||||
>
|
||||
<el-icon
|
||||
v-if="appStore.isDark"
|
||||
class="w-8 h-8 shadow rounded-full border border-gray-600 cursor-pointer border-solid"
|
||||
class="w-8 h-8 p-2 shadow rounded-full border border-gray-600 cursor-pointer border-solid"
|
||||
@click="appStore.toggleTheme(false)"
|
||||
>
|
||||
<Sunny />
|
||||
</el-icon>
|
||||
<el-icon
|
||||
v-else
|
||||
class="w-8 h-8 shadow rounded-full border border-gray-200 cursor-pointer border-solid"
|
||||
class="w-8 h-8 p-2 shadow rounded-full border border-gray-200 cursor-pointer border-solid"
|
||||
@click="appStore.toggleTheme(true)"
|
||||
>
|
||||
<Moon />
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
:content="userStore.userInfo.nickName"
|
||||
/>
|
||||
<gva-header />
|
||||
<div class="flex flex-row w-full gva-container pt-16 box-border h-full">
|
||||
<div class="flex flex-row w-full pt-16 box-border h-full">
|
||||
<gva-aside
|
||||
v-if="
|
||||
config.side_mode === 'normal' || config.side_mode === 'sidebar' ||
|
||||
|
||||
@@ -22,14 +22,14 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div class="h-full bg-white dark:bg-gray-900">
|
||||
<div class="bg-white dark:bg-gray-900">
|
||||
<div class="px-8 pt-4 pb-6 border-b border-gray-200 dark:border-gray-700">
|
||||
<div class="flex justify-center">
|
||||
<div class="inline-flex bg-gray-100 dark:bg-gray-800 rounded-xl p-1.5 border border-gray-200 dark:border-gray-700 shadow-sm">
|
||||
<button
|
||||
<div
|
||||
v-for="tab in tabs"
|
||||
:key="tab.key"
|
||||
class="px-6 py-3 text-base font-medium rounded-lg transition-all duration-150 ease-in-out min-w-[80px]"
|
||||
class="px-6 py-3 text-base text-center cursor-pointer font-medium rounded-lg transition-all duration-150 ease-in-out min-w-[80px]"
|
||||
:class="[
|
||||
activeTab === tab.key
|
||||
? 'text-white shadow-md transform -translate-y-0.5'
|
||||
@@ -39,7 +39,7 @@
|
||||
@click="activeTab = tab.key"
|
||||
>
|
||||
{{ tab.label }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
v-model="activeValue"
|
||||
:closable="!(historys.length === 1 && $route.name === defaultRouter)"
|
||||
type="card"
|
||||
class="bg-white text-slate-700 dark:text-slate-500 dark:bg-slate-900"
|
||||
class="bg-white text-slate-700 dark:text-slate-500 dark:bg-slate-900 pt-1"
|
||||
@contextmenu.prevent="openContextMenu($event)"
|
||||
@tab-click="changeTab"
|
||||
@tab-remove="removeTab"
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<template #default="{ node, data }">
|
||||
<span class="custom-tree-node">
|
||||
<span>{{ node.label }}</span>
|
||||
<span v-if="node.checked">
|
||||
<span v-if="node.checked && !data.name?.startsWith('http://') && !data.name?.startsWith('https://')">
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
module.exports = {
|
||||
content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],
|
||||
important: true,
|
||||
theme: {
|
||||
extend: {
|
||||
backgroundColor: {
|
||||
main: '#F5F5F5'
|
||||
},
|
||||
textColor: {
|
||||
active: 'var(--el-color-primary)'
|
||||
},
|
||||
boxShadowColor: {
|
||||
active: 'var(--el-color-primary)'
|
||||
},
|
||||
borderColor: {
|
||||
'table-border': 'var(--el-border-color-lighter)'
|
||||
}
|
||||
}
|
||||
},
|
||||
darkMode: 'class',
|
||||
plugins: []
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import { defineConfig } from '@unocss/vite';
|
||||
import presetWind3 from '@unocss/preset-wind3';
|
||||
import transformerDirectives from '@unocss/transformer-directives'
|
||||
|
||||
export default defineConfig({
|
||||
theme: {
|
||||
backgroundColor: {
|
||||
main: '#F5F5F5'
|
||||
},
|
||||
textColor: {
|
||||
active: 'var(--el-color-primary)'
|
||||
},
|
||||
boxShadowColor: {
|
||||
active: 'var(--el-color-primary)'
|
||||
},
|
||||
borderColor: {
|
||||
'table-border': 'var(--el-border-color-lighter)'
|
||||
}
|
||||
},
|
||||
presets: [
|
||||
presetWind3({ dark: 'class' })
|
||||
],
|
||||
transformers: [
|
||||
transformerDirectives(),
|
||||
],
|
||||
})
|
||||
+4
-1
@@ -9,6 +9,8 @@ import vueDevTools from 'vite-plugin-vue-devtools'
|
||||
import VueFilePathPlugin from './vitePlugin/componentName/index.js'
|
||||
import { svgBuilder } from 'vite-auto-import-svg'
|
||||
import { AddSecret } from './vitePlugin/secret'
|
||||
import UnoCSS from 'unocss/vite'
|
||||
|
||||
// @see https://cn.vitejs.dev/config/
|
||||
export default ({ mode }) => {
|
||||
AddSecret('')
|
||||
@@ -111,7 +113,8 @@ export default ({ mode }) => {
|
||||
vuePlugin(),
|
||||
svgBuilder(['./src/plugin/','./src/assets/icons/'],base, outDir,'assets', NODE_ENV),
|
||||
[Banner(`\n Build based on gin-vue-admin \n Time : ${timestamp}`)],
|
||||
VueFilePathPlugin('./src/pathInfo.json')
|
||||
VueFilePathPlugin('./src/pathInfo.json'),
|
||||
UnoCSS()
|
||||
]
|
||||
}
|
||||
return config
|
||||
|
||||
Reference in New Issue
Block a user