@tarojs/plugin-platform-harmony-ets 4.0.0-beta.3 → 4.0.0-beta.5

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.
@@ -1,5 +1,6 @@
1
1
  import { eventHandler, getComponentEventCallback, AREA_CHANGE_EVENT_NAME, VISIBLE_CHANGE_EVENT_NAME, createTaroEvent } from '@tarojs/runtime'
2
2
 
3
+ import commonStyleModify from './style'
3
4
  import { getNormalAttributes, parseStyles, shouldBindEvent, getNodeThresholds } from './utils/helper'
4
5
  import { INPUT_TYPE_MAP, INPUT_CONFIRM_MAP } from './utils/constant/style'
5
6
 
@@ -11,67 +12,6 @@ interface InputAttrs {
11
12
 
12
13
  @Extend(TextInput)
13
14
  function styles (style: TaroStyleType) {
14
- .id(style.id)
15
- .key(style.id)
16
- .flexGrow(style.flexGrow)
17
- .flexShrink(style.flexShrink)
18
- .flexBasis(style.flexBasis)
19
- .alignSelf(style.alignSelf)
20
- .padding({
21
- top: style.paddingTop,
22
- right: style.paddingRight,
23
- bottom: style.paddingBottom,
24
- left: style.paddingLeft
25
- })
26
- .margin({
27
- top: style.marginTop,
28
- right: style.marginRight,
29
- bottom: style.marginBottom,
30
- left: style.marginLeft
31
- })
32
- .width(style.width)
33
- .height(style.height)
34
- .constraintSize({
35
- minWidth: style.minWidth,
36
- maxWidth: style.maxWidth,
37
- minHeight: style.minHeight,
38
- maxHeight: style.maxHeight
39
- })
40
- .backgroundColor(style.backgroundColor)
41
- .backgroundImage(style.backgroundImage?.src, style.backgroundRepeat)
42
- .backgroundImageSize(style.backgroundSize)
43
- .backgroundImagePosition(style.backgroundPosition)
44
- .borderStyle({
45
- top: style.borderTopStyle,
46
- right: style.borderRightStyle,
47
- bottom: style.borderBottomStyle,
48
- left: style.borderLeftStyle
49
- })
50
- .borderWidth({
51
- top: style.borderTopWidth,
52
- right: style.borderRightWidth,
53
- bottom: style.borderBottomWidth,
54
- left: style.borderLeftWidth
55
- })
56
- .borderColor({
57
- top: style.borderTopColor,
58
- right: style.borderRightColor,
59
- bottom: style.borderBottomColor,
60
- left: style.borderLeftColor
61
- })
62
- .borderRadius({
63
- topLeft: style.borderTopLeftRadius,
64
- topRight: style.borderTopRightRadius,
65
- bottomLeft: style.borderBottomLeftRadius,
66
- bottomRight: style.borderBottomRightRadius
67
- })
68
- .zIndex(style.zIndex)
69
- .opacity(style.opacity)
70
- .linearGradient(style.linearGradient)
71
- .clip(style.overflow)
72
- .rotate({ centerX: style.transformOrigin?.x, centerY: style.transformOrigin?.y, angle: 0 })
73
- .scale({ centerX: style.transformOrigin?.x, centerY: style.transformOrigin?.y })
74
- .transform(style.transform)
75
15
  .fontColor(style.color)
76
16
  .fontSize(style.fontSize)
77
17
  .fontWeight(style.fontWeight)
@@ -130,6 +70,7 @@ export default struct TaroInput {
130
70
  .maxLength(Number(this.node._attrs?.maxlength) || null)
131
71
  .placeholderColor(getPlaceholderColor(this.node))
132
72
  .enterKeyType(INPUT_CONFIRM_MAP.get(this.node._attrs?.confirmType) || EnterKeyType.Done)
73
+ .attributeModifier(commonStyleModify.setNode(this.node))
133
74
  .styles(getNormalAttributes(this.node))
134
75
  .attrs(getAttributes(this.node))
135
76
  .onChange((value: string) => {
@@ -1,141 +1,12 @@
1
1
  import { Current, eventHandler, getComponentEventCallback, VISIBLE_CHANGE_EVENT_NAME, getPageScrollerOrNode, AREA_CHANGE_EVENT_NAME } from '@tarojs/runtime'
2
2
 
3
+ import commonStyleModify from './style'
3
4
  import { createLazyChildren } from './render'
4
5
  import { TOUCH_EVENT_MAP } from './utils/constant/event'
5
6
  import { FlexManager } from './utils/FlexManager'
6
7
  import { getNormalAttributes, shouldBindEvent, getNodeThresholds } from './utils/helper'
7
8
 
8
- import type { TaroStyleType, TaroLabelElement, TaroElement, TaroAny, TaroRadioElement, TaroCheckboxElement } from '@tarojs/runtime'
9
-
10
- @Extend(Column)
11
- function columnAttrs (style: TaroStyleType) {
12
- .id(style.id)
13
- .key(style.id)
14
- .flexGrow(style.flexGrow)
15
- .flexShrink(style.flexShrink)
16
- .flexBasis(style.flexBasis)
17
- .alignSelf(style.alignSelf)
18
- .padding({
19
- top: style.paddingTop,
20
- right: style.paddingRight,
21
- bottom: style.paddingBottom,
22
- left: style.paddingLeft
23
- })
24
- .margin({
25
- top: style.marginTop,
26
- right: style.marginRight,
27
- bottom: style.marginBottom,
28
- left: style.marginLeft
29
- })
30
- .width(style.width)
31
- .height(style.height)
32
- .constraintSize({
33
- minWidth: style.minWidth,
34
- maxWidth: style.maxWidth,
35
- minHeight: style.minHeight,
36
- maxHeight: style.maxHeight
37
- })
38
- .backgroundColor(style.backgroundColor)
39
- .backgroundImage(style.backgroundImage?.src, style.backgroundRepeat)
40
- .backgroundImageSize(style.backgroundSize)
41
- .backgroundImagePosition(style.backgroundPosition)
42
- .borderStyle({
43
- top: style.borderTopStyle,
44
- right: style.borderRightStyle,
45
- bottom: style.borderBottomStyle,
46
- left: style.borderLeftStyle
47
- })
48
- .borderWidth({
49
- top: style.borderTopWidth,
50
- right: style.borderRightWidth,
51
- bottom: style.borderBottomWidth,
52
- left: style.borderLeftWidth
53
- })
54
- .borderColor({
55
- top: style.borderTopColor,
56
- right: style.borderRightColor,
57
- bottom: style.borderBottomColor,
58
- left: style.borderLeftColor
59
- })
60
- .borderRadius({
61
- topLeft: style.borderTopLeftRadius,
62
- topRight: style.borderTopRightRadius,
63
- bottomLeft: style.borderBottomLeftRadius,
64
- bottomRight: style.borderBottomRightRadius
65
- })
66
- .zIndex(style.zIndex)
67
- .opacity(style.opacity)
68
- .linearGradient(style.linearGradient)
69
- .clip(style.overflow)
70
- .rotate({ centerX: style.transformOrigin?.x, centerY: style.transformOrigin?.y, angle: 0 })
71
- .scale({ centerX: style.transformOrigin?.x, centerY: style.transformOrigin?.y })
72
- .transform(style.transform)
73
- }
74
-
75
- @Extend(Row)
76
- function rowAttrs (style: TaroStyleType) {
77
- .id(style.id)
78
- .key(style.id)
79
- .flexGrow(style.flexGrow)
80
- .flexShrink(style.flexShrink)
81
- .flexBasis(style.flexBasis)
82
- .alignSelf(style.alignSelf)
83
- .padding({
84
- top: style.paddingTop,
85
- right: style.paddingRight,
86
- bottom: style.paddingBottom,
87
- left: style.paddingLeft
88
- })
89
- .margin({
90
- top: style.marginTop,
91
- right: style.marginRight,
92
- bottom: style.marginBottom,
93
- left: style.marginLeft
94
- })
95
- .width(style.width)
96
- .height(style.height)
97
- .constraintSize({
98
- minWidth: style.minWidth,
99
- maxWidth: style.maxWidth,
100
- minHeight: style.minHeight,
101
- maxHeight: style.maxHeight
102
- })
103
- .backgroundColor(style.backgroundColor)
104
- .backgroundImage(style.backgroundImage?.src, style.backgroundRepeat)
105
- .backgroundImageSize(style.backgroundSize)
106
- .backgroundImagePosition(style.backgroundPosition)
107
- .borderStyle({
108
- top: style.borderTopStyle,
109
- right: style.borderRightStyle,
110
- bottom: style.borderBottomStyle,
111
- left: style.borderLeftStyle
112
- })
113
- .borderWidth({
114
- top: style.borderTopWidth,
115
- right: style.borderRightWidth,
116
- bottom: style.borderBottomWidth,
117
- left: style.borderLeftWidth
118
- })
119
- .borderColor({
120
- top: style.borderTopColor,
121
- right: style.borderRightColor,
122
- bottom: style.borderBottomColor,
123
- left: style.borderLeftColor
124
- })
125
- .borderRadius({
126
- topLeft: style.borderTopLeftRadius,
127
- topRight: style.borderTopRightRadius,
128
- bottomLeft: style.borderBottomLeftRadius,
129
- bottomRight: style.borderBottomRightRadius
130
- })
131
- .zIndex(style.zIndex)
132
- .opacity(style.opacity)
133
- .linearGradient(style.linearGradient)
134
- .clip(style.overflow)
135
- .rotate({ centerX: style.transformOrigin?.x, centerY: style.transformOrigin?.y, angle: 0 })
136
- .scale({ centerX: style.transformOrigin?.x, centerY: style.transformOrigin?.y })
137
- .transform(style.transform)
138
- }
9
+ import type { TaroLabelElement, TaroElement, TaroAny, TaroRadioElement, TaroCheckboxElement } from '@tarojs/runtime'
139
10
 
140
11
  function handleTargetChange (id: string) {
141
12
  const taro: TaroAny = Current.taro
@@ -169,7 +40,7 @@ export default function TaroLabel (node: TaroLabelElement) {
169
40
  Row() {
170
41
  createLazyChildren(node)
171
42
  }
172
- .rowAttrs(getNormalAttributes(node))
43
+ .attributeModifier(commonStyleModify.setNode(node))
173
44
  .onClick((e: ClickEvent) => {
174
45
  const firstChild: TaroElement | null = node.childNodes[0] as TaroElement | null
175
46
  const id: string = node._attrs.for || firstChild?._attrs.id || firstChild?._nid || ''
@@ -188,7 +59,7 @@ export default function TaroLabel (node: TaroLabelElement) {
188
59
  Column() {
189
60
  createLazyChildren(node)
190
61
  }
191
- .columnAttrs(getNormalAttributes(node))
62
+ .attributeModifier(commonStyleModify.setNode(node))
192
63
  .onClick((e: ClickEvent) => {
193
64
  const firstChild: TaroElement | null = node.childNodes[0] as TaroElement | null
194
65
  const id: string = node._attrs.for || firstChild?._attrs.id || firstChild?._nid || ''
@@ -1,144 +1,15 @@
1
1
  import { AREA_CHANGE_EVENT_NAME, eventHandler, getComponentEventCallback, VISIBLE_CHANGE_EVENT_NAME, TaroPickerElement, createTaroEvent } from '@tarojs/runtime'
2
2
  import { createLazyChildren } from './render'
3
+ import commonStyleModify from './style'
3
4
  import { getSingleSelector, getMultiSelector } from './utils'
4
5
  import { TOUCH_EVENT_MAP } from './utils/constant/event'
5
6
  import { FlexManager } from './utils/FlexManager'
6
7
  import { getNormalAttributes, shouldBindEvent, getNodeThresholds } from './utils/helper'
7
8
 
8
- import type { TaroAny, TaroStyleType, TaroEvent } from '@tarojs/runtime'
9
+ import type { TaroAny, TaroEvent } from '@tarojs/runtime'
9
10
 
10
11
  import { PickerDateProps, PickerMultiSelectorProps, PickerSelectorProps, PickerTimeProps } from './types'
11
12
 
12
- @Extend(TextPicker)
13
- function textPickerAttrs (style: TaroStyleType) {
14
- .id(style.id)
15
- .key(style.id)
16
- .flexGrow(style.flexGrow)
17
- .flexShrink(style.flexShrink)
18
- .flexBasis(style.flexBasis)
19
- .alignSelf(style.alignSelf)
20
- .padding({
21
- top: style.paddingTop,
22
- right: style.paddingRight,
23
- bottom: style.paddingBottom,
24
- left: style.paddingLeft
25
- })
26
- .margin({
27
- top: style.marginTop,
28
- right: style.marginRight,
29
- bottom: style.marginBottom,
30
- left: style.marginLeft
31
- })
32
- .width(style.width || '100%')
33
- .height(style.height)
34
- .constraintSize({
35
- minWidth: style.minWidth,
36
- maxWidth: style.maxWidth,
37
- minHeight: style.minHeight,
38
- maxHeight: style.maxHeight
39
- })
40
- .backgroundColor(style.backgroundColor || '#fff')
41
- .backgroundImage(style.backgroundImage?.src, style.backgroundRepeat)
42
- .backgroundImageSize(style.backgroundSize)
43
- .backgroundImagePosition(style.backgroundPosition)
44
- .borderStyle({
45
- top: style.borderTopStyle,
46
- right: style.borderRightStyle,
47
- bottom: style.borderBottomStyle,
48
- left: style.borderLeftStyle
49
- })
50
- .borderWidth({
51
- top: style.borderTopWidth,
52
- right: style.borderRightWidth,
53
- bottom: style.borderBottomWidth,
54
- left: style.borderLeftWidth
55
- })
56
- .borderColor({
57
- top: style.borderTopColor,
58
- right: style.borderRightColor,
59
- bottom: style.borderBottomColor,
60
- left: style.borderLeftColor
61
- })
62
- .borderRadius({
63
- topLeft: style.borderTopLeftRadius,
64
- topRight: style.borderTopRightRadius,
65
- bottomLeft: style.borderBottomLeftRadius,
66
- bottomRight: style.borderBottomRightRadius
67
- })
68
- .zIndex(style.zIndex)
69
- .opacity(style.opacity)
70
- .linearGradient(style.linearGradient)
71
- .clip(style.overflow)
72
- .rotate({ centerX: style.transformOrigin?.x, centerY: style.transformOrigin?.y, angle: 0 })
73
- .scale({ centerX: style.transformOrigin?.x, centerY: style.transformOrigin?.y })
74
- .transform(style.transform)
75
- }
76
-
77
- @Extend(DatePicker)
78
- function datePickerAttrs (style: TaroStyleType) {
79
- .id(style.id)
80
- .key(style.id)
81
- .flexGrow(style.flexGrow)
82
- .flexShrink(style.flexShrink)
83
- .flexBasis(style.flexBasis)
84
- .alignSelf(style.alignSelf)
85
- .padding({
86
- top: style.paddingTop,
87
- right: style.paddingRight,
88
- bottom: style.paddingBottom,
89
- left: style.paddingLeft
90
- })
91
- .margin({
92
- top: style.marginTop,
93
- right: style.marginRight,
94
- bottom: style.marginBottom,
95
- left: style.marginLeft
96
- })
97
- .width(style.width || '100%')
98
- .height(style.height)
99
- .constraintSize({
100
- minWidth: style.minWidth,
101
- maxWidth: style.maxWidth,
102
- minHeight: style.minHeight,
103
- maxHeight: style.maxHeight
104
- })
105
- .backgroundColor(style.backgroundColor || '#fff')
106
- .backgroundImage(style.backgroundImage?.src, style.backgroundRepeat)
107
- .backgroundImageSize(style.backgroundSize)
108
- .backgroundImagePosition(style.backgroundPosition)
109
- .borderStyle({
110
- top: style.borderTopStyle,
111
- right: style.borderRightStyle,
112
- bottom: style.borderBottomStyle,
113
- left: style.borderLeftStyle
114
- })
115
- .borderWidth({
116
- top: style.borderTopWidth,
117
- right: style.borderRightWidth,
118
- bottom: style.borderBottomWidth,
119
- left: style.borderLeftWidth
120
- })
121
- .borderColor({
122
- top: style.borderTopColor,
123
- right: style.borderRightColor,
124
- bottom: style.borderBottomColor,
125
- left: style.borderLeftColor
126
- })
127
- .borderRadius({
128
- topLeft: style.borderTopLeftRadius,
129
- topRight: style.borderTopRightRadius,
130
- bottomLeft: style.borderBottomLeftRadius,
131
- bottomRight: style.borderBottomRightRadius
132
- })
133
- .zIndex(style.zIndex)
134
- .opacity(style.opacity)
135
- .linearGradient(style.linearGradient)
136
- .clip(style.overflow)
137
- .rotate({ centerX: style.transformOrigin?.x, centerY: style.transformOrigin?.y, angle: 0 })
138
- .scale({ centerX: style.transformOrigin?.x, centerY: style.transformOrigin?.y })
139
- .transform(style.transform)
140
- }
141
-
142
13
  interface TimeRange {
143
14
  startHH: number
144
15
  startMM: number
@@ -275,7 +146,9 @@ export struct PickerView {
275
146
  color: '#000'
276
147
  })
277
148
  .canLoop(false)
278
- .textPickerAttrs(getNormalAttributes(this.node))
149
+ .attributeModifier(commonStyleModify.setNode(this.node))
150
+ .width(getNormalAttributes(this.node).width || '100%')
151
+ .backgroundColor(getNormalAttributes(this.node).backgroundColor || '#fff')
279
152
  .onChange((_, index) => {
280
153
  this.node?.updateFormWidgetValue(index)
281
154
  })
@@ -285,7 +158,9 @@ export struct PickerView {
285
158
  color: '#000'
286
159
  })
287
160
  .canLoop(false)
288
- .textPickerAttrs(getNormalAttributes(this.node))
161
+ .attributeModifier(commonStyleModify.setNode(this.node))
162
+ .width(getNormalAttributes(this.node).width || '100%')
163
+ .backgroundColor(getNormalAttributes(this.node).backgroundColor || '#fff')
289
164
  .onChange((_, index) => {
290
165
  if (index instanceof Array) {
291
166
  this.node?.updateFormWidgetValue(index)
@@ -312,7 +187,9 @@ export struct PickerView {
312
187
  .selectedTextStyle({
313
188
  color: '#000'
314
189
  })
315
- .datePickerAttrs(getNormalAttributes(this.node))
190
+ .attributeModifier(commonStyleModify.setNode(this.node))
191
+ .width(getNormalAttributes(this.node).width || '100%')
192
+ .backgroundColor(getNormalAttributes(this.node).backgroundColor || '#fff')
316
193
  .onDateChange(value => {
317
194
  const data = value.toLocaleDateString().split('/')
318
195
  const day = data[1]
@@ -326,7 +203,9 @@ export struct PickerView {
326
203
  color: '#000'
327
204
  })
328
205
  .canLoop(false)
329
- .textPickerAttrs(getNormalAttributes(this.node))
206
+ .attributeModifier(commonStyleModify.setNode(this.node))
207
+ .width(getNormalAttributes(this.node).width || '100%')
208
+ .backgroundColor(getNormalAttributes(this.node).backgroundColor || '#fff')
330
209
  .onChange((value) => {
331
210
  this.node?.updateFormWidgetValue(`${('00'+value[0]).slice(-2)}:${('00'+value[1]).slice(-2)}`)
332
211
  })
@@ -1,82 +1,18 @@
1
1
  import { eventHandler, getComponentEventCallback, AREA_CHANGE_EVENT_NAME, VISIBLE_CHANGE_EVENT_NAME, createTaroEvent } from '@tarojs/runtime'
2
2
 
3
+ import commonStyleModify from './style'
3
4
  import { createLazyChildren } from './render'
4
5
  import { TOUCH_EVENT_MAP } from './utils/constant/event'
5
6
  import { FlexManager } from './utils/FlexManager'
6
- import { shouldBindEvent, getNormalAttributes, getNodeThresholds } from './utils/helper'
7
+ import { shouldBindEvent, getNodeThresholds } from './utils/helper'
7
8
 
8
- import { TaroEvent, TaroAny, TaroStyleType, HarmonyType, TaroRadioGroupElement, TaroRadioElement } from '@tarojs/runtime'
9
+ import { TaroEvent, TaroAny, HarmonyType, TaroRadioGroupElement, TaroRadioElement } from '@tarojs/runtime'
9
10
 
10
11
  interface RadioAttrs {
11
12
  radioStyle?: HarmonyType.RadioStyle
12
13
  themeStyles?: boolean
13
14
  }
14
15
 
15
- @Extend(Radio)
16
- function style (style: TaroStyleType) {
17
- .id(style.id)
18
- .key(style.id)
19
- .flexGrow(style.flexGrow)
20
- .flexShrink(style.flexShrink)
21
- .flexBasis(style.flexBasis)
22
- .alignSelf(style.alignSelf)
23
- .padding({
24
- top: style.paddingTop,
25
- right: style.paddingRight,
26
- bottom: style.paddingBottom,
27
- left: style.paddingLeft
28
- })
29
- .margin({
30
- top: style.marginTop,
31
- right: style.marginRight,
32
- bottom: style.marginBottom,
33
- left: style.marginLeft
34
- })
35
- .width(style.width)
36
- .height(style.height)
37
- .constraintSize({
38
- minWidth: style.minWidth,
39
- maxWidth: style.maxWidth,
40
- minHeight: style.minHeight,
41
- maxHeight: style.maxHeight
42
- })
43
- .backgroundColor(style.backgroundColor)
44
- .backgroundImage(style.backgroundImage?.src, style.backgroundRepeat)
45
- .backgroundImageSize(style.backgroundSize)
46
- .backgroundImagePosition(style.backgroundPosition)
47
- .borderStyle({
48
- top: style.borderTopStyle,
49
- right: style.borderRightStyle,
50
- bottom: style.borderBottomStyle,
51
- left: style.borderLeftStyle
52
- })
53
- .borderWidth({
54
- top: style.borderTopWidth,
55
- right: style.borderRightWidth,
56
- bottom: style.borderBottomWidth,
57
- left: style.borderLeftWidth
58
- })
59
- .borderColor({
60
- top: style.borderTopColor,
61
- right: style.borderRightColor,
62
- bottom: style.borderBottomColor,
63
- left: style.borderLeftColor
64
- })
65
- .borderRadius({
66
- topLeft: style.borderTopLeftRadius,
67
- topRight: style.borderTopRightRadius,
68
- bottomLeft: style.borderBottomLeftRadius,
69
- bottomRight: style.borderBottomRightRadius
70
- })
71
- .zIndex(style.zIndex)
72
- .opacity(style.opacity)
73
- .linearGradient(style.linearGradient)
74
- .clip(style.overflow)
75
- .rotate({ centerX: style.transformOrigin?.x, centerY: style.transformOrigin?.y, angle: 0 })
76
- .scale({ centerX: style.transformOrigin?.x, centerY: style.transformOrigin?.y })
77
- .transform(style.transform)
78
- }
79
-
80
16
  @Extend(Radio)
81
17
  function radioAttr (attr: RadioAttrs) {
82
18
  .radioStyle(attr.radioStyle)
@@ -117,7 +53,7 @@ export struct TaroRadio {
117
53
  value: this.node.value || '',
118
54
  })
119
55
  .checked(this.node.checked)
120
- .style(getNormalAttributes(this.node))
56
+ .attributeModifier(commonStyleModify.setNode(this.node))
121
57
  .radioAttr(getAttributes(this.node))
122
58
  .onChange((value: boolean) => {
123
59
  if (this.node) {
@@ -156,136 +92,6 @@ export struct TaroRadio {
156
92
  }
157
93
  }
158
94
 
159
- @Extend(Column)
160
- function radioGroupColumnAttrs (style: TaroStyleType) {
161
- .id(style.id)
162
- .key(style.id)
163
- .flexGrow(style.flexGrow)
164
- .flexShrink(style.flexShrink)
165
- .flexBasis(style.flexBasis)
166
- .alignSelf(style.alignSelf)
167
- .padding({
168
- top: style.paddingTop,
169
- right: style.paddingRight,
170
- bottom: style.paddingBottom,
171
- left: style.paddingLeft
172
- })
173
- .margin({
174
- top: style.marginTop,
175
- right: style.marginRight,
176
- bottom: style.marginBottom,
177
- left: style.marginLeft
178
- })
179
- .width(style.width)
180
- .height(style.height)
181
- .constraintSize({
182
- minWidth: style.minWidth,
183
- maxWidth: style.maxWidth,
184
- minHeight: style.minHeight,
185
- maxHeight: style.maxHeight
186
- })
187
- .backgroundColor(style.backgroundColor)
188
- .backgroundImage(style.backgroundImage?.src, style.backgroundRepeat)
189
- .backgroundImageSize(style.backgroundSize)
190
- .backgroundImagePosition(style.backgroundPosition)
191
- .borderStyle({
192
- top: style.borderTopStyle,
193
- right: style.borderRightStyle,
194
- bottom: style.borderBottomStyle,
195
- left: style.borderLeftStyle
196
- })
197
- .borderWidth({
198
- top: style.borderTopWidth,
199
- right: style.borderRightWidth,
200
- bottom: style.borderBottomWidth,
201
- left: style.borderLeftWidth
202
- })
203
- .borderColor({
204
- top: style.borderTopColor,
205
- right: style.borderRightColor,
206
- bottom: style.borderBottomColor,
207
- left: style.borderLeftColor
208
- })
209
- .borderRadius({
210
- topLeft: style.borderTopLeftRadius,
211
- topRight: style.borderTopRightRadius,
212
- bottomLeft: style.borderBottomLeftRadius,
213
- bottomRight: style.borderBottomRightRadius
214
- })
215
- .zIndex(style.zIndex)
216
- .opacity(style.opacity)
217
- .linearGradient(style.linearGradient)
218
- .clip(style.overflow)
219
- .rotate({ centerX: style.transformOrigin?.x, centerY: style.transformOrigin?.y, angle: 0 })
220
- .scale({ centerX: style.transformOrigin?.x, centerY: style.transformOrigin?.y })
221
- .transform(style.transform)
222
- }
223
-
224
- @Extend(Row)
225
- function radioGroupRowAttrs (style: TaroStyleType) {
226
- .id(style.id)
227
- .key(style.id)
228
- .flexGrow(style.flexGrow)
229
- .flexShrink(style.flexShrink)
230
- .flexBasis(style.flexBasis)
231
- .alignSelf(style.alignSelf)
232
- .padding({
233
- top: style.paddingTop,
234
- right: style.paddingRight,
235
- bottom: style.paddingBottom,
236
- left: style.paddingLeft
237
- })
238
- .margin({
239
- top: style.marginTop,
240
- right: style.marginRight,
241
- bottom: style.marginBottom,
242
- left: style.marginLeft
243
- })
244
- .width(style.width)
245
- .height(style.height)
246
- .constraintSize({
247
- minWidth: style.minWidth,
248
- maxWidth: style.maxWidth,
249
- minHeight: style.minHeight,
250
- maxHeight: style.maxHeight
251
- })
252
- .backgroundColor(style.backgroundColor)
253
- .backgroundImage(style.backgroundImage?.src, style.backgroundRepeat)
254
- .backgroundImageSize(style.backgroundSize)
255
- .backgroundImagePosition(style.backgroundPosition)
256
- .borderStyle({
257
- top: style.borderTopStyle,
258
- right: style.borderRightStyle,
259
- bottom: style.borderBottomStyle,
260
- left: style.borderLeftStyle
261
- })
262
- .borderWidth({
263
- top: style.borderTopWidth,
264
- right: style.borderRightWidth,
265
- bottom: style.borderBottomWidth,
266
- left: style.borderLeftWidth
267
- })
268
- .borderColor({
269
- top: style.borderTopColor,
270
- right: style.borderRightColor,
271
- bottom: style.borderBottomColor,
272
- left: style.borderLeftColor
273
- })
274
- .borderRadius({
275
- topLeft: style.borderTopLeftRadius,
276
- topRight: style.borderTopRightRadius,
277
- bottomLeft: style.borderBottomLeftRadius,
278
- bottomRight: style.borderBottomRightRadius
279
- })
280
- .zIndex(style.zIndex)
281
- .opacity(style.opacity)
282
- .linearGradient(style.linearGradient)
283
- .clip(style.overflow)
284
- .rotate({ centerX: style.transformOrigin?.x, centerY: style.transformOrigin?.y, angle: 0 })
285
- .scale({ centerX: style.transformOrigin?.x, centerY: style.transformOrigin?.y })
286
- .transform(style.transform)
287
- }
288
-
289
95
 
290
96
  @Component
291
97
  export struct TaroRadioGroup {
@@ -322,7 +128,7 @@ export struct TaroRadioGroup {
322
128
  Row() {
323
129
  createLazyChildren(this.node)
324
130
  }
325
- .radioGroupRowAttrs(getNormalAttributes(this.node))
131
+ .attributeModifier(commonStyleModify.setNode(this.node))
326
132
  .defaultEvent()
327
133
  .visibleChangeEvent()
328
134
  .alignItems(FlexManager.flexOptions(this.node).alignItems as VerticalAlign)
@@ -331,7 +137,7 @@ export struct TaroRadioGroup {
331
137
  Column() {
332
138
  createLazyChildren(this.node)
333
139
  }
334
- .radioGroupColumnAttrs(getNormalAttributes(this.node))
140
+ .attributeModifier(commonStyleModify.setNode(this.node))
335
141
  .defaultEvent()
336
142
  .visibleChangeEvent()
337
143
  .alignItems(FlexManager.flexOptions(this.node).alignItems as HorizontalAlign)