Giter VIP home page Giter VIP logo

go-admin-team / go-admin-ui Goto Github PK

View Code? Open in Web Editor NEW
1.1K 1.1K 701.0 2.2 MB

基于Gin + Vue + Element UI & Arco Design & Ant Design 的前后端分离权限管理系统的前端模块

Home Page: https://www.go-admin.dev

License: MIT License

JavaScript 23.72% HTML 0.81% Vue 71.08% CSS 0.55% Handlebars 0.11% SCSS 3.65% Dockerfile 0.06% Shell 0.02%
admin ant-design antd-design-pro arco arco-design element-ui vue

go-admin-ui's Introduction

go-admin

Build Status Release License

English | 简体中文

The front-end and back-end separation authority management system based on Gin + Vue + Element UI is extremely simple to initialize the system. You only need to modify the database connection in the configuration file. The system supports multi-instruction operations. Migration instructions can make it easier to initialize database information. Service instructions It's easy to start the api service.

documentation

Backend project

Video tutorial

✨ Feature

  • Follow RESTful API design specifications

  • Based on the GIN WEB API framework, it provides rich middleware support (user authentication, cross-domain, access log, tracking ID, etc.)

  • RBAC access control model based on Casbin

  • JWT authentication

  • Support Swagger documents (based on swaggo)

  • Database storage based on GORM, which can expand multiple types of databases

  • Simple model mapping of configuration files to quickly get the desired configuration

  • Code generation tool

  • Form builder

  • Multi-command mode

  • TODO: unit test

🎁 Internal

  1. User management: The user is the system operator, this function mainly completes the system user configuration.
  2. Department management: configure the system organization (company, department, group), and display the tree structure to support data permissions.
  3. Position management: configure the positions of system users.
  4. Menu management: configure the system menu, operation authority, button authority identification, interface authority, etc.
  5. Role management: Role menu permission assignment and role setting are divided into data scope permissions by organization.
  6. Dictionary management: Maintain some relatively fixed data frequently used in the system.
  7. Parameter management: dynamically configure common parameters for the system.
  8. Operation log: system normal operation log record and query; system abnormal information log record and query.
  9. Login log: The system login log record query contains login exceptions.
  10. Interface documentation: Automatically generate related api interface documents according to the business code.
  11. Code generation: According to the data table structure, generate the corresponding addition, deletion, modification, and check corresponding business, and the whole process of visual operation, so that the basic business can be implemented with zero code.
  12. Form construction: Customize the page style, drag and drop to realize the page layout.
  13. Service monitoring: View the basic information of some servers.
  14. Content management: demo function, including classification management and content management. You can refer to the easy to use quick start.

Ready to work

You need to install locally [go] [gin] nodegit

At the same time, a series of tutorials including videos and documents are provided. How to complete the downloading to the proficient use, it is strongly recommended that you read these tutorials before you practice this project! ! !

Easily implement go-admin to write the first application-documentation tutorial

Step 1 - basic content introduction

Step 2 - Practical application - writing database operations

Teach you from getting started to giving up-video tutorial

How to start go-admin

Easily implement business using build tools

v1.1.0 version code generation tool-free your hands [Advanced]

Explanation of multi-command startup mode and IDE configuration

Configuration instructions for go-admin menu [Must see]

How to configure menu information and interface information [Must see]

go-admin permission configuration instructions [Must see]

Instructions for use of go-admin data permissions [Must see]

If you have any questions, please read the above-mentioned usage documents and articles first. If you are not satisfied, welcome to issue and pr. Video tutorials and documents are being updated continuously.

📦 Local development

Environmental requirements

go 1.17

nodejs: v14.16.0

npm: 6.14.11

Development directory creation

# Create a development directory
mkdir goadmin
cd goadmin

Get the code

Important note: the two projects must be placed in the same folder;

# Get backend code
git clone https://github.com/go-admin-team/go-admin.git

# Get the front-end code
git clone https://github.com/go-admin-team/go-admin-ui.git

Startup instructions

Server startup instructions

# Enter the go-admin backend project
cd ./go-admin

# Compile the project
go build

# Change setting 
# File path go-admin/config/settings.yml
vi ./config/setting.yml 

# 1. Modify the database information in the configuration file
# Note: The corresponding configuration data under settings.database
# 2. Confirm the log path

:::tip ⚠️Note that this problem will occur if CGO is not installed in the windows environment;

E:\go-admin>go build
# github.com/mattn/go-sqlite3
cgo: exec /missing-cc: exec: "/missing-cc": file does not exist

or

D:\Code\go-admin>go build
# github.com/mattn/go-sqlite3
cgo: exec gcc: exec: "gcc": executable file not found in %PATH%

Solve the cgo problem and enter

:::

Initialize the database, and start the service

# The first configuration needs to initialize the database resource information
# Use under macOS or linux
$ ./go-admin migrate -c=config/settings.dev.yml

# ⚠️Note: Use under windows
$ go-admin.exe migrate -c=config/settings.dev.yml

# Start the project, you can also use the IDE for debugging
# Use under macOS or linux
$ ./go-admin server -c config/settings.yml

# ⚠️Note: Use under windows
$ go-admin.exe server -c config/settings.yml

Use docker to compile and start

# Compile the image
docker build -t go-admin .


# Start the container, the first go-admin is the container name, and the second go-admin is the image name
# -v Mapping configuration file Local path: container path
docker run --name go-admin -p 8000:8000 -v /config/settings.yml:/config/settings.yml -d go-admin-server

Generation Document

go generate

Cross compile

# windows
env GOOS=windows GOARCH=amd64 go build main.go

# or
# linux
env GOOS=linux GOARCH=amd64 go build main.go

UI interactive terminal startup instructions

# Installation dependencies
npm install   # or cnpm install

# Start service
npm run dev

🎬 Online Demo

admin / 123456

演示地址:http://www.go-admin.dev

📨 Interactive

Wechat go-admin技术交流乙号

💎 Members

JetBrains open source certificate support

The go-admin project has always been developed in the GoLand integrated development environment under JetBrains, based on the free JetBrains Open Source license(s) genuine free license. I would like to express my gratitude.

🤝 Thanks

  1. chengxiao
  2. gin
  3. casbin
  4. spf13/viper
  5. gorm
  6. gin-swagger
  7. jwt-go
  8. vue-element-admin
  9. ruoyi-vue
  10. form-generator

🤟 Sponsor Us

If you think this project helped you, you can buy a glass of juice for the author to show encouragement 🍹

🤝 Link

Go developer growth roadmap

🔑 License

MIT

Copyright (c) 2020 wenjianzhang

go-admin-ui's People

Contributors

bing127 avatar bullpen9346 avatar d1y avatar g-akiraka avatar haimait avatar infnan avatar kikiyou avatar misakichan avatar mss-boot avatar nicole0724 avatar qlijin avatar quanbisen avatar wenjianzhang avatar wxb1207 avatar yangcuiwang avatar zhuxuyang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

go-admin-ui's Issues

启东报错

ERROR Failed to compile with 1 error 下午3:02:10

Syntax Error: Error: No ESLint configuration found in /Users//Documents/Go_admin_Web/src.

You may use special comments to disable some warnings.
Use // eslint-disable-next-line to ignore the next line.
Use /* eslint-disable */ to ignore all warnings in a file.

ERESOLVE unable to resolve dependency tree

运行 npm install 报错了。

npm install

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/eslint
npm ERR!   dev eslint@"7.6.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@">= 1.6.0 < 7.0.0" from @vue/[email protected]
npm ERR! node_modules/@vue/cli-plugin-eslint
npm ERR!   dev @vue/cli-plugin-eslint@"^4.4.6" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /Users/nibuw/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/nibuw/.npm/_logs/2021-06-01T10_27_35_783Z-debug.log

用户管理-新增报错

用户管理,点击新增,没有反应。查看日志发现:
vue.runtime.esm.js?2b0e:619 [Vue warn]: Error in v-on handler: "TypeError: Object(...) is not a function"

found in

---> at packages/button/src/button.vue




at packages/card/src/main.vue
at src/layout/BasicLayout.vue
at src/views/admin/sys-user/index.vue
at src/layout/components/AppMain.vue
at src/layout/index.vue
at src/App.vue

warn @ vue.runtime.esm.js?2b0e:619
vue.runtime.esm.js?2b0e:1888 TypeError: Object(...) is not a function
at VueComponent.handleAdd (webpack-internal:///./node_modules/cache-loader/dist/cjs.js?!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/admin/sys-user/index.vue?vue&type=script&lang=js&:611)
at invokeWithErrorHandling (webpack-internal:///./node_modules/vue/dist/vue.runtime.esm.js:1853)
at VueComponent.invoker (webpack-internal:///./node_modules/vue/dist/vue.runtime.esm.js:2178)
at invokeWithErrorHandling (webpack-internal:///./node_modules/vue/dist/vue.runtime.esm.js:1853)
at VueComponent.Vue.$emit (webpack-internal:///./node_modules/vue/dist/vue.runtime.esm.js:3882)
at VueComponent.handleClick (webpack-internal:///./node_modules/element-ui/lib/element-ui.common.js:9417)
at invokeWithErrorHandling (webpack-internal:///./node_modules/vue/dist/vue.runtime.esm.js:1853)
at HTMLButtonElement.invoker (webpack-internal:///./node_modules/vue/dist/vue.runtime.esm.js:2178)
at HTMLButtonElement.original._wrapper (webpack-internal:///./node_modules/vue/dist/vue.runtime.esm.js:6907)

能否格式化一下下项目

能否格式化一下下项目,go fmt priject...
好多地方编码都不符合google go code style,诸如一下不等...

  1. import顺序错乱,随意;
  2. 运算符前后空格;
  3. 文件头尾等位置空行数量;
  4. 注释双斜线空格统一;

请问系统必须至少有二级菜单吗?

你好,最近做一个教学的系统,为了方便,有些菜单不想弄成二级的,想让用户直接访问(图1):
image

但是配置好后,点这个链接,却没有了左边的菜单栏(图2):

image

请问系统在不需要大改的情况下,有没有可能设置正常显示的一级菜单呢? 谢谢!

前端项目缺少行政区管理sys-china-area-data

初始化项目后 系统工具中包含行政区管理页面,组件路径为src/views/sys-tools/sys-china-area-data/index。实际前端项目中并没有这个.vue文件。会报错Error: Cannot find module './views/sys-tools/sys-china-area-data/index'

npm i 执行报错

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/eslint
npm ERR! dev eslint@"7.6.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@">= 1.6.0 < 7.0.0" from @vue/[email protected]
npm ERR! node_modules/@vue/cli-plugin-eslint
npm ERR! dev @vue/cli-plugin-eslint@"^4.4.6" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

有没有前后端交互的接口协议

这个前端很不错,正好我最近想开发一个基于fastapi的这样一个类似项目,想咨询一下有没有相关的前后端交互协议,或者提供一下相关的资料。

自动生成代码优化

1.新增或修改页如果为选择框,值无法动态获取
2.建议增加时间属性选择

本地运行后端正常启动 前端可登录 但是页面所有接口都请求不到数据 404

2021-03-26 01:10:42 [INFO] OPTIONS /api/v1/getinfo 200 13.201µs 127.0.0.1
2021-03-26 01:10:42 [INFO] GET /api/v1/getinfo admin
2021-03-26 01:10:42 [INFO] GET /api/v1/getinfo 200 1.971335ms 127.0.0.1
2021-03-26 01:10:42 [INFO] OPTIONS /api/v1/menurole 200 12.493µs 127.0.0.1
2021-03-26 01:10:42 [INFO] GET /api/v1/menurole admin
2021-03-26 01:10:42 [INFO] GET /api/v1/menurole 200 3.787844ms 127.0.0.1
2021-03-26 01:10:48 [INFO] OPTIONS /api/v1/sysUser?pageIndex=1&pageSize=10 200 9.36µs 127.0.0.1
2021-03-26 01:10:48 [INFO] OPTIONS /api/v1/deptTree 200 8.33µs 127.0.0.1
2021-03-26 01:10:48 [INFO] OPTIONS /api/v1/dict/data-all?dictType=sys_normal_disable 200 8.942µs 127.0.0.1
2021-03-26 01:10:48 [INFO] OPTIONS /api/v1/dict/data-all?dictType=sys_user_sex 200 7.248µs 127.0.0.1
2021-03-26 01:10:48 [INFO] GET /api/v1/deptTree admin
2021-03-26 01:10:48 [INFO] OPTIONS /api/v1/configKey/sys.user.initPassword 200 20.935µs 127.0.0.1
2021-03-26 01:10:48 [INFO] GET /api/v1/deptTree 200 2.097172ms 127.0.0.1

例如:前端访问的是用户管理菜单,下面这两个请求是404,
2021-03-26 01:10:48 [INFO] GET /api/v1/dict/data-all?dictType=sys_normal_disable 404 8.868µs 127.0.0.1
2021-03-26 01:10:48 [INFO] GET /api/v1/dict/data-all?dictType=sys_user_sex 404 6.082µs 127.0.0.1

2021-03-26 01:10:48 [INFO] GET /api/v1/configKey/sys.user.initPassword admin
2021-03-26 01:10:48 [INFO] GET /api/v1/configKey/sys.user.initPassword 200 3.967244ms 127.0.0.1
在登陆页面就会有404的请求

2021-03-26 01:22:37 [INFO] GET /api/v1/app-config 404 7.037µs 127.0.0.1
2021-03-26 01:22:37 [INFO] GET /api/v1/getCaptcha 200 2.653827ms 127.0.0.1

大神 这个是前端请求错误端口了吗?

修改角色权限 处于半勾选的数据没有上传到后台

1.修改角色权限,只授予部分菜单权限时,上级节点处于半勾选状态,处于半勾选的数据没有上传到后台。

会导致授予了部分子菜单,但是顶级菜单没有。

getMenuAllCheckedKeys() {
// 目前被选中的菜单节点
const checkedKeys = this.$refs.menuTree.getHalfCheckedKeys()
console.log('目前被选中的菜单节点', checkedKeys)
// 半选中的菜单节点
const halfCheckedKeys = this.$refs.menuTree.getCheckedKeys()
console.log('半选中的菜单节点', halfCheckedKeys)
// checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys)
return halfCheckedKeys
},

compile filed

ERROR Failed to compile with 1 error 10:34:22

error in ./src/main.js

Syntax Error: D:\admin\go-admin-ui\node_modules\eslint\lib\cli-engine\cli-engine.js:406
} catch {
^

SyntaxError: Unexpected token {

@ multi (webpack)-dev-server/client?http://192.168.0.108:9527&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.js

代码生成

// 多选框选中数据

232 | handleSelectionChange(selection) {

233 | this.ids = selection.map(item => item.)
| ^
234 | this.single = selection.length !== 1
235 | this.multiple = !selection.length

silly fetchPackageMetaData error for [email protected] Unexpected end of JSON input while parsing near

没部署起来......

编译的日志

4790 http fetch GET 304 https://registry.npmjs.org/codemirror 145ms (from cache)
4791 silly fetchPackageMetaData error for [email protected] Unexpected end of JSON input while parsing near '...xFxysdF42Swp81ovye85C'
4792 http fetch GET 304 https://registry.npmjs.org/fuse.js 116ms (from cache)
4793 silly fetchPackageMetaData error for [email protected] Unexpected end of JSON input while parsing near '...4.0.6","vue-eslint-pa'
4794 http fetch GET 304 https://registry.npmjs.org/core-js 149ms (from cache)
4795 silly fetchPackageMetaData error for core-js@^2.6.11 Unexpected end of JSON input while parsing near '...m":"00eb6d6bf815471cc'
4796 http fetch GET 304 https://registry.npmjs.org/vuex 88ms (from cache)
4797 silly fetchPackageMetaData error for [email protected] Unexpected end of JSON input while parsing near '...watch-helpers":"^1.1.'
4798 timing stage:rollbackFailedOptional Completed in 1ms
4799 timing stage:runTopLevelLifecycles Completed in 144167ms
4800 silly saveTree [email protected]
4800 silly saveTree +-- @riophae/[email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree +-- [email protected]
4800 silly saveTree `-- [email protected]
4801 verbose stack SyntaxError: Unexpected end of JSON input while parsing near '...xFxysdF42Swp81ovye85C'
4801 verbose stack     at JSON.parse (<anonymous>)
4801 verbose stack     at parseJson (/usr/local/lib/node_modules/npm/node_modules/json-parse-better-errors/index.js:7:17)
4801 verbose stack     at /usr/local/lib/node_modules/npm/node_modules/node-fetch-npm/src/body.js:96:50
4801 verbose stack     at runMicrotasks (<anonymous>)
4801 verbose stack     at processTicksAndRejections (internal/process/task_queues.js:97:5)
4802 verbose cwd /app
4803 verbose Linux 4.19.76-linuxkit
4804 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
4805 verbose node v12.16.2
4806 verbose npm  v6.14.4

dockerfile

FROM node:lts 
# 创建 app 目录
WORKDIR /app
# 可选命令:
# RUN npm -g install serve
# RUN mkdir /src;
# COPY ./go-admin-ui/* /src
# RUN find /src/  -maxdepth 1 -mindepth 1  \! -name "node_modules"   \! -name "*.git" \! -name "dist"  -exec cp -rf {} /app/ \;
# 安装 app 依赖
# RUN npm install --only=production
# RUN npm install
# RUN npm build:prod
# COPY --from=node_build /app ./
COPY ./start.sh /
RUN chmod +x -R /start.sh;
VOLUME [ "/data1" , "/app" ]
EXPOSE 3000
#CMD ["serve", "-s", "dist", "-p", "8080"]
#CMD ["npm", "run" , "dev"]
CMD ["/start.sh"]

启动脚本

#!/bin/sh
npm cache clean --force
npm install
npm run dev

安装时出错

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/soft/node-v14.15.0-linux-x64/bin/node',
1 verbose cli '/soft/node/bin/npm',
1 verbose cli 'run',
1 verbose cli 'lint',
1 verbose cli '--',
1 verbose cli '--fix'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prelint', 'lint', 'postlint' ]
5 info lifecycle [email protected]prelint: [email protected]
6 info lifecycle [email protected]
lint: [email protected]
7 verbose lifecycle [email protected]lint: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]
lint: PATH: /soft/node-v14.15.0-linux-x64/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/soft/go-admin-ui/node_modules/.bin:/home/bzyy/.local/bin:/home/bzyy/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/soft/node/bin
9 verbose lifecycle [email protected]lint: CWD: /soft/go-admin-ui
10 silly lifecycle [email protected]
lint: Args: [ '-c', 'eslint --ext .js,.vue src "--fix"' ]
11 info lifecycle [email protected]~lint: Failed to exec lint script
12 verbose stack Error: [email protected] lint: eslint --ext .js,.vue src "--fix"
12 verbose stack spawn ENOENT
12 verbose stack at ChildProcess. (/soft/node-v14.15.0-linux-x64/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
12 verbose stack at ChildProcess.emit (events.js:315:20)
12 verbose stack at maybeClose (internal/child_process.js:1048:16)
12 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
13 verbose pkgid [email protected]
14 verbose cwd /soft/go-admin-ui
15 verbose Linux 4.18.0-147.5.1.el8_1.x86_64
16 verbose argv "/soft/node-v14.15.0-linux-x64/bin/node" "/soft/node/bin/npm" "run" "lint" "--" "--fix"
17 verbose node v14.15.0
18 verbose npm v6.14.8
19 error code ELIFECYCLE
20 error syscall spawn
21 error file sh
22 error errno ENOENT
23 error [email protected] lint: eslint --ext .js,.vue src "--fix"
23 error spawn ENOENT
24 error Failed at the [email protected] lint script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]

node v14.15.0

前端构建失败

npm ERR! Error while executing:
npm ERR! /usr/local/bin/git ls-remote -h -t git://github.com/adobe-webplatform/eve.git
npm ERR!
npm ERR! fatal: unable to connect to github.com:
npm ERR! github.com[0: 192.30.253.112]: errno=Operation timed out
npm ERR!
npm ERR!
npm ERR! exited with error code: 128

npm ERR! A complete log of this run can be found in:
npm ERR!     /Applications/MxSrvs/cache/nodejs/_logs/2021-03-01T08_32_24_530Z-debug.log

getConfigKey 接口请求参数有误

在文件 src/api/system/config.js的21行, 函数getConfigKey 有误,应该是 get /api/v1/configKey/xxx, 而不是post,页面会报错,
根据后端go-admin的接口文档以及代码来看发现的

npm install报错eslint版本不兼容

拉取时间2021/6/3 commit c27f7fa

环境:

  • windows10 64位
  • node.js 版本16.1.0
  • npm版本 7.16.0

具体表现

> npm install   
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/eslint
npm ERR!   dev eslint@"7.6.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@">= 1.6.0 < 7.0.0" from @vue/[email protected]
npm ERR! node_modules/@vue/cli-plugin-eslint
npm ERR!   dev @vue/cli-plugin-eslint@"^4.4.6" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\Zander.liu\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Zander.liu\AppData\Local\npm-cache\_logs\2021-06-04T06_43_02_674Z-debug.log

dashboard keep-alive 失效

偶然发现框架 keep-alive 失效,经过了解后发现 路由 name 必须跟组件 name 一模一样。 希望在文档或代码中提及。
以及 dashboard 路由 name 应当与组件 name 一致。

  {
    path: '/',
    component: Layout,
    redirect: '/dashboard',
    children: [
      {
        path: 'dashboard',
        component: () => import('@/views/dashboard/index'),
-       name: '首页',
+       name: 'Dashboard',
        meta: { title: '首页', icon: 'dashboard', affix: true }
      }
    ]
  },

我还发现菜单的 noCache 是写死的不缓存,我认为可以在创建菜单时提供 cache 选项自定义是否缓存。

磁盘信息是否有逻辑错误

我看到你使用率是用:

// 我注意到你是使用磁盘可用GB (free) / 磁盘总GB(total)
(info.disk.free/ info.disk.total * 100).toFixed(2) // 取两位小数

如果,你想得到磁盘使用率,那么Go-admin应该:

diskDic["usage"] = strconv.ParseFloat(fmt.Sprintf("%.2f",dis.UsedPercent), 2)
# or
diskDic["usage"] = tools.Round(dis.UsedPercent,2) // TODO: 保留2位小数,我采用了四舍五入

emmmm.... 视图提示信息也需要更改

“首页”链接无效

Describe the bug
进入子页面后导航栏的首页链接点击后会进入404页面

To Reproduce
Steps to reproduce the behavior:

Go to '用户管理'
Click on '首页'
See 404 error

Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 14.x 的处理办法

Failed to compile with 1 error 下午8:15:12

error in ./src/styles/element-variables.scss

Syntax Error: Error: Missing binding /Users/jonny/go/src/go-admin-ui/node_modules/node-sass/vendor/darwin-x64-83/binding.node
Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 14.x

Found bindings for the following environments:

  • OS X 64-bit with Node.js 13.x

This usually happens because your environment has changed since running npm install.
Run npm rebuild node-sass to download the binding for your current environment.

@ ./src/styles/element-variables.scss 4:14-237 14:3-18:5 15:22-245
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:9527&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.js

dev无法运行

代码git下来,安装依赖,运行,无验证码,无法登陆

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.