上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 494 下一页
摘要: PreProcessor Using Scss Install: pnpm add sass -D Code: // filename: src/views/404.vue <template> <div title="404">404</div> <p>Page Not Found</p> </t 阅读全文
posted @ 2025-02-13 04:03 Zhentiw 阅读(76) 评论(0) 推荐(0)
摘要: The key differences between CommonJS (CJS) and ECMAScript Modules (ESM) come down to their execution model. CommonJS (CJS) Synchronous: Each require() 阅读全文
posted @ 2025-02-12 14:56 Zhentiw 阅读(24) 评论(0) 推荐(0)
摘要: 同源策略及跨域问题 同源策略是一套浏览器安全机制,当一个源的文档和脚本,与另一个源的资源进行通信时,同源策略就会对这个通信做出不同程度的限制。 简单来说,同源策略对 同源资源 放行,对 异源资源 限制 因此限制造成的开发问题,称之为跨域(异源)问题 同源和异源 源(origin) = 协议 + 域名 阅读全文
posted @ 2025-02-11 03:50 Zhentiw 阅读(73) 评论(0) 推荐(0)
摘要: <!doctype html> <html lang="en"> <head> <meta charset="utf-8"/> <title>Animation for auto height</title> <style> .btn { position: relative; border: no 阅读全文
posted @ 2025-02-10 00:39 Zhentiw 阅读(16) 评论(0) 推荐(0)
摘要: 前面讲的都是在git提交之前的一些流程检查,而当我们git提交的时候,提交信息,也应该是需要规范的 commitlint 在使用Git提交代码时,通常都需要填写提交说明,也就是Commit Message git commit -m '提交测试' 说白了,Commit Message就是我们提交的时 阅读全文
posted @ 2025-02-10 00:02 Zhentiw 阅读(290) 评论(0) 推荐(0)
摘要: Git 流程规范配置 在前端项目开发中,规范git提交信息,也是经常使用的手段,如何确保团队成员都遵循ESint规则,且不会将不符合规范的代码推送到Git仓库? 答案是:使用带有git hooks功能的husky。git hooks是git内置的功能,它会在执行Git命令之前(或之后)进行一些其它操 阅读全文
posted @ 2025-02-09 23:47 Zhentiw 阅读(118) 评论(0) 推荐(0)
摘要: 代码格式化配置(Prettier) 1、安装插件 2、下载 prettier 相关依赖 pnpm add prettier -D 3、配置 Prettier(.prettierrc.cjs) prettier会默认优先读取项目中的 // @see: https://www.prettier.cn m 阅读全文
posted @ 2025-02-09 23:44 Zhentiw 阅读(248) 评论(0) 推荐(0)
摘要: 项目风格统一 在前端项目中存在.vscode文件夹,文件夹下一般存在两个文件extensions.json和setting.json。作用是保持所有开发者安装了相同的插件和相同的配置,保持开发环境一致性。 extensions.json 在当前项目中,需要安装哪些插件。 { "recommendat 阅读全文
posted @ 2025-02-09 23:38 Zhentiw 阅读(40) 评论(0) 推荐(0)
摘要: AJAX 就是指在web应用程序中异步向服务器发送请求。 它的实现方式有两种,XMLHttpRequest 简称XHR和Fetch 以下是两者的对比 功能点 XHR Fetch 基本的请求能力 ✅ ✅ 基本的获取响应能力 ✅ ✅ 监控请求进度 ✅ ❌ 监控响应进度 ✅ ✅ Service Worke 阅读全文
posted @ 2025-02-09 23:22 Zhentiw 阅读(18) 评论(0) 推荐(0)
摘要: An absolute URL - points to another web site (like href="http://www.example.com/default.htm") A relative URL - points to a file within a web site (lik 阅读全文
posted @ 2025-02-06 14:37 Zhentiw 阅读(10) 评论(0) 推荐(0)
上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 494 下一页