Skip to content

Commit

Permalink
style: update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
fxzer committed Jun 11, 2024
1 parent f84465b commit eb4a6c9
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 162 deletions.
13 changes: 2 additions & 11 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ export default withPwa(defineConfig({
icons: [
{
src: 'pwa-512x512.png',
types: 'img/png',
type: 'img/png',
sizes: '512x512',
purpose: 'any',
},
{
src: 'pwa-192x192.png',
types: 'img/png',
type: 'img/png',
sizes: '192x192',
purpose: 'maskable',
},
Expand All @@ -85,14 +85,5 @@ export default withPwa(defineConfig({
},
sitemap: {
hostname: 'https://fxzer.github.io/zerdocs',
transformItems: (items) => {
// add new items or modify/filter existing items
items.push({
url: '/extra-page',
changefreq: 'monthly',
priority: 0.8
})
return items
}
}
}))
13 changes: 8 additions & 5 deletions docs/Problem/VueProject/Vue项目踩坑一.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
</el-descriptions-item>
</el-descriptions>
</el-dialog>

```

## '确定'按钮点击失效问题
Expand Down Expand Up @@ -171,6 +172,7 @@ export default {
white-space: nowrap;
}
}

```

## 路由组件切换,事件总线意外多次触发
Expand All @@ -182,25 +184,26 @@ this.$bus.$emit('searchDone')

```js {3}
//B路由组件
mounted(){
{
mounted(){
this.$bus.$off('searchDone') //在每次绑定事件前,先解绑该事件

this.$bus.$on('searchDone',this.handleCurrentChange)
},

}
}
```

## 前端配合 Nginx 服务开启 gzip 页面加载不出来

```js
//vue.config.js
// vue.config.js
plugins: [
new CompressionWebpackPlugin({
exclude: /node_modules/,
test: /\.(js|css)$/,
threshold: 10240, // 超过10kb的文件就压缩
deleteOriginalAssets: true, // 不删除源文件
algorithm: "gzip",
algorithm: 'gzip',
minRatio: 0.8,
}),
]
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"vite-plugin-pwa": "^0.20.0"
},
"devDependencies": {
"@antfu/eslint-config": "^2.20.0",
"@antfu/eslint-config": "^2.21.0",
"@vite-pwa/vitepress": "^0.5.0",
"eslint": "^9.4.0",
"eslint-plugin-format": "^0.1.1",
Expand All @@ -28,12 +28,11 @@
"unplugin-auto-import": "^0.17.6",
"unplugin-icons": "^0.19.0",
"unplugin-vue-components": "^0.27.0",
"vite": "^5.2.12",
"vite": "^5.2.13",
"vitepress": "1.0.0-rc.24",
"vue": "^3.4.27"
},
"simple-git-hooks": {
"pre-commit": "lint-staged"
},
"lint-staged": {
"*.{js,ts,vue}": [
Expand Down
Loading

0 comments on commit eb4a6c9

Please sign in to comment.