Skip to content

Commit a43ace1

Browse files
committed
judge the login and update vite version
1 parent 1974fa8 commit a43ace1

Some content is hidden

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

42 files changed

+565
-5703
lines changed

.eslintrc.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ module.exports = {
99
process: true,
1010
__dirname: true,
1111
document: true,
12+
GLOBAL_VAR: true,
13+
GLOBAL_STRING: true,
1214
localStorage: true,
1315
window: true,
1416
defineProps: true,

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ node_modules
55
dist
66
dist-ssr
77
*.local
8-
yarn.lock
8+
pnpm*
9+
ts-out-dir
10+
pnpm*

.husky/commit-msg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
#. "$(dirname "$0")/_/husky.sh"
3+
#pnpm run lint

.husky/pre-commit

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/sh
2+
#. "$(dirname "$0")/_/husky.sh"
3+
#pnpm run lint
4+
#npx --no-install commitlint --edit "$1"
5+
#npx husky add .husky/commit-msg 'npx --no-install commitlint --edit "$1"'
6+
#推送之前运行eslint检查
7+
npm run lint
8+
9+
#推送之前运行tsc检查
10+
npm run tsc-check
11+
12+
13+
#测试提交有问题阻断
14+
#echo exit;;

README-zh_CN.md

Lines changed: 16 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,18 @@
11
# react-admin-ts
22

3-
**中文** | [English](./README.md)
4-
5-
63

74
> 这是一个基础的 react admin 管理后台。
85
96

10-
本架构使用的技术为:react17+vite2+ant4 新一代的前端框架,It's fast!
7+
本架构使用的技术为:react17+vite2+ant4 新一代的前端框架,It's easy and fast!
118

129
使用 eslint+prettier+gitHooks 格式和校验代码,提高代码规范性和开发效率
1310

1411
## 更新日志
1512

16-
```javascript
17-
//10-08
18-
add error log collection func
19-
```
13+
--- to look the doc-
2014

15+
[真香定律!带你用react17+vite2撸后台](https://juejin.cn/post/7054467502717272094)
2116

2217
## 线上体验
2318

@@ -39,26 +34,22 @@ github 地址: https://github.com/jzfai/react-admin-ts.git
3934
![template-demo](http://8.135.1.141/file/images/react-template-demo.png)
4035

4136
## 相关项目
42-
43-
框架有js,ts和plus版本
37+
框架有js,ts版本
4438

4539
- react js版本: [react-admin-template](https://github.com/jzfai/react-admin-template.git)
46-
- react ts版本: [react-admin-template](https://github.com/jzfai/react-admin-ts.git)
47-
- vue3 js版本:[vue3-element-admin](https://github.com/jzfai/vue3-admin-template.git)
48-
- vue3 ts版本:[vue3-element-ts](https://github.com/jzfai/vue3-admin-ts.git)
40+
- react ts版本: [react-admin-ts](https://github.com/jzfai/react-admin-ts.git)
41+
4942
- vue3 plus版本:[vue3-element-plus](https://github.com/jzfai/vue3-admin-plus.git)
5043
- java微服务后台数据:[micro-service-plus](https://github.com/jzfai/micro-service-plus)
51-
5244
> 开发和使用感受:两个字 真香!!!!!
5345
5446

5547
## 文档
56-
-- 文档努力开发中。。。。
5748

58-
可以先参考(和vue-admin-template使用类似):[vue-admin-template使用文档](https://juejin.im/post/59097cd7a22b9d0065fb61d2)
49+
- [真香定律!带你用react17+vite2撸后台](https://juejin.cn/post/7054467502717272094)
5950

6051

61-
#### 和 传统react admin区别
52+
#### 和传统react admin区别
6253

6354
1.路由配置简单,一次配置即可完成路由生成和页面渲染
6455

@@ -67,7 +58,6 @@ github 地址: https://github.com/jzfai/react-admin-ts.git
6758
3.使用vite2代替webpack 配置更加简单,打包和运行速度更快
6859

6960

70-
[vite2和webpack打包速度上的对比](https://github.com/jzfai/vue3-admin-template/issues/2)
7161

7262
## 构建步骤
7363

@@ -78,11 +68,11 @@ git clone https://github.com/jzfai/react-admin-ts.git
7868
# 进入项目目录
7969
cd react-admin-ts
8070

81-
# 安装依赖(建议用yarn)
82-
yarn
71+
# 安装依赖(建议用pnpm)
72+
pnpm
8373

8474
# 启动服务
85-
yarn run dev
75+
pnpm run dev
8676
```
8777

8878
浏览器访问 http://localhost:5005
@@ -92,95 +82,25 @@ yarn run dev
9282

9383
```bash
9484
# 构建测试环境
95-
yarn run build-serve
85+
pnpm run build-serve
9686

9787
# 构建生产环境
98-
yarn run build
88+
pnpm run build
9989
```
10090

10191
## 其它
10292

10393
```bash
10494
# 预览发布环境效果
105-
yarn run preview:build-serve
95+
pnpm run preview:build-serve
10696

10797
# 预览生产环境
108-
yarn run preview
98+
pnpm run preview
10999

110100
# 代码格式检查并自动修复
111-
yarn run lint
112-
```
113-
114-
## 功能
115-
116-
```
117-
- 登录 / 注销
118-
119-
- 权限验证
120-
- 页面权限
121-
- 指令权限
122-
- 权限配置
123-
- 二步登录
124-
125-
- 多环境发布
126-
- serve
127-
- build
128-
- priview
129-
- lint
130-
131-
- 全局功能
132-
#- 国际化多语言
133-
#- 多种动态换肤
134-
- 动态侧边栏(支持多级路由嵌套)
135-
- 动态面包屑
136-
- 快捷导航(标签页)
137-
- Svg Sprite 图标
138-
- 本地/后端 mock 数据
139-
#- Screenfull全屏
140-
- 自适应收缩侧边栏
141-
142-
- 编辑器
143-
#- 富文本
144-
#- Markdown
145-
#- JSON 等多格式
146-
147-
#- Excel
148-
#- 导出excel
149-
#- 导入excel
150-
#- 前端可视化excel
151-
#- 导出zip
152-
153-
- 表格
154-
#- 动态表格
155-
#- 拖拽表格
156-
#- 内联编辑
157-
158-
- 错误页面
159-
#- 401
160-
#- 404
161-
162-
- 組件
163-
- 头像上传
164-
- 返回顶部
165-
#- 拖拽Dialog
166-
#- 拖拽Select
167-
#- 拖拽看板
168-
#- 列表拖拽
169-
#- SplitPane
170-
#- Dropzone
171-
#- Sticky
172-
#- CountTo
173-
174-
- 综合实例
175-
- 错误日志
176-
- Dashboard
177-
#- 引导页
178-
- ECharts 图表
179-
#- Clipboard(剪贴复制)
180-
#- Markdown2html
101+
pnpm run lint
181102
```
182103

183-
>注:#---暂未实现(希望大家能一起开发)
184104

185105
## 额外
186106

README.md

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@ Use eslint+prettier+gitHooks format and verification code to improve code standa
1111

1212
## Update log
1313

14-
```javascript
15-
//10-08
16-
add error log collection func
17-
```
14+
--- to look the doc-
15+
16+
[真香定律!带你用react17+vite2撸后台](https://juejin.cn/post/7054467502717272094)
1817

1918
## Online experience
2019

@@ -37,21 +36,20 @@ github 地址: https://github.com/jzfai/react-admin-ts.git
3736

3837
## Related items
3938

40-
The framework is available in js, ts and plus versions
39+
The framework is available in js, ts versions
4140

4241
- react js version: [react-admin-template](https://github.com/jzfai/react-admin-template.git)
4342
- react ts version: [react-admin-template](https://github.com/jzfai/react-admin-ts.git)
44-
- vue3 js version:[vue3-element-admin](https://github.com/jzfai/vue3-admin-template.git)
45-
- vue3 ts version:[vue3-element-ts](https://github.com/jzfai/vue3-admin-ts.git)
43+
4644
- vue3 plus version:[vue3-element-plus](https://github.com/jzfai/vue3-admin-plus.git)
4745
- java Micro-service background data:[micro-service-plus](https://github.com/jzfai/micro-service-plus)
4846
> development and experience:two words Really fragrant!!!!!
4947
5048
## Documents
5149

52-
-- Efforts are being made to develop documents ......
50+
系列文章入口:
5351

54-
You can refer to first:[documentation of vue-admin-template ](https://juejin.im/post/59097cd7a22b9d0065fb61d2)
52+
- [真香定律!带你用react17+vite2撸后台](https://juejin.cn/post/7054467502717272094)
5553

5654
#### Difference from traditional react admin
5755

@@ -73,11 +71,11 @@ git clone https://github.com/jzfai/react-admin-ts.git
7371
# enter the project directory
7472
cd react-admin-ts
7573

76-
# install dependency(Recommend use yarn)
77-
yarn
74+
# install dependency(Recommend use pnpm)
75+
pnpm
7876

7977
# develop
80-
yarn run dev
78+
pnpm run dev
8179
```
8280

8381
using the browser to open http://localhost:5001
@@ -86,23 +84,23 @@ using the browser to open http://localhost:5001
8684

8785
```bash
8886
# build for dev environment
89-
yarn run build-serve
87+
pnpm run build-serve
9088

9189
# build for production environment
92-
yarn run build
90+
pnpm run build
9391
```
9492

9593
## Others
9694

9795
```bash
9896
# preview the dev environment effect
99-
yarn run preview:build-serve
97+
pnpm run preview:build-serve
10098

10199
# preview the release environment effect
102-
yarn run preview
100+
pnpm run preview
103101

104102
# code format check
105-
yarn run lint
103+
pnpm run lint
106104

107105
```
108106

0 commit comments

Comments
 (0)