Skip to content

Commit 63069cf

Browse files
committed
Refactor
1 parent b86cd41 commit 63069cf

File tree

195 files changed

+6814
-12101
lines changed

Some content is hidden

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

195 files changed

+6814
-12101
lines changed

.env.development

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
NODE_ENV = 'development'
33

44
# base api
5-
VUE_APP_BASE_API = 'http://49.234.210.243:8888/loafer'
5+
VUE_APP_BASE_API = 'http://localhost:8888/loafer'
66

77
VUE_APP_PORT = '9585'
88

.eslintignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
vue.config.js
2-
.eslintrc.js
3-
src/*.d.ts
41
node_modules/*
2+
src/*.d.ts

.eslintrc.js

Lines changed: 106 additions & 354 deletions
Large diffs are not rendered by default.

.prettierrc.js

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

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# vue3.0-ts
1+
# vue-ts
22

33
## Project setup
44
```
@@ -7,15 +7,18 @@ npm install
77

88
### Compiles and hot-reloads for development
99
```
10-
npm run dev
10+
npm run serve
1111
```
1212

1313
### Compiles and minifies for production
1414
```
15-
npm run build:prod
15+
npm run build
1616
```
1717

1818
### Lints and fixes files
1919
```
20-
npm run lint-fix
20+
npm run lint
2121
```
22+
23+
### Customize configuration
24+
See [Configuration Reference](https://cli.vuejs.org/config/).

package-lock.json

Lines changed: 2671 additions & 2849 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "vue3.0-ts",
2+
"name": "vue3",
33
"version": "0.1.0",
44
"private": true,
55
"scripts": {
@@ -12,43 +12,41 @@
1212
"lint-fix": "eslint --fix --ext .js --ext .ts --ext .vue src/*"
1313
},
1414
"dependencies": {
15+
"@types/js-cookie": "^2.2.6",
1516
"axios": "^0.21.1",
1617
"core-js": "^3.6.5",
17-
"element-plus": "^1.0.2-beta.33",
18+
"element-plus": "^1.0.2-beta.40",
1819
"js-cookie": "^3.0.0-rc.1",
19-
"lodash": "^4.17.20",
20+
"lodash": "^4.17.21",
2021
"nprogress": "^0.2.0",
2122
"screenfull": "^5.1.0",
22-
"vue": "^3.0.5",
23+
"svg-sprite-loader": "^6.0.2",
24+
"vue": "^3.0.0",
2325
"vue-class-component": "^8.0.0-0",
24-
"vue-i18n": "^9.0.0",
26+
"vue-i18n": "^9.1.6",
2527
"vue-property-decorator": "^9.1.2",
2628
"vue-router": "^4.0.0-0",
2729
"vuex": "^4.0.0-0",
2830
"vuex-class": "^0.3.2"
2931
},
3032
"devDependencies": {
31-
"@types/reflect-metadata": "^0.1.0",
32-
"@typescript-eslint/eslint-plugin": "^2.33.0",
33-
"@typescript-eslint/parser": "^2.33.0",
33+
"@types/lodash": "^4.14.168",
34+
"@typescript-eslint/eslint-plugin": "^4.18.0",
35+
"@typescript-eslint/parser": "^4.18.0",
3436
"@vue/cli-plugin-babel": "~4.5.0",
3537
"@vue/cli-plugin-eslint": "~4.5.0",
3638
"@vue/cli-plugin-router": "~4.5.0",
3739
"@vue/cli-plugin-typescript": "~4.5.0",
3840
"@vue/cli-plugin-vuex": "~4.5.0",
3941
"@vue/cli-service": "~4.5.0",
4042
"@vue/compiler-sfc": "^3.0.0",
41-
"@vue/eslint-config-prettier": "^6.0.0",
42-
"@vue/eslint-config-typescript": "^5.0.2",
43+
"@vue/eslint-config-typescript": "^7.0.0",
4344
"babel-plugin-component": "^1.1.1",
44-
"eslint": "^7.17.0",
45-
"eslint-plugin-prettier": "^3.3.1",
46-
"eslint-plugin-vue": "^7.0.0-0",
47-
"prettier": "^2.2.1",
45+
"eslint": "^6.7.2",
46+
"eslint-plugin-vue": "^7.0.0",
4847
"sass": "^1.26.5",
4948
"sass-loader": "^8.0.2",
50-
"svg-sprite-loader": "^5.1.1",
51-
"typescript": "^3.9.7",
49+
"typescript": "^4.2.3",
5250
"webpack-bundle-analyzer": "^4.4.0"
5351
}
5452
}

public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html lang="en">
2+
<html lang="">
33
<head>
44
<meta charset="utf-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">

src/App.vue

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,13 @@
1-
<!--
2-
* @Description:
3-
* @Author: gumingchen
4-
5-
* @Date: 2020-12-15 08:45:46
6-
* @LastEditors: gumingchen
7-
* @LastEditTime: 2021-02-21 09:09:57
8-
-->
91
<template>
102
<router-view />
113
</template>
124

13-
<script lang="ts">
14-
import { Options, Vue } from 'vue-class-component'
15-
16-
@Options({})
17-
export default class App extends Vue {}
18-
</script>
19-
205
<style lang="scss">
6+
@import '@SASS/_variable.scss';
217
#app {
228
font-family: Avenir, Helvetica, Arial, sans-serif;
239
-webkit-font-smoothing: antialiased;
2410
-moz-osx-font-smoothing: grayscale;
25-
text-align: center;
26-
color: #606266;
27-
font-size: 14px;
11+
color: $fontColor1;
2812
}
2913
</style>

src/api/base/menu/index.ts

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
/*
2+
* @Description:
3+
* @Author: gumingchen
4+
5+
* @Date: 2020-12-28 16:25:18
6+
* @LastEditors: gumingchen
7+
* @LastEditTime: 2021-04-21 23:00:11
8+
*/
9+
import service from '@/utils/request'
10+
import { IResponse, IStatusParams } from '@/api/index.type'
11+
import { IMenu, IMenuParams, IMenuSelect } from './index.type'
12+
13+
/**
14+
* @description: 获取权限菜单
15+
* @param {params} IGetListParams
16+
* @return {*}
17+
* @author: gumingchen
18+
*/
19+
export function getList(params: { parent_id: number }): Promise<IResponse<IMenu[]>> {
20+
return service({
21+
url: '/base/menu/list',
22+
method: 'get',
23+
params: params
24+
})
25+
}
26+
27+
/**
28+
* @description: 详情
29+
* @param {*}
30+
* @return {*}
31+
* @author: gumingchen
32+
*/
33+
export function info(params: number): Promise<IResponse<IMenuParams>> {
34+
return service({
35+
url: `/base/menu/info/${ params }`,
36+
method: 'get'
37+
})
38+
}
39+
40+
/**
41+
* @description: 新增
42+
* @param {*}
43+
* @return {*}
44+
* @author: gumingchen
45+
*/
46+
export function add(params: IMenuParams): Promise<IResponse<null>> {
47+
return service({
48+
url: '/base/menu/create',
49+
method: 'post',
50+
data: params
51+
})
52+
}
53+
54+
/**
55+
* @description: 编辑
56+
* @param {*}
57+
* @return {*}
58+
* @author: gumingchen
59+
*/
60+
export function edit(params: IMenuParams): Promise<IResponse<null>> {
61+
return service({
62+
url: '/base/menu/update',
63+
method: 'post',
64+
data: params
65+
})
66+
}
67+
68+
/**
69+
* @description: 删除
70+
* @param {IStatusParams} params
71+
* @return {*}
72+
* @author: gumingchen
73+
*/
74+
export function del(params: { id: number }): Promise<IResponse<null>> {
75+
return service({
76+
url: '/base/menu/delete',
77+
method: 'post',
78+
data: params
79+
})
80+
}
81+
82+
/**
83+
* @description: 是否显示
84+
* @param {IStatusParams} params
85+
* @return {*}
86+
* @author: gumingchen
87+
*/
88+
export function setDisplay(params: IStatusParams): Promise<IResponse<null>> {
89+
return service({
90+
url: '/base/menu/display',
91+
method: 'post',
92+
data: params
93+
})
94+
}
95+
96+
/**
97+
* @description: 是否缓存
98+
* @param {IStatusParams} params
99+
* @return {*}
100+
* @author: gumingchen
101+
*/
102+
export function setAlive(params: IStatusParams): Promise<IResponse<null>> {
103+
return service({
104+
url: '/base/menu/alive',
105+
method: 'post',
106+
data: params
107+
})
108+
}
109+
110+
/**
111+
* @description: 是否显示在标签栏
112+
* @param {IStatusParams} params
113+
* @return {*}
114+
* @author: gumingchen
115+
*/
116+
export function setTab(params: IStatusParams): Promise<IResponse<null>> {
117+
return service({
118+
url: '/base/menu/tab',
119+
method: 'post',
120+
data: params
121+
})
122+
}
123+
124+
/**
125+
* @description: 是否在标签栏多开
126+
* @param {IStatusParams} params
127+
* @return {*}
128+
* @author: gumingchen
129+
*/
130+
export function setMultiple(params: IStatusParams): Promise<IResponse<null>> {
131+
return service({
132+
url: '/base/menu/multiple',
133+
method: 'post',
134+
data: params
135+
})
136+
}
137+
138+
/**
139+
* @description: 下拉列表
140+
* @param {params} IGetListParams
141+
* @return {*}
142+
* @author: gumingchen
143+
*/
144+
export function select(): Promise<IResponse<IMenuSelect[]>> {
145+
return service({
146+
url: '/base/menu/select',
147+
method: 'get'
148+
})
149+
}
150+
151+
/**
152+
* @description: 下拉列表
153+
* @param {params} IGetListParams
154+
* @return {*}
155+
* @author: gumingchen
156+
*/
157+
export function selfSelect(): Promise<IResponse<IMenuSelect[]>> {
158+
return service({
159+
url: '/base/menu/self/select',
160+
method: 'get'
161+
})
162+
}

0 commit comments

Comments
 (0)