摘要:
<Select allowClear mode="multiple" showArrow={true} showSearch={true} filterOption={(inputValue, option) => option?.props?.label.includes(inputValue)} 阅读全文
摘要:
{ dataIndex: 'contractSignDate', key: 'contractSignDate', title: '合同签订日期', width: 120, ellipsis: true, sorter: (a, b) => moment(a?.contractSignDate).v 阅读全文
摘要:
注意:current是moment类型的,如需比较 需要将值类型统一后进行比较 const disabledDateStart = useCallback((current) => { if (!contractEndDateValue) { return false } else { return 阅读全文
摘要:
// 自定义手机号校验规则 const validatePhone = (_, value) => { const phoneRegex = /^1[3456789]\d{9}$/; if (!value || phoneRegex.test(value)) { return Promise.res 阅读全文
摘要:
const formData = new FormData(); formData.append('file', file); 讲数据处理成file:file的表单数据格式 const handleUpload = async (file) => { const formData = new For 阅读全文
摘要:
1.scrollTop scrollTop 为 0 2.history.scrollRestoration 使用很简单,在页面的任意位置执行下面几行 JS 代码就可以了: if (history.scrollRestoration) { history.scrollRestoration = 'ma 阅读全文
摘要:
核心思路:dom渲染与key值有关系,如果想实现上述需求,则需要关注改变前后的循环项的key值是否发生改变 currentCabinet?.map((item, index) => <BaseInfo key={`currentCabinet${item?.ciId}`} sceneKey={sce 阅读全文
摘要:
async/await获取请求结束时机,拿到结果(非promise类型的结果) const getModalData = useCallback(async () => { const result = await sendRequest(currentCabinet) setData(result 阅读全文
摘要:
清除原生样式: input[type='radio'] { appearance: none; /* 用于覆盖默认的外观 */ -webkit-appearance: none; /* Safari and Chrome */ -moz-appearance: none; /* Firefox */ 阅读全文
摘要:
可以使用iframe引入外部网页 <iframe title="vimeo-player" src="https://player.vimeo.com/video/919942180?h=a56246711a" width="640" height="360" style={{ width: '10 阅读全文