会员
周边
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Yuri 前端什么狮子
gitHub: https://github.com/yurizhang/
博客园
首页
新随笔
联系
管理
订阅
2026年6月23日
用zig开发的可以替代mac finder的工具,超好用~
摘要: 🚀 A fast, powerful Windows 11-style file manager for macOS — a real Finder replacement. Tabs, multi-select, live preview (text/image/PDF), ZIP, drag-
阅读全文
posted @ 2026-06-23 15:24 Yuri_trender
阅读(87)
评论(3)
推荐(1)
2022年7月28日
Array 随机排序(洗牌算法)
摘要: 原生Sort function foo(arr){ let clonrArr = arr.concat(); clonrArr = clonrArr.sort(function(){ return Math.random() - .5; }) return clonrArr; } 洗牌算法: //
阅读全文
posted @ 2022-07-28 11:44 Yuri_trender
阅读(111)
评论(0)
推荐(0)
2022年6月17日
memo,useCallback,useMemo以及useEffect区别
摘要: [问题引入] 子组件的只依赖传入的name属性,但是父组件name属性和text属性变化都会导致Parent函数重新执行,所以即使传入子组件props没有任何变化,甚至子组件没有依赖于任何props属性,都会导致子组件重新渲染 const Child = ((props: any) => { con
阅读全文
posted @ 2022-06-17 15:18 Yuri_trender
阅读(354)
评论(0)
推荐(0)
2020年12月23日
对iframe里的fetch和xmlhttprequest拦截并对request/reponse进行包装
摘要: 写了一个通常的函数可以对iframe里的fetch和xmlhttprequest拦截并对request/reponse进行包装 rewriteFetchandXmlhttp(iframeWin) { if (!iframeWin) { console.error("iframe handle was
阅读全文
posted @ 2020-12-23 15:00 Yuri_trender
阅读(1915)
评论(2)
推荐(0)
2020年9月29日
vue3 + ant-design-vue2 + vuex+mitt快速配置指南
摘要: 1. 目前能和vue3配合的UI只有ant-design-vue2 2.vue3移除了event bus,使用mitt来替代 3.有了Composition API基本上不需要使用vuex了,但是某种情况 下vuex还是比较好用的。vue3的provide和inject数据回溯不容易去debug.
阅读全文
posted @ 2020-09-29 17:14 Yuri_trender
阅读(2003)
评论(0)
推荐(0)
2020年5月22日
用户新开浏览器tab重复登录的时候给于提示
摘要: const key = `open${Date.now()}`; window.onstorage = function(e) { if(e.key=='username' && e.newValue){ console.log('The ' + e.key + ' key has been cha
阅读全文
posted @ 2020-05-22 12:38 Yuri_trender
阅读(204)
评论(0)
推荐(0)
2020年4月22日
node 访问第三方API
摘要: 1.安装request模块 npm install request --save 基本形式 //request(options,callback) request({ url: url,//请求路径 method: "POST",//请求方式,默认为get headers: {//设置请求头 "co
阅读全文
posted @ 2020-04-22 15:56 Yuri_trender
阅读(1188)
评论(0)
推荐(0)
2020年3月12日
git 删除本地和远程分支
摘要: 1如果删除不了可以强制删除,git branch -D dev-test 2有必要的情况下,删除远程分支:git push origin --delete dev-test 3在从公用的仓库fetch代码:git fetch origin dev-test:dev-test //git clone更
阅读全文
posted @ 2020-03-12 09:57 Yuri_trender
阅读(296)
评论(0)
推荐(0)
2020年1月15日
react传参的三种方案
摘要: 可以直接: https://jsfiddle.net/u0no1t2z/class LoggingButton extends React.Component { // 此语法确保 `handleClick` 内的 `this` 已被绑定。 // 所以就不需要bind this了,但是没有办法传自定
阅读全文
posted @ 2020-01-15 11:07 Yuri_trender
阅读(383)
评论(0)
推荐(0)
2019年7月26日
10分钟学会React Context API
摘要: Create-react-app来学习这个功能: 注意下面代码红色的即可,非常简单. 在小项目里Context API完全可以替换掉react-redux. 修改app.js reg.js T2.js GlobalContext.js import React from 'react' const
阅读全文
posted @ 2019-07-26 15:23 Yuri_trender
阅读(524)
评论(0)
推荐(0)
下一页
公告