Skip to content

Commit 750cb34

Browse files
committed
pre-commit 脚本并调整多个 mdx 文件的格式,修正空格和添加缺失的 git add 命令。
1 parent f734a7f commit 750cb34

File tree

8 files changed

+26
-7
lines changed

8 files changed

+26
-7
lines changed

.husky/pre-commit

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
npx lint-staged
1+
. "$(dirname -- "$0")/_/husky.sh"
2+
3+
npx lint-staged

docs/blog/code/22.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ description: VantUI 移动端适配
2222
{" "}
2323

2424
{" "}
25+
2526
<Source value="https://github.com/cuth/postcss-pxtorem" />
2627

2728
- [lib-flexible](https://github.com/amfe/lib-flexible) 用于设置 rem 基准值
@@ -37,6 +38,7 @@ description: VantUI 移动端适配
3738
{" "}
3839

3940
{" "}
41+
4042
<Source value="https://github.com/amfe/lib-flexible" />
4143

4244
### 插件安装
@@ -54,6 +56,7 @@ description: VantUI 移动端适配
5456
{" "}
5557

5658
{" "}
59+
5760
<Install value="install postcss-pxtorem -D" />
5861

5962
- [lib-flexible](https://github.com/amfe/lib-flexible)
@@ -62,7 +65,7 @@ description: VantUI 移动端适配
6265
{" "}
6366
{" "}
6467
{" "}
65-
{" "}
68+
{" "}
6669
<Install value="install lib-flexible -S" />
6770

6871
### PostCSS 配置

docs/blog/code/27.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ description: JS 生成分享带图二维码
5252
{" "}
5353

5454
{" "}
55+
5556
<Install value="install vue-qr" />
5657

5758
- 安装用于将 html 代码生成图片的插件 html2canvas
@@ -67,6 +68,7 @@ description: JS 生成分享带图二维码
6768
{" "}
6869

6970
{" "}
71+
7072
<Install value="install html2canvas" />
7173

7274
- 安装用于保存图片的插件 file-saver
@@ -82,6 +84,7 @@ description: JS 生成分享带图二维码
8284
{" "}
8385

8486
{" "}
87+
8588
<Install value="install file-saver" />
8689

8790
**插件介绍:(点击访问文档地址)**

docs/blog/code/30.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ description: vuex 数据持久化存储
3232
{" "}
3333

3434
{" "}
35+
3536
<Source value="https://github.com/robinvdvleuten/vuex-persistedstate#readme" />
3637

3738
- 使用方法
@@ -122,6 +123,7 @@ export new Vuex.Store({
122123
{" "}
123124

124125
{" "}
126+
125127
<Source value="https://github.com/championswimmer/vuex-persist#readme" />
126128

127129
- 使用方法

docs/blog/code/32.mdx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ description: husky、prettier、eslint 代码格式化
3030
{" "}
3131

3232
{" "}
33+
3334
<Install value="install eslint -D" />
3435

3536
- **"prettier": "^2.4.1"**
@@ -45,6 +46,7 @@ description: husky、prettier、eslint 代码格式化
4546
{" "}
4647

4748
{" "}
49+
4850
<Install value="install prettier -D" />
4951

5052
- **"husky": "^8.0.0"**
@@ -60,6 +62,7 @@ description: husky、prettier、eslint 代码格式化
6062
{" "}
6163

6264
{" "}
65+
6366
<Install value="install husky -D" />
6467

6568
- **"lint-staged": "^11.1.2"**
@@ -68,7 +71,7 @@ description: husky、prettier、eslint 代码格式化
6871
{" "}
6972
{" "}
7073
{" "}
71-
{" "}
74+
{" "}
7275
<Install value="install lint-staged -D" />
7376

7477
#### 依赖安装二
@@ -86,6 +89,7 @@ description: husky、prettier、eslint 代码格式化
8689
{" "}
8790

8891
{" "}
92+
8993
<Install value="install eslint-config-prettier -D" />
9094

9195
- **"eslint-plugin-prettier": "^4.0.0"**
@@ -101,6 +105,7 @@ description: husky、prettier、eslint 代码格式化
101105
{" "}
102106

103107
{" "}
108+
104109
<Install value="install eslint-plugin-prettier -D" />
105110

106111
- **"eslint-plugin-vue": "^9.19.2"**
@@ -109,7 +114,7 @@ description: husky、prettier、eslint 代码格式化
109114
{" "}
110115
{" "}
111116
{" "}
112-
{" "}
117+
{" "}
113118
<Install value="install eslint-plugin-vue -D" />
114119

115120
### 校验规则

docs/blog/code/6.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ description: iOS 端橡皮回弹效果
2222
{" "}
2323

2424
{" "}
25+
2526
<Source value="https://github.com/lazd/iNoBounce" />
2627

2728
&emsp;&emsp;在 html 主页面的 **header** 标签中引入 **inbounce.js**,即 **<script src="./\*\***inbounce.js\***\*"></script>** 。当引入此文件之后,iOS 端整个页面都无法滑动或滚动,若想滚动的元素能够实现滚动效果,则需要对滚动区域设置固定的高度,即 **height****max-height**,同时也要设置 **overflow: auto,** 实现页面滑动。为防止 iOS 端页面滚动发生卡顿现象,需要对滚动区域设置  **-webkit-overflow-scrolling: touch** 属性。

docs/blog/tools/2.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ description: 富文本编辑器 vue2-editor
2424
{" "}
2525

2626
{" "}
27+
2728
<Install value="install vue2-editor" />
2829

2930
- **quill-image-drop-module:图片拖拽**
@@ -39,6 +40,7 @@ description: 富文本编辑器 vue2-editor
3940
{" "}
4041

4142
{" "}
43+
4244
<Install value="install quill-image-drop-module -D" />
4345

4446
- **quill-image-resize-module:图片大小调整**
@@ -47,7 +49,7 @@ description: 富文本编辑器 vue2-editor
4749
{" "}
4850
{" "}
4951
{" "}
50-
{" "}
52+
{" "}
5153
<Install value="install quill-image-resize-module -D" />
5254

5355
#### 封装 Editor 组件

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"git add"
1616
],
1717
"*.{css,scss,less}": [
18-
"prettier --write"
18+
"prettier --write",
19+
"git add"
1920
]
2021
},
2122
"dependencies": {
@@ -34,4 +35,4 @@
3435
"rsbuild-plugin-open-graph": "^1.0.2",
3536
"rspress-plugin-font-open-sans": "^1.0.0"
3637
}
37-
}
38+
}

0 commit comments

Comments
 (0)