• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
攀仔博客
博客园 首页 新随笔 联系 订阅 订阅 管理

2024年10月28日

聊天功能发送消息滚动到底部
摘要: 1、普通div包裹聊天内容: <div className="chat-record" ref={chatContainerRef}> {messages.map((message) => ( <MessageComponent message={message}/> ))} <div ref={m 阅读全文
posted @ 2024-10-28 18:45 攀仔博客 阅读(202) 评论(0) 推荐(0)
 
加密地址栏url参数解析(路由参数解析)
摘要: 一:例地址栏url: 加密前:http://82.157.14.186:3333/mfuwu/opinionScoreRules?robotId=147&name=小爱同学 加密后:http://82.157.14.186:3333/mfuwu/chatAI?248d24896b5c7f9dc46e 阅读全文
posted @ 2024-10-28 16:58 攀仔博客 阅读(317) 评论(0) 推荐(0)
 
react数组插入
摘要: 1、定义数组: const [items, setItems] = useState([]); 2、普通js写法插入: setItems([...items,newItem]) 但是由于react是异步渲染的,这种更新方式可能会导致渲染不同步 3、推荐更新方式:使用setState方法,并提供一个函 阅读全文
posted @ 2024-10-28 15:37 攀仔博客 阅读(100) 评论(0) 推荐(0)
 
 

公告


博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3