@doubao-apps/create 0.0.25 → 0.0.27
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/36.js +4 -4
- package/dist/template-empty/.ai/examples/common-patterns.md +53 -43
- package/dist/template-empty/.ai/examples/component-basics.md +0 -17
- package/dist/template-empty/.ai/guides/component-development.md +96 -214
- package/dist/template-empty/.ai/guides/system-prompt.md +14 -14
- package/dist/template-empty/.ai/reference/framework-api-quick-ref.md +46 -85
- package/dist/template-empty/.ai/reference/open-api/01-/345/237/272/347/241/200-/350/264/246/345/217/267-/347/263/273/347/273/237.md +699 -0
- package/dist/template-empty/.ai/reference/open-api/02-/345/255/230/345/202/250.md +409 -0
- package/dist/template-empty/.ai/reference/open-api/03-/350/267/257/347/224/261.md +165 -0
- package/dist/template-empty/.ai/reference/open-api/04-/347/225/214/351/235/242-/344/272/244/344/272/222.md +432 -0
- package/dist/template-empty/.ai/reference/open-api/05-/347/225/214/351/235/242-/350/276/223/345/205/245.md +42 -0
- package/dist/template-empty/.ai/reference/open-api/06-/347/275/221/347/273/234.md +148 -0
- package/dist/template-empty/.ai/reference/open-api/07-/345/252/222/344/275/223.md +346 -0
- package/dist/template-empty/.ai/reference/open-api/08-/345/274/200/346/224/276/350/203/275/345/212/233-/344/270/232/345/212/241/350/203/275/345/212/233.md +546 -0
- package/dist/template-empty/.ai/reference/open-api/09-/350/256/276/345/244/207-/350/223/235/347/211/231.md +961 -0
- package/dist/template-empty/.ai/reference/open-api/10-/350/256/276/345/244/207-wi-fi.md +277 -0
- package/dist/template-empty/.ai/reference/open-api/11-/350/256/276/345/244/207-/345/212/240/351/200/237/345/272/246/350/256/241.md +104 -0
- package/dist/template-empty/.ai/reference/open-api/12-/350/256/276/345/244/207-ibeacon.md +148 -0
- package/dist/template-empty/.ai/reference/open-api/13-/350/256/276/345/244/207-/347/275/227/347/233/230.md +82 -0
- package/dist/template-empty/.ai/reference/open-api/14-/350/256/276/345/244/207-/350/256/276/345/244/207/346/226/271/345/220/221.md +70 -0
- package/dist/template-empty/.ai/reference/open-api/15-/350/256/276/345/244/207-/351/231/200/350/236/272/344/273/252.md +104 -0
- package/dist/template-empty/.ai/reference/open-api/16-ui-/350/276/223/345/205/245.md +65 -0
- package/dist/template-empty/.ai/reference/open-api/17-/350/256/276/345/244/207-/347/275/221/347/273/234.md +164 -0
- package/dist/template-empty/.ai/reference/open-api/18-/350/256/276/345/244/207-/347/237/255/344/277/241.md +62 -0
- package/dist/template-empty/.ai/reference/open-api/19-/350/256/276/345/244/207-/346/227/240/351/232/234/347/242/215.md +43 -0
- package/dist/template-empty/.ai/reference/open-api/20-/350/256/276/345/244/207-/347/224/265/346/261/240.md +83 -0
- package/dist/template-empty/.ai/reference/open-api/21-/350/256/276/345/244/207-/346/227/245/345/216/206.md +215 -0
- package/dist/template-empty/.ai/reference/open-api/22-/350/256/276/345/244/207-/345/211/252/350/264/264/346/235/277.md +70 -0
- package/dist/template-empty/.ai/reference/open-api/23-/350/256/276/345/244/207-/350/201/224/347/263/273/344/272/272.md +270 -0
- package/dist/template-empty/.ai/reference/open-api/24-/350/256/276/345/244/207-/345/212/240/345/257/206.md +56 -0
- package/dist/template-empty/.ai/reference/open-api/25-/350/256/276/345/244/207-/347/224/265/350/257/235.md +41 -0
- package/dist/template-empty/.ai/reference/open-api/26-/350/256/276/345/244/207-/346/211/253/347/240/201.md +100 -0
- package/dist/template-empty/.ai/reference/open-api/27-/350/256/276/345/244/207-/345/261/217/345/271/225.md +173 -0
- package/dist/template-empty/.ai/reference/open-api/28-/350/256/276/345/244/207-/351/234/207/345/212/250.md +66 -0
- package/dist/template-empty/.ai/reference/open-api/README.md +36 -0
- package/dist/template-empty/.ai/reference/open-api.md +1758 -266
- package/dist/template-empty/.ai/rules/dos-and-donts.md +50 -37
- package/dist/template-empty/AGENTS.md +56 -33
- package/dist/template-empty/README.md +57 -10
- package/dist/template-empty/package.json +2 -2
- package/dist/template-empty/src/app.config.ts +6 -0
- package/dist/template-empty/src/app.ts +0 -6
- package/dist/template-empty/tsconfig.json +2 -0
- package/dist/template-starter/.ai/examples/common-patterns.md +53 -43
- package/dist/template-starter/.ai/examples/component-basics.md +0 -17
- package/dist/template-starter/.ai/guides/component-development.md +96 -214
- package/dist/template-starter/.ai/guides/system-prompt.md +14 -14
- package/dist/template-starter/.ai/reference/framework-api-quick-ref.md +46 -85
- package/dist/template-starter/.ai/reference/open-api/01-/345/237/272/347/241/200-/350/264/246/345/217/267-/347/263/273/347/273/237.md +699 -0
- package/dist/template-starter/.ai/reference/open-api/02-/345/255/230/345/202/250.md +409 -0
- package/dist/template-starter/.ai/reference/open-api/03-/350/267/257/347/224/261.md +165 -0
- package/dist/template-starter/.ai/reference/open-api/04-/347/225/214/351/235/242-/344/272/244/344/272/222.md +432 -0
- package/dist/template-starter/.ai/reference/open-api/05-/347/225/214/351/235/242-/350/276/223/345/205/245.md +42 -0
- package/dist/template-starter/.ai/reference/open-api/06-/347/275/221/347/273/234.md +148 -0
- package/dist/template-starter/.ai/reference/open-api/07-/345/252/222/344/275/223.md +346 -0
- package/dist/template-starter/.ai/reference/open-api/08-/345/274/200/346/224/276/350/203/275/345/212/233-/344/270/232/345/212/241/350/203/275/345/212/233.md +546 -0
- package/dist/template-starter/.ai/reference/open-api/09-/350/256/276/345/244/207-/350/223/235/347/211/231.md +961 -0
- package/dist/template-starter/.ai/reference/open-api/10-/350/256/276/345/244/207-wi-fi.md +277 -0
- package/dist/template-starter/.ai/reference/open-api/11-/350/256/276/345/244/207-/345/212/240/351/200/237/345/272/246/350/256/241.md +104 -0
- package/dist/template-starter/.ai/reference/open-api/12-/350/256/276/345/244/207-ibeacon.md +148 -0
- package/dist/template-starter/.ai/reference/open-api/13-/350/256/276/345/244/207-/347/275/227/347/233/230.md +82 -0
- package/dist/template-starter/.ai/reference/open-api/14-/350/256/276/345/244/207-/350/256/276/345/244/207/346/226/271/345/220/221.md +70 -0
- package/dist/template-starter/.ai/reference/open-api/15-/350/256/276/345/244/207-/351/231/200/350/236/272/344/273/252.md +104 -0
- package/dist/template-starter/.ai/reference/open-api/16-ui-/350/276/223/345/205/245.md +65 -0
- package/dist/template-starter/.ai/reference/open-api/17-/350/256/276/345/244/207-/347/275/221/347/273/234.md +164 -0
- package/dist/template-starter/.ai/reference/open-api/18-/350/256/276/345/244/207-/347/237/255/344/277/241.md +62 -0
- package/dist/template-starter/.ai/reference/open-api/19-/350/256/276/345/244/207-/346/227/240/351/232/234/347/242/215.md +43 -0
- package/dist/template-starter/.ai/reference/open-api/20-/350/256/276/345/244/207-/347/224/265/346/261/240.md +83 -0
- package/dist/template-starter/.ai/reference/open-api/21-/350/256/276/345/244/207-/346/227/245/345/216/206.md +215 -0
- package/dist/template-starter/.ai/reference/open-api/22-/350/256/276/345/244/207-/345/211/252/350/264/264/346/235/277.md +70 -0
- package/dist/template-starter/.ai/reference/open-api/23-/350/256/276/345/244/207-/350/201/224/347/263/273/344/272/272.md +270 -0
- package/dist/template-starter/.ai/reference/open-api/24-/350/256/276/345/244/207-/345/212/240/345/257/206.md +56 -0
- package/dist/template-starter/.ai/reference/open-api/25-/350/256/276/345/244/207-/347/224/265/350/257/235.md +41 -0
- package/dist/template-starter/.ai/reference/open-api/26-/350/256/276/345/244/207-/346/211/253/347/240/201.md +100 -0
- package/dist/template-starter/.ai/reference/open-api/27-/350/256/276/345/244/207-/345/261/217/345/271/225.md +173 -0
- package/dist/template-starter/.ai/reference/open-api/28-/350/256/276/345/244/207-/351/234/207/345/212/250.md +66 -0
- package/dist/template-starter/.ai/reference/open-api/README.md +36 -0
- package/dist/template-starter/.ai/reference/open-api.md +1758 -266
- package/dist/template-starter/.ai/rules/dos-and-donts.md +50 -37
- package/dist/template-starter/AGENTS.md +56 -33
- package/dist/template-starter/README.md +6 -1
- package/dist/template-starter/package.json +2 -2
- package/dist/template-starter/src/app.config.ts +35 -0
- package/dist/template-starter/src/app.ts +0 -6
- package/dist/template-starter/src/pages/applet/index.tsx +0 -5
- package/dist/template-starter/src/pages/home/index.tsx +0 -5
- package/dist/template-starter/src/pages/lynx/index.tsx +0 -4
- package/dist/template-starter/src/pages/react-lynx/index.tsx +0 -5
- package/dist/template-starter/src/widgets/weather-card/index.tsx +0 -4
- package/dist/template-starter/tsconfig.json +2 -0
- package/package.json +1 -1
|
@@ -87,19 +87,6 @@ interface UserInfo {
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
export default defineWidget({
|
|
90
|
-
aiMeta: {
|
|
91
|
-
id: 'user-card',
|
|
92
|
-
name: '用户卡片',
|
|
93
|
-
input: {
|
|
94
|
-
type: 'object',
|
|
95
|
-
properties: {
|
|
96
|
-
name: { type: 'string', title: '姓名' },
|
|
97
|
-
age: { type: 'number', title: '年龄' },
|
|
98
|
-
avatar: { type: 'string', title: '头像' }
|
|
99
|
-
},
|
|
100
|
-
required: ['name', 'age']
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
90
|
render() {
|
|
104
91
|
const input = getViewData<UserInfo>();
|
|
105
92
|
return <view>{input.name}</view>;
|
|
@@ -107,6 +94,21 @@ export default defineWidget({
|
|
|
107
94
|
});
|
|
108
95
|
```
|
|
109
96
|
|
|
97
|
+
```ts
|
|
98
|
+
// ✅ 把 metadata 写到 src/app.config.ts
|
|
99
|
+
import { defineAppConfig } from '@doubao-apps/kit';
|
|
100
|
+
|
|
101
|
+
export default defineAppConfig({
|
|
102
|
+
widgets: {
|
|
103
|
+
'widgets/user-card': {
|
|
104
|
+
id: 'user-card',
|
|
105
|
+
name: '用户卡片',
|
|
106
|
+
description: '用户信息卡片'
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
```
|
|
111
|
+
|
|
110
112
|
```tsx
|
|
111
113
|
// ❌ 不好的做法
|
|
112
114
|
export default defineWidget({
|
|
@@ -247,20 +249,26 @@ export default definePage({
|
|
|
247
249
|
```
|
|
248
250
|
|
|
249
251
|
```tsx
|
|
250
|
-
// ✅
|
|
251
|
-
|
|
252
|
-
data: {
|
|
253
|
-
userData: null
|
|
254
|
-
},
|
|
252
|
+
// ✅ 推荐 - 使用 Hook 管理请求和状态
|
|
253
|
+
import { useEffect, useState } from '@doubao-apps/framework';
|
|
255
254
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
255
|
+
function UserPage() {
|
|
256
|
+
const [userData, setUserData] = useState<{ name?: string } | null>(null);
|
|
257
|
+
|
|
258
|
+
useEffect(() => {
|
|
259
|
+
fetch('/api/data')
|
|
260
|
+
.then(res => res.json())
|
|
261
|
+
.then(data => {
|
|
262
|
+
setUserData(data);
|
|
263
|
+
});
|
|
264
|
+
}, []);
|
|
261
265
|
|
|
266
|
+
return <view>{userData?.name}</view>;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
export default definePage({
|
|
262
270
|
render() {
|
|
263
|
-
return <
|
|
271
|
+
return <UserPage />;
|
|
264
272
|
}
|
|
265
273
|
});
|
|
266
274
|
```
|
|
@@ -351,21 +359,26 @@ export default defineWidget({
|
|
|
351
359
|
```
|
|
352
360
|
|
|
353
361
|
```tsx
|
|
354
|
-
// ✅
|
|
362
|
+
// ✅ 推荐 - 使用组件内状态,实例之间互不影响
|
|
363
|
+
import { useState } from '@doubao-apps/framework';
|
|
364
|
+
|
|
365
|
+
function CounterWidget() {
|
|
366
|
+
const [count, setCount] = useState(0);
|
|
367
|
+
|
|
368
|
+
return (
|
|
369
|
+
<view
|
|
370
|
+
onClick={() => {
|
|
371
|
+
setCount(prev => prev + 1);
|
|
372
|
+
}}
|
|
373
|
+
>
|
|
374
|
+
Count: {count}
|
|
375
|
+
</view>
|
|
376
|
+
);
|
|
377
|
+
}
|
|
378
|
+
|
|
355
379
|
export default defineWidget({
|
|
356
|
-
data: {
|
|
357
|
-
count: 0
|
|
358
|
-
},
|
|
359
380
|
render() {
|
|
360
|
-
return
|
|
361
|
-
<view
|
|
362
|
-
onClick={() => {
|
|
363
|
-
this.setData({ count: this.data.count + 1 });
|
|
364
|
-
}}
|
|
365
|
-
>
|
|
366
|
-
Count: {this.data.count}
|
|
367
|
-
</view>
|
|
368
|
-
);
|
|
381
|
+
return <CounterWidget />;
|
|
369
382
|
}
|
|
370
383
|
});
|
|
371
384
|
```
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Doubao Apps SDK AI 开发指南
|
|
2
2
|
|
|
3
3
|
本文件专供 AI coding agents(如 Claude、Copilot、Cursor)和开发者使用,提供 Doubao Apps SDK 框架的快速入门、开发规则和文档导航。
|
|
4
4
|
|
|
@@ -31,7 +31,6 @@ pnpm install
|
|
|
31
31
|
|
|
32
32
|
# 启动开发
|
|
33
33
|
pnpm dev
|
|
34
|
-
|
|
35
34
|
```
|
|
36
35
|
|
|
37
36
|
**开发服务器命令**:
|
|
@@ -66,9 +65,9 @@ my-doubao-app/
|
|
|
66
65
|
|
|
67
66
|
- **优先使用 pnpm** 作为包管理器
|
|
68
67
|
- **分离样式文件**:每个组件使用独立的 `.scss` 文件
|
|
69
|
-
-
|
|
68
|
+
- **在 `src/app.config.ts` 中配置 metadata**:为 App、Page 和 Widget 统一配置元数据
|
|
70
69
|
- **使用生命周期钩子**:合理使用 `onShow`、`onMounted` 等
|
|
71
|
-
- **TypeScript
|
|
70
|
+
- **TypeScript 类型**:使用 `getViewData<T>()`、为 props 和 state 提供类型定义
|
|
72
71
|
- **错误处理**:处理边界情况和错误状态
|
|
73
72
|
|
|
74
73
|
### 禁止做法
|
|
@@ -92,22 +91,37 @@ my-doubao-app/
|
|
|
92
91
|
|
|
93
92
|
Page 是全屏 UI 组件,支持九宫格、浮窗等变体。
|
|
94
93
|
|
|
95
|
-
|
|
94
|
+
**metadata 配置**:
|
|
95
|
+
```ts
|
|
96
|
+
import { defineAppConfig } from '@doubao-apps/kit';
|
|
97
|
+
|
|
98
|
+
export default defineAppConfig({
|
|
99
|
+
pages: {
|
|
100
|
+
'pages/home': {
|
|
101
|
+
id: 'my-page',
|
|
102
|
+
title: '我的页面',
|
|
103
|
+
description: '页面功能描述'
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**页面实现**:
|
|
96
110
|
```tsx
|
|
97
111
|
import { definePage, getViewData } from '@doubao-apps/framework';
|
|
98
112
|
import './index.scss';
|
|
99
113
|
|
|
114
|
+
interface HomePageData {
|
|
115
|
+
title: string;
|
|
116
|
+
}
|
|
117
|
+
|
|
100
118
|
export default definePage({
|
|
101
|
-
aiMeta: {
|
|
102
|
-
id: 'my-page',
|
|
103
|
-
title: '我的页面',
|
|
104
|
-
},
|
|
105
119
|
onShow() {
|
|
106
120
|
// 页面显示时触发
|
|
107
121
|
},
|
|
108
122
|
render() {
|
|
109
|
-
const input = getViewData();
|
|
110
|
-
return <view
|
|
123
|
+
const input = getViewData<HomePageData>();
|
|
124
|
+
return <view>{input.title}</view>;
|
|
111
125
|
}
|
|
112
126
|
});
|
|
113
127
|
```
|
|
@@ -118,28 +132,38 @@ export default definePage({
|
|
|
118
132
|
|
|
119
133
|
Widget 是聊天流中的卡片组件,在对话中展示。
|
|
120
134
|
|
|
121
|
-
|
|
135
|
+
**metadata 配置**:
|
|
136
|
+
```ts
|
|
137
|
+
import { defineAppConfig } from '@doubao-apps/kit';
|
|
138
|
+
|
|
139
|
+
export default defineAppConfig({
|
|
140
|
+
widgets: {
|
|
141
|
+
'widgets/my-widget': {
|
|
142
|
+
id: 'my-widget',
|
|
143
|
+
name: '我的卡片',
|
|
144
|
+
description: '卡片功能描述',
|
|
145
|
+
boxType: 'inbox',
|
|
146
|
+
border: true
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
**卡片实现**:
|
|
122
153
|
```tsx
|
|
123
154
|
import { defineWidget, getViewData } from '@doubao-apps/framework';
|
|
124
155
|
import './index.scss';
|
|
125
156
|
|
|
157
|
+
interface MyWidgetData {
|
|
158
|
+
title: string;
|
|
159
|
+
}
|
|
160
|
+
|
|
126
161
|
export default defineWidget({
|
|
127
|
-
aiMeta: {
|
|
128
|
-
id: 'my-widget',
|
|
129
|
-
name: '我的卡片',
|
|
130
|
-
boxType: 'inbox',
|
|
131
|
-
input: {
|
|
132
|
-
type: 'object',
|
|
133
|
-
properties: {
|
|
134
|
-
title: { type: 'string', title: '标题' }
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
},
|
|
138
162
|
onMounted() {
|
|
139
163
|
// 卡片挂载后触发
|
|
140
164
|
},
|
|
141
165
|
render() {
|
|
142
|
-
const input = getViewData();
|
|
166
|
+
const input = getViewData<MyWidgetData>();
|
|
143
167
|
return <view>{input.title}</view>;
|
|
144
168
|
}
|
|
145
169
|
});
|
|
@@ -171,7 +195,7 @@ export default defineWidget({
|
|
|
171
195
|
完整的 Framework API(框架核心)和 Bridge API(系统能力)列表:
|
|
172
196
|
|
|
173
197
|
- **[Framework API 快速参考](.ai/reference/framework-api-quick-ref.md)** - 核心 Framework API 速查
|
|
174
|
-
- **[Open API
|
|
198
|
+
- **[Open API 目录](.ai/reference/open-api/README.md)** - 公开可用的端能力(系统能力)目录与详细文档
|
|
175
199
|
- **[组件库快速参考](.ai/reference/components-quick-ref.md)** - SDK 内置组件(Button、Switch、Swiper 等)
|
|
176
200
|
|
|
177
201
|
包含:
|
|
@@ -206,8 +230,7 @@ API 参考文档
|
|
|
206
230
|
|
|
207
231
|
- **[Framework API](.ai/reference/framework-api-quick-ref.md)** - 核心 Framework API 速查
|
|
208
232
|
- **[组件库](.ai/reference/components-quick-ref.md)** - SDK 内置组件速查
|
|
209
|
-
- **[Open API](.ai/reference/open-api.md)** - 系统能力 API
|
|
210
|
-
|
|
233
|
+
- **[Open API](.ai/reference/open-api/README.md)** - 系统能力 API 目录与详细文档
|
|
211
234
|
|
|
212
235
|
### 依赖包
|
|
213
236
|
|
|
@@ -243,10 +266,10 @@ API 参考文档
|
|
|
243
266
|
|
|
244
267
|
```
|
|
245
268
|
项目根目录/
|
|
246
|
-
├── AGENTS.md
|
|
247
|
-
└── .ai/
|
|
248
|
-
├── guides/
|
|
249
|
-
├── rules/
|
|
250
|
-
├── examples/
|
|
251
|
-
└── reference/
|
|
269
|
+
├── AGENTS.md # 主入口文档(AI Agent 必读)
|
|
270
|
+
└── .ai/ # 详细文档目录
|
|
271
|
+
├── guides/ # 开发指南
|
|
272
|
+
├── rules/ # 开发规则
|
|
273
|
+
├── examples/ # 代码示例
|
|
274
|
+
└── reference/ # API 参考
|
|
252
275
|
```
|
|
@@ -45,7 +45,8 @@ pnpm run analyze
|
|
|
45
45
|
├── package.json # 依赖管理
|
|
46
46
|
├── tsconfig.json # TypeScript 配置
|
|
47
47
|
├── src/
|
|
48
|
-
│ ├── app.ts
|
|
48
|
+
│ ├── app.config.ts # App / Page / Widget metadata
|
|
49
|
+
│ ├── app.ts # 应用生命周期入口
|
|
49
50
|
│ ├── pages/ # 页面组件目录
|
|
50
51
|
│ │ └── home/
|
|
51
52
|
│ │ ├── index.tsx
|
|
@@ -57,6 +58,10 @@ pnpm run analyze
|
|
|
57
58
|
└── debug-scene/ # 调试场景配置
|
|
58
59
|
```
|
|
59
60
|
|
|
61
|
+
### metadata 配置
|
|
62
|
+
|
|
63
|
+
项目中的 App、Page 和 Widget metadata 统一写在 `src/app.config.ts`,`src/app.ts` 和各页面/卡片入口只负责生命周期与渲染逻辑。
|
|
64
|
+
|
|
60
65
|
---
|
|
61
66
|
|
|
62
67
|
## 🤖 AI 开发支持
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
"build": "doubao build"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@doubao-apps/framework": "^0.0.
|
|
9
|
+
"@doubao-apps/framework": "^0.0.27"
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
|
-
"@doubao-apps/kit": "^0.0.
|
|
12
|
+
"@doubao-apps/kit": "^0.0.27",
|
|
13
13
|
"typescript": "5.5.3"
|
|
14
14
|
},
|
|
15
15
|
"version": "0.0.16"
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { defineAppConfig } from '@doubao-apps/kit';
|
|
2
|
+
|
|
3
|
+
export default defineAppConfig({
|
|
4
|
+
appId: '<%= appId %>',
|
|
5
|
+
name: '<%= name %>',
|
|
6
|
+
pages: {
|
|
7
|
+
'pages/home': {
|
|
8
|
+
id: 'home',
|
|
9
|
+
title: 'Doubao Apps SDK',
|
|
10
|
+
description: 'Doubao Apps SDK 欢迎页面'
|
|
11
|
+
},
|
|
12
|
+
'pages/react-lynx': {
|
|
13
|
+
id: 'react-lynx',
|
|
14
|
+
title: 'React Lynx',
|
|
15
|
+
description: '基于 React 的 UI 开发框架介绍'
|
|
16
|
+
},
|
|
17
|
+
'pages/lynx': {
|
|
18
|
+
id: 'lynx',
|
|
19
|
+
title: 'Lynx',
|
|
20
|
+
description: '高性能跨平台 UI 引擎介绍'
|
|
21
|
+
},
|
|
22
|
+
'pages/applet': {
|
|
23
|
+
id: 'applet',
|
|
24
|
+
title: 'Applet',
|
|
25
|
+
description: '小程序开发模板介绍'
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
widgets: {
|
|
29
|
+
'widgets/weather-card': {
|
|
30
|
+
id: 'weather-card',
|
|
31
|
+
name: 'Weather Card',
|
|
32
|
+
description: '显示当前天气信息的卡片组件'
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
});
|