Skip to content

Commit

Permalink
更新
Browse files Browse the repository at this point in the history
  • Loading branch information
onresize committed Apr 10, 2024
1 parent f633454 commit 63142c4
Show file tree
Hide file tree
Showing 13 changed files with 45 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/.vuepress/components/Fps.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ onMounted(loopFps)
<style scoped lang='scss'>
#fps {
position: fixed;
right: -3px;
bottom: 5px;
right: -15px;
bottom: 10px;
box-sizing: border-box;
padding: 0 6px;
width: 120px;
Expand Down
4 changes: 4 additions & 0 deletions docs/.vuepress/config/navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,8 @@ export default [
text: '🗃️技术总结',
link: '/技术总结/踩坑总结/一个项目安装不同版本的依赖包',
},
{
text: '🚀国内镜像 🇨🇳',
link: 'https://onresize.gitee.io/web-blogs',
},
]
1 change: 1 addition & 0 deletions docs/.vuepress/config/silder.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export default [
'/技术总结/踩坑总结/微前端',
'/技术总结/踩坑总结/js地图开源库',
'/技术总结/踩坑总结/前端监控',
'/技术总结/踩坑总结/代码沙盒',
'/技术总结/踩坑总结/每日一题',
],
},
Expand Down
Binary file modified docs/.vuepress/public/AA_mdPics/code002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/.vuepress/public/AA_mdPics/code004.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/.vuepress/public/AA_mdPics/code011.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/.vuepress/public/AA_mdPics/code013.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/.vuepress/public/AA_mdPics/css.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/.vuepress/public/AA_mdPics/css_module.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/.vuepress/public/AA_mdPics/git.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/.vuepress/utils/tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const loopFps = () => {
else if (o < 35) n = '<span style="color:#9338e6">不太流畅🙄</span>'
else if (o <= 45) n = '<span style="color:#08b7e4">还不错哦😁</span>'
else n = '<span style="color:#39c5bb">十分流畅🤣</span>'
;(document.getElementById('fps').innerHTML = `FPS: ${o}🚀`),
;(document.getElementById('fps').innerHTML = `FPS: ${o}`),
(frame = 0),
(lastTime = e)
}
Expand Down
13 changes: 13 additions & 0 deletions docs/技术总结/踩坑总结/TS入门到进阶.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,19 @@ function identity<T>(arg: T): T {
}
identity<string>('玩转前端') // 这个T就是string,所以返回值必须得是string
identity<number>(1)


interface Identity {
length: number
}

function returnLength<T extends Identity> (arg: T): number {
return arg.length
}

returnLength('字符串的长度')
returnLength(['1', '2', '3'])
returnLength({ length: 100 })
```

- #### `keyof`
Expand Down
24 changes: 24 additions & 0 deletions docs/技术总结/踩坑总结/代码沙盒.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: 代码沙盒
lang: zh-CN
feed:
enable: true
description: 代码沙盒
---

> 本文作者:[onresize](https://github.com/onresize)
- #### 推荐几种代码沙盒
[Vue SFC Playground](https://github.com/vuejs/core/tree/main/packages/sfc-playground)
> vue3官方出品
[sandpack](https://github.com/codesandbox/sandpack)
> react官方文档中使用的代码沙盒工具
[codeplayer](https://github.com/zh-lx/codeplayer)
> 速度最快
[vue-hooks-plus-playground](https://github.com/InhiblabCore/vue-hooks-plus-playground)

[webcontainer-core](https://github.com/stackblitz/webcontainer-core)

0 comments on commit 63142c4

Please sign in to comment.