@trimjs/web-app 0.2.3 → 0.2.4
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/README.md +30 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -200,6 +200,36 @@ await app.openFileManager("/path/to/folder");
|
|
|
200
200
|
|
|
201
201
|
---
|
|
202
202
|
|
|
203
|
+
#### openApp
|
|
204
|
+
|
|
205
|
+
```typescript
|
|
206
|
+
async openApp(anchor: string): Promise<void | null>
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
通过应用锚点打开指定应用(仅支持 Web 平台)。
|
|
210
|
+
|
|
211
|
+
**参数:**
|
|
212
|
+
|
|
213
|
+
- `anchor: string` - 应用锚点(唯一标识)
|
|
214
|
+
|
|
215
|
+
**返回值:**
|
|
216
|
+
|
|
217
|
+
- 成功时返回 `Promise<void>`
|
|
218
|
+
- 失败时返回 `Promise<null>`
|
|
219
|
+
|
|
220
|
+
**注意:**
|
|
221
|
+
|
|
222
|
+
- 此方法仅在 Web 平台(iframe)中可用
|
|
223
|
+
- 在移动端调用会抛出错误:`openApp is not supported on mobile platform`
|
|
224
|
+
|
|
225
|
+
**示例:**
|
|
226
|
+
|
|
227
|
+
```typescript
|
|
228
|
+
await app.openApp("trim.notes");
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
203
233
|
#### setExitPageTips
|
|
204
234
|
|
|
205
235
|
```typescript
|