@dfeidao/atom-wxapp > global全局存储
External module: global全局存储
Index
Functions
Functions
clear
▸ clear(): void
Defined in global/clear.ts:15
清空所有存储对象
example:
import clear from '@dfeidao/atom-wxapp/global/clear';
clear();
Returns: void
get
▸ get(key: string
): any
Defined in global/get.ts:15
获取全局存储
example:
import get from '@dfeidao/atom-wxapp/global/get';
const value = get('key');
Parameters:
Name | Type | Description |
---|---|---|
key | string |
键 |
Returns: any
remove
▸ remove(key: string
): void
Defined in global/remove.ts:16
移除某个key
example:
import remove from '@dfeidao/atom-wxapp/global/remove';
remove('key');
Parameters:
Name | Type | Description |
---|---|---|
key | string |
键 |
Returns: void
set
▸ set(key: string
, value: any
): void
Defined in global/set.ts:17
设置全局存储
example:
import set from '@dfeidao/atom-wxapp/global/set';
set('key', 'value');
Parameters:
Name | Type | Description |
---|---|---|
key | string |
键 |
value | any |
值(只是引用) |
Returns: void