@tarojs/plugin-platform-harmony-ets 4.0.0-beta.10 → 4.0.0-beta.11
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/components-harmony-ets/button.ets +34 -31
- package/dist/components-harmony-ets/checkbox.ets +3 -2
- package/dist/components-harmony-ets/form.ets +30 -27
- package/dist/components-harmony-ets/icon.ets +22 -18
- package/dist/components-harmony-ets/image.ets +15 -11
- package/dist/components-harmony-ets/innerHtml.ets +9 -5
- package/dist/components-harmony-ets/input.ets +1 -1
- package/dist/components-harmony-ets/label.ets +43 -39
- package/dist/components-harmony-ets/movableArea.ets +67 -0
- package/dist/components-harmony-ets/movableView.ets +66 -0
- package/dist/components-harmony-ets/picker.ets +2 -1
- package/dist/components-harmony-ets/progress.ets +45 -0
- package/dist/components-harmony-ets/radio.ets +2 -2
- package/dist/components-harmony-ets/richText.ets +14 -9
- package/dist/components-harmony-ets/scrollView.ets +36 -32
- package/dist/components-harmony-ets/slider.ets +1 -1
- package/dist/components-harmony-ets/swiper.ets +23 -19
- package/dist/components-harmony-ets/switch.ets +1 -1
- package/dist/components-harmony-ets/text.ets +28 -22
- package/dist/components-harmony-ets/textArea.ets +1 -1
- package/dist/components-harmony-ets/video.ets +26 -21
- package/dist/components-harmony-ets/view.ets +33 -29
- package/dist/components-harmony-ets/webView.ets +37 -32
- package/dist/index.js +35 -15
- package/dist/index.js.map +1 -1
- package/dist/runtime-ets/dom/element/element.ts +0 -1
- package/dist/runtime-ets/dom/element/form.ts +11 -4
- package/dist/runtime-ets/dom/element/index.ts +9 -1
- package/dist/runtime-ets/dom/element/movableArea.ts +12 -0
- package/dist/runtime-ets/dom/element/movableView.ts +12 -0
- package/dist/runtime-ets/dom/element/normal.ts +8 -2
- package/dist/runtime-ets/dom/element/progress.ts +13 -0
- package/dist/runtime-ets/dom/element/scrollView.ts +1 -0
- package/dist/runtime-ets/dom/element/text.ts +1 -0
- package/dist/runtime-ets/dom/element/video.ts +1 -0
- package/dist/runtime-ets/dom/element/webView.ts +8 -0
- package/dist/runtime-ets/dom/node.ts +18 -17
- package/package.json +8 -8
|
@@ -12,43 +12,48 @@ import type {
|
|
|
12
12
|
ViewProps
|
|
13
13
|
} from '@tarojs/components/types'
|
|
14
14
|
|
|
15
|
+
@Observed
|
|
15
16
|
class TaroViewElement extends TaroElement<ViewProps> {
|
|
16
17
|
constructor() {
|
|
17
18
|
super('View')
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
21
|
|
|
22
|
+
@Observed
|
|
21
23
|
class TaroImageElement extends TaroElement<ImageProps> {
|
|
22
24
|
constructor() {
|
|
23
25
|
super('Image')
|
|
24
26
|
}
|
|
25
27
|
}
|
|
26
28
|
|
|
29
|
+
@Observed
|
|
27
30
|
class TaroButtonElement extends TaroElement<ButtonProps> {
|
|
28
31
|
constructor() {
|
|
29
32
|
super('Button')
|
|
30
33
|
}
|
|
31
34
|
}
|
|
32
35
|
|
|
33
|
-
|
|
36
|
+
@Observed
|
|
34
37
|
class TaroIconElement extends TaroElement<IconProps>{
|
|
35
38
|
constructor() {
|
|
36
39
|
super('Icon')
|
|
37
40
|
}
|
|
38
41
|
}
|
|
39
|
-
|
|
42
|
+
@Observed
|
|
40
43
|
class TaroLabelElement extends TaroElement<LabelProps>{
|
|
41
44
|
constructor() {
|
|
42
45
|
super('Label')
|
|
43
46
|
}
|
|
44
47
|
}
|
|
45
48
|
|
|
49
|
+
@Observed
|
|
46
50
|
class TaroRichTextElement extends TaroElement<RichTextProps>{
|
|
47
51
|
constructor() {
|
|
48
52
|
super('RichText')
|
|
49
53
|
}
|
|
50
54
|
}
|
|
51
55
|
|
|
56
|
+
@Observed
|
|
52
57
|
class TaroSwiperElement extends TaroElement<SwiperProps>{
|
|
53
58
|
controller: SwiperController = new SwiperController()
|
|
54
59
|
|
|
@@ -57,6 +62,7 @@ class TaroSwiperElement extends TaroElement<SwiperProps>{
|
|
|
57
62
|
}
|
|
58
63
|
}
|
|
59
64
|
|
|
65
|
+
@Observed
|
|
60
66
|
class TaroSwiperItemElement extends TaroElement<SwiperItemProps>{
|
|
61
67
|
constructor() {
|
|
62
68
|
super('SwiperItem')
|
|
@@ -5,6 +5,14 @@ import { TaroElement } from './element'
|
|
|
5
5
|
|
|
6
6
|
import type { WebViewProps } from '@tarojs/components/types'
|
|
7
7
|
|
|
8
|
+
@Observed
|
|
9
|
+
export class TaroInnerHtmlElement extends TaroElement {
|
|
10
|
+
constructor() {
|
|
11
|
+
super('InnerHtml')
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@Observed
|
|
8
16
|
export class TaroWebViewElement extends TaroElement<WebViewProps>{
|
|
9
17
|
ports: web_webview.WebMessagePort[] = []
|
|
10
18
|
|
|
@@ -63,27 +63,27 @@ export class TaroNode extends TaroDataSourceElement {
|
|
|
63
63
|
return this.childNodes.findIndex(node => node._nid === refChild._nid)
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
public updateTextNode () {
|
|
67
|
+
// @ts-ignore
|
|
68
|
+
if (this.childNodes.length <= 0 || this.tagName !== 'VIEW') return
|
|
69
|
+
|
|
70
|
+
// TextNode 不具备 props 更新能力,需要由父节点来进行触发
|
|
71
|
+
this.childNodes.forEach(item => {
|
|
72
|
+
if (item.nodeType !== NodeType.TEXT_NODE) return
|
|
73
|
+
|
|
74
|
+
item._updateTrigger++
|
|
75
|
+
})
|
|
76
|
+
}
|
|
77
|
+
|
|
66
78
|
// 更新对应的 ArkUI 组件
|
|
67
79
|
public updateComponent () {
|
|
68
|
-
if (!this._isCompileMode
|
|
69
|
-
|
|
70
|
-
const idx = this.parentNode.findIndex(this)
|
|
80
|
+
if (!this._isCompileMode) return
|
|
71
81
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
this._updateTrigger++
|
|
76
|
-
} else {
|
|
77
|
-
this.parentNode.updateComponent()
|
|
78
|
-
}
|
|
82
|
+
// 半编译模式下走 @State 的更新模式
|
|
83
|
+
if (this._isDynamicNode) {
|
|
84
|
+
this._updateTrigger++
|
|
79
85
|
} else {
|
|
80
|
-
|
|
81
|
-
if (idx >= 0) {
|
|
82
|
-
this._updateTrigger++
|
|
83
|
-
this.parentNode.notifyDataChange(idx)
|
|
84
|
-
} else {
|
|
85
|
-
this.parentNode.notifyDataReload()
|
|
86
|
-
}
|
|
86
|
+
this.parentNode.updateComponent()
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
|
|
@@ -229,6 +229,7 @@ export class TaroNode extends TaroDataSourceElement {
|
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
+
@Observed
|
|
232
233
|
export class TaroTextNode extends TaroNode {
|
|
233
234
|
constructor(value = '', nodeName = '#text', nodeType: NodeType = NodeType.TEXT_NODE) {
|
|
234
235
|
super(nodeName, nodeType)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/plugin-platform-harmony-ets",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.11",
|
|
4
4
|
"description": "OpenHarmony & 鸿蒙系统插件",
|
|
5
5
|
"author": "O2Team",
|
|
6
6
|
"homepage": "https://gitee.com/openharmony-sig/taro",
|
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"webpack-sources": "^3.2.3",
|
|
28
|
-
"@tarojs/components": "4.0.0-beta.
|
|
29
|
-
"@tarojs/runner-utils": "4.0.0-beta.
|
|
30
|
-
"@tarojs/
|
|
31
|
-
"@tarojs/helper": "4.0.0-beta.
|
|
32
|
-
"@tarojs/
|
|
33
|
-
"@tarojs/shared": "4.0.0-beta.
|
|
34
|
-
"@tarojs/taro": "4.0.0-beta.
|
|
28
|
+
"@tarojs/components": "4.0.0-beta.11",
|
|
29
|
+
"@tarojs/runner-utils": "4.0.0-beta.11",
|
|
30
|
+
"@tarojs/service": "4.0.0-beta.11",
|
|
31
|
+
"@tarojs/helper": "4.0.0-beta.11",
|
|
32
|
+
"@tarojs/runtime": "4.0.0-beta.11",
|
|
33
|
+
"@tarojs/shared": "4.0.0-beta.11",
|
|
34
|
+
"@tarojs/taro": "4.0.0-beta.11"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@rollup/plugin-commonjs": "^25.0.7",
|