Skip to content

Commit c9b7421

Browse files
committed
fix: fix types
1 parent bb6a062 commit c9b7421

File tree

2 files changed

+22
-8
lines changed

2 files changed

+22
-8
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import type { H5 } from './h5'
33
import type { AppPlus } from './appPlus'
44
import type { MpAlipay } from './mpAlipay'
55
import type { MpWeixin } from './mpWeixin'
6-
import type { MpBaidu } from './MpBaidu'
6+
import type { MpBaidu } from './mpBaidu'
77
import type { MpToutiao } from './mpToutiao'
8-
import type { MpLark } from './MpLark'
8+
import type { MpLark } from './mpLark'
99
import type { MpQq } from './mpQq'
1010
import type { MpKuaishou } from './mpKuaishou'
1111
import type { MpJd } from './mpJd'

packages/schema/schema.json

+20-6
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,16 @@
224224
"description": "原生子窗体的高度,支持以 px 为单位的逻辑像素值或百分比\n\n未设置时,可同时设置 top 和 bottom 属性值改变窗口的默认高度"
225225
},
226226
"left": {
227+
"anyOf": [
228+
{
229+
"$ref": "#/definitions/PxSize"
230+
},
231+
{
232+
"$ref": "#/definitions/PercentageSize"
233+
}
234+
],
227235
"default": "0px",
228-
"description": "原生子窗体水平向左的偏移量,支持以 px 为单位的逻辑像素值或百分比\n\n未设置 left 属性值时,优先通过 right 和 width 属性值来计算原生子窗体的 left 位置",
229-
"type": "string"
236+
"description": "原生子窗体水平向左的偏移量,支持以 px 为单位的逻辑像素值或百分比\n\n未设置 left 属性值时,优先通过 right 和 width 属性值来计算原生子窗体的 left 位置"
230237
},
231238
"margin": {
232239
"description": "原生子窗体的边距,用于定位原生子窗体的位置,若设置了 left、right、top、bottom 则对应的边距值失效\n\n\"auto\" 居中",
@@ -249,9 +256,16 @@
249256
"type": "string"
250257
},
251258
"right": {
259+
"anyOf": [
260+
{
261+
"$ref": "#/definitions/PxSize"
262+
},
263+
{
264+
"$ref": "#/definitions/PercentageSize"
265+
}
266+
],
252267
"default": "根据 left 和 width 属性值来自动计算",
253-
"description": "原生子窗体水平向右的偏移量,支持以 px 为单位的逻辑像素值或百分比\n\n同时设置了 left 和 height 值时,忽略此属性值\n\n未设置 width 时,通过 left 和 bottom 属性值来确定原生子窗体的宽度",
254-
"type": "string"
268+
"description": "原生子窗体水平向右的偏移量,支持以 px 为单位的逻辑像素值或百分比\n\n同时设置了 left 和 height 值时,忽略此属性值\n\n未设置 width 时,通过 left 和 bottom 属性值来确定原生子窗体的宽度"
255269
},
256270
"top": {
257271
"anyOf": [
@@ -916,7 +930,7 @@
916930
"description": "绘制操作类型\n\n\"img\" 绘制图片,与 drawBitmap 操作一致,此时 id、src、position、sprite 属性值有效\n\n\"rect\" 绘制矩形区域,与 drawRect 操作一致,此时 id、color、position、rectStyles 属性值有效\n\n\"font\" 绘制文本内容,与 drawText 操作一致,此时 id、position、text、textStyles 属性值有效\n\n\"richtext\" 绘制富文本内容,与 drawRichText 操作一致,此时 id、position、text、richTextStyles 属性值有效\n\n\"input\" 绘制输入框内容,此时 id、position、inputStyles 属性值有效",
917931
"enum": [
918932
"img",
919-
"react",
933+
"rect",
920934
"font",
921935
"richtext",
922936
"input"
@@ -2853,4 +2867,4 @@
28532867
"type": "object"
28542868
}
28552869
}
2856-
}
2870+
}

0 commit comments

Comments
 (0)