feat: 统一函数命名

This commit is contained in:
2026-08-02 12:02:17 +08:00
parent 97235386ca
commit 99d5392a68
64 changed files with 331 additions and 1459 deletions

View File

@@ -1,6 +1,6 @@
import { createContext, useContext, useState, type ReactNode } from 'react'
import { type SysRole } from '@/schemas'
import { type Role } from '@/schemas'
import type { Action } from '../constants'
@@ -11,11 +11,11 @@ type CrudContextType<T> = {
setCurrentRow: (row: T | null) => void
}
export const CrudContext = createContext<CrudContextType<SysRole> | null>(null)
export const CrudContext = createContext<CrudContextType<Role> | null>(null)
export const CrudProvider = ({ children }: { children: ReactNode }) => {
const [action, setAction] = useState<Action>(null)
const [currentRow, setCurrentRow] = useState<SysRole | null>(null)
const [currentRow, setCurrentRow] = useState<Role | null>(null)
return (
<CrudContext value={{ action, setAction, currentRow, setCurrentRow }}>{children}</CrudContext>