mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-26 00:26:20 +08:00
chore: format code
This commit is contained in:
@@ -21,7 +21,7 @@ type ShallowUnwrap<T> = {
|
||||
export function createContext<T>(
|
||||
context: any,
|
||||
key: InjectionKey<T> = Symbol(),
|
||||
options: CreateContextOptions = {}
|
||||
options: CreateContextOptions = {},
|
||||
) {
|
||||
const { readonly = true, createProvider = false, native = false } = options;
|
||||
|
||||
@@ -39,7 +39,7 @@ export function useContext<T>(key: InjectionKey<T>, defaultValue?: any, native?:
|
||||
|
||||
export function useContext<T>(
|
||||
key: InjectionKey<T> = Symbol(),
|
||||
defaultValue?: any
|
||||
defaultValue?: any,
|
||||
): ShallowUnwrap<T> {
|
||||
return inject(key, defaultValue || {});
|
||||
}
|
||||
|
Reference in New Issue
Block a user