-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
schema.json
3289 lines (3289 loc) · 127 KB
/
schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"$ref": "#/definitions/PagesConfig",
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"AnimationType": {
"description": "窗口动画,详见 [窗口动画](https://uniapp.dcloud.net.cn/api/router.html#animation)",
"enum": [
"slide-in-right",
"slide-in-left",
"slide-in-top",
"slide-in-bottom",
"pop-in",
"fade-in",
"zoom-out",
"zoom-fade-out",
"none"
],
"type": "string"
},
"AppPlus": {
"properties": {
"animationDuration": {
"default": 300,
"description": "窗口显示动画的持续时间,单位为 ms",
"type": "number"
},
"animationType": {
"$ref": "#/definitions/AnimationType",
"default": "pop-in",
"description": "窗口显示的动画效果,详见 [窗口动画](https://uniapp.dcloud.net.cn/api/router#animation)"
},
"background": {
"$ref": "#/definitions/HEXColor",
"default": "#FFFFFF",
"description": "窗体背景色,支持 HEX 颜色\n\n无论 vue 页面还是 nvue 页面,在 App 上都有一个父级原生窗体,该窗体的背景色生效时间快于页面里的 css 生效时间",
"format": "color"
},
"bounce": {
"description": "页面回弹效果,设置为 \"none\" 时关闭效果",
"type": "string"
},
"popGesture": {
"default": "close",
"description": "侧滑返回功能,仅支持 \"close\" / \"none\"\n\n\"close\" 启用侧滑返回\n\n\"none\" 禁用侧滑返回",
"enum": [
"close",
"none"
],
"type": "string"
},
"pullToRefresh": {
"description": "下拉刷新",
"properties": {
"color": {
"$ref": "#/definitions/HEXColor",
"default": "#2BD009",
"description": "下拉刷新控件颜色,仅 style 为 \"circle\" 时有效,支持 HEX 颜色",
"format": "color"
},
"contentdown": {
"description": "下拉可刷新状态时配置,仅 style 为 \"default\" 时有效",
"properties": {
"caption": {
"description": "下拉可刷新状态时下拉刷新控件标题内容",
"type": "string"
}
},
"type": "object"
},
"contentover": {
"description": "释放可刷新状态时配置,仅 style 为 \"default\" 时有效",
"properties": {
"caption": {
"description": "释放可刷新状态时下拉刷新控件标题内容",
"type": "string"
}
},
"type": "object"
},
"contentrefresh": {
"description": "正在刷新状态时配置,仅 style 为 \"default\" 时有效",
"properties": {
"caption": {
"description": "正在刷新状态时下拉刷新控件标题内容",
"type": "string"
}
},
"type": "object"
},
"height": {
"anyOf": [
{
"$ref": "#/definitions/PxSize"
},
{
"$ref": "#/definitions/PercentageSize"
}
],
"description": "下拉刷新控件进入刷新状态的拉拽高度,支持以 px 为单位的逻辑像素值或百分比"
},
"offset": {
"anyOf": [
{
"$ref": "#/definitions/PxSize"
},
{
"$ref": "#/definitions/PercentageSize"
}
],
"description": "下拉刷新控件的起始位置,仅 style 为 \"circle\" 时有效,用于定义刷新控件下拉时的起始位置,支持以 px 为单位的逻辑像素值或百分比\n\n如使用了非原生 title 且需要原生下拉刷新,一般都设置 style 为 \"circle\" 并将 offset 设置为自定义 title 的高度"
},
"range": {
"anyOf": [
{
"$ref": "#/definitions/PxSize"
},
{
"$ref": "#/definitions/PercentageSize"
}
],
"description": "窗口可下拉拖拽的范围,支持以 px 为单位的逻辑像素值或百分比"
},
"style": {
"default": "Android 为 \"circle\",iOS 为 \"default\"",
"description": "下拉刷新控件样式\n\n\"default\" 下拉拖动时页面内容跟随\n\n\"circle\" 下拉拖动时仅刷新控件跟随",
"enum": [
"default",
"circle"
],
"type": "string"
},
"support": {
"default": false,
"description": "是否开启窗口下拉刷新",
"type": "boolean"
}
},
"type": "object"
},
"scrollIndicator": {
"description": "滚动条显示策略,设置为 \"none\" 时不显示滚动条",
"type": "string"
},
"softInputMode": {
"default": "adjustPan",
"description": "软键盘弹出模式,仅支持 \"adjustResize\" / \"adjustPan\"",
"enum": [
"adjustResize",
"adjustPan"
],
"type": "string"
},
"softInputNavBar": {
"default": "auto",
"description": "iOS 软键盘上完成工具栏的显示模式,设置为 \"none\" 时关闭工具栏",
"enum": [
"auto",
"none"
],
"type": "string"
},
"subNVues": {
"description": "原生子窗体,详见 [原生子窗体](https://uniapp.dcloud.net.cn/collocation/pages#app-subNVues)",
"items": {
"properties": {
"id": {
"description": "原生子窗体的标识",
"type": "string"
},
"path": {
"description": "配置 nvue 文件路径,nvue 文件需放置到使用 subNVue 的页面文件目录下,cli 项目需要去掉 .nvue 后缀,只保留文件名",
"type": "string"
},
"style": {
"description": "原生子窗体的样式",
"properties": {
"background": {
"anyOf": [
{
"$ref": "#/definitions/HEXColor"
},
{
"const": "transparent",
"type": "string"
}
],
"default": "#FFFFFF",
"description": "窗口的背景颜色,支持 Hex 颜色\n\nAndroid 平台 4.0 以上系统支持 \"transparent\" 背景透明样式,比如 subNVue 为圆角时需要设置为 \"transparent\" 才能看到正确的效果",
"format": "color"
},
"bottom": {
"anyOf": [
{
"$ref": "#/definitions/PxSize"
},
{
"$ref": "#/definitions/PercentageSize"
}
],
"default": "根据 top 和 height 属性值自动计算",
"description": "原生子窗体垂直向上的偏移量,支持以 px 为单位的逻辑像素值或百分比\n\n同时设置了 top 和 height 值时,忽略此属性值\n\n未设置 height 时,通过 top 和 bottom 属性值来确定原生子窗体的高度"
},
"dock": {
"default": "bottom",
"description": "原生子窗体停靠位置,仅 position 为 \"dock\" 时生效\n\n\"top\" 原生子窗体停靠在页面顶部\n\n\"bottom\" 原生子窗体停靠在页面底部\n\n\"right\" 原生子窗体停靠在页面右侧\n\n\"left\" 原生子窗体停靠在页面左侧",
"enum": [
"top",
"bottom",
"right",
"left"
],
"type": "string"
},
"height": {
"anyOf": [
{
"$ref": "#/definitions/PxSize"
},
{
"$ref": "#/definitions/PercentageSize"
}
],
"default": "100%",
"description": "原生子窗体的高度,支持以 px 为单位的逻辑像素值或百分比\n\n未设置时,可同时设置 top 和 bottom 属性值改变窗口的默认高度"
},
"left": {
"anyOf": [
{
"$ref": "#/definitions/PxSize"
},
{
"$ref": "#/definitions/PercentageSize"
}
],
"default": "0px",
"description": "原生子窗体水平向左的偏移量,支持以 px 为单位的逻辑像素值或百分比\n\n未设置 left 属性值时,优先通过 right 和 width 属性值来计算原生子窗体的 left 位置"
},
"margin": {
"description": "原生子窗体的边距,用于定位原生子窗体的位置,若设置了 left、right、top、bottom 则对应的边距值失效\n\n\"auto\" 居中",
"type": "string"
},
"mask": {
"$ref": "#/definitions/RGBAColor",
"default": "rgba(0,0,0,0.5)",
"description": "原生子窗体的遮罩层,仅当原生子窗体 type 为 \"popup\" 时生效,支持 RGBA 颜色",
"format": "color"
},
"position": {
"default": "absolute",
"description": "原生子窗体的排版位置,排版位置决定原生子窗体在父窗口中的定位方式\n\n\"static\" 原生子窗体在页面中正常定位,如果页面存在滚动条则随窗口内容滚动\n\n\"absolute\" 原生子窗体在页面中绝对定位,如果页面存在滚动条不随窗口内容滚动\n\n\"dock\" 原生子窗体在页面中停靠,停靠位置由 dock 属性值决定",
"enum": [
"static",
"absolute",
"dock"
],
"type": "string"
},
"right": {
"anyOf": [
{
"$ref": "#/definitions/PxSize"
},
{
"$ref": "#/definitions/PercentageSize"
}
],
"default": "根据 left 和 width 属性值来自动计算",
"description": "原生子窗体水平向右的偏移量,支持以 px 为单位的逻辑像素值或百分比\n\n同时设置了 left 和 height 值时,忽略此属性值\n\n未设置 width 时,通过 left 和 bottom 属性值来确定原生子窗体的宽度"
},
"top": {
"anyOf": [
{
"$ref": "#/definitions/PxSize"
},
{
"$ref": "#/definitions/PercentageSize"
}
],
"default": "0px",
"description": "原生子窗体垂直向下的偏移量,支持以 px 为单位的逻辑像素值或百分比\n\n未设置 top 属性值时,优先通过 bottom 和 height 属性值来计算原生子窗体的 top 位置"
},
"width": {
"anyOf": [
{
"$ref": "#/definitions/PxSize"
},
{
"$ref": "#/definitions/PercentageSize"
}
],
"default": "100%",
"description": "原生子窗体的宽度,支持以 px 为单位的逻辑像素值或百分比\n\n未设置时,可同时设置 left 和 right 属性值改变窗口的默认宽度"
},
"zindex": {
"description": "原生子窗体的窗口的堆叠顺序值,拥有更高堆叠顺序的窗口总是会处于堆叠顺序较低的窗口的前面,拥有相同堆叠顺序的窗口后调用 show 方法则在前面",
"type": "number"
}
},
"type": "object"
},
"type": {
"description": "原生子窗口内置样式\n\n\"popup\" 弹出层\n\n\"navigationBar\" 导航栏",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"titleNView": {
"anyOf": [
{
"const": false,
"type": "boolean"
},
{
"properties": {
"autoBackButton": {
"default": true,
"description": "标题栏控件是否显示左侧返回按钮",
"type": "boolean"
},
"backButton": {
"description": "返回按钮的样式,详见 [backButton](https://uniapp.dcloud.net.cn/collocation/pages#app-titlenview-backbuttonstyles)",
"properties": {
"background": {
"anyOf": [
{
"$ref": "#/definitions/HEXColor"
},
{
"$ref": "#/definitions/RGBAColor"
}
],
"default": "灰色半透明",
"description": "背景颜色,仅在标题栏 type 为 \"transparent\" 时生效,当标题栏透明时按钮显示的背景颜色,支持 HEX 和 RGBA 颜色",
"format": "color"
},
"badgeText": {
"description": "角标文本,最多显示3个字符,超过则显示为 ...",
"type": "string"
},
"color": {
"anyOf": [
{
"$ref": "#/definitions/HEXColor"
},
{
"$ref": "#/definitions/RGBAColor"
}
],
"default": "窗口标题栏控件的标题文字颜色",
"description": "图标和标题颜色,支持 HEX 和 RGBA 颜色",
"format": "color"
},
"colorPressed": {
"anyOf": [
{
"$ref": "#/definitions/HEXColor"
},
{
"$ref": "#/definitions/RGBAColor"
}
],
"default": "color 属性值自动调整透明度为 0.3",
"description": "按下状态按钮文字颜色,支持 HEX 和 RGBA 颜色",
"format": "color"
},
"fontSize": {
"$ref": "#/definitions/PxSize",
"description": "返回图标文字大小,单位为 px\n\n窗口标题栏为透明样式 type 为 \"transparent\" 时,默认值为 \"22px\"\n\n窗口标题栏为默认样式 type 为 \"default\" 时,默认值为 \"27px\""
},
"fontWeight": {
"default": "normal",
"description": "返回图标的粗细\n\n\"normal\" 正常\n\n\"bold\" 粗体",
"enum": [
"normal",
"bold"
],
"type": "string"
},
"redDot": {
"default": false,
"description": "是否显示红点,当设置了角标文本时红点不显示",
"type": "boolean"
},
"title": {
"default": "",
"description": "返回按钮上的标题,显示在返回图标(字体图标)后",
"type": "string"
},
"titleWeight": {
"description": "返回按钮上标题的粗细\n\n\"normal\" 正常\n\n\"bold\" 粗体",
"enum": [
"normal",
"bold"
],
"type": "string"
}
},
"type": "object"
},
"backgroundColor": {
"anyOf": [
{
"$ref": "#/definitions/HEXColor"
},
{
"$ref": "#/definitions/RGBAColor"
}
],
"default": "#F7F7F7",
"description": "背景颜色,支持 HEX 和 RGBA 颜色,App 端仅悬浮导航栏支持 RGBA 颜色",
"format": "color"
},
"backgroundImage": {
"description": "背景图片\n\n背景图片路径,如 \"/static/img.png\",仅支持本地文件绝对路径,根据实际标题栏宽高拉伸绘制\n\n渐变色,仅支持线性渐变,两种颜色的渐变,如 \"linear-gradient(to top, #a80077, #66ff00)\",其中第一个参数为渐变方向,可选 \"to right\"(从左向右渐变)/ \"to left\"(从右向左渐变)/ \"to bottom\"(从上到下渐变)/ \"to top\"(从下到上渐变)/ \"to bottom right\"(从左上到右下渐变)/\"to top left\"(从左上到右下渐变)",
"type": "string"
},
"backgroundRepeat": {
"default": "no-repeat",
"description": "仅在 backgroundImage 设置为图片路径时有效\n\n\"repeat\" 背景图片在垂直方向和水平方向平铺\n\n\"repeat-x\" 背景图片在水平方向平铺,垂直方向拉伸\n\n\"repeat-y\" 背景图片在垂直方向平铺,水平方向拉伸\n\n\"no-repeat\" 背景图片在垂直方向和水平方向都拉伸",
"enum": [
"repeat",
"repeat-x",
"repeat-y",
"no-repeat"
],
"type": "string"
},
"blurEffect": {
"default": "none",
"description": "高斯模糊效果,仅在 type 为 \"transparent\" 或 \"float\" 时有效\n\n使用模糊效果时应避免设置背景颜色,设置背景颜色可能覆盖模糊效果\n\n\"dark\" 暗风格模糊,对应 iOS 原生 UIBlurEffectStyleDark 效果\n\n\"extralight\" 高亮风格模糊,对应 iOS 原生 UIBlurEffectStyleExtraLight 效果\n\n\"light\" 亮风格模糊,对应 iOS 原生 UIBlurEffectStyleLight 效果\n\n\"none\" 无模糊效果",
"enum": [
"dark",
"extralight",
"light",
"none"
],
"type": "string"
},
"buttons": {
"description": "自定义按钮,详见 [自定义按钮](https://uniapp.dcloud.net.cn/collocation/pages#app-titlenview-buttons)",
"items": {
"$ref": "#/definitions/TitleNViewButton"
},
"type": "array"
},
"coverage": {
"anyOf": [
{
"$ref": "#/definitions/PxSize"
},
{
"$ref": "#/definitions/PercentageSize"
}
],
"default": "132px",
"description": "标题栏控件变化作用范围,仅在 type 为 \"transparent\" 时有效,页面滚动时标题栏背景透明度将发生变化\n\n当页面滚动到指定偏移量时标题栏背景变为完全不透明\n\n支持单位为 px 的逻辑像素值、百分比"
},
"homeButton": {
"default": false,
"description": "标题栏控件是否显示 Home 按钮",
"type": "boolean"
},
"searchInput": {
"description": "原生导航栏上的搜索框配置,详见 [searchInput](https://uniapp.dcloud.net.cn/collocation/pages#app-titlenview-searchinput)",
"properties": {
"align": {
"default": "center",
"description": "非输入状态下文本的对齐方式\n\n\"left\" 居左对齐\n\n\"right\" 居右对齐\n\n\"center\" 居中对齐",
"enum": [
"center",
"left",
"right"
],
"type": "string"
},
"autoFocus": {
"default": false,
"description": "是否自动获取焦点",
"type": "boolean"
},
"backgroundColor": {
"anyOf": [
{
"$ref": "#/definitions/HEXColor"
},
{
"$ref": "#/definitions/RGBAColor"
}
],
"default": "rgba(255,255,255,0.5)",
"description": "背景颜色,支持 HEX 和 RGBA 颜色",
"format": "color"
},
"borderRadius": {
"$ref": "#/definitions/PxSize",
"default": "0px",
"description": "输入框的圆角半径,单位为 px"
},
"disabled": {
"default": false,
"description": "是否禁止输入",
"type": "boolean"
},
"placeholder": {
"description": "提示文本",
"type": "string"
},
"placeholderColor": {
"$ref": "#/definitions/HEXColor",
"default": "#CCCCCC",
"description": "提示文本颜色,支持 HEX 颜色",
"format": "color"
}
},
"type": "object"
},
"splitLine": {
"anyOf": [
{
"type": "boolean"
},
{
"properties": {
"color": {
"anyOf": [
{
"$ref": "#/definitions/HEXColor"
},
{
"$ref": "#/definitions/RGBAColor"
}
],
"default": "#CCCCCC",
"description": "底部分割线颜色,支持 HEX 和 RGBA 颜色",
"format": "color"
},
"height": {
"anyOf": [
{
"$ref": "#/definitions/PxSize"
},
{
"$ref": "#/definitions/PercentageSize"
}
],
"default": "1px",
"description": "底部分割线高度,支持单位为 px 的逻辑像素值、百分比"
}
},
"type": "object"
}
],
"default": false,
"description": "是否显示标题栏的底部分割线"
},
"subtitleColor": {
"anyOf": [
{
"$ref": "#/definitions/HEXColor"
},
{
"$ref": "#/definitions/RGBAColor"
}
],
"default": "与主标题文字颜色一致",
"description": "副标题文字颜色,支持 HEX 和 RGBA 颜色",
"format": "color"
},
"subtitleOverflow": {
"default": "ellipsis",
"description": "标题文字超出显示区域时处理方式\n\n\"clip\" 超出显示区域时内容裁剪\n\n\"ellipsis\" 超出显示区域时尾部显示省略标记(...)",
"enum": [
"clip",
"ellipsis"
],
"type": "string"
},
"subtitleSize": {
"anyOf": [
{
"$ref": "#/definitions/PxSize"
},
{
"const": "auto",
"type": "string"
}
],
"default": "auto",
"description": "副标题文字字体大小,单位为 px\n\n\"auto\" 自动计算,约为 12px"
},
"subtitleText": {
"description": "副标题文字内容,设置副标题后将显示两行标题,副标题显示在主标题(titleText)下方\n\n设置副标题后将居左显示",
"type": "string"
},
"tags": {
"description": "原生 View 增强,详见 [5+ View 控件](http://www.html5plus.org/doc/zh_cn/nativeobj.html#plus.nativeObj.ViewDrawTagStyles)",
"items": {
"properties": {
"color": {
"anyOf": [
{
"$ref": "#/definitions/HEXColor"
},
{
"$ref": "#/definitions/RGBAColor"
}
],
"default": "#FFFFFF",
"description": "矩形区域颜色,支持 HEX 和 RGBA 颜色\n\n不推荐使用,推荐使用 rectStyles\n\n当 tag 属性值为 \"rect\" 时有效,用于指定矩形区域颜色",
"format": "color"
},
"id": {
"description": "绘制操作标识\n\n可通过 view 对象的 drawBitmap / drawRect / drawText / clearRect 方法进行更新",
"type": "string"
},
"inputStyles": {
"description": "绘制输入框的样式\n\n当 tag 属性值为 \"input\" 时有效,用于指定绘制输入框的样式、大小位置等信息",
"properties": {
"borderColor": {
"$ref": "#/definitions/HEXColor",
"default": "#000000",
"description": "输入框的边框颜色,支持 HEX 颜色",
"format": "color"
},
"borderRadius": {
"$ref": "#/definitions/PxSize",
"default": "0px",
"description": "输入框的边框圆角半径,单位为 px"
},
"borderWidth": {
"$ref": "#/definitions/PxSize",
"default": "1px",
"description": "输入框的边框宽度,单位为 px"
},
"fontSize": {
"$ref": "#/definitions/PxSize",
"default": "16px",
"description": "输入框的字体大小,单位为 px"
},
"placeholder": {
"description": "输入框的提示文本\n\n当用户未输入内容时显示在编辑框中(灰色文字)。",
"type": "string"
},
"type": {
"default": "text",
"description": "输入框类型\n\n\"email\" 邮箱地址输入框\n\n\"number\" 数字输入框\n\n\"search\" 搜索文本输入框\n\n\"tel\" 电话号码输入框\n\n\"text\" 普通文本输入框\n\n\"url\" URL地址输入框",
"enum": [
"email",
"number",
"search",
"tel",
"text",
"url"
],
"type": "string"
}
},
"type": "object"
},
"position": {
"default": {
"height": "100%",
"left": "0px",
"top": "0px",
"width": "100%"
},
"description": "绘制内容区域,相对于 View 控件的区域信息\n\n当 tag 属性值为 \"img\" 时,用于指定绘制图片的目标区域\n\n当 tag 属性值为 \"rect\" 时,用于指定绘制的矩形区域\n\n当 tag 属性值为 \"font\" 时,用于指定绘制文本的目标区域,此时 height 属性值支持设置为 \"wrap_content\",表示文本高度根据内容自动计算,此时通过 top 来定位文本绘制的起始位置",
"properties": {
"bottom": {
"anyOf": [
{
"$ref": "#/definitions/PxSize"
},
{
"$ref": "#/definitions/PercentageSize"
},
{
"const": "auto",
"type": "string"
}
],
"description": "区域顶部相对于作用对象或容器向上的偏移量,支持单位为 px 的逻辑像素值、百分比(相对于作用对象或容器的高度)或 \"auto\"\n\n当设置了 top 和 height 值时,忽略此属性值\n\n当未设置 top 值时,可通过 bottom 属性值来确定区域的垂直位置\n\n当未设置 height 值时,可通过 top 和 bottom 属性值来确定区域的高度"
},
"height": {
"anyOf": [
{
"$ref": "#/definitions/PxSize"
},
{
"$ref": "#/definitions/PercentageSize"
}
],
"default": "100%",
"description": "区域高度,相对于作用对象或容器的高度,支持单位为 px 的逻辑像素值或百分比"
},
"left": {
"anyOf": [
{
"$ref": "#/definitions/PxSize"
},
{
"$ref": "#/definitions/PercentageSize"
},
{
"const": "auto",
"type": "string"
}
],
"default": "0px",
"description": "区域顶部相对于作用对象或容器向右的偏移量,支持单位为 px 的逻辑像素值、百分比(相对于作用对象或容器的高度)或 \"auto\""
},
"right": {
"anyOf": [
{
"$ref": "#/definitions/PxSize"
},
{
"$ref": "#/definitions/PercentageSize"
},
{
"const": "auto",
"type": "string"
}
],
"description": "区域顶部相对于作用对象或容器向左的偏移量,支持单位为 px 的逻辑像素值、百分比(相对于作用对象或容器的高度)或 \"auto\"\n\n当设置了 left 和 width 值时,忽略此属性值\n\n当未设置 left 值时,可通过 right 属性值来确定区域的水平位置\n\n当未设置 width 值时,可通过 left 和 right 属性值来确定区域的宽度"
},
"top": {
"anyOf": [
{
"$ref": "#/definitions/PxSize"
},
{
"$ref": "#/definitions/PercentageSize"
},
{
"const": "auto",
"type": "string"
}
],
"default": "0px",
"description": "区域顶部相对于作用对象或容器向下的偏移量,支持单位为 px 的逻辑像素值、百分比(相对于作用对象或容器的高度)或 \"auto\""
},
"width": {
"anyOf": [
{
"$ref": "#/definitions/PxSize"
},
{
"$ref": "#/definitions/PercentageSize"
}
],
"default": "100%",
"description": "区域宽度,相对于作用对象或容器的宽度,支持单位为 px 的逻辑像素值或百分比"
}
},
"type": "object"
},
"rectStyles": {
"description": "绘制区域的样式\n\n当 tag 属性值为 \"rect\" 时有效,用于指定绘制区域的样式、填充颜色、圆角大小等信息",
"properties": {
"borderColor": {
"anyOf": [
{
"$ref": "#/definitions/HEXColor"
},
{
"$ref": "#/definitions/RGBAColor"
}
],
"default": "color 属性值",
"description": "矩形边框颜色,绘制矩形边框的颜色,支持 HEX 和 RGBA 颜色",
"format": "color"
},
"borderWidth": {
"$ref": "#/definitions/PxSize",
"default": "0px",
"description": "矩形边框宽度,单位为 px"
},
"color": {
"anyOf": [
{
"$ref": "#/definitions/HEXColor"
},
{
"$ref": "#/definitions/RGBAColor"
}
],
"default": "#FFFFFF",
"description": "绘制颜色,矩形填充区域的颜色,支持 HEX 和 RGBA 颜色",
"format": "color"
},
"radius": {
"$ref": "#/definitions/PxSize",
"default": "0px",
"description": "矩形区域的圆角半径,单位为 px"
}
},
"type": "object"
},
"richTextStyles": {
"description": "绘制富文本的样式\n\n当 tag 属性值为 \"richtext\" 时有效,用于指定绘制富文本内容的默认字体颜色、字体类型等信息",
"properties": {
"align": {
"default": "left",
"description": "富文本内容的水平对齐方式,对整体内容有效,无法单独控制每行的内容\n\n\"left\" 字体在指定的区域中水平居左对齐\n\n\"center\" 字体在指定的区域中水平居中对齐\n\n\"right\" 字体在指定的区域中水平居右对齐",
"enum": [
"left",
"right",
"center"
],
"type": "string"
},
"family": {
"description": "富文本默认使用的字体名称,如果指定名称的字体不存在,则使用默认字体",
"type": "string"
},
"fontSrc": {
"description": "富文本默认使用的字体文件路径,必须为本地路径,如果指定的文件路径无效,则使用系统默认字体",
"type": "string"
}
},
"type": "object"
},
"sprite": {
"default": {
"height": "100%",
"left": "0px",
"top": "0px",
"width": "100%"
},
"description": "图片源的绘制区域\n\n当 tag 属性值为 \"img\" 时有效,用于指定图片源的绘制区域,相对于图片的区域信息",
"properties": {
"bottom": {
"anyOf": [
{
"$ref": "#/definitions/PxSize"
},
{
"$ref": "#/definitions/PercentageSize"
},
{
"const": "auto",
"type": "string"
}
],
"description": "区域顶部相对于作用对象或容器向上的偏移量,支持单位为 px 的逻辑像素值、百分比(相对于作用对象或容器的高度)或 \"auto\"\n\n当设置了 top 和 height 值时,忽略此属性值\n\n当未设置 top 值时,可通过 bottom 属性值来确定区域的垂直位置\n\n当未设置 height 值时,可通过 top 和 bottom 属性值来确定区域的高度"
},
"height": {
"anyOf": [
{
"$ref": "#/definitions/PxSize"
},
{
"$ref": "#/definitions/PercentageSize"
}
],
"default": "100%",
"description": "区域高度,相对于作用对象或容器的高度,支持单位为 px 的逻辑像素值或百分比"
},
"left": {
"anyOf": [
{
"$ref": "#/definitions/PxSize"
},
{
"$ref": "#/definitions/PercentageSize"
},
{
"const": "auto",
"type": "string"
}
],
"default": "0px",
"description": "区域顶部相对于作用对象或容器向右的偏移量,支持单位为 px 的逻辑像素值、百分比(相对于作用对象或容器的高度)或 \"auto\""
},
"right": {
"anyOf": [
{
"$ref": "#/definitions/PxSize"
},
{
"$ref": "#/definitions/PercentageSize"
},
{
"const": "auto",
"type": "string"
}
],
"description": "区域顶部相对于作用对象或容器向左的偏移量,支持单位为 px 的逻辑像素值、百分比(相对于作用对象或容器的高度)或 \"auto\"\n\n当设置了 left 和 width 值时,忽略此属性值\n\n当未设置 left 值时,可通过 right 属性值来确定区域的水平位置\n\n当未设置 width 值时,可通过 left 和 right 属性值来确定区域的宽度"
},
"top": {
"anyOf": [
{
"$ref": "#/definitions/PxSize"
},
{
"$ref": "#/definitions/PercentageSize"
},
{
"const": "auto",
"type": "string"
}
],
"default": "0px",
"description": "区域顶部相对于作用对象或容器向下的偏移量,支持单位为 px 的逻辑像素值、百分比(相对于作用对象或容器的高度)或 \"auto\""
},
"width": {
"anyOf": [
{
"$ref": "#/definitions/PxSize"
},
{
"$ref": "#/definitions/PercentageSize"
}
],
"default": "100%",
"description": "区域宽度,相对于作用对象或容器的宽度,支持单位为 px 的逻辑像素值或百分比"
}
},
"type": "object"
},
"src": {
"description": "绘制的图片资源\n\n当 tag 属性值为 \"img\" 时有效,可以是图片资源路径(字符串类型)或者图片对象(plus.nativeObj.Bitmap对象)\n\nsrc 路径支持 gif 图片,设置的图片路径文件使用 \".gif\" 后缀时则认为是 gif 图片,如\"_www/loading.gif\"",
"type": "string"
},
"tag": {
"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 属性值有效",
"enum": [
"img",
"rect",
"font",
"richtext",
"input"
],
"type": "string"
},
"text": {
"description": "绘制的文本内容\n\n当 tag 属性值为 \"font\" 时有效,用于保存绘制的文本内容",
"type": "string"
},
"textStyles": {
"description": "绘制文本的样式\n\n当 tag 属性值为 \"font\" 时有效,用于指定绘制文本内容的字体大小、字体颜色、字体类型等信息",
"properties": {
"align": {
"default": "center",
"description": "水平对齐方式\n\n\"left\" 字体在指定的区域中水平居左对齐\n\n\"center\" 字体在指定的区域中水平居中对齐\n\n\"right\" 字体在指定的区域中水平居右对齐",
"enum": [
"left",
"right",
"center"
],
"type": "string"
},
"color": {
"anyOf": [
{
"$ref": "#/definitions/HEXColor"
},
{
"$ref": "#/definitions/RGBAColor"
}
],
"default": "#000000",
"description": "字体颜色,支持 HEX 和 RGBA 颜色",
"format": "color"
},
"decoration": {
"default": "none",
"description": "文本装饰\n\n\"none\" 无装饰效果\n\n\"underline\" 文本带下划线效果\n\n\"line-through\" 文本带贯穿线(删除线)效果",
"enum": [
"none",
"underline",
"line-through"
],
"type": "string"
},
"family": {
"description": "字体名称,如果指定名称的字体不存在,则使用默认字体",
"type": "string"
},
"fontSrc": {
"description": "字体文件路径",
"type": "string"
},
"lineSpacing": {
"anyOf": [
{
"$ref": "#/definitions/PxSize"
},
{
"$ref": "#/definitions/PercentageSize"
}
],
"default": "20%",
"description": "文本行间距,支持单位为 px 的逻辑像素值或百分比"
},
"margin": {