升级element版本 修改icon

This commit is contained in:
piexlmax
2021-12-10 19:07:15 +08:00
parent 255dba330d
commit 8791206a5c
33 changed files with 1402 additions and 924 deletions
+43 -46
View File
@@ -3,54 +3,51 @@
*/
const config = {
appName: 'Gin-Vue-Admin',
appLogo: 'https://www.gin-vue-admin.com/img/logo.png',
showViteLogo: true
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.4.6 Apache`
)
)
console.log(
chalk.green(
`> 加群方式:微信:shouzi_1994 QQ群:622360840`
)
)
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_SERVER_PORT}/swagger/index.html`
)
)
console.log(
chalk.green(
`> 默认前端文件运行地址:http://127.0.0.1:${env.VITE_CLI_PORT}`
)
)
console.log(
chalk.green(
`> 如果项目让您获得了收益,希望您能请团队喝杯可乐:https://www.github.com/flipped-aurora/gin-vue-admin/server.com/docs/coffee`
)
)
console.log('\n')
}
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.4.6 Apache`
)
)
console.log(
chalk.green(
`> 加群方式:微信:shouzi_1994 QQ群:622360840`
)
)
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_SERVER_PORT}/swagger/index.html`
)
)
console.log(
chalk.green(
`> 默认前端文件运行地址:http://127.0.0.1:${env.VITE_CLI_PORT}`
)
)
console.log(
chalk.green(
`> 如果项目让您获得了收益,希望您能请团队喝杯可乐:https://www.github.com/flipped-aurora/gin-vue-admin/server.com/docs/coffee`
)
)
console.log('\n')
}
}
export default config
export default config
+10
View File
@@ -1,11 +1,21 @@
import config from './config'
import { emitter } from '@/utils/bus.js'
// 统一导入el-icon图标
import * as ElIconModules from '@element-plus/icons'
// 导入转换图标名称的函数
const closeThisPage = () => {
emitter.emit('closeThisPage')
}
export const register = (app) => {
// 统一注册el-icon图标
for (const iconName in ElIconModules) {
app.component(iconName, ElIconModules[iconName])
}
app.config.globalProperties.$GIN_VUE_ADMIN = config
app.config.globalProperties.$CloseThisPage = closeThisPage
}