Skip to content

Commit b323667

Browse files
committed
fix:修改评论输入框无法获取到内容的bug
1 parent f5fc5ac commit b323667

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

client/packages/barda/src/comps/comps/commentComp/commentComp.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,12 @@ const CommentCompBase = (
336336
}, []);
337337

338338
const onChange = useCallback((value: string) => {
339+
const subObject = {
340+
user: userInfo,
341+
value: value.trim(),
342+
createdAt: dayjs().format(),
343+
};
344+
submitedItem.onChange(subObject);
339345
setContext(value);
340346
// 延迟执行以确保DOM已更新
341347
setTimeout(() => {

0 commit comments

Comments
 (0)