• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Storage接口切换
2
3
4  | FA模型接口 | Stage模型接口对应d.ts文件 | Stage模型对应接口 |
5| -------- | -------- | -------- |
6| GetStorageOptions | Stage模型无对应接口 | Storage接口功能使用Prefereces接口来代替,接口入参已经重新设计 |
7| SetStorageOptions | Stage模型无对应接口 | Storage接口功能使用Prefereces接口来代替,接口入参已经重新设计 |
8| ClearStorageOptions | Stage模型无对应接口 | Storage接口功能使用Prefereces接口来代替,接口入参已经重新设计 |
9| DeleteStorageOptions | Stage模型无对应接口 | Storage接口功能使用Prefereces接口来代替,接口入参已经重新设计 |
10| [static&nbsp;get(options:&nbsp;GetStorageOptions):&nbsp;void;](../reference/apis/js-apis-system-storage.md#storageget) | \@ohos.data.preferences.d.ts | [get(key:&nbsp;string,&nbsp;defValue:&nbsp;ValueType,&nbsp;callback:&nbsp;AsyncCallback&lt;ValueType&gt;):&nbsp;void;](../reference/apis/js-apis-data-preferences.md#get)<br/>[get(key:&nbsp;string,&nbsp;defValue:&nbsp;ValueType):&nbsp;Promise&lt;ValueType&gt;;](../reference/apis/js-apis-data-preferences.md#get-1) |
11| [static&nbsp;set(options:&nbsp;SetStorageOptions):&nbsp;void;](../reference/apis/js-apis-system-storage.md#storageset) | \@ohos.data.preferences.d.ts | [put(key:&nbsp;string,&nbsp;value:&nbsp;ValueType,&nbsp;callback:&nbsp;AsyncCallback&lt;void&gt;):&nbsp;void;](../reference/apis/js-apis-data-preferences.md#put)<br/>[put(key:&nbsp;string,&nbsp;value:&nbsp;ValueType):&nbsp;Promise&lt;void&gt;;](../reference/apis/js-apis-data-preferences.md#put-1) |
12| [static&nbsp;clear(options?:&nbsp;ClearStorageOptions):&nbsp;void;](../reference/apis/js-apis-system-storage.md#storageclear) | \@ohos.data.preferences.d.ts | [clear(callback:&nbsp;AsyncCallback&lt;void&gt;):&nbsp;void;](../reference/apis/js-apis-data-preferences.md#clear)<br/>[clear():&nbsp;Promise&lt;void&gt;;](../reference/apis/js-apis-data-preferences.md#clear-1) |
13| [static&nbsp;delete(options:&nbsp;DeleteStorageOptions):&nbsp;void;](../reference/apis/js-apis-system-storage.md#storagedelete) | \@ohos.data.preferences.d.ts | [delete(key:&nbsp;string,&nbsp;callback:&nbsp;AsyncCallback&lt;void&gt;):&nbsp;void;](../reference/apis/js-apis-data-preferences.md#delete)<br/>[delete(key:&nbsp;string):&nbsp;Promise&lt;void&gt;;](../reference/apis/js-apis-data-preferences.md#delete-1) |
14