@trimjs/web-app 0.0.1 → 0.0.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/README.md +8 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
# @
|
|
1
|
+
# @trimjs/web-app
|
|
2
2
|
|
|
3
3
|
一个用于应用与基座平台通讯的 SDK。
|
|
4
4
|
|
|
5
5
|
## 简介
|
|
6
6
|
|
|
7
|
-
`@
|
|
7
|
+
`@trimjs/web-app` 是一个跨平台通讯 SDK,让你的应用能够轻松调用基座平台的能力。
|
|
8
8
|
|
|
9
9
|
**核心特性:**
|
|
10
10
|
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
21
|
# npm
|
|
22
|
-
npm install @
|
|
22
|
+
npm install @trimjs/web-app
|
|
23
23
|
|
|
24
24
|
# yarn
|
|
25
|
-
yarn add @
|
|
25
|
+
yarn add @trimjs/web-app
|
|
26
26
|
|
|
27
27
|
# pnpm
|
|
28
|
-
pnpm add @
|
|
28
|
+
pnpm add @trimjs/web-app
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
## 快速开始
|
|
@@ -33,7 +33,7 @@ pnpm add @trim/web-app
|
|
|
33
33
|
### 基础使用
|
|
34
34
|
|
|
35
35
|
```typescript
|
|
36
|
-
import { TrimApp } from "@
|
|
36
|
+
import { TrimApp } from "@trimjs/web-app";
|
|
37
37
|
|
|
38
38
|
// 创建实例
|
|
39
39
|
const app = new TrimApp();
|
|
@@ -45,7 +45,7 @@ await app.setTitle("我的应用");
|
|
|
45
45
|
### 完整示例
|
|
46
46
|
|
|
47
47
|
```typescript
|
|
48
|
-
import { TrimApp } from "@
|
|
48
|
+
import { TrimApp } from "@trimjs/web-app";
|
|
49
49
|
|
|
50
50
|
// 创建实例
|
|
51
51
|
const app = new TrimApp({
|
|
@@ -690,7 +690,7 @@ interface PlatformConfig {
|
|
|
690
690
|
SDK 导出了以下类型,方便你在 TypeScript 项目中使用:
|
|
691
691
|
|
|
692
692
|
```typescript
|
|
693
|
-
import type { TrimAppOptions, PlatformConfig } from "@
|
|
693
|
+
import type { TrimAppOptions, PlatformConfig } from "@trimjs/web-app";
|
|
694
694
|
```
|
|
695
695
|
|
|
696
696
|
如果需要使用其他类型(如 `FilePickerParams`、`QueryConfig`、`ResponseData`),可以从 `@fn/micro-app-postmate` 导入:
|