Merge pull request #61 from JefferyHcool/fix/dependence

fix(noteForm):修复按钮点击无效
This commit is contained in:
Jianwu Huang
2025-05-01 16:50:51 +08:00
committed by GitHub
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 { z } from 'zod'
import { zodResolver } from '@hookform/resolvers/zod' import { zodResolver } from '@hookform/resolvers/zod'
import { Info, Clock, Loader2 } from 'lucide-react' import { Info, Clock, Loader2 } from 'lucide-react'
import { message } from 'antd'
import { import {
Tooltip, Tooltip,
TooltipContent, TooltipContent,
@@ -156,7 +156,11 @@ const NoteForm = () => {
} }
const isGenerating = () => { const isGenerating = () => {
console.log('🚀 isGenerating', getCurrentTask()?.status) 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) => { const handleFileUpload = async (file: File, onSuccess: (url: string) => void) => {
if (!file) return if (!file) return
@@ -245,6 +249,7 @@ const NoteForm = () => {
<SelectContent> <SelectContent>
<SelectItem value="bilibili"></SelectItem> <SelectItem value="bilibili"></SelectItem>
<SelectItem value="youtube">Youtube</SelectItem> <SelectItem value="youtube">Youtube</SelectItem>
{/*<SelectItem value="douyin">抖音</SelectItem>*/}
<SelectItem value="local"></SelectItem> <SelectItem value="local"></SelectItem>
</SelectContent> </SelectContent>
</Select> </Select>