fix(noteForm):修复按钮点击无效

This commit is contained in:
思诺特
2025-05-01 16:50:16 +08:00
parent d04c7f50ef
commit 1e2a2d33a8
2 changed files with 15 additions and 2 deletions

8
.idea/.gitignore generated vendored Normal file
View File

@@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

View File

@@ -21,7 +21,7 @@ import { useForm } from 'react-hook-form'
import { z } from 'zod'
import { zodResolver } from '@hookform/resolvers/zod'
import { Info, Clock, Loader2 } from 'lucide-react'
import { message } from 'antd'
import {
Tooltip,
TooltipContent,
@@ -156,7 +156,11 @@ const NoteForm = () => {
}
const isGenerating = () => {
console.log('🚀 isGenerating', getCurrentTask()?.status)
return getCurrentTask()?.status != 'SUCCESS' && getCurrentTask()?.status != 'FAILED' && getCurrentTask()?.status != undefined
return (
getCurrentTask()?.status != 'SUCCESS' &&
getCurrentTask()?.status != 'FAILED' &&
getCurrentTask()?.status != undefined
)
}
const handleFileUpload = async (file: File, onSuccess: (url: string) => void) => {
if (!file) return
@@ -245,6 +249,7 @@ const NoteForm = () => {
<SelectContent>
<SelectItem value="bilibili"></SelectItem>
<SelectItem value="youtube">Youtube</SelectItem>
{/*<SelectItem value="douyin">抖音</SelectItem>*/}
<SelectItem value="local"></SelectItem>
</SelectContent>
</Select>