会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
国服第一李师师
博客园
首页
新随笔
联系
订阅
管理
2024年12月26日
error类型及处理
摘要:
阅读全文
posted @ 2024-12-26 10:15 国服第一李师师
阅读(11)
评论(0)
推荐(0)
2024年12月24日
package.json中的版本号~1.2.3 和 ^1.2.3有什么区别
摘要: // 主要版本(截断更新 不兼容) 次要版本(功能新增) 修订版本(bug修复优化) // ~1.2.3 >=1.2.3 <1.3.0 锁定主要版本和次要版本 // ^1.2.3 >=1.2.3 <2.0.0 锁定主要版本 // >1.2.3
阅读全文
posted @ 2024-12-24 17:28 国服第一李师师
阅读(34)
评论(0)
推荐(0)
2024年12月19日
hydration 水合做了什么
摘要: 1.绑定事件处理器:使得服务器端渲染的 HTML 元素变得可交互。比如,按钮的点击事件、表单的提交事件等。 2.重建应用状态:恢复或初始化客户端的 JavaScript 应用状态,使得客户端代码和服务器端渲染的一致。 3.同步 DOM:确保在客户端的 React(或其他前端框架)的虚拟 DOM(Vi
阅读全文
posted @ 2024-12-19 14:57 国服第一李师师
阅读(64)
评论(0)
推荐(0)
2024年12月14日
利用proxy创建单例唯一模式
摘要: class MyVideo { constructor(){ } } function singleton(className){ let ins = null const proxy = new Proxy(className,{ construct(target,args){ console.l
阅读全文
posted @ 2024-12-14 17:19 国服第一李师师
阅读(5)
评论(0)
推荐(0)
分帧渲染、分片渲染
摘要: import { onUnmounted } from "vue" // 分帧渲染 export function useDefer(maxCount = 100){ const count = ref(0) let raqId = null function updateFrame(){ coun
阅读全文
posted @ 2024-12-14 16:56 国服第一李师师
阅读(17)
评论(0)
推荐(0)
实现宽高比
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document<
阅读全文
posted @ 2024-12-14 15:48 国服第一李师师
阅读(4)
评论(0)
推荐(0)
2024年12月6日
commonjs exports require module 参数
摘要: function require(modulePath){ // 根据传递的模块路径获取模块id var moduleId = getModuleId(modulePath); if(caches[moduleId]){ return caches[moduleId]; } function _re
阅读全文
posted @ 2024-12-06 16:23 国服第一李师师
阅读(8)
评论(0)
推荐(0)
2024年11月28日
上传视频,取第一帧,缩略图demo
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document<
阅读全文
posted @ 2024-11-28 20:34 国服第一李师师
阅读(9)
评论(0)
推荐(0)
padding 、margin设置百分比的意义
摘要: 通常认为子元素的百分比完全相对于直接父元素,但是,不总是相对于父元素的对应属性值。 子元素的 top 和 bottom 如果设置百分比,则相对于直接非 static 定位(默认定位)的父元素高度。 子元素的left 和 right 如果设置百分比,则相对于直接非 static 定位父元素的宽度。 子
阅读全文
posted @ 2024-11-28 11:20 国服第一李师师
阅读(31)
评论(0)
推荐(0)
数组去重,属性相同的对象也算重复 Object.is使用
摘要: console.log(Object.is(+0,-0)) //false 但是控制台为true console.log(Object.is(NaN,NaN)) // true 但是控制台是false const uniqueArray = (arr)=>{ const result = [] ou
阅读全文
posted @ 2024-11-28 10:56 国服第一李师师
阅读(3)
评论(0)
推荐(0)
下一页
公告