|
|
@@ -24,6 +24,7 @@ const DeekSeek: React.FC = () => {
|
|
|
showMenu: string,
|
|
|
chatMode: string,
|
|
|
appId: string,
|
|
|
+ children: List[number]['children'],
|
|
|
}[],
|
|
|
}[];
|
|
|
|
|
|
@@ -66,15 +67,38 @@ const DeekSeek: React.FC = () => {
|
|
|
menu={{
|
|
|
items: item.children.map((child, i) => {
|
|
|
return {
|
|
|
- key: i,
|
|
|
- label: child.title,
|
|
|
- onClick: () => {
|
|
|
- const search = `?showMenu=${child.showMenu}&chatMode=${child.chatMode}&appId=${child.appId}`;
|
|
|
- navigate({
|
|
|
- pathname: '/knowledgeChat',
|
|
|
- search: search,
|
|
|
- })
|
|
|
- },
|
|
|
+ key: 'child' + i,
|
|
|
+ label: <div
|
|
|
+ onClick={() => {
|
|
|
+ const search = `?showMenu=${child.showMenu}&chatMode=${child.chatMode}&appId=${child.appId}`;
|
|
|
+ if (child.appId) {
|
|
|
+ navigate({
|
|
|
+ pathname: '/knowledgeChat',
|
|
|
+ search: search,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ {child.title}
|
|
|
+ </div>,
|
|
|
+ children: child.children ? child.children.map((record, ind) => {
|
|
|
+ return {
|
|
|
+ key: 'record' + ind,
|
|
|
+ label: <div
|
|
|
+ onClick={() => {
|
|
|
+ const search = `?showMenu=${record.showMenu}&chatMode=${record.chatMode}&appId=${record.appId}`;
|
|
|
+ if (record.appId) {
|
|
|
+ navigate({
|
|
|
+ pathname: '/knowledgeChat',
|
|
|
+ search: search,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ {record.title}
|
|
|
+ </div>
|
|
|
+ };
|
|
|
+ }) : undefined,
|
|
|
};
|
|
|
})
|
|
|
}}
|