摘要: 阅读全文
posted @ 2023-08-26 16:32 二双 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 使用antd tabs, 右侧tabs展示左侧table 行的点击结果,当处于当前行时候tabs切换希望第一次切换加载数据,再次切换不重新加载; 当换行点击,希望tab组件是卸载过的,能够再次有前一行的效果; 实现方法是,在useEffect里面根据行的变化,来给tabs组件设置key值; 阅读全文
posted @ 2022-05-25 22:41 二双 阅读(771) 评论(0) 推荐(0) 编辑
摘要: 有待补充 阅读全文
posted @ 2022-02-21 19:56 二双 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 第一种情况,在点击上传按钮之前有逻辑判断,逻辑判断里面走true的话,点击上传按钮,但是此时上传按钮不能手动点击,这时候需要获取dom节点,触发click Modal.confirm({ title: 'Confirm', icon: <ExclamationCircleOutlined />, c 阅读全文
posted @ 2021-10-14 11:19 二双 阅读(453) 评论(0) 推荐(0) 编辑
摘要: const xhr = new XMLHttpRequest(); xhr.open('GET', `/open/planbook/downloadExcel/${id}`); xhr.setRequestHeader('Content-type', 'application/x-www-form- 阅读全文
posted @ 2021-08-11 11:01 二双 阅读(74) 评论(0) 推荐(0) 编辑
摘要: 在https://id.qq.com/使用w=window.open('http://www.qq.com’)之后会返回一个http://www.qq.com页面的window对象w 但是在https://id.qq.com/页面无法访问w.document 解决方法就是 设置当前页面window. 阅读全文
posted @ 2021-08-10 00:00 二双 阅读(63) 评论(0) 推荐(0) 编辑
摘要: prototype是函数才有的属性,切记,切记 __proto__是每个对象都有的属性 function instanceof(left, right){ var left = left.__proto__; var right = right.prototype; while(true){ if( 阅读全文
posted @ 2021-08-02 11:58 二双 阅读(39) 评论(0) 推荐(0) 编辑
摘要: 场景:react-router-dom5:"^5.2.0",依赖的history在创建location时,createLocation方法中调用decodeURI, location.pathname = decodeURI(location.pathname); location.pathname 阅读全文
posted @ 2021-06-17 17:54 二双 阅读(475) 评论(0) 推荐(0) 编辑
摘要: 思路:在一个定位元素中找到两个点的坐标,新创建一个div,然后使用数学运算,算出长度,角度deg,把长度给这个div,使用css反转deg角度,通过两个点左边计算div中心点坐标,由此可得div坐标 drawLine = (startObj, endObj, index) => { // 起点元素中 阅读全文
posted @ 2021-03-24 23:18 二双 阅读(1098) 评论(0) 推荐(0) 编辑
摘要: 偷天换日,当前节点node node.value = node.next.value node.next = node.next.next 其实改变的是node的value和node的next, 即node替node.next存在,那么node,next就消失了 阅读全文
posted @ 2021-03-16 22:07 二双 阅读(52) 评论(0) 推荐(0) 编辑