初始化项目

This commit is contained in:
2023-01-10 11:52:47 +08:00
parent c74db0d2b9
commit 2180adecb0
142 changed files with 16480 additions and 0 deletions

58
src/core/config.js Normal file
View File

@@ -0,0 +1,58 @@
/**
* 网站配置文件
*/
const config = {
appName: 'Gin-Vue-Admin',
appLogo: 'https://www.gin-vue-admin.com/img/logo.png',
showViteLogo: true
}
export const viteLogo = (env) => {
if (config.showViteLogo) {
const chalk = require('chalk')
console.log(
chalk.green(
`> 欢迎使用Gin-Vue-Admin开源地址https://github.com/flipped-aurora/gin-vue-admin`
)
)
console.log(
chalk.green(
`> 当前版本:v2.5.5`
)
)
console.log(
chalk.green(
`> 加群方式:微信shouzi_1994 QQ群622360840`
)
)
console.log(
chalk.green(
`> GVA讨论社区https://support.qq.com/products/371961`
)
)
console.log(
chalk.green(
`> 插件市场:https://plugin.gin-vue-admin.com`
)
)
console.log(
chalk.green(
`> 默认自动化文档地址:http://127.0.0.1:${env.VITE_SERVER_PORT}/swagger/index.html`
)
)
console.log(
chalk.green(
`> 默认前端文件运行地址:http://127.0.0.1:${env.VITE_CLI_PORT}`
)
)
console.log(
chalk.green(
`> 如果项目让您获得了收益,希望您能请团队喝杯可乐:https://www.gin-vue-admin.com/coffee/index.html`
)
)
console.log('\n')
}
}
export default config

22
src/core/gin-vue-admin.js Normal file
View File

@@ -0,0 +1,22 @@
/*
* gin-vue-admin web框架组
*
* */
// 加载网站配置文件夹
import { register } from './global'
export default {
install: (app) => {
register(app)
console.log(`
欢迎使用 Gin-Vue-Admin
当前版本:v2.5.5
加群方式:微信shouzi_1994 QQ群622360840
GVA讨论社区:https://support.qq.com/products/371961
插件市场:https://plugin.gin-vue-admin.com
默认自动化文档地址:http://127.0.0.1:${import.meta.env.VITE_SERVER_PORT}/swagger/index.html
默认前端文件运行地址:http://127.0.0.1:${import.meta.env.VITE_CLI_PORT}
如果项目让您获得了收益,希望您能请团队喝杯可乐:https://www.gin-vue-admin.com/coffee/index.html
`)
}
}

13
src/core/global.js Normal file
View File

@@ -0,0 +1,13 @@
import config from './config'
// 统一导入el-icon图标
import * as ElIconModules from '@element-plus/icons-vue'
// 导入转换图标名称的函数
export const register = (app) => {
// 统一注册el-icon图标
for (const iconName in ElIconModules) {
app.component(iconName, ElIconModules[iconName])
}
app.config.globalProperties.$GIN_VUE_ADMIN = config
}