@atomicservice/ascf-base 1.0.11 → 1.0.13
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 +9 -1
- package/dist/index.d.mts +10 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +53 -53
- package/dist/index.mjs +53 -53
- package/dist/schemas/app.schema.json +293 -0
- package/dist/schemas/ascf.config.schema.json +149 -0
- package/dist/schemas/page_component.schema.json +129 -0
- package/package.json +1 -1
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$ref": "#/definitions/Schema",
|
|
4
|
+
"definitions": {
|
|
5
|
+
"Schema": {
|
|
6
|
+
"$ref": "#/definitions/AdditionalProperties%3CApp%3E",
|
|
7
|
+
"description": "ASCF全局配置\n\nASCF根目录下的 app.json 文件用来对ASCF进行全局配置。",
|
|
8
|
+
"markdownDescription": "ASCF全局配置\n\nASCF根目录下的 `app.json` 文件用来对ASCF进行全局配置。\n\nASCF文档:\n\n<https://developer.huawei.com/consumer/cn/doc/atomic-ascf/appjson-global-config>"
|
|
9
|
+
},
|
|
10
|
+
"AdditionalProperties<App>": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"properties": {
|
|
13
|
+
"entryPagePath": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "默认启动首页,默认为pages中第一项。不支持带页面路径参数。",
|
|
16
|
+
"markdownDescription": "默认启动首页,默认为pages中第一项。不支持带页面路径参数。"
|
|
17
|
+
},
|
|
18
|
+
"pages": {
|
|
19
|
+
"type": "array",
|
|
20
|
+
"items": {
|
|
21
|
+
"type": "string"
|
|
22
|
+
},
|
|
23
|
+
"description": "页面路径列表。",
|
|
24
|
+
"uniqueItems": true,
|
|
25
|
+
"markdownDescription": "页面路径列表。"
|
|
26
|
+
},
|
|
27
|
+
"window": {
|
|
28
|
+
"$ref": "#/definitions/IWindow",
|
|
29
|
+
"description": "全局的默认窗口表现。",
|
|
30
|
+
"markdownDescription": "全局的默认窗口表现。"
|
|
31
|
+
},
|
|
32
|
+
"tabBar": {
|
|
33
|
+
"$ref": "#/definitions/ITabBar",
|
|
34
|
+
"description": "底部 tab 栏的表现。",
|
|
35
|
+
"markdownDescription": "底部 tab 栏的表现。"
|
|
36
|
+
},
|
|
37
|
+
"subpackages": {
|
|
38
|
+
"type": "array",
|
|
39
|
+
"items": {
|
|
40
|
+
"$ref": "#/definitions/ISubpackages"
|
|
41
|
+
},
|
|
42
|
+
"description": "分包结构配置。编译后保留pages字段,其他对齐。",
|
|
43
|
+
"markdownDescription": "分包结构配置。编译后保留pages字段,其他对齐。"
|
|
44
|
+
},
|
|
45
|
+
"subPackages": {
|
|
46
|
+
"type": "array",
|
|
47
|
+
"items": {
|
|
48
|
+
"$ref": "#/definitions/ISubpackages"
|
|
49
|
+
},
|
|
50
|
+
"description": "分包结构配置。编译后保留pages字段,其他对齐。",
|
|
51
|
+
"markdownDescription": "分包结构配置。编译后保留pages字段,其他对齐。"
|
|
52
|
+
},
|
|
53
|
+
"preloadRule": {
|
|
54
|
+
"type": "object",
|
|
55
|
+
"description": "分包预下载规则(短期策略:使用原生层编码;编译不做处理。)",
|
|
56
|
+
"markdownDescription": "分包预下载规则(短期策略:使用原生层编码;编译不做处理。)"
|
|
57
|
+
},
|
|
58
|
+
"usingComponents": {
|
|
59
|
+
"$ref": "#/definitions/IUsingComponents",
|
|
60
|
+
"description": "全局自定义组件配置。",
|
|
61
|
+
"markdownDescription": "全局自定义组件配置。"
|
|
62
|
+
},
|
|
63
|
+
"permission": {
|
|
64
|
+
"type": "object",
|
|
65
|
+
"description": "元服务接口权限相关设置(短期策略:使用原生层编码,转换器在第一次转换时自动生成string.json并配置;编译不做处理。)",
|
|
66
|
+
"markdownDescription": "元服务接口权限相关设置(短期策略:使用原生层编码,转换器在第一次转换时自动生成string.json并配置;编译不做处理。)支持的scope,请参见[scope 列表](https://developer.huawei.com/consumer/cn/doc/atomic-ascf/develop-authorization#section234119171375)。"
|
|
67
|
+
},
|
|
68
|
+
"resolveAlias": {
|
|
69
|
+
"type": "object",
|
|
70
|
+
"additionalProperties": {
|
|
71
|
+
"type": "string"
|
|
72
|
+
},
|
|
73
|
+
"description": "自定义模块映射规则。依赖的最低ToolKit版本:1.0.4",
|
|
74
|
+
"markdownDescription": "自定义模块映射规则。依赖的最低ToolKit版本:1.0.4。详见:[resloveAlias](https://developer.huawei.com/consumer/cn/doc/atomic-ascf/appjson-global-config#section13041254111110)"
|
|
75
|
+
},
|
|
76
|
+
"lazyCodeLoading": {
|
|
77
|
+
"allOf": [
|
|
78
|
+
{
|
|
79
|
+
"type": "string",
|
|
80
|
+
"enum": ["requiredComponents"]
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"default": "requiredComponents",
|
|
84
|
+
"description": "按需注入和用时注入配置",
|
|
85
|
+
"markdownDescription": "按需注入和用时注入配置"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"required": [
|
|
89
|
+
"pages"
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
"IWindow": {
|
|
93
|
+
"type": "object",
|
|
94
|
+
"properties": {
|
|
95
|
+
"navigationBarBackgroundColor": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"pattern": "^#(?:[A-Fa-f0-9]{3}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$",
|
|
98
|
+
"description": "导航栏背景颜色。",
|
|
99
|
+
"default": "#ffffff",
|
|
100
|
+
"markdownDescription": "导航栏背景颜色。支持类型为:'HexColor'"
|
|
101
|
+
},
|
|
102
|
+
"navigationBarTextStyle": {
|
|
103
|
+
"allOf": [
|
|
104
|
+
{
|
|
105
|
+
"type": "string",
|
|
106
|
+
"enum": ["black", "white"]
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"description": "导航栏标题颜色。\n\n- 当HarmonyOS API版本为12时,仅当navigationStyle = \"custom\"时,可设置black 或 white,其他情况仅支持black。\n\n- 当HarmonyOS API版本为13及以上时,可设置成black 或 white。",
|
|
110
|
+
"default": "black",
|
|
111
|
+
"markdownDescription": "导航栏标题颜色。\n\n- 当HarmonyOS API版本为12时,仅当navigationStyle = \"custom\"时,可设置black 或 white,其他情况仅支持black。\n\n- 当HarmonyOS API版本为13及以上时,可设置成black 或 white。"
|
|
112
|
+
},
|
|
113
|
+
"navigationBarTitleText": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"description": "导航栏标题文字内容",
|
|
116
|
+
"markdownDescription": "导航栏标题文字内容"
|
|
117
|
+
},
|
|
118
|
+
"navigationStyle": {
|
|
119
|
+
"allOf": [
|
|
120
|
+
{
|
|
121
|
+
"$ref": "#/definitions/ENavigationStyle",
|
|
122
|
+
"type": "string"
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
"description": "导航栏样式,仅支持以下值:\n\n- `\"default\"` 默认样式\n\n- `\"custom\"` 自定义导航栏,只保留右上角胶囊按钮。",
|
|
126
|
+
"default": "default",
|
|
127
|
+
"markdownDescription": "导航栏样式,仅支持以下值:\n\n- `\"default\"` 默认样式\n\n- `\"custom\"` 自定义导航栏,只保留右上角胶囊按钮。"
|
|
128
|
+
},
|
|
129
|
+
"backgroundColor": {
|
|
130
|
+
"type": "string",
|
|
131
|
+
"pattern": "^#(?:[A-Fa-f0-9]{3}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$",
|
|
132
|
+
"description": "窗口的背景色",
|
|
133
|
+
"default": "#ffffff",
|
|
134
|
+
"markdownDescription": "窗口的背景色"
|
|
135
|
+
},
|
|
136
|
+
"enablePullDownRefresh": {
|
|
137
|
+
"type": "boolean",
|
|
138
|
+
"description": "是否开启全局的下拉刷新。",
|
|
139
|
+
"default": false,
|
|
140
|
+
"markdownDescription": "是否开启全局的下拉刷新。"
|
|
141
|
+
},
|
|
142
|
+
"backgroundTextStyle": {
|
|
143
|
+
"allOf": [
|
|
144
|
+
{
|
|
145
|
+
"enum": ["dark", "light"],
|
|
146
|
+
"type": "string"
|
|
147
|
+
}
|
|
148
|
+
],
|
|
149
|
+
"description": "下拉 loading 的样式,仅支持 dark / light",
|
|
150
|
+
"default": "dark",
|
|
151
|
+
"markdownDescription": "下拉 loading 的样式,仅支持 dark / light"
|
|
152
|
+
},
|
|
153
|
+
"onReachBottomDistance": {
|
|
154
|
+
"type": "number",
|
|
155
|
+
"description": "页面上拉触底事件触发时距页面底部距离,单位为 px。",
|
|
156
|
+
"default": 50,
|
|
157
|
+
"markdownDescription": "页面上拉触底事件触发时距页面底部距离,单位为 px。"
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
"ENavigationStyle": {
|
|
162
|
+
"type": "string",
|
|
163
|
+
"enum": [
|
|
164
|
+
"default",
|
|
165
|
+
"custom"
|
|
166
|
+
]
|
|
167
|
+
},
|
|
168
|
+
"ITabBar": {
|
|
169
|
+
"type": "object",
|
|
170
|
+
"properties": {
|
|
171
|
+
"color": {
|
|
172
|
+
"type": "string",
|
|
173
|
+
"pattern": "^#(?:[A-Fa-f0-9]{3}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$",
|
|
174
|
+
"description": "tab 上的文字默认颜色,仅支持十六进制颜色",
|
|
175
|
+
"markdownDescription": "tab 上的文字默认颜色,仅支持十六进制颜色"
|
|
176
|
+
},
|
|
177
|
+
"selectedColor": {
|
|
178
|
+
"type": "string",
|
|
179
|
+
"pattern": "^#(?:[A-Fa-f0-9]{3}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$",
|
|
180
|
+
"description": "tab 上的文字选中时的颜色,仅支持十六进制颜色",
|
|
181
|
+
"markdownDescription": "tab 上的文字选中时的颜色,仅支持十六进制颜色"
|
|
182
|
+
},
|
|
183
|
+
"backgroundColor": {
|
|
184
|
+
"type": "string",
|
|
185
|
+
"pattern": "^#(?:[A-Fa-f0-9]{3}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$",
|
|
186
|
+
"description": "tab 的背景色,仅支持十六进制颜色",
|
|
187
|
+
"markdownDescription": "tab 的背景色,仅支持十六进制颜色"
|
|
188
|
+
},
|
|
189
|
+
"list": {
|
|
190
|
+
"type": "array",
|
|
191
|
+
"items": {
|
|
192
|
+
"$ref": "#/definitions/ITabBarListItem"
|
|
193
|
+
},
|
|
194
|
+
"description": "tab 的列表。",
|
|
195
|
+
"markdownDescription": "tab 的列表。"
|
|
196
|
+
},
|
|
197
|
+
"custom": {
|
|
198
|
+
"type": "boolean",
|
|
199
|
+
"description": "是否开启自定义tabBar功能。起始版本:1.0.10。",
|
|
200
|
+
"markdownDescription": "是否开启自定义tabBar功能。起始版本:1.0.10。"
|
|
201
|
+
},
|
|
202
|
+
"position": {
|
|
203
|
+
"allOf": [
|
|
204
|
+
{
|
|
205
|
+
"enum": ["bottom", "top"],
|
|
206
|
+
"type": "string"
|
|
207
|
+
}
|
|
208
|
+
],
|
|
209
|
+
"default": "bottom",
|
|
210
|
+
"description": "tabBar 的位置,仅支持 bottom / top",
|
|
211
|
+
"markdownDescription": "tabBar 的位置,仅支持 bottom / top"
|
|
212
|
+
},
|
|
213
|
+
"borderStyle": {
|
|
214
|
+
"allOf": [
|
|
215
|
+
{
|
|
216
|
+
"enum": ["black", "white"],
|
|
217
|
+
"type": "string"
|
|
218
|
+
}
|
|
219
|
+
],
|
|
220
|
+
"default": "black",
|
|
221
|
+
"description": "tabbar 上边框的颜色, 仅支持 black / white",
|
|
222
|
+
"markdownDescription": "tabbar 上边框的颜色, 仅支持 black / white"
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
"required": [
|
|
226
|
+
"color",
|
|
227
|
+
"selectedColor",
|
|
228
|
+
"backgroundColor",
|
|
229
|
+
"list"
|
|
230
|
+
]
|
|
231
|
+
},
|
|
232
|
+
"ITabBarListItem": {
|
|
233
|
+
"type": "object",
|
|
234
|
+
"properties": {
|
|
235
|
+
"pagePath": {
|
|
236
|
+
"type": "string",
|
|
237
|
+
"description": "页面路径,必须在 pages 中先定义",
|
|
238
|
+
"markdownDescription": "页面路径,必须在 pages 中先定义"
|
|
239
|
+
},
|
|
240
|
+
"text": {
|
|
241
|
+
"type": "string",
|
|
242
|
+
"description": "tab 上按钮文字",
|
|
243
|
+
"markdownDescription": "tab 上按钮文字"
|
|
244
|
+
},
|
|
245
|
+
"iconPath": {
|
|
246
|
+
"type": "string",
|
|
247
|
+
"description": "图片路径,icon 大小限制为 40kb,建议尺寸为 81px * 81px,不支持网络图片。",
|
|
248
|
+
"markdownDescription": "图片路径,icon 大小限制为 40kb,建议尺寸为 81px * 81px,不支持网络图片。"
|
|
249
|
+
},
|
|
250
|
+
"selectedIconPath": {
|
|
251
|
+
"type": "string",
|
|
252
|
+
"description": "选中时的图片路径,icon 大小限制为 40kb,建议尺寸为 81px * 81px,不支持网络图片。",
|
|
253
|
+
"markdownDescription": "选中时的图片路径,icon 大小限制为 40kb,建议尺寸为 81px * 81px,不支持网络图片。"
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
"required": [
|
|
257
|
+
"pagePath",
|
|
258
|
+
"text"
|
|
259
|
+
]
|
|
260
|
+
},
|
|
261
|
+
"ISubpackages": {
|
|
262
|
+
"type": "object",
|
|
263
|
+
"properties": {
|
|
264
|
+
"root": {
|
|
265
|
+
"type": "string",
|
|
266
|
+
"description": "分包根目录",
|
|
267
|
+
"markdownDescription": "分包根目录"
|
|
268
|
+
},
|
|
269
|
+
"pages": {
|
|
270
|
+
"type": "array",
|
|
271
|
+
"items": {
|
|
272
|
+
"type": "string"
|
|
273
|
+
},
|
|
274
|
+
"description": "分包页面路径,相对于分包根目录",
|
|
275
|
+
"uniqueItems": true,
|
|
276
|
+
"markdownDescription": "分包页面路径,相对于分包根目录"
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
"required": [
|
|
280
|
+
"root",
|
|
281
|
+
"pages"
|
|
282
|
+
]
|
|
283
|
+
},
|
|
284
|
+
"IUsingComponents": {
|
|
285
|
+
"type": "object",
|
|
286
|
+
"additionalProperties": {
|
|
287
|
+
"type": "string",
|
|
288
|
+
"description": "自定义组件的标签名和对应的自定义组件文件路径",
|
|
289
|
+
"markdownDescription": "自定义组件的标签名和对应的自定义组件文件路径"
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$ref": "#/definitions/Schema",
|
|
4
|
+
"definitions": {
|
|
5
|
+
"Schema": {
|
|
6
|
+
"$ref": "#/definitions/AscfConfig"
|
|
7
|
+
},
|
|
8
|
+
"AscfConfig": {
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"packOptions": {
|
|
12
|
+
"$ref": "#/definitions/IPackOptions",
|
|
13
|
+
"description": "打包配置选项。",
|
|
14
|
+
"markdownDescription": "打包配置选项。详见:[packOptions](https://developer.huawei.com/consumer/cn/doc/atomic-ascf/project-json-config#section19209434153512)"
|
|
15
|
+
},
|
|
16
|
+
"swc": {
|
|
17
|
+
"type": "boolean",
|
|
18
|
+
"description": "默认使用babel编译,开启后使用swc编译,提升编译构建性能。\n\n依赖关系:ASCF Toolkit版本≥1.0.9",
|
|
19
|
+
"markdownDescription": "默认使用babel编译,开启后使用swc编译,提升编译构建性能。\n\n依赖关系:ASCF Toolkit版本≥1.0.9",
|
|
20
|
+
"default": false
|
|
21
|
+
},
|
|
22
|
+
"templateHoist": {
|
|
23
|
+
"type": "boolean",
|
|
24
|
+
"description": "类Taro框架(采用了base.hxml模板技术)情况下设置为true,可减少重复的编译代码,减少包体积。\n\n依赖关系:ASCF Toolkit版本≥1.0.9",
|
|
25
|
+
"markdownDescription": "类Taro框架(采用了base.hxml模板技术)情况下设置为true,可减少重复的编译代码,减少包体积。\n\n依赖关系:ASCF Toolkit版本≥1.0.9",
|
|
26
|
+
"default": false
|
|
27
|
+
},
|
|
28
|
+
"disableSubpackages": {
|
|
29
|
+
"type": "boolean",
|
|
30
|
+
"description": "在debug编译的情况下,将分包合并到主包以提升构建性能。\n\n依赖关系:ASCF Toolkit版本≥1.0.9",
|
|
31
|
+
"markdownDescription": "在debug编译的情况下,将分包合并到主包以提升构建性能。\n\n依赖关系:ASCF Toolkit版本≥1.0.9",
|
|
32
|
+
"default": false
|
|
33
|
+
},
|
|
34
|
+
"skipApiValidator": {
|
|
35
|
+
"type": "boolean",
|
|
36
|
+
"description": "跳过接口与组件的支持性校验,提升编译性能。\n\n依赖关系:ASCF Toolkit版本≥1.0.9",
|
|
37
|
+
"markdownDescription": "跳过接口与组件的支持性校验,提升编译性能。\n\n依赖关系:ASCF Toolkit版本≥1.0.9",
|
|
38
|
+
"default": false
|
|
39
|
+
},
|
|
40
|
+
"logging": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"enum": [
|
|
43
|
+
"debug",
|
|
44
|
+
"info",
|
|
45
|
+
"warn",
|
|
46
|
+
"error"
|
|
47
|
+
],
|
|
48
|
+
"description": "控制日志打印最低级别,level从低到高为:debug、info、warn、error。\n\n依赖关系:ASCF Toolkit版本≥1.0.9",
|
|
49
|
+
"markdownDescription": "控制日志打印最低级别,level从低到高为:debug、info、warn、error。\n\n依赖关系:ASCF Toolkit版本≥1.0.9",
|
|
50
|
+
"default": "info"
|
|
51
|
+
|
|
52
|
+
},
|
|
53
|
+
"devtool": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"description": "自定义source map的生成行为。type取值为Source Map的生成方式。\n\n默认值:eval-cheap-source-map\n\n依赖关系:ASCF Toolkit版本≥1.0.9",
|
|
56
|
+
"markdownDescription": "自定义source map的生成行为。type取值为Source Map的生成方式。\n\n默认值:eval-cheap-source-map\n\n依赖关系:ASCF Toolkit版本≥1.0.9",
|
|
57
|
+
"enum": [
|
|
58
|
+
"eval",
|
|
59
|
+
"eval-cheap-source-map",
|
|
60
|
+
"eval-cheap-module-source-map",
|
|
61
|
+
"eval-source-map",
|
|
62
|
+
"cheap-source-map",
|
|
63
|
+
"cheap-module-source-map",
|
|
64
|
+
"source-map",
|
|
65
|
+
"inline-cheap-source-map",
|
|
66
|
+
"inline-cheap-module-source-map",
|
|
67
|
+
"inline-source-map",
|
|
68
|
+
"eval-nosources-cheap-source-map",
|
|
69
|
+
"eval-nosources-cheap-module-source-map",
|
|
70
|
+
"eval-nosources-source-map",
|
|
71
|
+
"inline-nosources-cheap-source-map",
|
|
72
|
+
"inline-nosources-cheap-module-source-map",
|
|
73
|
+
"inline-nosources-source-map",
|
|
74
|
+
"nosources-cheap-source-map",
|
|
75
|
+
"nosources-cheap-module-source-map",
|
|
76
|
+
"nosources-source-map",
|
|
77
|
+
"hidden-nosources-cheap-source-map",
|
|
78
|
+
"hidden-nosources-cheap-module-source-map",
|
|
79
|
+
"hidden-nosources-source-map",
|
|
80
|
+
"hidden-cheap-source-map",
|
|
81
|
+
"hidden-cheap-module-source-map",
|
|
82
|
+
"hidden-source-map"
|
|
83
|
+
],
|
|
84
|
+
"default": "eval-cheap-source-map"
|
|
85
|
+
},
|
|
86
|
+
"cache": {
|
|
87
|
+
"anyOf": [
|
|
88
|
+
{
|
|
89
|
+
"type": "object"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"type": "boolean"
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
"description": "支持false关闭,默认开启。参考webpack的cache配置。\n\n依赖关系:ASCF Toolkit版本≥1.0.9",
|
|
96
|
+
"markdownDescription": "支持false关闭,默认开启。参考webpack的cache配置。\n\n依赖关系:ASCF Toolkit版本≥1.0.9"
|
|
97
|
+
},
|
|
98
|
+
"ascfDebugger": {
|
|
99
|
+
"type": "string",
|
|
100
|
+
"description": "配置为brk,会开启首行断点。\n\n依赖关系:ASCF Toolkit版本≥1.0.9",
|
|
101
|
+
"markdownDescription": "配置为brk,会开启首行断点。\n\n依赖关系:ASCF Toolkit版本≥1.0.9"
|
|
102
|
+
},
|
|
103
|
+
"externalSwcHelpers": {
|
|
104
|
+
"type": "boolean",
|
|
105
|
+
"description": "@swc/helpers的external模式纠错构建路径。仅swc功能异常情况下配置false关闭。\n\n依赖关系:ASCF Toolkit版本≥1.0.9",
|
|
106
|
+
"markdownDescription": "@swc/helpers的external模式纠错构建路径。仅swc功能异常情况下配置false关闭。\n\n依赖关系:ASCF Toolkit版本≥1.0.9"
|
|
107
|
+
},
|
|
108
|
+
"experimental": {
|
|
109
|
+
"type": "object",
|
|
110
|
+
"description": "实验性功能配置。\n\n依赖关系:ASCF Toolkit版本≥1.0.9",
|
|
111
|
+
"markdownDescription": "实验性功能配置。\n\n依赖关系:ASCF Toolkit版本≥1.0.9"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"IPackOptions": {
|
|
116
|
+
"type": "object",
|
|
117
|
+
"properties": {
|
|
118
|
+
"ignore": {
|
|
119
|
+
"type": "array",
|
|
120
|
+
"items": {
|
|
121
|
+
"$ref": "#/definitions/IIgnore"
|
|
122
|
+
},
|
|
123
|
+
"description": "对指定的文件或者文件夹跳过编译打包,这些文件或文件夹将不会出现在编译产物中。",
|
|
124
|
+
"markdownDescription": "对指定的文件或者文件夹跳过编译打包,这些文件或文件夹将不会出现在编译产物中。"
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"IIgnore": {
|
|
129
|
+
"type": "object",
|
|
130
|
+
"properties": {
|
|
131
|
+
"type": {
|
|
132
|
+
"allOf": [
|
|
133
|
+
{
|
|
134
|
+
"type": "string",
|
|
135
|
+
"enum": ["folder", "file", "suffix", "prefix", "regexp", "glob"]
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
"description": "排除的类型,可选值有:['folder', 'file', 'suffix', 'prefix', 'regexp', 'glob']。详见:[packOptions](https://developer.huawei.com/consumer/cn/doc/atomic-ascf/project-json-config#section19209434153512)",
|
|
139
|
+
"markdownDescription": "排除的类型,可选值有:['folder', 'file', 'suffix', 'prefix', 'regexp', 'glob']。详见:[packOptions](https://developer.huawei.com/consumer/cn/doc/atomic-ascf/project-json-config#section19209434153512)"
|
|
140
|
+
},
|
|
141
|
+
"value": {
|
|
142
|
+
"type": "string",
|
|
143
|
+
"description": "路径或排除规则。",
|
|
144
|
+
"markdownDescription": "路径或排除规则。"
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$ref": "#/definitions/Schema",
|
|
4
|
+
"definitions": {
|
|
5
|
+
"Schema": {
|
|
6
|
+
"$ref": "#/definitions/Page",
|
|
7
|
+
"description": "ascf页面或组件配置\n\napp.json 中的部分配置,也支持对单个页面进行配置, 可以在页面对应的 .json 文件来对本页面的表现进行配置。",
|
|
8
|
+
"markdownDescription": "ascf页面或组件配置\n\n`app.json` 中的部分配置,也支持对单个页面进行配置, 可以在页面对应的 .json 文件来对本页面的表现进行配置。\n\nascf文档:\n\n<https://developer.huawei.com/consumer/cn/doc/atomic-ascf/page-json-config>"
|
|
9
|
+
},
|
|
10
|
+
"Page": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"properties": {
|
|
13
|
+
"navigationBarBackgroundColor": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"pattern": "^#(?:[A-Fa-f0-9]{3}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$",
|
|
16
|
+
"description": "导航栏背景颜色,如 #ffffff。",
|
|
17
|
+
"default": "#ffffff",
|
|
18
|
+
"markdownDescription": "导航栏背景颜色,如 #ffffff。"
|
|
19
|
+
},
|
|
20
|
+
"navigationBarTextStyle": {
|
|
21
|
+
"allOf": [
|
|
22
|
+
{
|
|
23
|
+
"enum": ["black", "white"],
|
|
24
|
+
"type": "string"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"description": "导航栏标题颜色。\n\n当API version 12时,仅当navigationStyle = \"custom\"时,可设置black或white,其他情况仅支持black。\n\n当API version 13及以上时,可设置成black或white。",
|
|
28
|
+
"default": "black",
|
|
29
|
+
"markdownDescription": "导航栏标题颜色。\n\n当API version 12时,仅当navigationStyle = \"custom\"时,可设置black或white,其他情况仅支持black。\n\n当API version 13及以上时,可设置成black或white。"
|
|
30
|
+
},
|
|
31
|
+
"navigationBarTitleText": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"description": "导航栏标题文字内容",
|
|
34
|
+
"markdownDescription": "导航栏标题文字内容"
|
|
35
|
+
},
|
|
36
|
+
"navigationStyle": {
|
|
37
|
+
"allOf": [
|
|
38
|
+
{
|
|
39
|
+
"enum": ["default", "custom"],
|
|
40
|
+
"type": "string"
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"description": "导航栏样式,仅支持以下值:\n\n\"default\" 默认样式\n\n\"custom\" 自定义导航栏,只保留右上角胶囊按钮。",
|
|
44
|
+
"default": "default",
|
|
45
|
+
"markdownDescription": "导航栏样式,仅支持以下值:\n\n- `\"default\"` 默认样式\n\n- `\"custom\"` 自定义导航栏,只保留右上角胶囊按钮。"
|
|
46
|
+
},
|
|
47
|
+
"backgroundColor": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"pattern": "^#(?:[A-Fa-f0-9]{3}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$",
|
|
50
|
+
"description": "窗口的背景色",
|
|
51
|
+
"default": "#ffffff",
|
|
52
|
+
"markdownDescription": "窗口的背景色"
|
|
53
|
+
},
|
|
54
|
+
"enablePullDownRefresh": {
|
|
55
|
+
"type": "boolean",
|
|
56
|
+
"description": "是否开启当前页面下拉刷新。",
|
|
57
|
+
"default": false,
|
|
58
|
+
"markdownDescription": "是否开启当前页面下拉刷新。"
|
|
59
|
+
},
|
|
60
|
+
"usingComponents": {
|
|
61
|
+
"$ref": "#/definitions/IUsingComponents",
|
|
62
|
+
"description": "全局自定义组件配置。",
|
|
63
|
+
"markdownDescription": "全局自定义组件配置。"
|
|
64
|
+
},
|
|
65
|
+
"component": {
|
|
66
|
+
"type": "boolean",
|
|
67
|
+
"description": "自定义组件。",
|
|
68
|
+
"markdownDescription": "自定义组件 [详见](https://developer.huawei.com/consumer/cn/doc/atomic-ascf/custom-components)"
|
|
69
|
+
},
|
|
70
|
+
"styleIsolation": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"description": "页面样式隔离,具体参考组件样式隔离。\n\n依赖关系:ASCF Toolkit版本≥1.0.10",
|
|
73
|
+
"markdownDescription": "页面样式隔离,具体参考组件样式隔离。\n\n依赖关系:ASCF Toolkit版本≥1.0.10 [详见](https://developer.huawei.com/consumer/cn/doc/atomic-ascf/custom-components-style-isolation)"
|
|
74
|
+
},
|
|
75
|
+
"backgroundTextStyle": {
|
|
76
|
+
"allOf": [
|
|
77
|
+
{
|
|
78
|
+
"enum": ["dark", "light"],
|
|
79
|
+
"type": "string"
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"description": "下拉 loading 的样式,仅支持 dark / light",
|
|
83
|
+
"default": "dark",
|
|
84
|
+
"markdownDescription": "下拉 loading 的样式,仅支持 dark / light"
|
|
85
|
+
},
|
|
86
|
+
"onReachBottomDistance": {
|
|
87
|
+
"type": "number",
|
|
88
|
+
"description": "页面上拉触底事件触发时距页面底部距离,单位为 px。",
|
|
89
|
+
"default": 50,
|
|
90
|
+
"markdownDescription": "页面上拉触底事件触发时距页面底部距离,单位为 px。"
|
|
91
|
+
},
|
|
92
|
+
"disableScroll": {
|
|
93
|
+
"type": "boolean",
|
|
94
|
+
"description": "设置为 true 则页面整体不能上下滚动。\n只在页面配置中有效,无法在 app.json 中设置",
|
|
95
|
+
"default": false,
|
|
96
|
+
"markdownDescription": "设置为 true 则页面整体不能上下滚动。\n只在页面配置中有效,无法在 app.json 中设置。"
|
|
97
|
+
},
|
|
98
|
+
"componentPlaceholder": {
|
|
99
|
+
"$ref": "#/definitions/IComponentPlaceholder",
|
|
100
|
+
"description": "占位组件配置。",
|
|
101
|
+
"markdownDescription": "占位组件配置。"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"ENavigationStyle": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"enum": [
|
|
108
|
+
"default",
|
|
109
|
+
"custom"
|
|
110
|
+
]
|
|
111
|
+
},
|
|
112
|
+
"IUsingComponents": {
|
|
113
|
+
"type": "object",
|
|
114
|
+
"additionalProperties": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"description": "自定义组件的标签名和对应的自定义组件文件路径",
|
|
117
|
+
"markdownDescription": "自定义组件的标签名和对应的自定义组件文件路径"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"IComponentPlaceholder": {
|
|
121
|
+
"type": "object",
|
|
122
|
+
"additionalProperties": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"description": "自定义组件的标签名和对应的自定义组件的占位组件",
|
|
125
|
+
"markdownDescription": "自定义组件的标签名和对应的自定义组件的占位组件"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|