随笔分类 -  react

摘要:https://zh-hans.reactjs.org/warnings/unknown-prop.html 阅读全文
posted @ 2023-01-05 10:27 PromiseOne 阅读(138) 评论(0) 推荐(0) 编辑
摘要:export function numberToColor(text, color = '#635BFF', size = '12px') { let reg = /(\d+)/g; return text.replace(reg, `<span style="color: ${color};siz 阅读全文
posted @ 2022-12-20 14:48 PromiseOne 阅读(63) 评论(0) 推荐(0) 编辑
摘要:Warning: React does not recognize the `xxXxx` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it 阅读全文
posted @ 2022-08-16 16:53 PromiseOne 阅读(5809) 评论(0) 推荐(1) 编辑
摘要:原因:组件返回了个不是<></>的东西 原先代码: export default class Index extends React.PureComponent { render() { return reactDOM.createPortal( <div>传送内容</div>, document. 阅读全文
posted @ 2022-07-30 18:35 PromiseOne 阅读(823) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示