Skip to content

Commit 665e97d

Browse files
author
biao.chen
committed
feat: 项目已经用 Vue3 + TypeScript + Vite2 + Vuex4 + Vue-Router4 + element-plus 重构完啦
1 parent b61634c commit 665e97d

Some content is hidden

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

57 files changed

+6312
-0
lines changed

.babelrc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"plugins": [
3+
[
4+
"component",
5+
{
6+
"libraryName": "element-plus",
7+
"styleLibraryName": "theme-chalk"
8+
}
9+
]
10+
]
11+
}

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
node_modules
2+
.DS_Store
3+
dist
4+
dist-ssr
5+
*.local
6+
yarn.lock
7+
package-lock.json

README.md

Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
![](https://upload-images.jianshu.io/upload_images/12890819-527034962df50506.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
2+
3+
4+
## 简介
5+
6+
**项目已经用 Vue3 + TypeScript + Vite2 + Vuex4 + Vue-Router4 + element-plus 重构完啦!**
7+
8+
Vue2 版本请点这里:[基于 Vue2 全家桶 + TypeScript + Element-UI](https://github.com/biaochenxuying/blog-vue-typescript/tree/vue2) 或者 [v2.0.0](https://github.com/biaochenxuying/blog-vue-typescript/releases/tag/v2.0.0)
9+
10+
---
11+
12+
此项目是基于 Vue3 全家桶 + TypeScript + element-plus 技术栈的简洁时尚博客网站。
13+
14+
项目详情请猛戳该文章:
15+
16+
- [Vue3 全家桶 + Element Plus + Vite + TypeScript + Eslint 项目配置最佳实践](https://juejin.cn/post/6924687052005081095)
17+
18+
19+
## 效果
20+
21+
效果图:
22+
23+
- pc 端
24+
25+
![](https://upload-images.jianshu.io/upload_images/12890819-9f5f1b384a27c6ff.gif?imageMogr2/auto-orient/strip)
26+
27+
28+
- 移动端
29+
30+
![](https://upload-images.jianshu.io/upload_images/12890819-5370ed6dfbe61051.gif?imageMogr2/auto-orient/strip)
31+
32+
33+
完整效果请看:[https://biaochenxuying.cn](https://biaochenxuying.cn)
34+
35+
36+
## 功能
37+
38+
### 已经完成功能
39+
40+
- [x] 登录
41+
- [x] 注册
42+
- [x] 文章列表
43+
- [x] 文章归档
44+
- [x] 标签
45+
- [x] 关于
46+
- [x] 点赞与评论
47+
- [x] 留言
48+
- [x] 历程
49+
- [x] 文章详情(支持代码语法高亮)
50+
- [x] 文章详情目录
51+
- [x] 移动端适配
52+
- [x] github 授权登录
53+
54+
55+
[⬆️ 返回顶部](##简介)
56+
57+
## 前端主要技术
58+
59+
所有技术都是当前最新的。
60+
61+
- vue: ^3.0.5
62+
- typescript : ^4.1.3
63+
- element-plus: ^1.0.2-beta.41
64+
- vue-router : ^4.0.6
65+
- vite: ^2.2.3
66+
- vuex: ^4.0.0
67+
- axios: ^0.21.1
68+
- highlight.js: ^10.7.2
69+
- marked:^2.0.3
70+
71+
72+
[⬆️ 返回顶部](##简介)
73+
74+
## Build Setup
75+
76+
```
77+
# clone
78+
git clone https://github.com/biaochenxuying/blog-vue-typescript.git
79+
```
80+
81+
```
82+
# cd
83+
cd blog-vue-typescript
84+
```
85+
86+
```
87+
# install dependencies
88+
npm install
89+
```
90+
91+
```
92+
# Compiles and hot-reloads for development
93+
npm run dev
94+
```
95+
96+
```
97+
# Compiles and minifies for production
98+
npm run build
99+
```
100+
101+
102+
如果要看有后台数据完整的效果,是要和后台项目 **[blog-node](https://github.com/biaochenxuying/blog-node)** 一起运行才行的,不然接口请求会失败。
103+
104+
虽然引入了 mock 了,但是还没有时间做模拟数据,想看具体效果,请稳步到我的网站上查看 [https://biaochenxuying.cn](https://biaochenxuying.cn)
105+
106+
107+
[⬆️ 返回顶部](##简介)
108+
109+
110+
## 项目地址与文档教程
111+
112+
**项目地址:**
113+
114+
> [vue 前台展示: https://github.com/biaochenxuying/blog-vue-typescript](https://github.com/biaochenxuying/blog-vue-typescript)
115+
116+
> [react 前台展示: https://github.com/biaochenxuying/blog-react](https://github.com/biaochenxuying/blog-react)
117+
118+
> [管理后台:https://github.com/biaochenxuying/blog-react-admin](https://github.com/biaochenxuying/blog-react-admin)
119+
120+
> [后端:https://github.com/biaochenxuying/blog-node](https://github.com/biaochenxuying/blog-node)
121+
122+
> [blog:https://github.com/biaochenxuying/blog](https://github.com/biaochenxuying/blog)
123+
124+
**本博客系统的系列文章:**
125+
126+
- [0. Vue3 全家桶 + Element Plus + Vite + TypeScript + Eslint 项目配置最佳实践](https://juejin.cn/post/6924687052005081095)
127+
- [1. react + node + express + ant + mongodb 的简洁兼时尚的博客网站](https://biaochenxuying.cn/articleDetail?article_id=5bf57a8f85e0f13af26e579b)
128+
- [2. react + Ant Design + 支持 markdown 的 blog-react 项目文档说明](https://biaochenxuying.cn/articleDetail?article_id=5bf6bb5e85e0f13af26e57b7)
129+
- [3. 基于 node + express + mongodb 的 blog-node 项目文档说明](https://biaochenxuying.cn/articleDetail?article_id=5bf8c57185e0f13af26e7d0d)
130+
- [4. 服务器小白的我,是如何将 node+mongodb 项目部署在服务器上并进行性能优化的](https://biaochenxuying.cn/articleDetail?article_id=5bfa728bb54f044b4f9da240)
131+
- [5. github 授权登录教程与如何设计第三方授权登录的用户表](https://biaochenxuying.cn/articleDetail?article_id=5c7bd34e42b55e2ecc90976d)
132+
- [6. 一次网站的性能优化之路 -- 天下武功,唯快不破](https://biaochenxuying.cn/articleDetail?article_id=5c8ca2d3b87b8a04f1860c9a)
133+
- [7. Vue + TypeScript + Element 搭建简洁时尚的博客网站及踩坑记](https://biaochenxuying.cn/articleDetail?article_id=5c9d8ce5f181945ddd6b0ffc)
134+
- [8. 前端解决第三方图片防盗链的办法 - html referrer 访问图片资源403问题](https://biaochenxuying.cn/articleDetail?article_id=5cfcc6798090bd3c84138a08)
135+
136+
137+
[⬆️ 返回顶部](##简介)
138+
139+
## 服务器
140+
141+
笔者觉得每个开发者都应该拥有自己的网站和服务器,这可是很酷的事情,学习 Linux、跑跑脚本、建站、搭博客啥的都行啊。
142+
143+
因为笔者就有自己的服务器,而且有两台了,用于平时的学习,还搭建了自己的网站。
144+
145+
有不少读者问过我,为什么我学的那么快的呢 ? 怎么在一年内学了那么知识的...
146+
147+
其实也没什么秘决,就是平时有自己的服务器了,就爱折腾,学到的知识能很快得到验证,所以学起来兴致高一点。
148+
149+
特别是大三和大四的学生,买了服务器,搭建个项目给面试官看也香,对找工作和面试都加分,还可以熟悉技术栈。
150+
151+
阿里云、腾讯云、华为云 都有,这里购买就是最优惠: [低于 1 折、89/年、229/3年,比学生机还便宜](https://biaochenxuying.cn/articleDetail?article_id=5de65dd90283dc742f8f633a)
152+
153+
比如笔者的两个网站:
154+
155+
> https://biaochenxuying.cn/
156+
157+
> https://www.kwgg2020.com/
158+
159+
160+
[⬆️ 返回顶部](##简介)
161+
162+
163+
## 项目推荐
164+
165+
166+
> 专注于挖掘优秀的前端开源项目,抹平你的前端信息不对称的项目:https://github.com/FrontEndGitHub/FrontEndGitHub
167+
168+
> 以最优惠的方式购买极客时间课程:https://github.com/biaochenxuying/preferential-courses ,涵盖了后端、架构、前端、移动、人工智能、大数据、产品、运营、运维、测试等
169+
170+
171+
[⬆️ 返回顶部](##简介)
172+
173+
174+
## 撩我
175+
176+
如果你觉得该项目不错,或者对你有所帮助,点个 Star,就是对我最大的鼓励,我会更有动力维护好该项目。
177+
178+
179+
| 微信 | 公众号 |
180+
| :------: | :------: |
181+
| ID:**CB834301747** <div align="center" style="margin-top: 10px;"> ![CB834301747](https://upload-images.jianshu.io/upload_images/12890819-d4d4cae18ddb84c5.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/360) </div> | ID:**QuanZhanXiuLian** <div align="center" style="margin-top: 10px;"> ![](https://upload-images.jianshu.io/upload_images/12890819-50b85ba33dd7ba90.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) </div> |
182+
183+
184+
> 欢迎关注微信公众号 “**[全栈修炼](https://upload-images.jianshu.io/upload_images/12890819-9a13b43f4feb8f84.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)**”,回复 “**电子书**” 即可以获得下面 **300** 本技术精华书籍和 **160+** 本前端精华电子书哦。
185+
186+
![](https://upload-images.jianshu.io/upload_images/12890819-62496904db90a9fa.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/340)
187+
188+
189+
[⬆️ 返回顶部](##简介)

index.html

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8" />
6+
<link rel="icon" href="/favicon.ico" />
7+
<meta id="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
8+
name="viewport" />
9+
<meta id="referrer" name="referrer" content="always" />
10+
<title id="title">夜尽天明的个人博客网站</title>
11+
<meta name="baidu-site-verification" content="7XGPmF2RtW" />
12+
<meta id="keywords" name="keywords" content="夜尽天明 的博客网站,大前端开发" />
13+
<meta id="description" name="description" content="夜尽天明 的博客网站。夜尽天明,目前是一名前端开发工程师,全栈修炼 公众号作者,致力于大前端开发、全栈程序员的成长之路。" />
14+
</head>
15+
16+
<body>
17+
<div id="app">
18+
<!-- 首屏加载动画 -->
19+
<div style="text-align: center; height: 300px; margin-top: 15%">
20+
<img src="./public/img/loading.svg" width="250" alt="加载中..." />
21+
</div>
22+
</div>
23+
<script type="module" src="/src/main.ts"></script>
24+
</body>
25+
26+
</html>

package.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "blog-vue-ts-vite",
3+
"version": "0.0.0",
4+
"scripts": {
5+
"dev": "vite",
6+
"build": "vue-tsc --noEmit && vite build",
7+
"serve": "vite preview"
8+
},
9+
"dependencies": {
10+
"axios": "^0.21.1",
11+
"element-plus": "^1.0.2-beta.41",
12+
"highlight.js": "^10.7.2",
13+
"marked": "^2.0.3",
14+
"vue": "^3.0.5",
15+
"vue-router": "^4.0.6",
16+
"vuex": "^4.0.0"
17+
},
18+
"devDependencies": {
19+
"@types/marked": "^2.0.2",
20+
"@vitejs/plugin-vue": "^1.2.2",
21+
"@vue/compiler-sfc": "^3.0.5",
22+
"less": "^4.1.1",
23+
"typescript": "^4.1.3",
24+
"vite": "^2.2.3",
25+
"vite-plugin-style-import": "^0.10.0",
26+
"vue-tsc": "^0.0.24"
27+
}
28+
}

public/favicon.ico

4.19 KB
Binary file not shown.

public/img/loading.svg

Lines changed: 20 additions & 0 deletions
Loading

public/img/logo.jpg

22.8 KB
Loading

public/img/userLogo.jpeg

19.8 KB
Loading

0 commit comments

Comments
 (0)