@tarojs/plugin-platform-harmony-ets 3.7.0-alpha.27 → 4.0.0-alpha.10
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.
- package/dist/apis/apis.ts +6 -2
- package/dist/apis/base/crypto.ts +4 -0
- package/dist/apis/base/debug.ts +5 -0
- package/dist/apis/base/index.ts +9 -1
- package/dist/apis/base/performance.ts +8 -0
- package/dist/apis/base/system.ts +74 -21
- package/dist/apis/base/update.ts +5 -0
- package/dist/apis/base/weapp/app-event.ts +75 -0
- package/dist/apis/base/weapp/life-cycle.ts +21 -0
- package/dist/apis/canvas/index.ts +27 -0
- package/dist/apis/data-analysis/index.ts +6 -0
- package/dist/apis/device/accelerometer.ts +2 -1
- package/dist/apis/device/accessibility.ts +4 -0
- package/dist/apis/device/battery.ts +2 -2
- package/dist/apis/device/bluetooth-ble.ts +19 -0
- package/dist/apis/device/bluetooth-peripheral.ts +6 -0
- package/dist/apis/device/bluetooth.ts +16 -0
- package/dist/apis/device/calendar.ts +5 -0
- package/dist/apis/device/clipboard.ts +17 -9
- package/dist/apis/device/compass.ts +21 -0
- package/dist/apis/device/contact.ts +5 -0
- package/dist/apis/device/crypto.ts +4 -0
- package/dist/apis/device/gyroscope.ts +7 -0
- package/dist/apis/device/iBeacon.ts +10 -0
- package/dist/apis/device/index.ts +15 -0
- package/dist/apis/device/keyboard.ts +2 -1
- package/dist/apis/device/memory.ts +10 -3
- package/dist/apis/device/motion.ts +6 -0
- package/dist/apis/device/network.ts +26 -9
- package/dist/apis/device/nfc.ts +10 -0
- package/dist/apis/device/phone.ts +2 -1
- package/dist/apis/device/scan.ts +4 -0
- package/dist/apis/device/screen.ts +2 -1
- package/dist/apis/device/sms.ts +4 -0
- package/dist/apis/device/vibrate.ts +19 -11
- package/dist/apis/device/wifi.ts +15 -0
- package/dist/apis/ext/index.ts +5 -0
- package/dist/apis/files/index.ts +2 -1
- package/dist/apis/files/manager.ts +2 -1
- package/dist/apis/framework/index.ts +3 -8
- package/dist/apis/index.ts +27 -17
- package/dist/apis/location/index.ts +61 -68
- package/dist/apis/media/EditorContext.ts +32 -0
- package/dist/apis/media/audio/index.ts +18 -0
- package/dist/apis/media/background-audio/index.ts +16 -0
- package/dist/apis/media/camera.ts +16 -0
- package/dist/apis/media/common.ts +2 -1
- package/dist/apis/media/{image.ts → image/index.ts} +4 -3
- package/dist/apis/media/index.ts +10 -0
- package/dist/apis/media/live.ts +5 -0
- package/dist/apis/media/map.ts +4 -0
- package/dist/apis/media/media-recorder.ts +4 -0
- package/dist/apis/media/recorder.ts +6 -0
- package/dist/apis/media/video/VideoContext.ts +68 -0
- package/dist/apis/media/{video.ts → video/index.ts} +13 -2
- package/dist/apis/media/video-decoder.ts +4 -0
- package/dist/apis/media/video-processing.ts +4 -0
- package/dist/apis/media/voip.ts +19 -0
- package/dist/apis/network/index.ts +3 -0
- package/dist/apis/network/mdns.ts +13 -0
- package/dist/apis/network/request.ts +7 -6
- package/dist/apis/network/tcp.ts +4 -0
- package/dist/apis/network/udp.ts +4 -0
- package/dist/apis/network/webSocket.ts +2 -6
- package/dist/apis/open-api/account.ts +4 -0
- package/dist/apis/open-api/address.ts +4 -0
- package/dist/apis/open-api/authorize.ts +5 -0
- package/dist/apis/open-api/card.ts +5 -0
- package/dist/apis/open-api/channels-live.ts +11 -0
- package/dist/apis/open-api/customer-service.ts +4 -0
- package/dist/apis/open-api/device-voip.ts +5 -0
- package/dist/apis/open-api/facial.ts +7 -0
- package/dist/apis/open-api/favorites.ts +5 -0
- package/dist/apis/open-api/group.ts +4 -0
- package/dist/apis/open-api/index.ts +20 -6
- package/dist/apis/open-api/invoice.ts +5 -0
- package/dist/apis/open-api/license-plate.ts +4 -0
- package/dist/apis/open-api/login.ts +6 -0
- package/dist/apis/open-api/my-miniprogram.ts +4 -0
- package/dist/apis/open-api/privacy.ts +7 -0
- package/dist/apis/open-api/red-package.ts +4 -0
- package/dist/apis/open-api/settings.ts +5 -0
- package/dist/apis/open-api/soter.ts +6 -0
- package/dist/apis/open-api/subscribe-message.ts +6 -0
- package/dist/apis/open-api/{user-info/index.ts → user-info.ts} +1 -16
- package/dist/apis/open-api/werun.ts +5 -0
- package/dist/apis/payment/index.ts +6 -0
- package/dist/apis/route/index.ts +19 -28
- package/dist/apis/share/index.ts +33 -0
- package/dist/apis/storage/background-fetch.ts +7 -0
- package/dist/apis/storage/cache-manager.ts +4 -0
- package/dist/apis/storage/index.ts +158 -88
- package/dist/apis/ui/{animation.ts → animation/animation.ts} +73 -31
- package/dist/apis/ui/animation/index.ts +7 -0
- package/dist/apis/ui/background.ts +4 -19
- package/dist/apis/ui/custom-component.ts +8 -0
- package/dist/apis/ui/fonts.ts +4 -0
- package/dist/apis/ui/index.ts +8 -10
- package/dist/apis/ui/interaction/index.ts +45 -59
- package/dist/apis/ui/menu.ts +4 -0
- package/dist/apis/ui/navigation-bar/index.ts +60 -21
- package/dist/apis/ui/pull-down-refresh.ts +10 -4
- package/dist/apis/{page → ui/scroll}/index.ts +32 -27
- package/dist/apis/ui/sticky.ts +4 -0
- package/dist/apis/{tabbar/index.ts → ui/tab-bar.ts} +6 -8
- package/dist/apis/ui/window.ts +20 -0
- package/dist/apis/utils/handler.ts +4 -4
- package/dist/apis/utils/index.ts +1 -1
- package/dist/apis/worker/index.ts +4 -0
- package/dist/apis/wxml/IntersectionObserver.ts +24 -25
- package/dist/apis/wxml/index.ts +7 -2
- package/dist/apis/wxml/nodesRef.ts +2 -2
- package/dist/apis/wxml/selectorQuery.ts +29 -17
- package/dist/components-harmony-ets/button.ets +106 -80
- package/dist/components-harmony-ets/canvas.ets +51 -0
- package/dist/components-harmony-ets/checkbox.ets +82 -148
- package/dist/components-harmony-ets/form.ets +45 -132
- package/dist/components-harmony-ets/icon.ets +66 -69
- package/dist/components-harmony-ets/image.ets +26 -61
- package/dist/components-harmony-ets/index.ets +92 -0
- package/dist/components-harmony-ets/innerHtml.ets +7 -70
- package/dist/components-harmony-ets/input.ets +60 -146
- package/dist/components-harmony-ets/label.ets +86 -92
- package/dist/components-harmony-ets/listView.ets +26 -0
- package/dist/components-harmony-ets/movableArea.ets +124 -0
- package/dist/components-harmony-ets/movableView.ets +93 -0
- package/dist/components-harmony-ets/navigationBar.ets +65 -0
- package/dist/components-harmony-ets/pageMeta.ets +94 -0
- package/dist/components-harmony-ets/picker.ets +172 -198
- package/dist/components-harmony-ets/progress.ets +52 -0
- package/dist/components-harmony-ets/pseudo.ets +80 -0
- package/dist/components-harmony-ets/radio.ets +85 -155
- package/dist/components-harmony-ets/richText.ets +15 -87
- package/dist/components-harmony-ets/scrollList.ets +94 -0
- package/dist/components-harmony-ets/scrollView.ets +81 -149
- package/dist/components-harmony-ets/slider.ets +47 -94
- package/dist/components-harmony-ets/stickySection.ets +42 -0
- package/dist/components-harmony-ets/style.ets +396 -0
- package/dist/components-harmony-ets/swiper.ets +51 -151
- package/dist/components-harmony-ets/switch.ets +35 -76
- package/dist/components-harmony-ets/{index.ts → tag.ts} +6 -0
- package/dist/components-harmony-ets/text.ets +131 -76
- package/dist/components-harmony-ets/textArea.ets +64 -140
- package/dist/components-harmony-ets/utils/AttributeManager.ets +1 -1
- package/dist/components-harmony-ets/utils/DynamicCenter.ts +4 -13
- package/dist/components-harmony-ets/utils/constant/style.ets +9 -6
- package/dist/components-harmony-ets/utils/flexManager.ets +68 -85
- package/dist/components-harmony-ets/utils/helper.ets +18 -65
- package/dist/components-harmony-ets/utils/htmlParser/HarmonyHTMLParser.ts +1 -2
- package/dist/components-harmony-ets/utils/htmlParser/index.ts +1 -1
- package/dist/components-harmony-ets/utils/index.ts +55 -51
- package/dist/components-harmony-ets/utils/styles.ets +177 -65
- package/dist/components-harmony-ets/video.ets +70 -116
- package/dist/components-harmony-ets/view.ets +58 -64
- package/dist/components-harmony-ets/webView.ets +56 -0
- package/dist/index.d.ts +152 -0
- package/dist/index.js +230 -60
- package/dist/index.js.map +1 -1
- package/dist/runtime-ets/bom/document.ts +6 -4
- package/dist/runtime-ets/bom/getComputedStyle.ts +2 -2
- package/dist/runtime-ets/bom/window.ts +9 -2
- package/dist/runtime-ets/current.ts +3 -0
- package/dist/runtime-ets/dom/bind.ts +96 -0
- package/dist/runtime-ets/dom/class-list.ts +4 -6
- package/dist/runtime-ets/dom/comment.ts +1 -2
- package/dist/runtime-ets/dom/cssNesting.ts +409 -0
- package/dist/runtime-ets/dom/cssStyleDeclaration.ts +30 -20
- package/dist/runtime-ets/dom/dataSource.ts +64 -0
- package/dist/runtime-ets/dom/document.ts +36 -51
- package/dist/runtime-ets/dom/element/canvas.ts +136 -0
- package/dist/runtime-ets/dom/element/element.ts +439 -0
- package/dist/runtime-ets/dom/element/form.ts +403 -0
- package/dist/runtime-ets/dom/element/index.ts +120 -0
- package/dist/runtime-ets/dom/element/movableArea.ts +11 -0
- package/dist/runtime-ets/dom/element/movableView.ts +242 -0
- package/dist/runtime-ets/dom/element/normal.ts +103 -0
- package/dist/runtime-ets/dom/element/progress.ts +11 -0
- package/dist/runtime-ets/dom/element/scrollView.ts +15 -0
- package/dist/runtime-ets/dom/element/text.ts +10 -0
- package/dist/runtime-ets/dom/element/video.ts +50 -0
- package/dist/runtime-ets/dom/element/webView.ts +68 -0
- package/dist/runtime-ets/dom/event.ts +26 -5
- package/dist/runtime-ets/dom/eventTarget.ts +3 -3
- package/dist/runtime-ets/dom/node.ts +114 -49
- package/dist/runtime-ets/dom/stylesheet/covertWeb2Hm.ts +805 -0
- package/dist/runtime-ets/dom/stylesheet/index.ts +122 -429
- package/dist/runtime-ets/dom/stylesheet/type.ts +93 -17
- package/dist/runtime-ets/dom/stylesheet/util.ts +145 -17
- package/dist/runtime-ets/index.ts +2 -3
- package/dist/runtime-ets/interface/event.ts +3 -2
- package/dist/runtime-ets/utils/index.ts +87 -17
- package/dist/runtime-ets/utils/info.ts +21 -47
- package/dist/runtime-framework/react/app.ts +20 -28
- package/dist/runtime-framework/react/hooks.ts +3 -4
- package/dist/runtime-framework/react/index.ts +1 -2
- package/dist/runtime-framework/react/native-page.ts +421 -0
- package/dist/runtime-framework/react/page.ts +5 -17
- package/dist/runtime-framework/solid/app.ts +25 -45
- package/dist/runtime-framework/solid/connect.ts +21 -3
- package/dist/runtime-framework/solid/hooks.ts +17 -12
- package/dist/runtime-framework/solid/index.ts +6 -2
- package/dist/runtime-framework/solid/page.ts +84 -36
- package/dist/runtime-framework/solid/reconciler/props.ts +70 -25
- package/dist/runtime-framework/solid/reconciler/render.ts +16 -6
- package/dist/runtime-framework/solid/reconciler/use.ts +0 -1
- package/dist/runtime-framework/solid/utils/index.ts +0 -2
- package/dist/runtime-utils.d.ts +827 -0
- package/dist/runtime-utils.js +1633 -549
- package/dist/runtime-utils.js.map +1 -1
- package/dist/runtime.d.ts +1 -0
- package/dist/runtime.js +1633 -549
- package/dist/runtime.js.map +1 -1
- package/index.js +3 -1
- package/package.json +14 -15
- package/static/media/cancel.svg +1 -0
- package/static/media/circle.svg +1 -0
- package/static/media/clear.svg +1 -0
- package/static/media/download.svg +1 -0
- package/static/media/info.svg +1 -0
- package/static/media/info_circle.svg +1 -0
- package/static/media/search.svg +1 -0
- package/static/media/success.svg +1 -0
- package/static/media/success_no_circle.svg +1 -0
- package/static/media/taro_arrow_left.svg +1 -0
- package/static/media/taro_home.svg +1 -0
- package/static/media/waiting.svg +1 -0
- package/static/media/warn.svg +1 -0
- package/types/harmony.d.ts +4 -0
- package/types/index.d.ts +4 -0
- package/types/runtime.d.ts +7 -1
- package/LICENSE +0 -160
- package/dist/components-harmony-ets/base.ets +0 -63
- package/dist/components-harmony-ets/element.ets +0 -223
- package/dist/components-harmony-ets/utils/constant/icon.ts +0 -19
- package/dist/runtime-ets/dom/element.ts +0 -457
- package/dist/runtime-ets/dom/text.ts +0 -19
- package/dist/runtime-ets/utils/bind.ts +0 -35
- package/types/api.d.ts +0 -4
- /package/dist/runtime-framework/solid/{contant.ts → constant.ts} +0 -0
|
@@ -1,149 +1,62 @@
|
|
|
1
|
-
import {
|
|
2
|
-
TaroEvent,
|
|
3
|
-
TaroAny,
|
|
4
|
-
TaroFormWidgetElement
|
|
5
|
-
} from '@tarojs/runtime'
|
|
1
|
+
import { AREA_CHANGE_EVENT_NAME, eventHandler, getComponentEventCallback, VISIBLE_CHANGE_EVENT_NAME } from '@tarojs/runtime'
|
|
6
2
|
|
|
7
|
-
import {
|
|
8
|
-
import TaroComponentWrapper from './base'
|
|
9
|
-
import { TOUCH_EVENT_MAP } from './utils/constant/event'
|
|
10
|
-
import { FlexManager } from './utils/FlexManager'
|
|
11
|
-
import { createTaroEvent } from './utils/events'
|
|
12
|
-
import { getNormalAttributes, shouldBindEvent, getNodeThresholds, bindAnimation } from './utils/helper'
|
|
13
|
-
|
|
14
|
-
import type { TaroFormElement, TaroElement, TaroCheckboxElement, TaroRadioElement, TaroInputElement,
|
|
15
|
-
TaroSliderElement,
|
|
16
|
-
TaroSwitchElement,
|
|
17
|
-
TaroPickerElement
|
|
18
|
-
} from './element'
|
|
19
|
-
import type { TaroStyleType } from '@tarojs/runtime'
|
|
3
|
+
import commonStyleModify, { rowModify, columnModify } from './style'
|
|
20
4
|
|
|
5
|
+
import { TOUCH_EVENT_MAP } from './utils/constant/event'
|
|
6
|
+
import { FlexManager } from './utils/flexManager'
|
|
7
|
+
import { shouldBindEvent, getNodeThresholds } from './utils/helper'
|
|
21
8
|
|
|
22
|
-
@
|
|
23
|
-
|
|
24
|
-
.id(style.id)
|
|
25
|
-
.key(style.id)
|
|
26
|
-
.padding(style.padding)
|
|
27
|
-
.margin(style.margin)
|
|
28
|
-
.width(style.width)
|
|
29
|
-
.height(style.height)
|
|
30
|
-
.constraintSize(style.constraintSize)
|
|
31
|
-
.flexGrow(style.flexGrow)
|
|
32
|
-
.flexShrink(style.flexShrink)
|
|
33
|
-
.flexBasis(style.flexBasis)
|
|
34
|
-
.alignSelf(style.alignSelf)
|
|
35
|
-
.backgroundColor(style.backgroundColor)
|
|
36
|
-
.backgroundImage(style.backgroundImage, style.backgroundRepeat)
|
|
37
|
-
.backgroundImageSize(style.backgroundImageSize)
|
|
38
|
-
.rotate(style.rotate)
|
|
39
|
-
.scale(style.scale)
|
|
40
|
-
.translate(style.translate)
|
|
41
|
-
.transform(style.transform)
|
|
42
|
-
.borderStyle(style.borderStyle)
|
|
43
|
-
.borderWidth(style.borderWidth)
|
|
44
|
-
.borderColor(style.borderColor)
|
|
45
|
-
.borderRadius(style.borderRadius)
|
|
46
|
-
.linearGradient(style.linearGradient)
|
|
47
|
-
.zIndex(style.zIndex)
|
|
48
|
-
.opacity(style.opacity)
|
|
49
|
-
.clip(style.clip)
|
|
50
|
-
}
|
|
9
|
+
import type { TaroAny, TaroFormElement } from '@tarojs/runtime'
|
|
10
|
+
import { isUndefined } from '@tarojs/shared'
|
|
51
11
|
|
|
52
12
|
@Component
|
|
53
13
|
export default struct TaroForm {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
@Styles visibleChangeEvent () {
|
|
57
|
-
.onVisibleAreaChange(getNodeThresholds(this.node) || [0.0, 1.0], getComponentEventCallback(this.node, VISIBLE_CHANGE_EVENT_NAME))
|
|
58
|
-
}
|
|
59
|
-
|
|
14
|
+
@Builder customBuilder() {}
|
|
15
|
+
@BuilderParam createLazyChildren: (node: TaroFormElement) => void = this.customBuilder
|
|
60
16
|
@ObjectLink node: TaroFormElement
|
|
61
17
|
|
|
62
|
-
|
|
63
|
-
initComponentNodeInfo(this, this.node)
|
|
64
|
-
bindInstanceToNode(this.node, this)
|
|
65
|
-
// 绑定动画
|
|
66
|
-
bindAnimation(this.node)
|
|
67
|
-
|
|
68
|
-
// 监听submit冒泡
|
|
69
|
-
this.node.addEventListener('submit-btn', (e: TaroEvent) => {
|
|
70
|
-
e.stopPropagation()
|
|
71
|
-
const formResult: Record<string, string> = {}
|
|
72
|
-
findChildNodeWithDFS(this.node, (item: TaroFormWidgetElement) => {
|
|
73
|
-
switch (item.nodeName) {
|
|
74
|
-
case 'INPUT':
|
|
75
|
-
case 'SLIDER':
|
|
76
|
-
case 'SWITCH':
|
|
77
|
-
case 'RADIO-GROUP':
|
|
78
|
-
case 'CHECKBOX-GROUP':
|
|
79
|
-
case 'PICKER': {
|
|
80
|
-
formResult[item.name] = item.value
|
|
81
|
-
break
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
return false
|
|
85
|
-
}, true)
|
|
86
|
-
const event: TaroEvent = createTaroEvent('submit', { detail: { value: formResult } }, this.node)
|
|
87
|
-
eventHandler(event, 'submit', this.node)
|
|
88
|
-
})
|
|
89
|
-
// 监听reset冒泡
|
|
90
|
-
this.node.addEventListener('reset-btn', (e: TaroEvent) => {
|
|
91
|
-
findChildNodeWithDFS(this.node, (item: TaroFormWidgetElement) => {
|
|
92
|
-
e.stopPropagation()
|
|
93
|
-
switch (item.nodeName) {
|
|
94
|
-
case 'INPUT': {
|
|
95
|
-
item.value = (item as TaroInputElement)._attrs.value
|
|
96
|
-
break
|
|
97
|
-
}
|
|
98
|
-
case 'SLIDER': {
|
|
99
|
-
item.value = (item as TaroSliderElement)._attrs.value
|
|
100
|
-
break
|
|
101
|
-
}
|
|
102
|
-
case 'SWITCH': {
|
|
103
|
-
item.value = (item as TaroSwitchElement)._attrs.checked
|
|
104
|
-
break
|
|
105
|
-
}
|
|
106
|
-
case 'RADIO-GROUP': {
|
|
107
|
-
item.getElementsByTagName<TaroRadioElement>('RADIO').forEach(element => {
|
|
108
|
-
element._instance.checked = element._attrs.checked || false
|
|
109
|
-
})
|
|
110
|
-
break
|
|
111
|
-
}
|
|
112
|
-
case 'CHECKBOX-GROUP': {
|
|
113
|
-
item.getElementsByTagName<TaroCheckboxElement>('CHECKBOX').forEach(element => {
|
|
114
|
-
element._instance.checked = element._attrs.checked || false
|
|
115
|
-
})
|
|
116
|
-
break
|
|
117
|
-
}
|
|
118
|
-
case 'PICKER': {
|
|
119
|
-
item.value = (item as TaroPickerElement)._attrs.value
|
|
120
|
-
break
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
return false
|
|
124
|
-
}, true)
|
|
125
|
-
})
|
|
126
|
-
}
|
|
18
|
+
@State overwriteStyle: Record<string, TaroAny> = {}
|
|
127
19
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
const eventResult: TaroAny = res.eventResult
|
|
133
|
-
this.nodeInfoMap[this.node._nid].areaInfo = eventResult[1]
|
|
134
|
-
}))
|
|
20
|
+
aboutToAppear(): void {
|
|
21
|
+
if (this.node) {
|
|
22
|
+
this.node._instance = this
|
|
23
|
+
}
|
|
135
24
|
}
|
|
136
25
|
|
|
137
26
|
build() {
|
|
138
|
-
|
|
27
|
+
if (FlexManager.useFlexLayout(this.node)) {
|
|
139
28
|
Flex(FlexManager.flexOptions(this.node)) {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
29
|
+
this.createLazyChildren(this.node)
|
|
30
|
+
}
|
|
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()))
|
|
34
|
+
.onAreaChange(getComponentEventCallback(this.node, AREA_CHANGE_EVENT_NAME, (res: TaroAny) => {
|
|
35
|
+
this.node._nodeInfo.areaInfo = res[1]
|
|
36
|
+
}))
|
|
37
|
+
.onVisibleAreaChange(getNodeThresholds(this.node) || [0.0, 1.0], getComponentEventCallback(this.node, VISIBLE_CHANGE_EVENT_NAME))
|
|
38
|
+
} else if (FlexManager.isFlexNode(this.node) && FlexManager.direction(this.node) !== FlexDirection.Column) {
|
|
39
|
+
Row() {
|
|
40
|
+
this.createLazyChildren(this.node)
|
|
41
|
+
}
|
|
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()))
|
|
45
|
+
.onAreaChange(getComponentEventCallback(this.node, AREA_CHANGE_EVENT_NAME, (res: TaroAny) => {
|
|
46
|
+
this.node._nodeInfo.areaInfo = res[1]
|
|
47
|
+
}))
|
|
48
|
+
.onVisibleAreaChange(getNodeThresholds(this.node) || [0.0, 1.0], getComponentEventCallback(this.node, VISIBLE_CHANGE_EVENT_NAME))
|
|
49
|
+
} else {
|
|
50
|
+
Column() {
|
|
51
|
+
this.createLazyChildren(this.node)
|
|
143
52
|
}
|
|
144
|
-
.
|
|
145
|
-
.
|
|
146
|
-
.
|
|
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()))
|
|
56
|
+
.onAreaChange(getComponentEventCallback(this.node, AREA_CHANGE_EVENT_NAME, (res: TaroAny) => {
|
|
57
|
+
this.node._nodeInfo.areaInfo = res[1]
|
|
58
|
+
}))
|
|
59
|
+
.onVisibleAreaChange(getNodeThresholds(this.node) || [0.0, 1.0], getComponentEventCallback(this.node, VISIBLE_CHANGE_EVENT_NAME))
|
|
147
60
|
}
|
|
148
61
|
}
|
|
149
62
|
}
|
|
@@ -1,84 +1,81 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { eventHandler, convertNumber2VP, getComponentEventCallback, AREA_CHANGE_EVENT_NAME, VISIBLE_CHANGE_EVENT_NAME, convertNumber2PX } from '@tarojs/runtime'
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { getNormalAttributes, shouldBindEvent, getNodeThresholds, bindAnimation } from './utils/helper'
|
|
3
|
+
import commonStyleModify from './style'
|
|
4
|
+
import { shouldBindEvent, getNodeThresholds } from './utils/helper'
|
|
6
5
|
|
|
7
|
-
import type { TaroIconElement } from '
|
|
8
|
-
import type { TaroStyleType } from '@tarojs/runtime'
|
|
6
|
+
import type { TaroIconElement, TaroAny } from '@tarojs/runtime'
|
|
9
7
|
|
|
8
|
+
const ICON_COLOR_MAP: TaroAny = {
|
|
9
|
+
success: Color.Green,
|
|
10
|
+
success_no_circle: Color.Green,
|
|
11
|
+
info: Color.Blue,
|
|
12
|
+
warn: Color.Red,
|
|
13
|
+
waiting: Color.Blue,
|
|
14
|
+
cancel: Color.Red,
|
|
15
|
+
download: Color.Gray,
|
|
16
|
+
search: Color.Gray,
|
|
17
|
+
clear: Color.Gray,
|
|
18
|
+
info_circle: Color.Blue,
|
|
19
|
+
circle: Color.Gray
|
|
20
|
+
}
|
|
10
21
|
|
|
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
|
-
.clip(style.clip)
|
|
22
|
+
function getIconData (node: TaroIconElement): Resource | null {
|
|
23
|
+
switch (node._attrs.type) {
|
|
24
|
+
case 'success':
|
|
25
|
+
return $r('app.media.success')
|
|
26
|
+
case 'success_no_circle':
|
|
27
|
+
return $r('app.media.success_no_circle')
|
|
28
|
+
case 'info':
|
|
29
|
+
return $r('app.media.info')
|
|
30
|
+
case 'warn':
|
|
31
|
+
return $r('app.media.warn')
|
|
32
|
+
case 'waiting':
|
|
33
|
+
return $r('app.media.waiting')
|
|
34
|
+
case 'cancel':
|
|
35
|
+
return $r('app.media.cancel')
|
|
36
|
+
case 'download':
|
|
37
|
+
return $r('app.media.download')
|
|
38
|
+
case 'search':
|
|
39
|
+
return $r('app.media.search')
|
|
40
|
+
case 'clear':
|
|
41
|
+
return $r('app.media.clear')
|
|
42
|
+
case 'info_circle':
|
|
43
|
+
return $r('app.media.info_circle')
|
|
44
|
+
case 'circle':
|
|
45
|
+
return $r('app.media.circle')
|
|
46
|
+
default:
|
|
47
|
+
return null
|
|
48
|
+
}
|
|
39
49
|
}
|
|
40
50
|
|
|
41
51
|
@Component
|
|
42
52
|
export default struct TaroIcon {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
@Styles visibleChangeEvent () {
|
|
46
|
-
.onVisibleAreaChange(getNodeThresholds(this.node) || [0.0, 1.0], getComponentEventCallback(this.node, VISIBLE_CHANGE_EVENT_NAME))
|
|
47
|
-
}
|
|
48
|
-
|
|
53
|
+
@Builder customBuilder() {}
|
|
54
|
+
@BuilderParam createLazyChildren: (node: TaroIconElement) => void = this.customBuilder
|
|
49
55
|
@ObjectLink node: TaroIconElement
|
|
56
|
+
@State overwriteStyle: Record<string, TaroAny> = {}
|
|
50
57
|
|
|
51
|
-
aboutToAppear
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
bindAnimation(this.node)
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
@Styles defaultEvent () {
|
|
59
|
-
.onClick(shouldBindEvent((e: ClickEvent) => eventHandler(e, 'click', this.node), this.node, ['click']))
|
|
60
|
-
.onAreaChange(getComponentEventCallback(this.node, AREA_CHANGE_EVENT_NAME, res => {
|
|
61
|
-
const eventResult: TaroAny = res.eventResult
|
|
62
|
-
this.nodeInfoMap[this.node._nid].areaInfo = eventResult[1]
|
|
63
|
-
}))
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
getIconData () {
|
|
67
|
-
if (!this.node || !this.node._attrs) return null
|
|
68
|
-
const type: string = this.node._attrs.type
|
|
69
|
-
// TODO:等待鸿蒙支持 base64 格式的 svg 图片,或者工程化支持图片资源的迁移
|
|
70
|
-
return ICON_SVG_MAP.get(type) || null
|
|
58
|
+
aboutToAppear(): void {
|
|
59
|
+
if (this.node) {
|
|
60
|
+
this.node._instance = this
|
|
61
|
+
}
|
|
71
62
|
}
|
|
72
63
|
|
|
73
64
|
build() {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
65
|
+
Image(getIconData(this.node))
|
|
66
|
+
.objectFit(ImageFit.Contain)
|
|
67
|
+
.fillColor(this.node._attrs.color || ICON_COLOR_MAP[this.node._attrs.type] || Color.Black)
|
|
68
|
+
.attributeModifier(commonStyleModify.setNode(this.node).setAnimationStyle(this.overwriteStyle))
|
|
69
|
+
.size({
|
|
70
|
+
width: Number(this.node._attrs.size) || 23,
|
|
71
|
+
height: Number(this.node._attrs.size) || 23
|
|
72
|
+
})
|
|
73
|
+
.onComplete(e => eventHandler(e, 'complete', this.node))
|
|
74
|
+
.onClick(shouldBindEvent((e: ClickEvent) => eventHandler(e, 'click', this.node), this.node, ['click']))
|
|
75
|
+
.onVisibleAreaChange(getNodeThresholds(this.node) || [0.0, 1.0], getComponentEventCallback(this.node, VISIBLE_CHANGE_EVENT_NAME))
|
|
76
|
+
.onAreaChange(getComponentEventCallback(this.node, AREA_CHANGE_EVENT_NAME, (res: TaroAny) => {
|
|
77
|
+
this.node._nodeInfo.areaInfo = res[1]
|
|
78
|
+
}))
|
|
83
79
|
}
|
|
84
80
|
}
|
|
81
|
+
|
|
@@ -1,42 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { eventHandler, getComponentEventCallback, AREA_CHANGE_EVENT_NAME, VISIBLE_CHANGE_EVENT_NAME } from '@tarojs/runtime'
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
3
|
+
import commonStyleModify from './style'
|
|
4
|
+
import { shouldBindEvent, getNodeThresholds } from './utils/helper'
|
|
5
5
|
|
|
6
|
-
import type { TaroImageElement } from '
|
|
7
|
-
import type { TaroStyleType } from '@tarojs/runtime'
|
|
6
|
+
import type { TaroImageElement, TaroAny } from '@tarojs/runtime'
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
function attrs (style: TaroStyleType) {
|
|
11
|
-
.id(style.id)
|
|
12
|
-
.key(style.id)
|
|
13
|
-
.padding(style.padding)
|
|
14
|
-
.margin(style.margin)
|
|
15
|
-
.width(style.width)
|
|
16
|
-
.height(style.height)
|
|
17
|
-
.constraintSize(style.constraintSize)
|
|
18
|
-
.flexGrow(style.flexGrow)
|
|
19
|
-
.flexShrink(style.flexShrink)
|
|
20
|
-
.flexBasis(style.flexBasis)
|
|
21
|
-
.alignSelf(style.alignSelf)
|
|
22
|
-
.backgroundColor(style.backgroundColor)
|
|
23
|
-
.backgroundImage(style.backgroundImage, style.backgroundRepeat)
|
|
24
|
-
.backgroundImageSize(style.backgroundImageSize)
|
|
25
|
-
.rotate(style.rotate)
|
|
26
|
-
.scale(style.scale)
|
|
27
|
-
.translate(style.translate)
|
|
28
|
-
.transform(style.transform)
|
|
29
|
-
.borderStyle(style.borderStyle)
|
|
30
|
-
.borderWidth(style.borderWidth)
|
|
31
|
-
.borderColor(style.borderColor)
|
|
32
|
-
.borderRadius(style.borderRadius)
|
|
33
|
-
.linearGradient(style.linearGradient)
|
|
34
|
-
.zIndex(style.zIndex)
|
|
35
|
-
.opacity(style.opacity)
|
|
36
|
-
.clip(style.clip)
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function getImageMode (mode: string): ImageFit {
|
|
8
|
+
export function getImageMode (mode: string): ImageFit {
|
|
40
9
|
switch (mode) {
|
|
41
10
|
case 'aspectFit': return ImageFit.Contain
|
|
42
11
|
case 'aspectFill': return ImageFit.Cover
|
|
@@ -49,37 +18,33 @@ function getImageMode (mode: string): ImageFit {
|
|
|
49
18
|
|
|
50
19
|
@Component
|
|
51
20
|
export default struct TaroImage {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
@Styles visibleChangeEvent () {
|
|
55
|
-
.onVisibleAreaChange(getNodeThresholds(this.node) || [0.0, 1.0], getComponentEventCallback(this.node, VISIBLE_CHANGE_EVENT_NAME))
|
|
56
|
-
}
|
|
57
|
-
|
|
21
|
+
@Builder customBuilder() {}
|
|
22
|
+
@BuilderParam createLazyChildren: (node: TaroImageElement) => void = this.customBuilder
|
|
58
23
|
@ObjectLink node: TaroImageElement
|
|
24
|
+
@State overwriteStyle: Record<string, TaroAny> = {}
|
|
59
25
|
|
|
60
|
-
aboutToAppear
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
bindAnimation(this.node)
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
@Styles defaultEvent () {
|
|
68
|
-
.onClick(shouldBindEvent((e: ClickEvent) => eventHandler(e, 'click', this.node), this.node, ['click']))
|
|
69
|
-
.onAreaChange(getComponentEventCallback(this.node, AREA_CHANGE_EVENT_NAME, res => {
|
|
70
|
-
const eventResult: TaroAny = res.eventResult
|
|
71
|
-
this.nodeInfoMap[this.node._nid].areaInfo = eventResult[1]
|
|
72
|
-
}))
|
|
26
|
+
aboutToAppear(): void {
|
|
27
|
+
if (this.node) {
|
|
28
|
+
this.node._instance = this
|
|
29
|
+
}
|
|
73
30
|
}
|
|
74
31
|
|
|
75
32
|
build() {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
.
|
|
33
|
+
Image(this.node.getAttribute('src'))
|
|
34
|
+
.onClick(shouldBindEvent((e: ClickEvent) => eventHandler(e, 'click', this.node), this.node, ['click']))
|
|
35
|
+
.onAreaChange(getComponentEventCallback(this.node, AREA_CHANGE_EVENT_NAME, (res: TaroAny) => {
|
|
36
|
+
this.node._nodeInfo.areaInfo = res[1]
|
|
37
|
+
}))
|
|
79
38
|
.objectFit(getImageMode(this.node.getAttribute('mode')))
|
|
80
|
-
.
|
|
39
|
+
.attributeModifier(commonStyleModify.setNode(this.node).setAnimationStyle(this.overwriteStyle))
|
|
81
40
|
.onComplete(e => eventHandler(e, 'complete', this.node))
|
|
82
|
-
.
|
|
83
|
-
|
|
41
|
+
.onVisibleAreaChange(getNodeThresholds(this.node) || [0.0, 1.0], getComponentEventCallback(this.node, VISIBLE_CHANGE_EVENT_NAME))
|
|
42
|
+
// TODO: 临时改为申明式,后续等鸿蒙修复modify设置失败的bug后删除该申明
|
|
43
|
+
.borderRadius({
|
|
44
|
+
topLeft: this.node._st.hmStyle.borderTopLeftRadius,
|
|
45
|
+
topRight: this.node._st.hmStyle.borderTopRightRadius,
|
|
46
|
+
bottomLeft: this.node._st.hmStyle.borderBottomLeftRadius,
|
|
47
|
+
bottomRight: this.node._st.hmStyle.borderBottomRightRadius
|
|
48
|
+
})
|
|
84
49
|
}
|
|
85
50
|
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import TaroImage, { getImageMode } from './image'
|
|
2
|
+
import TaroText from './text'
|
|
3
|
+
import TaroView from './view'
|
|
4
|
+
import TaroIcon from './icon'
|
|
5
|
+
import TaroForm from './form'
|
|
6
|
+
import TaroLabel from './label'
|
|
7
|
+
import TaroInput from './input'
|
|
8
|
+
import TaroVideo from './video'
|
|
9
|
+
import TaroCanvas from './canvas'
|
|
10
|
+
import TaroButton from './button'
|
|
11
|
+
import TaroPicker from './picker'
|
|
12
|
+
import TaroSlider from './slider'
|
|
13
|
+
import TaroSwitch from './switch'
|
|
14
|
+
import TaroSwiper from './swiper'
|
|
15
|
+
import TaroWebView from './webView'
|
|
16
|
+
import TaroTextArea from './textArea'
|
|
17
|
+
import TaroRichText from './richText'
|
|
18
|
+
import TaroProgress from './progress'
|
|
19
|
+
import TaroInnerHtml from './innerHtml'
|
|
20
|
+
import TaroScrollView from './scrollView'
|
|
21
|
+
import TaroMovableArea from './movableArea'
|
|
22
|
+
import TaroMovableView from './movableView'
|
|
23
|
+
import { TaroRadio, TaroRadioGroup } from './radio'
|
|
24
|
+
import { TaroCheckboxGroup, TaroCheckbox } from './checkbox'
|
|
25
|
+
import TaroPageMeta from './pageMeta'
|
|
26
|
+
import TaroNavigationBar from './navigationBar'
|
|
27
|
+
|
|
28
|
+
import TaroListView from './listView'
|
|
29
|
+
import TaroStickySection from './stickySection'
|
|
30
|
+
import TaroScrollList from './scrollList'
|
|
31
|
+
|
|
32
|
+
import commonStyleModify, { rowModify, columnModify, textModify, setNormalTextAttributeIntoInstance } from './style'
|
|
33
|
+
import { getButtonColor } from './button'
|
|
34
|
+
import { FlexManager } from './utils/flexManager'
|
|
35
|
+
import { DynamicCenter } from './utils/DynamicCenter'
|
|
36
|
+
import { TOUCH_EVENT_MAP } from './utils/constant/event'
|
|
37
|
+
import { BUTTON_THEME_COLOR } from './utils/constant/style'
|
|
38
|
+
import { getStyleAttr } from './utils/styles'
|
|
39
|
+
import { shouldBindEvent, getNodeThresholds, getNormalAttributes, getFontAttributes } from './utils/helper'
|
|
40
|
+
|
|
41
|
+
export {
|
|
42
|
+
textModify,
|
|
43
|
+
getStyleAttr,
|
|
44
|
+
FlexManager,
|
|
45
|
+
DynamicCenter,
|
|
46
|
+
getButtonColor,
|
|
47
|
+
TOUCH_EVENT_MAP,
|
|
48
|
+
shouldBindEvent,
|
|
49
|
+
getFontAttributes,
|
|
50
|
+
commonStyleModify,
|
|
51
|
+
rowModify,
|
|
52
|
+
columnModify,
|
|
53
|
+
getNodeThresholds,
|
|
54
|
+
BUTTON_THEME_COLOR,
|
|
55
|
+
getNormalAttributes,
|
|
56
|
+
setNormalTextAttributeIntoInstance,
|
|
57
|
+
getImageMode,
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export {
|
|
61
|
+
TaroImage,
|
|
62
|
+
TaroCanvas,
|
|
63
|
+
TaroText,
|
|
64
|
+
TaroView,
|
|
65
|
+
TaroIcon,
|
|
66
|
+
TaroForm,
|
|
67
|
+
TaroLabel,
|
|
68
|
+
TaroInput,
|
|
69
|
+
TaroVideo,
|
|
70
|
+
TaroButton,
|
|
71
|
+
TaroPicker,
|
|
72
|
+
TaroSlider,
|
|
73
|
+
TaroSwitch,
|
|
74
|
+
TaroSwiper,
|
|
75
|
+
TaroWebView,
|
|
76
|
+
TaroTextArea,
|
|
77
|
+
TaroRichText,
|
|
78
|
+
TaroProgress,
|
|
79
|
+
TaroInnerHtml,
|
|
80
|
+
TaroScrollView,
|
|
81
|
+
TaroMovableArea,
|
|
82
|
+
TaroMovableView,
|
|
83
|
+
TaroRadio,
|
|
84
|
+
TaroRadioGroup,
|
|
85
|
+
TaroCheckboxGroup,
|
|
86
|
+
TaroCheckbox,
|
|
87
|
+
TaroPageMeta,
|
|
88
|
+
TaroNavigationBar,
|
|
89
|
+
TaroListView,
|
|
90
|
+
TaroStickySection,
|
|
91
|
+
TaroScrollList
|
|
92
|
+
}
|
|
@@ -1,79 +1,16 @@
|
|
|
1
|
-
import TaroComponentWrapper from './base'
|
|
2
|
-
import web_webview from '@ohos.web.webview'
|
|
3
1
|
import htmlParser from './utils/htmlParser'
|
|
4
|
-
|
|
5
|
-
import type { TaroElement } from '
|
|
2
|
+
|
|
3
|
+
import type { TaroElement, TaroInnerHtmlElement } from '@tarojs/runtime'
|
|
6
4
|
|
|
7
5
|
@Component
|
|
8
6
|
export default struct TaroInnerHtml {
|
|
9
|
-
@
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
// isLoaded: boolean = false
|
|
14
|
-
|
|
15
|
-
// @State isInit: boolean = false
|
|
16
|
-
|
|
17
|
-
// @State height: string = '2vp' // 如果起始高度不足,将不会渲染webview
|
|
18
|
-
|
|
19
|
-
// jsBridge = {
|
|
20
|
-
// // 获取父级高度,拿到实际的webview宽度,计算出高度
|
|
21
|
-
// load: (bodyHeight: number, bodyWidth: number) => {
|
|
22
|
-
// const { width } = this.node.parentElement.instance.info
|
|
23
|
-
// const widthPx = vp2px(width)
|
|
24
|
-
// this.height = Math.floor(widthPx / bodyWidth * bodyHeight) + 'px'
|
|
25
|
-
// this.isInit = true
|
|
26
|
-
// }
|
|
27
|
-
// }
|
|
7
|
+
@Builder customBuilder() {}
|
|
8
|
+
@BuilderParam createChildItem: (node: TaroElement, callback?: (node: TaroElement) => void) => void = this.customBuilder
|
|
9
|
+
@ObjectLink node: TaroInnerHtmlElement
|
|
28
10
|
|
|
29
11
|
build() {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
createNode(htmlParser(this.node.innerHTML))
|
|
33
|
-
}
|
|
34
|
-
// // webview实现
|
|
35
|
-
// if (this.node.innerHTML) {
|
|
36
|
-
// Web({ src: $rawfile('innerHTML.html'), controller: this.controller }).onPageBegin((event) => {
|
|
37
|
-
// if (this.isLoaded) return
|
|
38
|
-
// this.isLoaded = true
|
|
39
|
-
// // 注入jsBridge,监听页面onload行为,获取高度
|
|
40
|
-
// this.controller.registerJavaScriptProxy(this.jsBridge, 'jsBridge', ['load'])
|
|
41
|
-
// const innerString = this.node.innerHTML
|
|
42
|
-
// try {
|
|
43
|
-
// this.controller.loadData(
|
|
44
|
-
// `
|
|
45
|
-
// <html>
|
|
46
|
-
// <body onload="jsBridge.load(document.getElementById('container').clientHeight, document.body.clientWidth);" style="padding: 0;margin: 0">
|
|
47
|
-
// <div id="container">
|
|
48
|
-
// ${innerString}
|
|
49
|
-
// </div>
|
|
50
|
-
// </body>
|
|
51
|
-
// </html>
|
|
52
|
-
// `,
|
|
53
|
-
// "text/html",
|
|
54
|
-
// "UTF-8"
|
|
55
|
-
// )
|
|
56
|
-
// } catch (error) {
|
|
57
|
-
// console.log(`ErrorCode: ${error.code}, Message: ${error.message}`);
|
|
58
|
-
// }
|
|
59
|
-
// })
|
|
60
|
-
// .javaScriptAccess(true)
|
|
61
|
-
// .size({
|
|
62
|
-
// width: '100%',
|
|
63
|
-
// height: this.height
|
|
64
|
-
// })
|
|
65
|
-
// .visibility(this.isInit)
|
|
66
|
-
// // 覆盖webwiew的scroll
|
|
67
|
-
// Stack({ alignContent: Alignment.TopStart }) {
|
|
68
|
-
// Flex().size({
|
|
69
|
-
// height: this.height,
|
|
70
|
-
// width: '100%'
|
|
71
|
-
// })
|
|
72
|
-
// }.position({
|
|
73
|
-
// x: 0,
|
|
74
|
-
// y: 0
|
|
75
|
-
// })
|
|
76
|
-
// }
|
|
12
|
+
if (this.node?.hmStyle?.display !== 'none' && this.node.innerHTML) {
|
|
13
|
+
this.createChildItem(htmlParser(this.node.innerHTML))
|
|
77
14
|
}
|
|
78
15
|
}
|
|
79
16
|
}
|