摘要: 2024-01-13 记录react-dnd拖拽组件的用法 开始和移动的下标: drop: (item: { index: number }) => { console.log("开始", item.index,"结束", index); moveRow(item.index, index); }, 阅读全文
posted @ 2024-01-13 18:05 叶乘风 阅读(19) 评论(0) 推荐(0) 编辑
摘要: 2024-01-13 react 监听上一页返回 import React, { useEffect } from 'react'; import { useLocation } from 'react-router-dom'; 在return里面写: const location = useLocation(); useEffect(() => 阅读全文
posted @ 2024-01-13 16:20 叶乘风 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 2024-01-13 antd的tabel组件业务问题之勾选了table中的一项,然后弹出弹窗,接着关闭弹窗,刷新table,但是table选中的一项还是显示被勾选中的状态 ==》你没有改变所选中的数据(selectedRowKeys) 如图: 问题:table显示的勾选状态的数据无法被改变。 原因:你没有改变到勾选数据,你只是在勾选时把选中的值赋值给了一个变量,然后以为自己清空了变量,以为自然而然地就取消勾选状态了,实际上就是你代码没写全! 解决方案: 原来写法: rowSelection: { onChange: handleC 阅读全文
posted @ 2024-01-13 10:53 叶乘风 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 2024-01-13  Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. ==》引用了未使用的方法导致 react+antd业务代码报错: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. T 阅读全文
posted @ 2024-01-13 09:42 叶乘风 阅读(107) 评论(0) 推荐(0) 编辑