@tarojs/plugin-platform-harmony-ets 4.0.0-beta.95 → 4.0.0-beta.96

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.
@@ -152,7 +152,7 @@ export default struct TaroButton {
152
152
  }
153
153
  eventHandler(e, 'click', this.node)
154
154
  })
155
- .onTouch(shouldBindEvent((e: TouchEvent) => eventHandler(e, TOUCH_EVENT_MAP.get(e.type), this.node), this.node, TOUCH_EVENT_MAP.values()))
155
+ .onTouch(shouldBindEvent((e: TouchEvent) => { eventHandler(e, TOUCH_EVENT_MAP.get(e.type), this.node) }, this.node, TOUCH_EVENT_MAP.values()))
156
156
  .onAreaChange(getComponentEventCallback(this.node, AREA_CHANGE_EVENT_NAME, (res: TaroAny) => {
157
157
  this.node._nodeInfo.areaInfo = res[1]
158
158
  }))
@@ -74,7 +74,7 @@ export struct TaroCheckbox {
74
74
  }
75
75
  }
76
76
  })
77
- .onClick(shouldBindEvent((e: ClickEvent) => eventHandler(e, 'click', this.node), this.node, ['click']))
77
+ .onClick(shouldBindEvent((e: ClickEvent) => { eventHandler(e, 'click', this.node) }, this.node, ['click']))
78
78
  .onAreaChange(getComponentEventCallback(this.node, AREA_CHANGE_EVENT_NAME, (res: TaroAny) => {
79
79
  if (this.node) {
80
80
  this.node._nodeInfo.areaInfo = res[1]
@@ -121,7 +121,7 @@ export struct TaroCheckboxGroup {
121
121
  }
122
122
 
123
123
  @Styles defaultEvent () {
124
- .onClick(shouldBindEvent((e: ClickEvent) => eventHandler(e, 'click', this.node), this.node, ['click']))
124
+ .onClick(shouldBindEvent((e: ClickEvent) => { eventHandler(e, 'click', this.node) }, this.node, ['click']))
125
125
  .onAreaChange(getComponentEventCallback(this.node, AREA_CHANGE_EVENT_NAME, (res: TaroAny) => {
126
126
  if (this.node) {
127
127
  this.node._nodeInfo.areaInfo = res[1]
@@ -29,8 +29,8 @@ export default struct TaroForm {
29
29
  this.createLazyChildren(this.node, 0)
30
30
  }
31
31
  .attributeModifier(commonStyleModify.setNode(this.node).setAnimationStyle(this.overwriteStyle))
32
- .onClick(shouldBindEvent((e: ClickEvent) => eventHandler(e, 'click', this.node), this.node, ['click']))
33
- .onTouch(shouldBindEvent((e: TouchEvent) => eventHandler(e, TOUCH_EVENT_MAP.get(e.type), this.node), this.node, TOUCH_EVENT_MAP.values()))
32
+ .onClick(shouldBindEvent((e: ClickEvent) => { eventHandler(e, 'click', this.node) }, this.node, ['click']))
33
+ .onTouch(shouldBindEvent((e: TouchEvent) => { eventHandler(e, TOUCH_EVENT_MAP.get(e.type), this.node) }, this.node, TOUCH_EVENT_MAP.values()))
34
34
  .onAreaChange(getComponentEventCallback(this.node, AREA_CHANGE_EVENT_NAME, (res: TaroAny) => {
35
35
  this.node._nodeInfo.areaInfo = res[1]
36
36
  }))
@@ -40,8 +40,8 @@ export default struct TaroForm {
40
40
  this.createLazyChildren(this.node, 0)
41
41
  }
42
42
  .attributeModifier(rowModify.setNode(this.node).setAnimationStyle(this.overwriteStyle))
43
- .onClick(shouldBindEvent((e: ClickEvent) => eventHandler(e, 'click', this.node), this.node, ['click']))
44
- .onTouch(shouldBindEvent((e: TouchEvent) => eventHandler(e, TOUCH_EVENT_MAP.get(e.type), this.node), this.node, TOUCH_EVENT_MAP.values()))
43
+ .onClick(shouldBindEvent((e: ClickEvent) => { eventHandler(e, 'click', this.node) }, this.node, ['click']))
44
+ .onTouch(shouldBindEvent((e: TouchEvent) => { eventHandler(e, TOUCH_EVENT_MAP.get(e.type), this.node) }, this.node, TOUCH_EVENT_MAP.values()))
45
45
  .onAreaChange(getComponentEventCallback(this.node, AREA_CHANGE_EVENT_NAME, (res: TaroAny) => {
46
46
  this.node._nodeInfo.areaInfo = res[1]
47
47
  }))
@@ -51,8 +51,8 @@ export default struct TaroForm {
51
51
  this.createLazyChildren(this.node, 0)
52
52
  }
53
53
  .attributeModifier(columnModify.setNode(this.node).setAnimationStyle(this.overwriteStyle))
54
- .onClick(shouldBindEvent((e: ClickEvent) => eventHandler(e, 'click', this.node), this.node, ['click']))
55
- .onTouch(shouldBindEvent((e: TouchEvent) => eventHandler(e, TOUCH_EVENT_MAP.get(e.type), this.node), this.node, TOUCH_EVENT_MAP.values()))
54
+ .onClick(shouldBindEvent((e: ClickEvent) => { eventHandler(e, 'click', this.node) }, this.node, ['click']))
55
+ .onTouch(shouldBindEvent((e: TouchEvent) => { eventHandler(e, TOUCH_EVENT_MAP.get(e.type), this.node) }, this.node, TOUCH_EVENT_MAP.values()))
56
56
  .onAreaChange(getComponentEventCallback(this.node, AREA_CHANGE_EVENT_NAME, (res: TaroAny) => {
57
57
  this.node._nodeInfo.areaInfo = res[1]
58
58
  }))
@@ -70,8 +70,8 @@ export default struct TaroIcon {
70
70
  width: Number(this.node._attrs.size) || 23,
71
71
  height: Number(this.node._attrs.size) || 23
72
72
  })
73
- .onComplete(e => eventHandler(e, 'complete', this.node))
74
- .onClick(shouldBindEvent((e: ClickEvent) => eventHandler(e, 'click', this.node), this.node, ['click']))
73
+ .onComplete(e => { eventHandler(e, 'complete', this.node) })
74
+ .onClick(shouldBindEvent((e: ClickEvent) => { eventHandler(e, 'click', this.node) }, this.node, ['click']))
75
75
  .onVisibleAreaChange(getNodeThresholds(this.node) || [0.0, 1.0], getComponentEventCallback(this.node, VISIBLE_CHANGE_EVENT_NAME))
76
76
  .onAreaChange(getComponentEventCallback(this.node, AREA_CHANGE_EVENT_NAME, (res: TaroAny) => {
77
77
  this.node._nodeInfo.areaInfo = res[1]
@@ -31,13 +31,13 @@ export default struct TaroImage {
31
31
 
32
32
  build() {
33
33
  Image(this.node.getAttribute('src'))
34
- .onClick(shouldBindEvent((e: ClickEvent) => eventHandler(e, 'click', this.node), this.node, ['click']))
34
+ .onClick(shouldBindEvent((e: ClickEvent) => { eventHandler(e, 'click', this.node) }, this.node, ['click']))
35
35
  .onAreaChange(getComponentEventCallback(this.node, AREA_CHANGE_EVENT_NAME, (res: TaroAny) => {
36
36
  this.node._nodeInfo.areaInfo = res[1]
37
37
  }))
38
38
  .objectFit(getImageMode(this.node.getAttribute('mode')))
39
39
  .attributeModifier(commonStyleModify.setNode(this.node).setAnimationStyle(this.overwriteStyle))
40
- .onComplete(e => eventHandler(e, 'complete', this.node))
40
+ .onComplete(e => { eventHandler(e, 'complete', this.node) })
41
41
  .onVisibleAreaChange(getNodeThresholds(this.node) || [0.0, 1.0], getComponentEventCallback(this.node, VISIBLE_CHANGE_EVENT_NAME))
42
42
  // TODO: 临时改为申明式,后续等鸿蒙修复modify设置失败的bug后删除该申明
43
43
  .borderRadius({
@@ -93,7 +93,7 @@ export default struct TaroInput {
93
93
  const event: TaroEvent = createTaroEvent('confirm', { detail: { value: this.value } }, this.node)
94
94
  eventHandler(event, 'confirm', this.node)
95
95
  })
96
- .onClick(shouldBindEvent((e: ClickEvent) => eventHandler(e, 'click', this.node), this.node, ['click']))
96
+ .onClick(shouldBindEvent((e: ClickEvent) => { eventHandler(e, 'click', this.node) }, this.node, ['click']))
97
97
  .onBlur(() => {
98
98
  const event: TaroEvent = createTaroEvent('blur', { detail: { value: this.value } }, this.node)
99
99
  eventHandler(event, 'blur', this.node)
@@ -61,7 +61,7 @@ export default struct TaroLabel {
61
61
  handleTargetChange(id)
62
62
  eventHandler(e, 'click', this.node)
63
63
  })
64
- .onTouch(shouldBindEvent((e: TouchEvent) => eventHandler(e, TOUCH_EVENT_MAP.get(e.type), this.node), this.node, TOUCH_EVENT_MAP.values()))
64
+ .onTouch(shouldBindEvent((e: TouchEvent) => { eventHandler(e, TOUCH_EVENT_MAP.get(e.type), this.node) }, this.node, TOUCH_EVENT_MAP.values()))
65
65
  .onAreaChange(getComponentEventCallback(this.node, AREA_CHANGE_EVENT_NAME, (res: TaroAny) => {
66
66
  this.node._nodeInfo.areaInfo = res[1]
67
67
  }))
@@ -78,7 +78,7 @@ export default struct TaroLabel {
78
78
  handleTargetChange(id)
79
79
  eventHandler(e, 'click', this.node)
80
80
  })
81
- .onTouch(shouldBindEvent((e: TouchEvent) => eventHandler(e, TOUCH_EVENT_MAP.get(e.type), this.node), this.node, TOUCH_EVENT_MAP.values()))
81
+ .onTouch(shouldBindEvent((e: TouchEvent) => { eventHandler(e, TOUCH_EVENT_MAP.get(e.type), this.node) }, this.node, TOUCH_EVENT_MAP.values()))
82
82
  .onAreaChange(getComponentEventCallback(this.node, AREA_CHANGE_EVENT_NAME, (res: TaroAny) => {
83
83
  this.node._nodeInfo.areaInfo = res[1]
84
84
  }))
@@ -95,7 +95,7 @@ export default struct TaroLabel {
95
95
  handleTargetChange(id)
96
96
  eventHandler(e, 'click', this.node)
97
97
  })
98
- .onTouch(shouldBindEvent((e: TouchEvent) => eventHandler(e, TOUCH_EVENT_MAP.get(e.type), this.node), this.node, TOUCH_EVENT_MAP.values()))
98
+ .onTouch(shouldBindEvent((e: TouchEvent) => { eventHandler(e, TOUCH_EVENT_MAP.get(e.type), this.node) }, this.node, TOUCH_EVENT_MAP.values()))
99
99
  .onAreaChange(getComponentEventCallback(this.node, AREA_CHANGE_EVENT_NAME, (res: TaroAny) => {
100
100
  this.node._nodeInfo.areaInfo = res[1]
101
101
  }))
@@ -20,12 +20,12 @@ export default struct TaroNavigationBar {
20
20
  }
21
21
 
22
22
  // FIXME 在 Harmony 提供 @Watch 文档后,根据 node 实际使用更细粒度的监听
23
- eventCenter.on('__taroComponentAttributeUpdate', this.handleAttributeUpdate)
23
+ eventCenter?.on('__taroComponentAttributeUpdate', this.handleAttributeUpdate)
24
24
  this.handleAttributes(this.node._attrs)
25
25
  }
26
26
 
27
27
  aboutToDisappear(): void {
28
- eventCenter.off('__taroComponentAttributeUpdate', this.handleAttributeUpdate)
28
+ eventCenter?.off('__taroComponentAttributeUpdate', this.handleAttributeUpdate)
29
29
  }
30
30
 
31
31
  handleAttributeUpdate = (opt: IComponentAttributeUpdateEvents) => {
@@ -51,7 +51,7 @@ export default struct TaroNavigationBar {
51
51
  if (attrs.frontColor) {
52
52
  options.frontColor = attrs.frontColor
53
53
  }
54
- eventCenter.trigger('__taroNavigationStyle', options)
54
+ eventCenter?.trigger('__taroNavigationStyle', options)
55
55
  // FIXME: 以下属性暂时不支持
56
56
  // attrs.colorAnimationDuration
57
57
  // attrs.colorAnimationTimingFunc
@@ -298,7 +298,7 @@ export default struct TaroPicker {
298
298
  .onClick((e: ClickEvent) => {
299
299
  eventHandler(e, 'click', this.node)
300
300
  })
301
- .onTouch(shouldBindEvent((e: TouchEvent) => eventHandler(e, TOUCH_EVENT_MAP.get(e.type), this.node), this.node, TOUCH_EVENT_MAP.values()))
301
+ .onTouch(shouldBindEvent((e: TouchEvent) => { eventHandler(e, TOUCH_EVENT_MAP.get(e.type), this.node) }, this.node, TOUCH_EVENT_MAP.values()))
302
302
  .onAreaChange(getComponentEventCallback(this.node, AREA_CHANGE_EVENT_NAME, (res: TaroAny) => {
303
303
  if (this.node) {
304
304
  this.node._nodeInfo.areaInfo = res[1]
@@ -35,7 +35,7 @@ export default struct TaroProgress {
35
35
  enableSmoothEffect: Boolean(this.node.getAttribute('active')),
36
36
  })
37
37
 
38
- .onClick(shouldBindEvent((e: ClickEvent) => eventHandler(e, 'click', this.node), this.node, ['click']))
38
+ .onClick(shouldBindEvent((e: ClickEvent) => { eventHandler(e, 'click', this.node) }, this.node, ['click']))
39
39
  .onVisibleAreaChange(getNodeThresholds(this.node) || [0.0, 1.0], getComponentEventCallback(this.node, VISIBLE_CHANGE_EVENT_NAME))
40
40
  .onAreaChange(getComponentEventCallback(this.node, AREA_CHANGE_EVENT_NAME, (res: TaroAny) => {
41
41
  if (this.node) {
@@ -75,7 +75,7 @@ export struct TaroRadio {
75
75
  }
76
76
  }
77
77
  })
78
- .onClick(shouldBindEvent((e: ClickEvent) => eventHandler(e, 'click', this.node), this.node, ['click']))
78
+ .onClick(shouldBindEvent((e: ClickEvent) => { eventHandler(e, 'click', this.node) }, this.node, ['click']))
79
79
  .onAreaChange(getComponentEventCallback(this.node, AREA_CHANGE_EVENT_NAME, (res: TaroAny) => {
80
80
  if (this.node) {
81
81
  this.node._nodeInfo.areaInfo = res[1]
@@ -122,8 +122,8 @@ export struct TaroRadioGroup {
122
122
  }
123
123
 
124
124
  @Styles defaultEvent () {
125
- .onClick(shouldBindEvent((e: ClickEvent) => eventHandler(e, 'click', this.node), this.node, ['click']))
126
- .onTouch(shouldBindEvent((e: TouchEvent) => eventHandler(e, TOUCH_EVENT_MAP.get(e.type), this.node), this.node, TOUCH_EVENT_MAP.values()))
125
+ .onClick(shouldBindEvent((e: ClickEvent) => { eventHandler(e, 'click', this.node) }, this.node, ['click']))
126
+ .onTouch(shouldBindEvent((e: TouchEvent) => { eventHandler(e, TOUCH_EVENT_MAP.get(e.type), this.node) }, this.node, TOUCH_EVENT_MAP.values()))
127
127
  .onAreaChange(getComponentEventCallback(this.node, AREA_CHANGE_EVENT_NAME, (res: TaroAny) => {
128
128
  if (this.node) {
129
129
  this.node._nodeInfo.areaInfo = res[1]
@@ -15,7 +15,7 @@ export default struct TaroRichText {
15
15
  build () {
16
16
  RichText(generateText(this.node))
17
17
  .attributeModifier(commonStyleModify.setNode(this.node))
18
- .onClick(shouldBindEvent((e: ClickEvent) => eventHandler(e, 'click', this.node), this.node, ['click']))
18
+ .onClick(shouldBindEvent((e: ClickEvent) => { eventHandler(e, 'click', this.node) }, this.node, ['click']))
19
19
  .onAreaChange(getComponentEventCallback(this.node, AREA_CHANGE_EVENT_NAME, (res: TaroAny) => {
20
20
  this.node._nodeInfo.areaInfo = res[1]
21
21
  }))
@@ -87,8 +87,8 @@ export default struct TaroScrollList {
87
87
  })
88
88
  })
89
89
  })
90
- .onClick(shouldBindEvent((e: ClickEvent) => eventHandler(e, 'click', this.node), this.node, ['click']))
91
- .onTouch(shouldBindEvent((e: TouchEvent) => eventHandler(e, TOUCH_EVENT_MAP.get(e.type), this.node), this.node, TOUCH_EVENT_MAP.values()))
90
+ .onClick(shouldBindEvent((e: ClickEvent) => { eventHandler(e, 'click', this.node) }, this.node, ['click']))
91
+ .onTouch(shouldBindEvent((e: TouchEvent) => { eventHandler(e, TOUCH_EVENT_MAP.get(e.type), this.node) }, this.node, TOUCH_EVENT_MAP.values()))
92
92
  .onAreaChange(getComponentEventCallback(this.node, AREA_CHANGE_EVENT_NAME, (res: TaroAny) => {
93
93
  this.node._nodeInfo.areaInfo = res[1]
94
94
  }))
@@ -117,8 +117,8 @@ export default struct TaroScrollView {
117
117
  .clip(true)
118
118
  .scrollable(getScrollable(this.node))
119
119
  .scrollBar(getAttributes(this.node).scrollBar)
120
- .onClick(shouldBindEvent((e: ClickEvent) => eventHandler(e, 'click', this.node), this.node, ['click']))
121
- .onTouch(shouldBindEvent((e: TouchEvent) => eventHandler(e, TOUCH_EVENT_MAP.get(e.type), this.node), this.node, TOUCH_EVENT_MAP.values()))
120
+ .onClick(shouldBindEvent((e: ClickEvent) => { eventHandler(e, 'click', this.node) }, this.node, ['click']))
121
+ .onTouch(shouldBindEvent((e: TouchEvent) => { eventHandler(e, TOUCH_EVENT_MAP.get(e.type), this.node) }, this.node, TOUCH_EVENT_MAP.values()))
122
122
  .onAreaChange(getComponentEventCallback(this.node, AREA_CHANGE_EVENT_NAME, (res: TaroAny) => {
123
123
  this.node._nodeInfo.areaInfo = res[1]
124
124
  }))
@@ -90,7 +90,7 @@ export default struct TaroSlider {
90
90
  }
91
91
  }
92
92
  })
93
- .onClick(shouldBindEvent((e: ClickEvent) => eventHandler(e, 'click', this.node), this.node, ['click']))
93
+ .onClick(shouldBindEvent((e: ClickEvent) => { eventHandler(e, 'click', this.node) }, this.node, ['click']))
94
94
  .onAreaChange(getComponentEventCallback(this.node, AREA_CHANGE_EVENT_NAME, (res: TaroAny) => {
95
95
  if (this.node) {
96
96
  this.node._nodeInfo.areaInfo = res[1]
@@ -72,7 +72,7 @@ export default struct TaroSwiper {
72
72
  const event: TaroEvent = createTaroEvent('change', { detail: { current: index } }, this.node)
73
73
  eventHandler(event, 'change', this.node)
74
74
  })
75
- .onClick(shouldBindEvent((e: ClickEvent) => eventHandler(e, 'click', this.node), this.node, ['click']))
75
+ .onClick(shouldBindEvent((e: ClickEvent) => { eventHandler(e, 'click', this.node) }, this.node, ['click']))
76
76
  .onAreaChange(getComponentEventCallback(this.node, AREA_CHANGE_EVENT_NAME, (res: TaroAny) => {
77
77
  this.node._nodeInfo.areaInfo = res[1]
78
78
  }))
@@ -63,7 +63,7 @@ export default struct TaroSwitch {
63
63
  }
64
64
  }
65
65
  })
66
- .onClick(shouldBindEvent((e: ClickEvent) => eventHandler(e, 'click', this.node), this.node, ['click']))
66
+ .onClick(shouldBindEvent((e: ClickEvent) => { eventHandler(e, 'click', this.node) }, this.node, ['click']))
67
67
  .onAreaChange(getComponentEventCallback(this.node, AREA_CHANGE_EVENT_NAME, (res: TaroAny) => {
68
68
  if (this.node) {
69
69
  this.node._nodeInfo.areaInfo = res[1]
@@ -64,7 +64,7 @@ export default struct TaroText {
64
64
  }, (item: TaroElement) => `${item._nid}${this.node._updateTrigger}`)
65
65
  }
66
66
  }
67
- .onClick(shouldBindEvent((e: ClickEvent) => eventHandler(e, 'click', this.node), this.node, ['click']))
67
+ .onClick(shouldBindEvent((e: ClickEvent) => { eventHandler(e, 'click', this.node) }, this.node, ['click']))
68
68
  .attributeModifier(textModify.setNode(this.node).withNormalStyle().setAnimationStyle(this.overwriteStyle))
69
69
  .onVisibleAreaChange(getNodeThresholds(this.node) || [0.0, 1.0], getComponentEventCallback(this.node, VISIBLE_CHANGE_EVENT_NAME))
70
70
  .onAreaChange(getComponentEventCallback(this.node, AREA_CHANGE_EVENT_NAME, (res: TaroAny) => {
@@ -110,7 +110,7 @@ function createTextChildNode (item: TaroElement) {
110
110
  bottomLeft: item._st.hmStyle.borderBottomLeftRadius,
111
111
  bottomRight: item._st.hmStyle.borderBottomRightRadius
112
112
  })
113
- .onClick(shouldBindEvent((e: ClickEvent) => eventHandler(e, 'click', item), item, ['click']))
113
+ .onClick(shouldBindEvent((e: ClickEvent) => { eventHandler(e, 'click', item) }, item, ['click']))
114
114
  } else if (item.nodeType === NodeType.TEXT_NODE) {
115
115
  Span(item.textContent)
116
116
  } else if (item.tagName === 'TEXT') {
@@ -126,7 +126,7 @@ function createTextChildNode (item: TaroElement) {
126
126
  bottomRight: item._st.hmStyle.borderBottomRightRadius,
127
127
  }
128
128
  })
129
- .onClick(shouldBindEvent((e: ClickEvent) => eventHandler(e, 'click', item), item, ['click']))
129
+ .onClick(shouldBindEvent((e: ClickEvent) => { eventHandler(e, 'click', item) }, item, ['click']))
130
130
  }
131
131
  }
132
132
 
@@ -76,7 +76,7 @@ export default struct TaroTextArea {
76
76
  this.node?.updateFormWidgetValue(value)
77
77
  eventHandler(event, 'input', this.node)
78
78
  })
79
- .onClick(shouldBindEvent((e: ClickEvent) => eventHandler(e, 'click', this.node), this.node, ['click']))
79
+ .onClick(shouldBindEvent((e: ClickEvent) => { eventHandler(e, 'click', this.node) }, this.node, ['click']))
80
80
  .onBlur(() => {
81
81
  const event: TaroEvent = createTaroEvent('blur', { detail: { value: this.value } }, this.node)
82
82
  eventHandler(event, 'blur', this.node)
@@ -2,8 +2,7 @@ import { VIEW } from '@tarojs/runtime/dist/runtime.esm'
2
2
 
3
3
  import { getNormalAttributes, getFontAttributes, getStyleAttr } from './styles'
4
4
 
5
- import type { TFunc } from '@tarojs/runtime/dist/runtime.esm'
6
- import type { TaroElement, TaroNode } from '@tarojs/runtime'
5
+ import type { TaroElement, TaroNode, TaroAny } from '@tarojs/runtime'
7
6
 
8
7
  export const parseStyles = (styles = ''): Record<string, string> => {
9
8
  const styleObj: Record<string, string> = {}
@@ -22,7 +21,7 @@ export const parseStyles = (styles = ''): Record<string, string> => {
22
21
  return styleObj
23
22
  }
24
23
 
25
- export function shouldBindEvent (cb: TFunc, node: TaroElement | null, eventNames: string[], disabled = false) {
24
+ export function shouldBindEvent (cb: TaroAny, node: TaroElement | null, eventNames: string[], disabled = false): TaroAny {
26
25
  if (!node || node._attrs?.disabled || disabled) return null
27
26
  if (!node.__listeners) {
28
27
  return null
@@ -105,7 +105,7 @@ export default struct TaroVideo {
105
105
  .onSeeked(shouldBindEvent(() => { emitEvent(this.node, 'seeked') }, this.node, ['seeked']))
106
106
  .onFullscreenChange(shouldBindEvent((e: TaroAny) => { emitEvent(this.node, 'fullScreenChange', { fullScreen: e.fullscreen}) }, this.node, ['fullscreenchange']))
107
107
  .onClick((e: ClickEvent) => { eventHandler(e, 'click', this.node) })
108
- .onTouch(shouldBindEvent((e: TouchEvent) => eventHandler(e, TOUCH_EVENT_MAP.get(e.type), this.node), this.node, TOUCH_EVENT_MAP.values()))
108
+ .onTouch(shouldBindEvent((e: TouchEvent) => { eventHandler(e, TOUCH_EVENT_MAP.get(e.type), this.node) }, this.node, TOUCH_EVENT_MAP.values()))
109
109
  .onAreaChange(getComponentEventCallback(this.node, AREA_CHANGE_EVENT_NAME, (res: TaroAny) => {
110
110
  this.node._nodeInfo.areaInfo = res[1]
111
111
  }))
@@ -32,8 +32,8 @@ export default struct TaroView {
32
32
  }
33
33
  }
34
34
  .attributeModifier(commonStyleModify.setNode(this.node).setAnimationStyle(this.overwriteStyle))
35
- .onClick(shouldBindEvent((e: ClickEvent) => eventHandler(e, 'click', this.node), this.node, ['click']))
36
- .onTouch(shouldBindEvent((e: TouchEvent) => eventHandler(e, TOUCH_EVENT_MAP.get(e.type), this.node), this.node, TOUCH_EVENT_MAP.values()))
35
+ .onClick(shouldBindEvent((e: ClickEvent) => { eventHandler(e, 'click', this.node) }, this.node, ['click']))
36
+ .onTouch(shouldBindEvent((e: TouchEvent) => { eventHandler(e, TOUCH_EVENT_MAP.get(e.type), this.node) }, this.node, TOUCH_EVENT_MAP.values()))
37
37
  .onAreaChange(getComponentEventCallback(this.node, AREA_CHANGE_EVENT_NAME, (res: TaroAny) => {
38
38
  this.node._nodeInfo.areaInfo = res[1]
39
39
  }))
@@ -47,8 +47,8 @@ export default struct TaroView {
47
47
  }
48
48
  }
49
49
  .attributeModifier(rowModify.setNode(this.node).setAnimationStyle(this.overwriteStyle))
50
- .onClick(shouldBindEvent((e: ClickEvent) => eventHandler(e, 'click', this.node), this.node, ['click']))
51
- .onTouch(shouldBindEvent((e: TouchEvent) => eventHandler(e, TOUCH_EVENT_MAP.get(e.type), this.node), this.node, TOUCH_EVENT_MAP.values()))
50
+ .onClick(shouldBindEvent((e: ClickEvent) => { eventHandler(e, 'click', this.node) }, this.node, ['click']))
51
+ .onTouch(shouldBindEvent((e: TouchEvent) => { eventHandler(e, TOUCH_EVENT_MAP.get(e.type), this.node) }, this.node, TOUCH_EVENT_MAP.values()))
52
52
  .onAreaChange(getComponentEventCallback(this.node, AREA_CHANGE_EVENT_NAME, (res: TaroAny) => {
53
53
  this.node._nodeInfo.areaInfo = res[1]
54
54
  }))
@@ -62,8 +62,8 @@ export default struct TaroView {
62
62
  }
63
63
  }
64
64
  .attributeModifier(columnModify.setNode(this.node).setAnimationStyle(this.overwriteStyle))
65
- .onClick(shouldBindEvent((e: ClickEvent) => eventHandler(e, 'click', this.node), this.node, ['click']))
66
- .onTouch(shouldBindEvent((e: TouchEvent) => eventHandler(e, TOUCH_EVENT_MAP.get(e.type), this.node), this.node, TOUCH_EVENT_MAP.values()))
65
+ .onClick(shouldBindEvent((e: ClickEvent) => { eventHandler(e, 'click', this.node) }, this.node, ['click']))
66
+ .onTouch(shouldBindEvent((e: TouchEvent) => { eventHandler(e, TOUCH_EVENT_MAP.get(e.type), this.node) }, this.node, TOUCH_EVENT_MAP.values()))
67
67
  .onAreaChange(getComponentEventCallback(this.node, AREA_CHANGE_EVENT_NAME, (res: TaroAny) => {
68
68
  this.node._nodeInfo.areaInfo = res[1]
69
69
  }))
@@ -47,7 +47,7 @@ export default struct TaroWebView {
47
47
 
48
48
  eventHandler(event, 'error', this.node)
49
49
  }, this.node, ['error']))
50
- .onClick(shouldBindEvent((e: ClickEvent) => eventHandler(e, 'click', this.node), this.node, ['click']))
50
+ .onClick(shouldBindEvent((e: ClickEvent) => { eventHandler(e, 'click', this.node) }, this.node, ['click']))
51
51
  .onAreaChange(getComponentEventCallback(this.node, AREA_CHANGE_EVENT_NAME, (res: TaroAny) => {
52
52
  this.node._nodeInfo.areaInfo = res[1]
53
53
  }))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tarojs/plugin-platform-harmony-ets",
3
- "version": "4.0.0-beta.95",
3
+ "version": "4.0.0-beta.96",
4
4
  "description": "OpenHarmony & 鸿蒙系统插件",
5
5
  "author": "O2Team",
6
6
  "homepage": "https://gitee.com/openharmony-sig/taro",
@@ -27,13 +27,13 @@
27
27
  "webpack-sources": "^3.2.3",
28
28
  "@babel/preset-react": "^7.24.1",
29
29
  "webpack": "5.91.0",
30
- "@tarojs/helper": "4.0.0-beta.95",
31
- "@tarojs/components": "4.0.0-beta.95",
32
- "@tarojs/runner-utils": "4.0.0-beta.95",
33
- "@tarojs/service": "4.0.0-beta.95",
34
- "@tarojs/runtime": "4.0.0-beta.95",
35
- "@tarojs/shared": "4.0.0-beta.95",
36
- "@tarojs/taro": "4.0.0-beta.95"
30
+ "@tarojs/components": "4.0.0-beta.96",
31
+ "@tarojs/runner-utils": "4.0.0-beta.96",
32
+ "@tarojs/service": "4.0.0-beta.96",
33
+ "@tarojs/runtime": "4.0.0-beta.96",
34
+ "@tarojs/shared": "4.0.0-beta.96",
35
+ "@tarojs/taro": "4.0.0-beta.96",
36
+ "@tarojs/helper": "4.0.0-beta.96"
37
37
  },
38
38
  "devDependencies": {
39
39
  "fast-glob": "^3.3.1",
@@ -42,7 +42,7 @@
42
42
  "rollup-plugin-ts": "^3.0.2",
43
43
  "solid-js": "^1.8.16",
44
44
  "tslib": "^2.4.0",
45
- "rollup-plugin-copy": "4.0.0-beta.95"
45
+ "rollup-plugin-copy": "4.0.0-beta.96"
46
46
  },
47
47
  "scripts": {
48
48
  "prod": "pnpm run build",