Preparing search index...
The search index is not available
@vorker/idb
@vorker/idb
ObjectHandle
Interface ObjectHandle
数据对象的操作方法
interface
ObjectHandle
{
get
:
(
<
K
>
(
key
?
)
=>
Promise
<
Record
<
K
[
number
]
,
any
>
>
)
;
onChange
:
(
<
T
>
(
callback
)
=>
{
callback
:
T
;
id
:
string
;
remove
:
(
(
)
=>
void
)
;
}
)
;
set
:
(
(
data
)
=>
Promise
<
boolean
>
)
;
}
Hierarchy
CommonHandle
ObjectHandle
Index
Properties
get
on
Change
set
Properties
get
get
:
(
<
K
>
(
key
?
)
=>
Promise
<
Record
<
K
[
number
]
,
any
>
>
)
获取对象字段值
Type declaration
<
K
>
(
key
?
)
:
Promise
<
Record
<
K
[
number
]
,
any
>
>
Type Parameters
K
extends
string
|
string
[]
Parameters
Optional
key
:
K
Returns
Promise
<
Record
<
K
[
number
]
,
any
>
>
on
Change
on
Change
:
(
<
T
>
(
callback
)
=>
{
callback
:
T
;
id
:
string
;
remove
:
(
(
)
=>
void
)
;
}
)
监听数据发生变化
Type declaration
<
T
>
(
callback
)
:
{
callback
:
T
;
id
:
string
;
remove
:
(
(
)
=>
void
)
;
}
Type Parameters
T
extends
(
(
changeData
)
=>
void
)
Parameters
callback
:
T
Returns
{
callback
:
T
;
id
:
string
;
remove
:
(
(
)
=>
void
)
;
}
callback
:
T
id
:
string
remove
:
(
(
)
=>
void
)
(
)
:
void
Returns
void
set
set
:
(
(
data
)
=>
Promise
<
boolean
>
)
设置对象字段值
Type declaration
(
data
)
:
Promise
<
boolean
>
Parameters
data
:
Record
<
string
,
any
>
Returns
Promise
<
boolean
>
Settings
Member Visibility
Protected
Private
Inherited
External
Theme
OS
Light
Dark
On This Page
get
on
Change
set
@vorker/idb
Loading...
数据对象的操作方法