Skip to content

Commit c98c016

Browse files
committed
feat: v3.0.1
1 parent cc5945a commit c98c016

Some content is hidden

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

59 files changed

+2250
-1926
lines changed

.env

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

2-
# port
3-
VITE_PORT = 2022
4-
52
# 网站标题
6-
VITE_APP_TITLE = '首页'
3+
VITE_APP_TITLE = '首页'
4+
5+
# 端口号
6+
VITE_PORT = 2022

.env.test

-7
This file was deleted.

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist

.eslintrc.js

+16-17
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
1-
// @ts-check
2-
// eslint-disable-next-line @typescript-eslint/no-require-imports
3-
const { defineConfig } = require('eslint-define-config');
4-
5-
module.exports = defineConfig({
1+
module.exports = {
62
root: true,
3+
extends: ['alloy', 'alloy/vue', 'alloy/typescript'],
4+
parser: 'vue-eslint-parser',
5+
parserOptions: {
6+
parser: {
7+
js: '@babel/eslint-parser',
8+
jsx: '@babel/eslint-parser',
9+
10+
ts: '@typescript-eslint/parser',
11+
tsx: '@typescript-eslint/parser',
12+
13+
// Leave the template parser unspecified, so that it could be determined by `<script lang="...">`
14+
},
15+
},
716
env: {
817
browser: true,
918
node: true,
@@ -12,17 +21,6 @@ module.exports = defineConfig({
1221
uni: true,
1322
wx: true,
1423
},
15-
parser: 'vue-eslint-parser',
16-
parserOptions: {
17-
parser: '@typescript-eslint/parser',
18-
ecmaVersion: 2020,
19-
sourceType: 'module',
20-
jsxPragma: 'React',
21-
ecmaFeatures: {
22-
jsx: true,
23-
},
24-
},
25-
extends: ['alloy', 'alloy/typescript', 'alloy/vue'],
2624
rules: {
2725
// 自定义你的规则
2826
'no-console': 'off',
@@ -33,5 +31,6 @@ module.exports = defineConfig({
3331
'vue/no-multiple-template-root': 'off',
3432
// 'vue/no-duplicate-attributes': 'off',
3533
// 'vue/no-v-for-template-key': 'off',
34+
'@typescript-eslint/prefer-optional-chain': 'off',
3635
},
37-
});
36+
};

.npmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
registry=https://registry.npmmirror.com
1+
registry=https://registry.npmmirror.com/

CHANGELOG.md

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# 更新日志
2+
3+
> 记录下重大改动
4+
5+
## v3.0.1(2022-08-16)
6+
7+
主要改动
8+
9+
- 更新依赖,更新 `eslint alloy`配置
10+
- 优化代码逻辑和其他细节完善
11+
12+
## v3.0.0(2022-02-21)
13+
14+
v3 大版本
15+
16+
- :rocket: v3 [Vue 3 + Vite 2](https://v-shop.shuzp.top/)
17+
18+
## v2.0.0(2022-02-21)
19+
20+
v2 大版本
21+
22+
- :tada: v2 [Vue 2 + Vue CLI 4.5](https://v-shop.shuzp.top/v2/)
23+
24+
## v1.0.0 (2019-07-12)
25+
26+
```
27+
# v-shop
28+
基于vue,使用api工厂提供的免费接口和云后台,实现一个线上商城
29+
```
30+
31+
## v0.0.0 (2019-05-23)
32+
33+
`v-shop` 开工

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 Joeshu
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+12-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,17 @@
22

33
## 🌈 简介
44

5-
v-shop 是一个前端免费开源的企业级 H5 商城,也可用于学习参考。
5+
v-shop 是一个前端免费开源的企业级移动端(H5)商城,使用 `vue3` `vite` `vant` `typescript`等前端前沿技术开发,也可用于学习参考。
6+
7+
## ✨ 特性
8+
9+
- 💪 使用前端主流技术栈搭建
10+
- 🍭 使用 [api 工厂](https://www.it120.cc/) 提供的开放 API 接口
11+
- 🍭 Vant 设计风格,支持 Vue 2、Vue 3
12+
- 🍭 清晰的项目结构,业务代码的最佳实现
13+
- 🍭 使用 TypeScript 开发
14+
- 🍭 使用 [AlloyTeam ESLint](https://github.com/AlloyTeam/eslint-config-alloy) 规则, 规范项目代码
15+
- 🎨 支持动态切换主题,支持动态加载 vconsole 面板
616

717
## 🔥 预览
818

@@ -77,4 +87,4 @@ pnpm run build
7787

7888
如果觉得项目不错,或者有帮助到你,希望你可以去 Github 或者 Gitee 帮我点个 ⭐ Star,这将是对我极大的鼓励与支持。
7989

80-
微信: f144270(请备注 v-shop)
90+
微信: f144270(请备注 v-shop)

index.html

+4-48
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html lang="zh-cmn-Hans">
2+
<html>
33
<head>
44
<meta charset="utf-8" />
55
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
@@ -8,52 +8,9 @@
88
name="viewport"
99
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover"
1010
/>
11-
<link rel="icon" href="/favicon.ico" />
1211
<title><%= title %></title>
13-
<style>
14-
.p-preloader {
15-
display: -webkit-box;
16-
display: -webkit-flex;
17-
display: -ms-flexbox;
18-
display: flex;
19-
-webkit-box-align: center;
20-
-webkit-align-items: center;
21-
-ms-flex-align: center;
22-
align-items: center;
23-
-webkit-box-pack: center;
24-
-webkit-justify-content: center;
25-
-ms-flex-pack: center;
26-
justify-content: center;
27-
position: absolute;
28-
top: 0;
29-
right: 0;
30-
bottom: 0;
31-
left: 0;
32-
z-index: 2;
33-
background-color: #fff;
34-
color: #c8c9cc;
35-
}
36-
37-
.p-preloader__icon {
38-
box-sizing: border-box;
39-
width: 40px;
40-
height: 40px;
41-
margin: 0 auto 10px;
42-
}
43-
44-
.p-preloader__icon svg {
45-
margin: 0 auto 10px;
46-
width: 40px;
47-
height: 40px;
48-
}
49-
50-
.p-preloader__label {
51-
font-size: 14px;
52-
text-align: center;
53-
letter-spacing: 2px;
54-
padding-left: 2px;
55-
}
56-
</style>
12+
<link rel="icon" href="/favicon.ico" />
13+
<link rel="stylesheet" href="/index.css" />
5714
</head>
5815
<body>
5916
<div id="app">
@@ -87,11 +44,10 @@
8744
></path>
8845
</svg>
8946
</div>
90-
<div class="p-preloader__label">加载中...</div>
47+
<div class="p-preloader__label">加载中,请稍后</div>
9148
</div>
9249
</div>
9350
</div>
9451
<script type="module" src="/src/main.ts"></script>
95-
<!-- built files will be auto injected -->
9652
</body>
9753
</html>

package.json

+31-28
Original file line numberDiff line numberDiff line change
@@ -15,41 +15,44 @@
1515
"lint:prettier": "prettier --write \"src/**/*.{js,jsx,json,tsx,css,less,scss,vue,html,md}\""
1616
},
1717
"dependencies": {
18-
"@vant/area-data": "^1.2.2",
19-
"@vueuse/core": "^7.6.0",
20-
"axios": "^0.21.1",
18+
"@vant/area-data": "^1.3.1",
19+
"@vueuse/core": "^7.7.1",
20+
"axios": "^0.21.4",
2121
"compressorjs": "^1.1.1",
22-
"dayjs": "^1.10.7",
22+
"dayjs": "^1.11.5",
2323
"good-storage": "^1.1.1",
24-
"number-precision": "^1.5.1",
25-
"pinia": "^2.0.11",
26-
"qs": "^6.10.1",
27-
"router": "^1.3.6",
28-
"vant": "^3.4.4",
29-
"vue": "^3.2.30",
30-
"vue-router": "^4.0.12"
24+
"number-precision": "^1.5.2",
25+
"pinia": "^2.0.18",
26+
"qs": "^6.11.0",
27+
"vant": "^3.5.4",
28+
"vue": "^3.2.37",
29+
"vue-router": "^4.1.3"
3130
},
3231
"devDependencies": {
33-
"@types/node": "^17.0.17",
34-
"@typescript-eslint/eslint-plugin": "^5.11.0",
35-
"@typescript-eslint/parser": "^5.11.0",
36-
"@vitejs/plugin-vue": "^2.1.0",
37-
"@vitejs/plugin-vue-jsx": "^1.3.4",
38-
"eslint": "^8.7.0",
39-
"eslint-config-alloy": "^4.4.0",
40-
"eslint-define-config": "^1.2.4",
41-
"eslint-plugin-vue": "^8.4.1",
42-
"less": "^4.1.2",
32+
"@babel/core": "^7.18.10",
33+
"@babel/eslint-parser": "^7.18.9",
34+
"@types/node": "^18.7.5",
35+
"@typescript-eslint/eslint-plugin": "^5.33.1",
36+
"@typescript-eslint/parser": "^5.33.1",
37+
"@vitejs/plugin-vue": "^2.3.4",
38+
"@vitejs/plugin-vue-jsx": "^1.3.10",
39+
"@vue/eslint-config-typescript": "^11.0.0",
40+
"autoprefixer": "^10.4.8",
41+
"eslint": "^8.22.0",
42+
"eslint-config-alloy": "^4.6.2",
43+
"eslint-define-config": "^1.6.0",
44+
"eslint-plugin-vue": "^9.3.0",
45+
"less": "^4.1.3",
46+
"postcss": "^8.4.16",
4347
"postcss-px-to-viewport": "^1.1.1",
44-
"prettier": "^2.5.1",
45-
"typescript": "^4.5.5",
46-
"vite": "^2.8.0",
47-
"vite-plugin-html": "^2.1.2",
48-
"vue-eslint-parser": "^8.2.0",
49-
"vue-tsc": "^0.31.2"
48+
"prettier": "^2.7.1",
49+
"typescript": "^4.7.4",
50+
"vite": "^2.9.15",
51+
"vite-plugin-html": "^3.2.0",
52+
"vue-eslint-parser": "^9.0.3",
53+
"vue-tsc": "^0.31.4"
5054
},
5155
"browserslist": [
52-
"Android >= 4.0",
5356
"Chrome >= 51",
5457
"iOS >= 10.0"
5558
]

0 commit comments

Comments
 (0)