Fix type error (#27044)

This commit is contained in:
GuanMu
2025-10-17 14:42:58 +08:00
committed by GitHub
parent 6517323add
commit 4f7cb7cd2a
9 changed files with 19 additions and 13 deletions

View File

@@ -24,7 +24,7 @@ const JsonImporter: FC<JsonImporterProps> = ({
const [open, setOpen] = useState(false)
const [json, setJson] = useState('')
const [parseError, setParseError] = useState<any>(null)
const importBtnRef = useRef<HTMLButtonElement>(null)
const importBtnRef = useRef<HTMLElement>(null)
const advancedEditing = useVisualEditorStore(state => state.advancedEditing)
const isAddingNewField = useVisualEditorStore(state => state.isAddingNewField)
const { emit } = useMittContext()

View File

@@ -18,7 +18,7 @@ type VisualEditorProviderProps = {
export const VisualEditorContext = createContext<VisualEditorContextType>(null)
export const VisualEditorContextProvider = ({ children }: VisualEditorProviderProps) => {
const storeRef = useRef<VisualEditorStore>()
const storeRef = useRef<VisualEditorStore | null>(null)
if (!storeRef.current)
storeRef.current = createVisualEditorStore()