Skip to content

Commit 00ba3cc

Browse files
authored
fix: fix jsdoc and schema type (#139)
* fix: 修复 pages.json 布尔类型初始值问题 fix: 修复分包 subPackages 的 schema 类型引用 * fix(types): 分包 subPackage 类型具体化,jsdoc 布尔类型默认值修正 * fix: schema.json 使用 generate 命令生成的内容
1 parent 95dca54 commit 00ba3cc

File tree

3 files changed

+20
-17
lines changed

3 files changed

+20
-17
lines changed

packages/core/src/config/types/globalStyle.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export interface GlobalStyle {
4646

4747
/**
4848
* 是否开启下拉刷新,详见页面生命周期。
49-
* @default "false"
49+
* @default false
5050
* @desc
5151
*/
5252
enablePullDownRefresh?: boolean
@@ -189,21 +189,21 @@ export interface GlobalStyle {
189189

190190
/**
191191
* 当存在 leftWindow 时,默认是否显示 leftWindow
192-
* @default "true"
192+
* @default true
193193
* @desc H5
194194
*/
195195
leftWindow?: boolean
196196

197197
/**
198198
* 当存在 topWindow 时,默认是否显示 topWindow
199-
* @default "true"
199+
* @default true
200200
* @desc H5
201201
*/
202202
topWindow?: boolean
203203

204204
/**
205205
* 当存在 rightWindow 时,默认是否显示 rightWindow
206-
* @default "true"
206+
* @default true
207207
* @desc H5
208208
*/
209209
rightWindow?: boolean
@@ -231,7 +231,7 @@ export interface GlobalStyle {
231231

232232
/**
233233
* 动态 rpx,屏幕大小变化会重新渲染 rpx
234-
* @default "false"
234+
* @default false
235235
* @desc App-nvue(vue3 固定值为 true) 3.2.13+
236236
*/
237237
dynamicRpx?: boolean

packages/core/src/config/types/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export interface SubPackage {
6969
/**
7070
* 子包由哪些页面组成,参数同 pages
7171
*/
72-
pages?: any[]
72+
pages?: PageMetaDatum[]
7373
}
7474

7575
export interface ConditionItem {

packages/schema/schema.json

+14-11
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,6 @@
123123
"type": "object"
124124
}
125125
},
126-
"required": [
127-
"autoscan",
128-
"custom"
129-
],
130126
"type": "object"
131127
},
132128
"GlobalStyle": {
@@ -187,12 +183,12 @@
187183
"type": "string"
188184
},
189185
"dynamicRpx": {
190-
"default": "false",
186+
"default": false,
191187
"description": "动态 rpx,屏幕大小变化会重新渲染 rpx",
192188
"type": "boolean"
193189
},
194190
"enablePullDownRefresh": {
195-
"default": "false",
191+
"default": false,
196192
"description": "是否开启下拉刷新,详见页面生命周期。",
197193
"type": "boolean"
198194
},
@@ -201,7 +197,7 @@
201197
"description": "设置编译到 H5 平台的特定样式,配置项参考下方 H5"
202198
},
203199
"leftWindow": {
204-
"default": "true",
200+
"default": true,
205201
"description": "当存在 leftWindow 时,默认是否显示 leftWindow",
206202
"type": "boolean"
207203
},
@@ -282,7 +278,7 @@
282278
"type": "string"
283279
},
284280
"rightWindow": {
285-
"default": "true",
281+
"default": true,
286282
"description": "当存在 rightWindow 时,默认是否显示 rightWindow",
287283
"type": "boolean"
288284
},
@@ -311,7 +307,7 @@
311307
"type": "string"
312308
},
313309
"topWindow": {
314-
"default": "true",
310+
"default": true,
315311
"description": "当存在 topWindow 时,默认是否显示 topWindow",
316312
"type": "boolean"
317313
},
@@ -550,7 +546,9 @@
550546
"properties": {
551547
"pages": {
552548
"description": "子包由哪些页面组成,参数同 pages",
553-
"items": {},
549+
"items": {
550+
"$ref": "#/definitions/PageMetaDatum"
551+
},
554552
"type": "array"
555553
},
556554
"root": {
@@ -625,6 +623,8 @@
625623
"items": {
626624
"$ref": "#/definitions/TabBarItem"
627625
},
626+
"maxItems": 5,
627+
"minItems": 2,
628628
"type": "array"
629629
},
630630
"midButton": {
@@ -653,6 +653,9 @@
653653
"type": "string"
654654
}
655655
},
656+
"required": [
657+
"list"
658+
],
656659
"type": "object"
657660
},
658661
"TabBarItem": {
@@ -743,4 +746,4 @@
743746
"type": "object"
744747
}
745748
}
746-
}
749+
}

0 commit comments

Comments
 (0)