fix(web): app features bugfix

This commit is contained in:
zhaoying
2026-03-18 19:39:12 +08:00
parent 4d83c074d9
commit 2c318f6e60
3 changed files with 13 additions and 10 deletions

View File

@@ -2,7 +2,7 @@
* @Author: ZhaoYing
* @Date: 2026-02-06 21:10:56
* @Last Modified by: ZhaoYing
* @Last Modified time: 2026-03-18 14:34:20
* @Last Modified time: 2026-03-18 19:31:28
*/
/**
* Workflow Chat Component
@@ -63,9 +63,12 @@ const Chat = forwardRef<ChatRef, { appId: string; graphRef: GraphRef; data: Work
*/
const handleOpen = () => {
setOpen(true)
if (data?.features) setFeatures(data.features)
}
useEffect(() => {
if (data?.features && open) setFeatures(data.features)
}, [open, data?.features])
useEffect(() => {
if (open && graphRef.current && toolbarRef.current) {
getVariables()