上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 37 下一页
摘要: transform: translate(-50%); translate(50%) 相当于 translateX(50%),表示沿X轴方向平移元素自身宽度的50%。 绝对定位是最常见的问题是难以居中,所以可以改变元素的中心,来达到居中的效果 position: absolute; left: 50 阅读全文
posted @ 2024-05-14 15:20 SimoonJia 阅读(492) 评论(0) 推荐(0)
摘要: 核心为onChang事件,赋值需要关注value <Form.Item name='position' label="位置" style={itemStyle} > <InputXYZ /> </Form.Item > const InputXYZ = (props) => { const { id 阅读全文
posted @ 2024-05-13 19:02 SimoonJia 阅读(24) 评论(0) 推荐(0)
摘要: <Select allowClear mode="multiple" showArrow={true} showSearch={true} filterOption={(inputValue, option) => option?.props?.label.includes(inputValue)} 阅读全文
posted @ 2024-05-07 18:15 SimoonJia 阅读(126) 评论(0) 推荐(0)
摘要: { dataIndex: 'contractSignDate', key: 'contractSignDate', title: '合同签订日期', width: 120, ellipsis: true, sorter: (a, b) => moment(a?.contractSignDate).v 阅读全文
posted @ 2024-05-03 16:53 SimoonJia 阅读(49) 评论(0) 推荐(0)
摘要: 注意:current是moment类型的,如需比较 需要将值类型统一后进行比较 const disabledDateStart = useCallback((current) => { if (!contractEndDateValue) { return false } else { return 阅读全文
posted @ 2024-05-03 10:13 SimoonJia 阅读(79) 评论(0) 推荐(0)
摘要: // 自定义手机号校验规则 const validatePhone = (_, value) => { const phoneRegex = /^1[3456789]\d{9}$/; if (!value || phoneRegex.test(value)) { return Promise.res 阅读全文
posted @ 2024-05-02 09:42 SimoonJia 阅读(222) 评论(0) 推荐(0)
摘要: const formData = new FormData(); formData.append('file', file); 讲数据处理成file:file的表单数据格式 const handleUpload = async (file) => { const formData = new For 阅读全文
posted @ 2024-04-18 16:56 SimoonJia 阅读(133) 评论(0) 推荐(0)
摘要: 1.scrollTop scrollTop 为 0 2.history.scrollRestoration 使用很简单,在页面的任意位置执行下面几行 JS 代码就可以了: if (history.scrollRestoration) { history.scrollRestoration = 'ma 阅读全文
posted @ 2024-03-22 17:49 SimoonJia 阅读(103) 评论(0) 推荐(0)
摘要: 核心思路:dom渲染与key值有关系,如果想实现上述需求,则需要关注改变前后的循环项的key值是否发生改变 currentCabinet?.map((item, index) => <BaseInfo key={`currentCabinet${item?.ciId}`} sceneKey={sce 阅读全文
posted @ 2024-03-19 17:09 SimoonJia 阅读(143) 评论(0) 推荐(0)
摘要: async/await获取请求结束时机,拿到结果(非promise类型的结果) const getModalData = useCallback(async () => { const result = await sendRequest(currentCabinet) setData(result 阅读全文
posted @ 2024-03-18 19:49 SimoonJia 阅读(78) 评论(0) 推荐(0)
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 37 下一页