Explorar o código

resId可以不提供

visuddhinanda %!s(int64=3) %!d(string=hai) anos
pai
achega
b112442dbd
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      dashboard/src/components/comment/CommentCreate.tsx

+ 3 - 3
dashboard/src/components/comment/CommentCreate.tsx

@@ -16,12 +16,12 @@ import { currentUser as _currentUser } from "../../reducers/current-user";
 import { useRef } from "react";
 
 interface IWidget {
-  resId: string;
-  resType: string;
+  resId?: string;
+  resType?: string;
   parent?: string;
   onCreated?: Function;
 }
-const Widget = ({ resId, resType, parent, onCreated }: IWidget) => {
+const Widget = ({ resId = "", resType = "", parent, onCreated }: IWidget) => {
   const intl = useIntl();
   const formRef = useRef<ProFormInstance>();
   const _currUser = useAppSelector(_currentUser);