Skip to content

Commit 387c8fb

Browse files
author
邝华
committed
Optimization side menu
1 parent 261c235 commit 387c8fb

File tree

122 files changed

+6193
-1130
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+6193
-1130
lines changed

.editorconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
end_of_line = lf
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
12+
[*.md]
13+
insert_final_newline = false
14+
trim_trailing_whitespace = false

.eslintrc.js

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = {
1010
process: true,
1111
__dirname: true
1212
},
13-
parser: 'babel-eslint',
13+
parser: '@typescript-eslint/parser',
1414
parserOptions: {
1515
ecmaFeatures: {
1616
experimentalObjectRestSpread: true,
@@ -21,16 +21,14 @@ module.exports = {
2121
},
2222
plugins: ['react'],
2323
rules: {
24-
quotes: [2, 'single'], //单引号
24+
//quotes: [2, 'single'], //单引号
2525
'no-console': 0, //不禁用console
2626
'no-debugger': 2, //禁用debugger
2727
'no-var': 0, //对var警告
28-
semi: 0, //不强制使用分号
29-
3028
'no-irregular-whitespace': 0, //不规则的空白不允许
3129
'no-trailing-spaces': 1, //一行结束后面有空格就发出警告
3230
'eol-last': 0, //文件以单一的换行符结束
33-
'no-unused-vars': 0,
31+
//'no-unused-vars': 1,
3432
//'no-unused-vars': [2, { vars: 'all', args: 'after-used' }], //不能有声明后未被使用的变量或参数
3533
'no-underscore-dangle': 0, //标识符不能以_开头或结尾
3634
'no-alert': 2, //禁止使用alert confirm prompt
@@ -49,17 +47,16 @@ module.exports = {
4947
'no-spaced-func': 2, //函数调用时 函数名与()之间不能有空格
5048
'no-this-before-super': 0, //在调用super()之前不能使用this或super
5149
'no-undef': 2, //不能有未定义的变量
52-
'no-use-before-define': 2, //未定义前不能使用
53-
camelcase: 0, //强制驼峰法命名
50+
'no-use-before-define': 1, //未定义前不能使用
5451
'jsx-quotes': [2, 'prefer-double'], //强制在JSX属性(jsx-quotes)中一致使用双引号
5552
'react/display-name': 0, //防止在React组件定义中丢失displayName
5653
'react/forbid-prop-types': [2, { forbid: ['any'] }], //禁止某些propTypes
57-
'react/jsx-boolean-value': 2, //在JSX中强制布尔属性符号
54+
//'react/jsx-boolean-value': 2, //在JSX中强制布尔属性符号
5855
'react/jsx-closing-bracket-location': 1, //在JSX中验证右括号位置
5956
'react/jsx-curly-spacing': [2, { when: 'never', children: true }], //在JSX属性和表达式中加强或禁止大括号内的空格。
60-
'react/jsx-indent-props': [2, 4], //验证JSX中的props缩进
57+
//'react/jsx-indent-props': [2, 4], //验证JSX中的props缩进
6158
'react/jsx-key': 2, //在数组或迭代器中验证JSX具有key属性
62-
'react/jsx-max-props-per-line': [1, { maximum: 1 }], // 限制JSX中单行上的props的最大数量
59+
//'react/jsx-max-props-per-line': [1, { maximum: 1 }], // 限制JSX中单行上的props的最大数量
6360
'react/jsx-no-bind': 0, //JSX中不允许使用箭头函数和bind
6461
'react/jsx-no-duplicate-props': 2, //防止在JSX中重复的props
6562
'react/jsx-no-literals': 0, //防止使用未包装的JSX字符串

.prettierrc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
{
2-
"useTabs": false,
3-
"tabWidth": 4,
4-
"printWidth": 120,
5-
"singleQuote": true,
6-
"trailingComma": "none",
7-
"bracketSpacing": true,
8-
"semi": false,
9-
"htmlWhitespaceSensitivity": "ignore"
10-
}
1+
{
2+
"useTabs": false,
3+
"tabWidth": 2,
4+
"printWidth": 120,
5+
"singleQuote": true,
6+
"trailingComma": "none",
7+
"bracketSpacing": true,
8+
"semi": false,
9+
"htmlWhitespaceSensitivity": "ignore"
10+
}

README.md

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,54 @@
1-
#### 更新日志
2-
```
3-
2021-09-26 fix menu some issue
4-
```
5-
### 前言
6-
#### 本架构使用的技术为:react17+hooks+vite2 的新一代的react框架,框架使用类似 vue-admin-template
7-
8-
```
9-
框架有js和ts版本
10-
js版本分支:https://github.com/jzfai/react-admin-template.git
11-
ts版本分支:开发中
12-
新一代的微服务架构:https://github.com/jzfai/micro-service-plus
13-
```
14-
15-
> 开发和使用感受:两个字 真香!!!!!
16-
17-
### 效果
18-
19-
### 线上体验地址:http://8.135.1.141/react-admin-template
20-
![http://8.135.1.141/file/images/wx-groud.png](http://8.135.1.141/file/images/1632649052939.png)
21-
### 看下首次加载资源大小和速度
22-
![http://8.135.1.141/file/images/wx-groud.png](http://8.135.1.141/file/images/1632649288128.png)
23-
### 如何运行
24-
25-
```javascript
26-
27-
克隆项目
28-
git clone https://github.com/jzfai/react-admin-template.git
29-
30-
进入项目目录
31-
cd react-admin-template
32-
33-
运行yarn安装依赖
34-
yarn
35-
36-
运行dev命令
37-
yarn run dev
38-
39-
补充:这里说下package.json里的scripts命令
40-
"scripts": {
41-
"dev": "vite --mode serve-dev", ---- 开发时运行
42-
"build": "vite build --mode build", ---- 打包发布生产环境
43-
"serve": "vite preview --mode build" ---- 这个是在你本地打包完后(yarn run build)后会生产一个dist文件夹,这个命令在你本地启动一个本地服务用于查看dist文件内容,发布生产前可以用这个先看下打包的效果
44-
"preview:build": "yarn run build && vite preview " --- 构建并查看(建议更新上product前运行一次,查看是否有问题)
45-
},
46-
```
47-
#####
48-
49-
#### 如果需要实时交流的可以加入wx群(有vue3+ts视频教程)
50-
51-
52-
![http://8.135.1.141/file/images/wx-groud.png](http://8.135.1.141/file/images/wx-groud1.png)
53-
54-
大家的支持是我前进的动力 欢迎加入一起开发
1+
#### 更新日志
2+
```
3+
2021-10-09 Optimization side menu
4+
```
5+
### 前言
6+
#### 本架构使用的技术为:react17+hooks+vite2 的新一代的react框架,框架使用类似 vue3-admin-template
7+
8+
```
9+
框架有js和ts版本
10+
js版本分支:https://github.com/jzfai/react-admin-template.git
11+
ts版本分支:开发中
12+
新一代的微服务架构:https://github.com/jzfai/micro-service-plus
13+
```
14+
15+
> 开发和使用感受:两个字 真香!!!!!
16+
17+
### 效果
18+
19+
### 线上体验地址:http://8.135.1.141/react-admin-template
20+
![http://8.135.1.141/file/images/wx-groud.png](http://8.135.1.141/file/images/1632649052939.png)
21+
### 看下首次加载资源大小和速度
22+
![http://8.135.1.141/file/images/wx-groud.png](http://8.135.1.141/file/images/1632649288128.png)
23+
### 如何运行
24+
25+
```javascript
26+
27+
克隆项目
28+
git clone https://github.com/jzfai/react-admin-template.git
29+
30+
进入项目目录
31+
cd react-admin-template
32+
33+
运行yarn安装依赖
34+
yarn
35+
36+
运行dev命令
37+
yarn run dev
38+
39+
补充:这里说下package.json里的scripts命令
40+
"scripts": {
41+
"dev": "vite --mode serve-dev", ---- 开发时运行
42+
"build": "vite build --mode build", ---- 打包发布生产环境
43+
"serve": "vite preview --mode build" ---- 这个是在你本地打包完后(yarn run build)后会生产一个dist文件夹,这个命令在你本地启动一个本地服务用于查看dist文件内容,发布生产前可以用这个先看下打包的效果
44+
"preview:build": "yarn run build && vite preview " --- 构建并查看(建议更新上product前运行一次,查看是否有问题)
45+
},
46+
```
47+
#####
48+
49+
#### 如果需要实时交流的可以加入wx群(有vue3+ts视频教程)
50+
51+
52+
![http://8.135.1.141/file/images/wx-groud.png](http://8.135.1.141/file/images/wx-groud1.png)
53+
54+
大家的支持是我前进的动力 欢迎加入一起开发

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />
5-
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
5+
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>Vite App</title>
7+
<title>react admin template</title>
88
</head>
99
<body>
1010
<div id="root"></div>

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "vite-react",
3-
"version": "0.0.0",
3+
"version": "1.0.3",
44
"scripts": {
5-
"dev": "vite --mode serve-dev",
5+
"dev": "vite --mode serve-dev --host",
66
"build": "vite build --mode build",
77
"serve": "vite preview --mode build",
88
"preview:build": "yarn run build && vite preview ",
9-
"lint": "eslint --ext .js,.jsx,.ts,.tsx src",
9+
"lint": "eslint --ext .js,.jsx,.ts,.tsx src --fix",
1010
"prepare": "husky install"
1111
},
1212
"dependencies": {
@@ -50,12 +50,12 @@
5050
"@types/react-dom": "^17.0.2",
5151
"@types/sortablejs": "^1.10.6",
5252
"@types/vuedraggable": "^2.24.0",
53-
"@typescript-eslint/eslint-plugin": "^4.22.0",
54-
"@typescript-eslint/parser": "^4.22.0",
53+
"@typescript-eslint/eslint-plugin": "^4.33.0",
54+
"@typescript-eslint/parser": "^4.33.0",
5555
"@vitejs/plugin-legacy": "^1.5.2",
5656
"@vitejs/plugin-react-refresh": "^1.3.6",
5757
"babel-eslint": "^10.1.0",
58-
"eslint": "^6.7.2",
58+
"eslint": "^7.32.0",
5959
"eslint-plugin-import": "^2.22.1",
6060
"eslint-plugin-prettier": "^4.0.0",
6161
"eslint-plugin-react": "^7.5.1",
@@ -66,6 +66,6 @@
6666
"scss": "^0.2.4",
6767
"svg-sprite-loader": "4.1.3",
6868
"typescript": "^4.3.2",
69-
"vite": "^2.5.10"
69+
"vite": "^2.6.5"
7070
}
7171
}

public/favicon.ico

-746 Bytes
Binary file not shown.

src/App.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { Component } from 'react'
1+
// eslint-disable-next-line no-use-before-define
2+
import React from 'react'
23
import { Provider } from 'react-redux'
34
import { ConfigProvider } from 'antd'
45
import zhCN from 'antd/es/locale/zh_CN'

src/api/excel.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/api/login.js

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)