@widget-js/core 0.11.21 → 0.11.22-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +575 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +598 -17
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1239,13 +1239,22 @@ interface SaveWidgetOption {
|
|
|
1239
1239
|
sendBroadcast?: boolean;
|
|
1240
1240
|
id?: string;
|
|
1241
1241
|
}
|
|
1242
|
+
/**
|
|
1243
|
+
* 用户处理浏览器数据,只在浏览器环境下有用
|
|
1244
|
+
*/
|
|
1242
1245
|
interface IWidgetDataApi {
|
|
1243
1246
|
findByName<T extends WidgetData>(name: string, type: {
|
|
1244
1247
|
new (name: string, id?: string): T;
|
|
1245
1248
|
}): Promise<T | undefined>;
|
|
1246
1249
|
findByName<T extends WidgetData>(data: T): Promise<T | undefined>;
|
|
1247
1250
|
save(data: WidgetData, options?: SaveWidgetOption): Promise<string>;
|
|
1248
|
-
|
|
1251
|
+
/**
|
|
1252
|
+
* 获取组件 LocalForage 存储实例
|
|
1253
|
+
* @param widgetName 组件名
|
|
1254
|
+
* @param storeName 存储名
|
|
1255
|
+
* @see https://localforage.docschina.org/
|
|
1256
|
+
*/
|
|
1257
|
+
getStore(widgetName: string, storeName?: string): LocalForage;
|
|
1249
1258
|
saveByName<T extends WidgetData>(data: T, options?: SaveWidgetOption): Promise<string>;
|
|
1250
1259
|
find<T extends WidgetData>(name: string, id: string, type: {
|
|
1251
1260
|
new (name: string, id?: string): T;
|