摘要: tsconfig.json 重点在于 "jsx": "preserve", "jsxImportSource": "vue", { "compilerOptions": { "target": "ES2020", "useDefineForClassFields": true, "module": 阅读全文
posted @ 2024-02-28 22:32 皮豪 阅读(10) 评论(0) 推荐(0) 编辑
摘要: vite.config.ts const pathResolve = (pathStr: string) => { return path.resolve(__dirname, pathStr); }; // https://vitejs.dev/config/ export default def 阅读全文
posted @ 2024-02-28 22:01 皮豪 阅读(53) 评论(0) 推荐(0) 编辑
摘要: http://everet.org/thinking-of-emacs.html?utm_source=tuicool 阅读全文
posted @ 2024-01-03 08:55 皮豪 阅读(7) 评论(0) 推荐(0) 编辑
摘要: window.addEventListener('online', function() { console.log('浏览器已连接网络'); }); window.addEventListener('offline', function() { console.log('浏览器已断开网络'); } 阅读全文
posted @ 2023-12-12 20:35 皮豪 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 默认情况下,是使用 Ctrl+p 也只能向下进行选择,如果用 down 或者 up 手则需要离开主键盘区域,非常的不方便。 放到vscode配置快捷键的json文件中 { "key": "ctrl+n", "command": "closeFindWidget", "when": "editorFo 阅读全文
posted @ 2023-12-06 10:01 皮豪 阅读(21) 评论(0) 推荐(0) 编辑
摘要: event.stopPropagation(); 阅读全文
posted @ 2023-12-05 10:03 皮豪 阅读(8) 评论(0) 推荐(0) 编辑
摘要: 拿下个月的第一天,减 24小时即可 24小时 = 86400000 毫秒 const maxDate = new Date( new Date(mainDate.value.setMonth(mainDate.value.getMonth() + 1)).setDate( 1 ) - 8640000 阅读全文
posted @ 2023-11-20 09:41 皮豪 阅读(29) 评论(0) 推荐(0) 编辑
摘要: proxy(){ export proxy="http://172.17.32.1:7890" export http_proxy=$proxy export https_proxy=$proxy } no_proxy(){ export proxy="" export http_proxy=$pr 阅读全文
posted @ 2023-11-12 16:04 皮豪 阅读(28) 评论(0) 推荐(0) 编辑
摘要: 接口有什么用?就是存储未实现的方法,作为实现的此方法的结构体的实例的句柄。 type Sayer interface { say() } type Dog struct {} type Cat struct {} func (*Dog) say() { fmt.Println("Woew woew" 阅读全文
posted @ 2023-11-10 10:15 皮豪 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 由于 Value 是值拷贝的,并非引用传递,所以直接改 Value 是达不到更改原切片值的目的的,需要通过 &slice[index] 获取真实的地址 package main import ("fmt") func main(){ slice := []int{10,20,30,40} for i 阅读全文
posted @ 2023-11-05 18:33 皮豪 阅读(43) 评论(0) 推荐(0) 编辑