跳到主要内容

useFindOne()

function useFindOne<T>(EntityType, options): RxDBResource<InstanceType<T> | undefined>;

Defined in: hooks.ts:137

查找第一个匹配条件的实体

Type Parameters

Type Parameter
T extends EntityType

Parameters

ParameterTypeDescription
EntityTypeT实体类
optionsUseOptions<EntityStaticType<T, "findOneOptions">>查询参数(where、排序等)

Returns

RxDBResource<InstanceType<T> | undefined>

返回包含实体的资源 signal