@tarojs/plugin-platform-harmony-ets 4.0.0-beta.16 → 4.0.0-beta.18
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 +32 -29
- package/dist/components-harmony-ets/checkbox.ets +2 -2
- package/dist/components-harmony-ets/form.ets +28 -25
- package/dist/components-harmony-ets/icon.ets +18 -16
- package/dist/components-harmony-ets/image.ets +13 -11
- package/dist/components-harmony-ets/innerHtml.ets +1 -1
- package/dist/components-harmony-ets/input.ets +1 -1
- package/dist/components-harmony-ets/label.ets +39 -36
- package/dist/components-harmony-ets/movableArea.ets +1 -1
- package/dist/components-harmony-ets/movableView.ets +1 -1
- package/dist/components-harmony-ets/picker.ets +1 -1
- package/dist/components-harmony-ets/progress.ets +1 -1
- package/dist/components-harmony-ets/radio.ets +2 -2
- package/dist/components-harmony-ets/richText.ets +10 -31
- package/dist/components-harmony-ets/scrollView.ets +45 -43
- package/dist/components-harmony-ets/slider.ets +1 -1
- package/dist/components-harmony-ets/style.ets +30 -5
- package/dist/components-harmony-ets/swiper.ets +19 -17
- package/dist/components-harmony-ets/switch.ets +1 -1
- package/dist/components-harmony-ets/text.ets +11 -9
- package/dist/components-harmony-ets/textArea.ets +1 -1
- package/dist/components-harmony-ets/utils/DynamicCenter.ts +1 -1
- package/dist/components-harmony-ets/utils/htmlParser/HarmonyHTMLParser.ts +1 -2
- package/dist/components-harmony-ets/utils/index.ts +26 -0
- package/dist/components-harmony-ets/video.ets +3 -1
- package/dist/components-harmony-ets/view.ets +29 -27
- package/dist/components-harmony-ets/webView.ets +34 -33
- package/dist/index.d.ts +149 -0
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/runtime-ets/dom/bind.ts +0 -1
- package/dist/runtime-ets/dom/cssNesting.ts +24 -27
- package/dist/runtime-ets/dom/document.ts +0 -1
- package/dist/runtime-ets/dom/element/movableView.ts +0 -1
- package/dist/runtime-ets/dom/element/normal.ts +0 -1
- package/dist/runtime-ets/dom/event.ts +0 -1
- package/dist/runtime-ets/dom/eventTarget.ts +0 -3
- package/dist/runtime-ets/dom/stylesheet/index.ts +0 -2
- package/dist/runtime-ets/dom/stylesheet/type.ts +7 -3
- package/dist/runtime-ets/dom/stylesheet/util.ts +18 -14
- package/dist/runtime-ets/interface/event.ts +1 -1
- package/dist/runtime-ets/utils/index.ts +0 -1
- package/dist/runtime-framework/react/native-page.ts +0 -1
- 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 +825 -0
- package/dist/runtime.d.ts +1 -0
- package/index.js +3 -1
- package/package.json +8 -8
|
@@ -155,7 +155,6 @@ export default class StyleSheet {
|
|
|
155
155
|
return FlexManager.reverseDirection(this.hmStyle.flexDirection)
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
|
|
159
158
|
set _flexDirection (value: FlexDirection) {
|
|
160
159
|
this.hmStyle.flexDirection = value
|
|
161
160
|
}
|
|
@@ -666,4 +665,3 @@ export default class StyleSheet {
|
|
|
666
665
|
this.hmStyle.content = value
|
|
667
666
|
}
|
|
668
667
|
}
|
|
669
|
-
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
-
import matrix4 from '@ohos.matrix4'
|
|
2
|
+
// import matrix4 from '@ohos.matrix4'
|
|
3
3
|
|
|
4
4
|
export interface HarmonyStyle extends TaroStyleType {
|
|
5
5
|
textAlign?: TextAlign
|
|
@@ -167,7 +167,11 @@ export namespace HarmonyType {
|
|
|
167
167
|
centerX?: number | string
|
|
168
168
|
centerY?: number | string
|
|
169
169
|
}
|
|
170
|
-
export type Transform = matrix4.Matrix4Transit
|
|
170
|
+
// export type Transform = matrix4.Matrix4Transit
|
|
171
|
+
export type Transform = {
|
|
172
|
+
Translate?: Translate
|
|
173
|
+
Scale?: Scale
|
|
174
|
+
Rotate?: Rotate
|
|
175
|
+
}
|
|
171
176
|
}
|
|
172
177
|
}
|
|
173
|
-
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
-
import matrix4 from '@ohos.matrix4'
|
|
2
|
+
// import matrix4 from '@ohos.matrix4'
|
|
3
3
|
import { isNumber } from '@tarojs/shared'
|
|
4
4
|
|
|
5
5
|
import { convertNumber2VP } from '../../'
|
|
@@ -163,7 +163,6 @@ export class FlexManager {
|
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
|
|
167
166
|
export class BORDER_STYLE_MAP {
|
|
168
167
|
static solid = BorderStyle.Solid
|
|
169
168
|
static dotted = BorderStyle.Dotted
|
|
@@ -188,7 +187,6 @@ export class BORDER_STYLE_MAP {
|
|
|
188
187
|
}
|
|
189
188
|
}
|
|
190
189
|
|
|
191
|
-
|
|
192
190
|
export function getNodeMarginOrPaddingData (dataValue: string) {
|
|
193
191
|
let res: any = {}
|
|
194
192
|
if (dataValue) {
|
|
@@ -216,7 +214,6 @@ export function getNodeMarginOrPaddingData (dataValue: string) {
|
|
|
216
214
|
return res
|
|
217
215
|
}
|
|
218
216
|
|
|
219
|
-
|
|
220
217
|
export function getUnit (val) {
|
|
221
218
|
// 空的字符串代表 Reconciler remove 了这个 prop,不进行后面的逻辑了
|
|
222
219
|
if (val === '') return val
|
|
@@ -238,19 +235,26 @@ export function getUnit (val) {
|
|
|
238
235
|
}
|
|
239
236
|
|
|
240
237
|
export function getTransform(transform) {
|
|
238
|
+
// if (transform) {
|
|
239
|
+
// return transform.reduce((res, item) => {
|
|
240
|
+
// switch (item.type) {
|
|
241
|
+
// case 'Translate': return res.translate(item.value)
|
|
242
|
+
// case 'Scale': return res.scale(item.value)
|
|
243
|
+
// case 'Rotate': return res.rotate(item.value)
|
|
244
|
+
// case 'Matrix': return res.combine(matrix4.init(item.value))
|
|
245
|
+
// }
|
|
246
|
+
// return res
|
|
247
|
+
// }, matrix4.identity())
|
|
248
|
+
// }
|
|
249
|
+
const result = {}
|
|
241
250
|
if (transform) {
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
case 'Rotate': return res.rotate(item.value)
|
|
247
|
-
case 'Matrix': return res.combine(matrix4.init(item.value))
|
|
248
|
-
}
|
|
249
|
-
return res
|
|
250
|
-
}, matrix4.identity())
|
|
251
|
+
transform.forEach((item) => {
|
|
252
|
+
result[item.type] = item.value
|
|
253
|
+
})
|
|
254
|
+
return result
|
|
251
255
|
}
|
|
252
256
|
}
|
|
253
257
|
|
|
254
258
|
export function capitalizeFirstLetter (str: string) {
|
|
255
259
|
return str.charAt(0).toUpperCase() + str.slice(1)
|
|
256
|
-
}
|
|
260
|
+
}
|
|
@@ -91,7 +91,6 @@ export function bindFn (fn: any, ctx: any, ...args: any) {
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
|
|
95
94
|
// 使用深度优先遍历寻找节点树中对应的子节点,且只需要找到第一个
|
|
96
95
|
// 通过 selector 判断是 id 还是 selector,从 node 的 id 和 className 属性中寻找
|
|
97
96
|
export function findChildNodeWithDFS<T extends TaroElement = TaroElement> (node: TaroElement, selector: string | ((ele: T) => boolean), selectAll: true): T[] | null;
|
|
@@ -315,7 +315,6 @@ export function createNativePageConfig (Component, pageName: string, react: type
|
|
|
315
315
|
Current.router = null
|
|
316
316
|
}
|
|
317
317
|
|
|
318
|
-
|
|
319
318
|
LIFECYCLES.forEach((lifecycle) => {
|
|
320
319
|
pageObj[lifecycle] = function () {
|
|
321
320
|
return safeExecute(this.$taroPath, lifecycle, ...arguments)
|