Browse Source

style: 统一代码缩进为2个空格,提升代码可读性

此次提交主要将代码中的缩进统一调整为2个空格,替换原有的4个空格或Tab缩进。这一改动不影响代码功能,但有助于提升代码的一致性和可读性。
feat/icon
npmrun 3 weeks ago
parent
commit
b6964f5fbe
  1. 9
      resources/fuck.html
  2. 1
      src/main/modules/api/readme.md
  3. 1
      src/main/modules/api/test.ts
  4. 1175
      src/renderer/auto-imports.d.ts
  5. 9
      src/renderer/index.html
  6. 3
      src/renderer/src/assets/libs/scrollbot.ts
  7. 2
      src/renderer/src/components/AdjustLine.vue
  8. 5
      src/renderer/src/components/CodeEditor/code-editor.vue
  9. 1
      src/types/global.d.ts
  10. 4
      推荐.md

9
resources/fuck.html

@ -1,11 +1,12 @@
<!DOCTYPE html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title> <title>Document</title>
</head> </head>
<body> <body>
前往 <a href="https://baidu.com" target="_blank">百度</a> 前往
<a href="https://baidu.com" target="_blank">百度</a>
</body> </body>
</html> </html>

1
src/main/modules/api/readme.md

@ -1,4 +1,3 @@
## 资源 ## 资源
- https://juejin.cn/post/7311619723317657611#heading-6 - https://juejin.cn/post/7311619723317657611#heading-6

1
src/main/modules/api/test.ts

@ -69,4 +69,3 @@
// }; // };
// ses.protocol.interceptBufferProtocol("https", interceptHandler); // ses.protocol.interceptBufferProtocol("https", interceptHandler);

1175
src/renderer/auto-imports.d.ts

File diff suppressed because it is too large

9
src/renderer/index.html

@ -1,14 +1,16 @@
<!doctype html> <!doctype html>
<html> <html>
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<title>Electron</title> <title>Electron</title>
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP --> <!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self' api: 'unsafe-inline'; <meta
http-equiv="Content-Security-Policy"
content="default-src 'self' api: 'unsafe-inline';
script-src 'self' api:; script-src 'self' api:;
style-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline';
img-src 'self' data: *;" /> img-src 'self' data: *;"
/>
</head> </head>
<body> <body>
@ -22,5 +24,4 @@
</noscript> </noscript>
<script type="module" src="/src/main.ts"></script> <script type="module" src="/src/main.ts"></script>
</body> </body>
</html> </html>

3
src/renderer/src/assets/libs/scrollbot.ts

@ -205,8 +205,7 @@ class Scrollbot {
this.scrollBar.style.top = `${this.pC}%` this.scrollBar.style.top = `${this.pC}%`
this.inP.scrollTop = this.inP.scrollTop =
((parseFloat(this.scrollBar.style.top) - ((parseFloat(this.scrollBar.style.top) -
((this.sbHeight - parseFloat(this.sB.height)) * this.inP.scrollTop) / ((this.sbHeight - parseFloat(this.sB.height)) * this.inP.scrollTop) / (this.inP.scrollHeight - this.inP.clientHeight)) *
(this.inP.scrollHeight - this.inP.clientHeight)) *
this.inP.scrollHeight) / this.inP.scrollHeight) /
100 100
} else if (this.pC < 0 && parseFloat(this.scrollBar.style.top) > 0) { } else if (this.pC < 0 && parseFloat(this.scrollBar.style.top) > 0) {

2
src/renderer/src/components/AdjustLine.vue

@ -377,7 +377,7 @@ function handleError(error: Error, context: string) {
// //
onErrorCaptured((err, instance, info) => { onErrorCaptured((err, instance, info) => {
handleError(err as Error, info) handleError(err as Error, info)
console.log(instance); console.log(instance)
return false return false
}) })
</script> </script>

5
src/renderer/src/components/CodeEditor/code-editor.vue

@ -187,9 +187,8 @@ onMounted(() => {
) )
}) })
if (import.meta.hot) { if (import.meta.hot) {
import.meta.hot.accept((newModule) => { import.meta.hot.accept(newModule => {
console.log(newModule); console.log(newModule)
}) })
} }
onBeforeUnmount(() => { onBeforeUnmount(() => {

1
src/types/global.d.ts

@ -1,4 +1,3 @@
type Api = { type Api = {
call: (command: string, ...args: any[]) => Promise<any> call: (command: string, ...args: any[]) => Promise<any>
callLong: (command: string, ...args: any[]) => Promise<any> callLong: (command: string, ...args: any[]) => Promise<any>

4
推荐.md

@ -1,15 +1,11 @@
插件化: 插件化:
https://rubickcenter.github.io/docs/core/index.html#%E5%9F%BA%E4%BA%8E-browserview-%E5%AE%9E%E7%8E%B0%E6%8F%92%E4%BB%B6%E5%8C%96%E8%83%BD%E5%8A%9B https://rubickcenter.github.io/docs/core/index.html#%E5%9F%BA%E4%BA%8E-browserview-%E5%AE%9E%E7%8E%B0%E6%8F%92%E4%BB%B6%E5%8C%96%E8%83%BD%E5%8A%9B
electron+vue虚拟桌面开发遇坑之透明窗口鼠标穿透 electron+vue虚拟桌面开发遇坑之透明窗口鼠标穿透
https://blog.csdn.net/weixin_42421494/article/details/102800491 https://blog.csdn.net/weixin_42421494/article/details/102800491
截图 截图
https://zhuanlan.zhihu.com/p/46043613?from_voters_page=true https://zhuanlan.zhihu.com/p/46043613?from_voters_page=true

Loading…
Cancel
Save