@tarojs/plugin-platform-harmony-ets 4.0.0-beta.19 → 4.0.0-beta.20

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.
Files changed (46) hide show
  1. package/dist/apis/wxml/IntersectionObserver.ts +5 -3
  2. package/dist/components-harmony-ets/button.ets +3 -2
  3. package/dist/components-harmony-ets/checkbox.ets +6 -3
  4. package/dist/components-harmony-ets/form.ets +5 -4
  5. package/dist/components-harmony-ets/icon.ets +8 -4
  6. package/dist/components-harmony-ets/image.ets +2 -0
  7. package/dist/components-harmony-ets/innerHtml.ets +5 -4
  8. package/dist/components-harmony-ets/input.ets +6 -4
  9. package/dist/components-harmony-ets/label.ets +5 -4
  10. package/dist/components-harmony-ets/movableArea.ets +8 -31
  11. package/dist/components-harmony-ets/movableView.ets +8 -31
  12. package/dist/components-harmony-ets/picker.ets +21 -16
  13. package/dist/components-harmony-ets/progress.ets +2 -0
  14. package/dist/components-harmony-ets/pseudo.ets +38 -31
  15. package/dist/components-harmony-ets/radio.ets +6 -3
  16. package/dist/components-harmony-ets/richText.ets +3 -1
  17. package/dist/components-harmony-ets/scrollView.ets +15 -36
  18. package/dist/components-harmony-ets/slider.ets +4 -2
  19. package/dist/components-harmony-ets/style.ets +62 -27
  20. package/dist/components-harmony-ets/swiper.ets +3 -2
  21. package/dist/components-harmony-ets/switch.ets +3 -1
  22. package/dist/components-harmony-ets/text.ets +10 -8
  23. package/dist/components-harmony-ets/textArea.ets +6 -4
  24. package/dist/components-harmony-ets/utils/helper.ets +3 -2
  25. package/dist/components-harmony-ets/utils/styles.ets +25 -93
  26. package/dist/components-harmony-ets/video.ets +2 -0
  27. package/dist/components-harmony-ets/view.ets +11 -32
  28. package/dist/components-harmony-ets/webView.ets +3 -1
  29. package/dist/index.d.ts +2 -0
  30. package/dist/index.js +10 -10
  31. package/dist/index.js.map +1 -1
  32. package/dist/runtime-ets/dom/cssNesting.ts +36 -10
  33. package/dist/runtime-ets/dom/cssStyleDeclaration.ts +15 -40
  34. package/dist/runtime-ets/dom/document.ts +0 -3
  35. package/dist/runtime-ets/dom/element/element.ts +6 -5
  36. package/dist/runtime-ets/dom/stylesheet/covertWeb2Hm.ts +152 -217
  37. package/dist/runtime-ets/dom/stylesheet/index.ts +17 -315
  38. package/dist/runtime-ets/dom/stylesheet/type.ts +6 -2
  39. package/dist/runtime-ets/index.ts +1 -1
  40. package/dist/runtime-ets/utils/index.ts +24 -8
  41. package/dist/runtime-framework/react/native-page.ts +6 -4
  42. package/dist/runtime-utils.js +4 -3
  43. package/dist/runtime-utils.js.map +1 -1
  44. package/dist/runtime.js +4 -3
  45. package/dist/runtime.js.map +1 -1
  46. package/package.json +8 -8
@@ -1,6 +1,5 @@
1
1
  /* eslint-disable accessor-pairs */
2
2
  // @ts-nocheck
3
- import { TaroAny } from '../../'
4
3
  import { BORDER_STYLE_MAP, FlexManager, getTransform } from './util'
5
4
 
6
5
  import type { HarmonyStyle, HarmonyType, TaroStyleType, TaroTextStyleType } from './type'
@@ -15,18 +14,10 @@ export default class StyleSheet {
15
14
  return this.hmStyle.display
16
15
  }
17
16
 
18
- set _display (value: string) {
19
- this.hmStyle.display = value
20
- }
21
-
22
17
  get position () {
23
18
  return this.hmStyle.position
24
19
  }
25
20
 
26
- set _position (value: string) {
27
- this.hmStyle.position = value
28
- }
29
-
30
21
  get padding () {
31
22
  return `${this.hmStyle.paddingTop} ${this.hmStyle.paddingRight} ${this.hmStyle.paddingBottom} ${this.hmStyle.paddingLeft}`
32
23
  }
@@ -35,34 +26,18 @@ export default class StyleSheet {
35
26
  return this.hmStyle.paddingTop
36
27
  }
37
28
 
38
- set _paddingTop (value: Length) {
39
- this.hmStyle.paddingTop = value
40
- }
41
-
42
29
  get paddingBottom () {
43
30
  return this.hmStyle.paddingBottom
44
31
  }
45
32
 
46
- set _paddingBottom (value: Length) {
47
- this.hmStyle.paddingBottom = value
48
- }
49
-
50
33
  get paddingLeft () {
51
34
  return this.hmStyle.paddingLeft
52
35
  }
53
36
 
54
- set _paddingLeft (value: Length) {
55
- this.hmStyle.paddingLeft = value
56
- }
57
-
58
37
  get paddingRight () {
59
38
  return this.hmStyle.paddingRight
60
39
  }
61
40
 
62
- set _paddingRight (value: Length) {
63
- this.hmStyle.paddingRight = value
64
- }
65
-
66
41
  get margin () {
67
42
  return `${this.hmStyle.marginTop} ${this.hmStyle.marginRight} ${this.hmStyle.marginBottom} ${this.hmStyle.marginLeft}`
68
43
  }
@@ -71,48 +46,32 @@ export default class StyleSheet {
71
46
  return this.hmStyle.marginTop
72
47
  }
73
48
 
74
- set _marginTop (value: Length) {
75
- this.hmStyle.marginTop = value
76
- }
77
-
78
49
  get marginBottom () {
79
50
  return this.hmStyle.marginBottom
80
51
  }
81
52
 
82
- set _marginBottom (value: Length) {
83
- this.hmStyle.marginBottom = value
84
- }
85
-
86
53
  get marginLeft () {
87
54
  return this.hmStyle.marginLeft
88
55
  }
89
56
 
90
- set _marginLeft (value: Length) {
91
- this.hmStyle.marginLeft = value
92
- }
93
-
94
57
  get marginRight () {
95
58
  return this.hmStyle.marginRight
96
59
  }
97
60
 
98
- set _marginRight (value: Length) {
99
- this.hmStyle.marginRight = value
100
- }
101
-
102
61
  get top () {
103
62
  return this.hmStyle.top
104
63
  }
105
64
 
106
- set _top (value: Length) {
107
- this.hmStyle.top = value
108
- }
109
-
110
65
  get left () {
111
66
  return this.hmStyle.left
112
67
  }
113
68
 
114
- set _left (value: Length) {
115
- this.hmStyle.left = value
69
+ get right () {
70
+ return this.hmStyle.right
71
+ }
72
+
73
+ get bottom () {
74
+ return this.hmStyle.bottom
116
75
  }
117
76
 
118
77
  get flex () {
@@ -123,157 +82,74 @@ export default class StyleSheet {
123
82
  return this.hmStyle.flexBasis
124
83
  }
125
84
 
126
- set _flexBasis (value: number | string) {
127
- this.hmStyle.flexBasis = value
128
- }
129
-
130
85
  get flexGrow () {
131
86
  return Number(this.hmStyle.flexGrow)
132
87
  }
133
88
 
134
- set _flexGrow (value: number) {
135
- this.hmStyle.flexGrow = value
136
- }
137
-
138
89
  get flexShrink () {
139
90
  return Number(this.hmStyle.flexShrink)
140
91
  }
141
92
 
142
- set _flexShrink (value: number) {
143
- this.hmStyle.flexShrink = value
144
- }
145
-
146
93
  get alignSelf () {
147
94
  return FlexManager.reverseItemAlign(this.hmStyle.alignSelf)
148
95
  }
149
96
 
150
- set _alignSelf (value: ItemAlign) {
151
- this.hmStyle.alignSelf = value
152
- }
153
-
154
97
  get flexDirection () {
155
98
  return FlexManager.reverseDirection(this.hmStyle.flexDirection)
156
99
  }
157
100
 
158
- set _flexDirection (value: FlexDirection) {
159
- this.hmStyle.flexDirection = value
160
- }
161
-
162
101
  get justifyContent () {
163
102
  return FlexManager.reverseFlexAlign(this.hmStyle.justifyContent)
164
103
  }
165
104
 
166
- set _justifyContent (value: FlexAlign) {
167
- this.hmStyle.justifyContent = value
168
- }
169
-
170
105
  get alignItems () {
171
106
  return FlexManager.reverseItemAlign(this.hmStyle.alignItems)
172
107
  }
173
108
 
174
- set _alignItems (value: ItemAlign) {
175
- this.hmStyle.alignItems = value
176
- }
177
-
178
109
  get alignContent () {
179
110
  return FlexManager.reverseFlexAlign(this.hmStyle.alignContent)
180
111
  }
181
112
 
182
- set _alignContent (value: FlexAlign) {
183
- this.hmStyle.alignContent = value
184
- }
185
-
186
113
  get flexWrap () {
187
114
  return FlexManager.reverseFlexWrap(this.hmStyle.flexWrap)
188
115
  }
189
116
 
190
- set _flexWrap (value: FlexWrap) {
191
- this.hmStyle.flexWrap = value
192
- }
193
-
194
117
  get width () {
195
118
  return this.hmStyle.width
196
119
  }
197
120
 
198
- set _width (value: Length) {
199
- this.hmStyle.width = value
200
- }
201
-
202
121
  get height () {
203
122
  return this.hmStyle.height
204
123
  }
205
124
 
206
- set _height (value: Length) {
207
- this.hmStyle.height = value
208
- }
209
-
210
125
  get minHeight () {
211
126
  return this.hmStyle.minHeight
212
127
  }
213
128
 
214
- set _minHeight (value: Length) {
215
- this.hmStyle.minHeight = value
216
- }
217
-
218
129
  get maxHeight () {
219
130
  return this.hmStyle.maxHeight
220
131
  }
221
132
 
222
- set _maxHeight (value: Length) {
223
- this.hmStyle.maxHeight = value
224
- }
225
-
226
133
  get minWidth () {
227
134
  return this.hmStyle.minWidth
228
135
  }
229
136
 
230
- set _minWidth (value: Length) {
231
- this.hmStyle.minWidth = value
232
- }
233
-
234
137
  get maxWidth () {
235
138
  return this.hmStyle.maxWidth
236
139
  }
237
140
 
238
- set _maxWidth (value: Length) {
239
- this.hmStyle.maxWidth = value
240
- }
241
-
242
141
  get background () {
243
142
  return `${this.backgroundColor} ${this.backgroundImage} ${this.backgroundRepeat} ${this.backgroundSize}`.trim()
244
143
  }
245
144
 
246
- set _background (value: TaroAny) {
247
- const _backgroundImage: HarmonyType.Background.backgroundImage = value?.image
248
- if (_backgroundImage) {
249
- this.hmStyle.backgroundImage = _backgroundImage.src
250
- if (_backgroundImage.repeat) {
251
- this.hmStyle.backgroundRepeat = _backgroundImage.repeat
252
- }
253
- }
254
- this.hmStyle.backgroundImageSize = value?.size
255
- this.hmStyle.backgroundColor = this.hmStyle.backgroundImage ? null : value?.color
256
-
257
- const _backgroundPosition: HarmonyType.Background.backgroundImagePosition = value?.position
258
- this.hmStyle.backgroundImagePosition = _backgroundPosition
259
- }
260
-
261
145
  get backgroundColor () {
262
146
  return this.hmStyle.backgroundColor
263
147
  }
264
148
 
265
- set _backgroundColor (value: ResourceColor) {
266
- this.hmStyle.backgroundColor = value
267
- }
268
-
269
149
  get backgroundImage () {
270
150
  return this.hmStyle.backgroundImage && `url(${this.hmStyle.backgroundImage})`
271
151
  }
272
152
 
273
- set _backgroundImage (value) {
274
- this.hmStyle.backgroundImage = value
275
- }
276
-
277
153
  get backgroundRepeat () {
278
154
  if (this.hmStyle.backgroundRepeat) {
279
155
  switch (this.hmStyle.backgroundRepeat) {
@@ -285,20 +161,12 @@ export default class StyleSheet {
285
161
  }
286
162
  }
287
163
 
288
- set _backgroundRepeat (value: ImageRepeat[]) {
289
- this.hmStyle.backgroundRepeat = value
290
- }
291
-
292
164
  get backgroundSize () {
293
165
  if (this.hmStyle.backgroundImage) {
294
166
  return [this.hmStyle.backgroundSize.width, this.hmStyle.backgroundSize.height].join(' ')
295
167
  }
296
168
  }
297
169
 
298
- set _backgroundSize (value: HarmonyType.Background.backgroundImageSize[]) {
299
- this.hmStyle.backgroundSize = value
300
- }
301
-
302
170
  get backgroundPosition () {
303
171
  if (this.hmStyle.backgroundPosition) {
304
172
  switch (this.hmStyle.backgroundPosition) {
@@ -319,10 +187,6 @@ export default class StyleSheet {
319
187
  }
320
188
  }
321
189
  }
322
-
323
- set _backgroundPosition (value: HarmonyType.Background.backgroundImagePosition[]) {
324
- this.hmStyle.backgroundPosition = value
325
- }
326
190
 
327
191
  get border () {
328
192
  return [this.borderWidth, this.borderStyle, this.bordercolor].join(' ')
@@ -332,219 +196,111 @@ export default class StyleSheet {
332
196
  return this.hmStyle.borderWidth
333
197
  }
334
198
 
335
- set _borderWidth (value: Length | EdgeWidths) {
336
- this.hmStyle.borderWidth = value
337
- }
338
-
339
199
  get borderLeftWidth () {
340
200
  return this.hmStyle.borderLeftWidth
341
201
  }
342
202
 
343
- set _borderLeftWidth (value: Length) {
344
- this.hmStyle.borderLeftWidth = value
345
- }
346
-
347
203
  get borderRightWidth () {
348
204
  return this.hmStyle.borderRightWidth
349
205
  }
350
206
 
351
- set _borderRightWidth (value: Length) {
352
- this.hmStyle.borderRightWidth = value
353
- }
354
-
355
207
  get borderTopWidth () {
356
208
  return this.hmStyle.borderTopWidth
357
209
  }
358
210
 
359
- set _borderTopWidth (value: Length) {
360
- this.hmStyle.borderTopWidth = value
361
- }
362
-
363
211
  get borderBottomWidth () {
364
212
  return this.hmStyle.borderBottomWidth
365
213
  }
366
214
 
367
- set _borderBottomWidth (value: Length) {
368
- this.hmStyle.borderBottomWidth = value
369
- }
370
-
371
215
  get borderColor () {
372
216
  return this.hmStyle.borderColor
373
217
  }
374
218
 
375
- set _borderColor (value: ResourceColor | EdgeColors) {
376
- this.hmStyle.borderColor = value
377
- }
378
-
379
219
  get borderLeftColor () {
380
220
  return this.hmStyle.borderLeftColor
381
221
  }
382
222
 
383
- set _borderLeftColor (value: ResourceColor) {
384
- this.hmStyle.borderLeftColor = value
385
- }
386
-
387
223
  get borderRightColor () {
388
224
  return this.hmStyle.borderRightColor
389
225
  }
390
226
 
391
- set _borderRightColor (value: ResourceColor) {
392
- this.hmStyle.borderRightColor = value
393
- }
394
-
395
227
  get borderTopColor () {
396
228
  return this.hmStyle.borderTopColor
397
229
  }
398
230
 
399
- set _borderTopColor (value: ResourceColor) {
400
- this.hmStyle.borderTopColor = value
401
- }
402
-
403
231
  get borderBottomColor () {
404
232
  return this.hmStyle.borderBottomColor
405
233
  }
406
234
 
407
- set _borderBottomColor (value: ResourceColor) {
408
- this.hmStyle.borderBottomColor = value
409
- }
410
-
411
235
  get borderStyle () {
412
236
  return BORDER_STYLE_MAP.reverse(this.hmStyle.borderStyle)
413
237
  }
414
238
 
415
- set _borderStyle (value: BorderStyle | EdgeStyles) {
416
- this.hmStyle.borderStyle = value
417
- }
418
-
419
239
  get borderLeftStyle () {
420
240
  return BORDER_STYLE_MAP.reverse(this.hmStyle.borderLeftStyle)
421
241
  }
422
242
 
423
- set _borderLeftStyle (value: BorderStyle) {
424
- this.hmStyle.borderLeftStyle = value
425
- }
426
-
427
243
  get borderRightStyle () {
428
244
  return BORDER_STYLE_MAP.reverse(this.hmStyle.borderRightStyle)
429
245
  }
430
246
 
431
- set _borderRightStyle (value: BorderStyle) {
432
- this.hmStyle.borderRightStyle = value
433
- }
434
-
435
247
  get borderTopStyle () {
436
248
  return BORDER_STYLE_MAP.reverse(this.hmStyle.borderTopStyle)
437
249
  }
438
250
 
439
- set _borderTopStyle (value: BorderStyle) {
440
- this.hmStyle.borderTopStyle = value
441
- }
442
-
443
251
  get borderBottomStyle () {
444
252
  return BORDER_STYLE_MAP.reverse(this.hmStyle.borderBottomStyle)
445
253
  }
446
254
 
447
- set _borderBottomStyle (value: BorderStyle) {
448
- this.hmStyle.borderBottomStyle = value
449
- }
450
-
451
255
  get borderRadius () {
452
256
  return this.hmStyle.borderRadius
453
257
  }
454
258
 
455
- set _borderRadius (value: Length | BorderRadiuses) {
456
- this.hmStyle.borderRadius = value
457
- }
458
-
459
259
  get borderTopLeftRadius () {
460
260
  return this.hmStyle.borderTopLeftRadius
461
261
  }
462
262
 
463
- set _borderTopLeftRadius (value: Length) {
464
- this.hmStyle.borderTopLeftRadius = value
465
- }
466
-
467
263
  get borderTopRightRadius () {
468
264
  return this.hmStyle.borderTopRightRadius
469
265
  }
470
266
 
471
- set _borderTopRightRadius (value: Length) {
472
- this.hmStyle.borderTopRightRadius = value
473
- }
474
-
475
267
  get borderBottomLeftRadius () {
476
268
  return this.hmStyle.borderBottomLeftRadius
477
269
  }
478
270
 
479
- set _borderBottomLeftRadius (value: Length) {
480
- this.hmStyle.borderBottomLeftRadius = value
481
- }
482
-
483
271
  get borderBottomRightRadius () {
484
272
  return this.hmStyle.borderBottomRightRadius
485
273
  }
486
274
 
487
- set _borderBottomRightRadius (value: Length) {
488
- this.hmStyle.borderBottomRightRadius = value
489
- }
490
-
491
- get zIndex (): number {
492
- return Number(this.hmStyle.zIndex)
493
- }
494
-
495
- set _zIndex (value: string) {
496
- this.hmStyle.zIndex = Number(value)
275
+ get zIndex () {
276
+ return this.hmStyle.zIndex
497
277
  }
498
278
 
499
279
  get opacity () {
500
280
  return this.hmStyle.opacity
501
281
  }
502
282
 
503
- set _opacity (value: number) {
504
- this.hmStyle.opacity = value
505
- }
506
-
507
283
  get overflow () {
508
284
  return this.hmStyle.overflow ? 'hidden' : 'visible'
509
285
  }
510
286
 
511
- set _overflow (value: string) {
512
- this.hmStyle.overflow = value === 'hidden'
513
- }
514
-
515
287
  get focus () {
516
288
  return !!this.hmStyle.focus
517
289
  }
518
290
 
519
- set focus (value: boolean) {
520
- this.hmStyle.focus = value
521
- }
522
-
523
291
  // 文本相关
524
292
  get color () {
525
293
  return this.hmStyle.color
526
294
  }
527
295
 
528
- set _color (value: ResourceColor) {
529
- this.hmStyle.color = value
530
- }
531
-
532
296
  get fontSize () {
533
297
  return this.hmStyle.fontSize
534
298
  }
535
299
 
536
- set _fontSize (value: number | string | Resource) {
537
- this.hmStyle.fontSize = value
538
- }
539
-
540
300
  get fontWeight () {
541
301
  return this.hmStyle.fontWeight
542
302
  }
543
303
 
544
- set _fontWeight (value: number | FontWeight | string) {
545
- this.hmStyle.fontWeight = value
546
- }
547
-
548
304
  get fontStyle () {
549
305
  switch (this.hmStyle.fontStyle) {
550
306
  case FontStyle.Italic: return 'italic'; break
@@ -553,18 +309,10 @@ export default class StyleSheet {
553
309
  }
554
310
  }
555
311
 
556
- set _fontStyle (value: FontStyle) {
557
- this.hmStyle.fontStyle = value
558
- }
559
-
560
312
  get fontFamily () {
561
313
  return this.hmStyle.fontFamily
562
314
  }
563
315
 
564
- set fontFamily (value: string) {
565
- this.hmStyle.fontFamily = value
566
- }
567
-
568
316
  get textAlign () {
569
317
  switch (this.hmStyle.textAlign) {
570
318
  case TextAlign.End: return 'right'; break
@@ -574,10 +322,6 @@ export default class StyleSheet {
574
322
  }
575
323
  }
576
324
 
577
- set _textAlign (value: TextAlign) {
578
- this.hmStyle.textAlign = value
579
- }
580
-
581
325
  get verticalAlign() {
582
326
  switch (this.hmStyle.verticalAlign) {
583
327
  case Alignment.Center: return 'middle'; break
@@ -587,38 +331,25 @@ export default class StyleSheet {
587
331
  }
588
332
  }
589
333
 
590
- set _align (value: string) {
591
- this.hmStyle.verticalAlign = value
592
- }
593
-
594
334
  get lineHeight () {
595
335
  return this.hmStyle.lineHeight
596
336
  }
597
337
 
598
- set _lineHeight (value: string | number | Resource) {
599
- this.hmStyle.lineHeight = value
600
- }
601
-
602
338
  get letterSpacing () {
603
339
  return this.hmStyle.letterSpacing
604
340
  }
605
341
 
606
- set _letterSpacing (value: number | string) {
607
- this.hmStyle.letterSpacing = value
608
- }
609
-
610
342
  get textDecoration () {
611
- switch (this.hmStyle.decoration) {
612
- case TextDecorationType.Underline: return 'underline'; break
613
- case TextDecorationType.Overline: return 'overline'; break
614
- case TextDecorationType.LineThrough: return 'line-through'; break
615
- case TextDecorationType.None: return 'none'; break
616
- default: return ''
343
+ if (this.hmStyle.textDecoration) {
344
+ switch (this.hmStyle.textDecoration.type) {
345
+ case TextDecorationType.Underline: return 'underline'; break
346
+ case TextDecorationType.Overline: return 'overline'; break
347
+ case TextDecorationType.LineThrough: return 'line-through'; break
348
+ case TextDecorationType.None: return 'none'; break
349
+ default: return ''
350
+ }
617
351
  }
618
- }
619
-
620
- set _decoration (value: TextDecorationType) {
621
- this.hmStyle.textDecoration = value
352
+ return ''
622
353
  }
623
354
 
624
355
  get textOverflow () {
@@ -632,49 +363,20 @@ export default class StyleSheet {
632
363
  }
633
364
  }
634
365
 
635
- set _textOverflow (value: TextOverflow) {
636
- switch (value.overflow) {
637
- case TextOverflow.Clip:
638
- case TextOverflow.Ellipsis:
639
- case TextOverflow.None: this.hmStyle.WebkitLineClamp = this.hmStyle.WebkitLineClamp || 1; break
640
- default: break
641
- }
642
- this.hmStyle.textOverflow = value
643
- }
644
-
645
366
  get WebkitLineClamp () {
646
367
  return Number(this.hmStyle.WebkitLineClamp)
647
368
  }
648
369
 
649
- set WebkitLineClamp (value: number) {
650
- this.hmStyle.WebkitLineClamp = value
651
- }
652
-
653
- set _WebkitLineClamp (value: number) {
654
- this.hmStyle.WebkitLineClamp = value
655
- }
656
-
657
370
  get transform () {
658
371
  return this.hmStyle.transform
659
372
  }
660
373
 
661
- set _transform (value: HarmonyType.Transform.Transform) {
662
- this.hmStyle.transform = getTransform(value)
663
- }
664
-
665
374
  get transformOrigin () {
666
375
  return this.hmStyle.transformOrigin
667
376
  }
668
377
 
669
- set _transformOrigin(value) {
670
- this.hmStyle.transformOrigin = value
671
- }
672
-
673
378
  get content () {
674
379
  return this.hmStyle._content
675
380
  }
676
381
 
677
- set _content (value) {
678
- this.hmStyle.content = value
679
- }
680
382
  }
@@ -37,6 +37,8 @@ export interface TaroStyleType {
37
37
  position?: 'relative' | 'absolute' | 'fixed'
38
38
  top?: Length
39
39
  left?: Length
40
+ bottom?: Length
41
+ right?: Length
40
42
 
41
43
  // flex
42
44
  flexBasis?: number | string
@@ -56,6 +58,9 @@ export interface TaroStyleType {
56
58
  backgroundSize?: SizeOptions | ImageSize
57
59
  backgroundPosition?: Position | Alignment
58
60
 
61
+ // 渐变
62
+ linearGradient?: HarmonyType.LinearGradient
63
+
59
64
  // transform
60
65
  rotate?: HarmonyType.Transform.Rotate
61
66
  translate?: HarmonyType.Transform.Translate
@@ -99,7 +104,7 @@ export interface TaroStyleType {
99
104
  // other
100
105
  opacity?: number | Resource
101
106
  zIndex?: number
102
- overflow?: boolean
107
+ overflow?: string
103
108
  focus?: boolean
104
109
  content?: string
105
110
  }
@@ -138,7 +143,6 @@ export namespace HarmonyType {
138
143
  export interface backgroundImage {
139
144
  src: ResourceStr
140
145
  repeat?: ImageRepeat
141
- colors?: Array<[ResourceColor, number]>
142
146
  }
143
147
  export type backgroundImageSize = SizeOptions | ImageSize
144
148
  export type backgroundImagePosition = Position | Alignment
@@ -14,5 +14,5 @@ export * from './dom/cssNesting'
14
14
  export * from './interface'
15
15
  export * from './utils'
16
16
  export * from './utils/info'
17
- export { URLSearchParams, eventSource, Events } from '@tarojs/runtime/dist/runtime.esm'
17
+ export { URL, URLSearchParams, eventSource, Events } from '@tarojs/runtime/dist/runtime.esm'
18
18
  export { hooks } from '@tarojs/shared'