@tarojs/plugin-platform-harmony-ets 4.0.0-beta.43 → 4.0.0-beta.45
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/base/system.ts +1 -1
- package/dist/components-harmony-ets/pseudo.ets +1 -1
- package/dist/components-harmony-ets/style.ets +49 -49
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/dist/runtime-ets/dom/bind.ts +11 -7
- package/dist/runtime-ets/dom/element/element.ts +76 -1
- package/dist/runtime-ets/dom/stylesheet/covertWeb2Hm.ts +8 -4
- package/dist/runtime-ets/dom/stylesheet/type.ts +3 -1
- package/dist/runtime-ets/utils/index.ts +1 -1
- package/dist/runtime-framework/react/native-page.ts +10 -2
- package/dist/runtime-utils.js +1 -1
- package/dist/runtime-utils.js.map +1 -1
- package/dist/runtime.js +1 -1
- package/dist/runtime.js.map +1 -1
- package/package.json +9 -9
|
@@ -38,7 +38,7 @@ export function convertNumber2PX (value: number) {
|
|
|
38
38
|
return pxTransformHelper(value, 'vp')
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
export function convertNumber2VP (value: number, unit = 'px') {
|
|
41
|
+
export function convertNumber2VP (value: number, unit = 'px'): string | number {
|
|
42
42
|
if (unit === 'vw' || unit === 'vh') {
|
|
43
43
|
return (value / 100 * (unit === 'vw' ? display.width: display.height)) + 'px'
|
|
44
44
|
}
|
|
@@ -52,8 +52,16 @@ function initNativeComponentEntry (params: InitNativeComponentEntryParams) {
|
|
|
52
52
|
|
|
53
53
|
componentDidMount () {
|
|
54
54
|
this.ctx.component = this
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
if (this.root.current) {
|
|
56
|
+
this.root.current = this.ctx
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// React 16 uncaught error 会导致整个应用 crash,
|
|
61
|
+
// 目前把错误缩小到页面
|
|
62
|
+
componentDidCatch (error, info: React.ErrorInfo) {
|
|
63
|
+
console.warn(error)
|
|
64
|
+
console.error(info.componentStack)
|
|
57
65
|
}
|
|
58
66
|
|
|
59
67
|
render () {
|
package/dist/runtime-utils.js
CHANGED
|
@@ -287,7 +287,7 @@ Current.contextPromise.then((context) => {
|
|
|
287
287
|
return;
|
|
288
288
|
}
|
|
289
289
|
const top = Math.max(...boundingRects.map(rect => rect.top + rect.height), ((_a = waterfallDisplayAreaRects.top) === null || _a === void 0 ? void 0 : _a.top) + ((_b = waterfallDisplayAreaRects.top) === null || _b === void 0 ? void 0 : _b.height), statusBarHeight);
|
|
290
|
-
const bottom = display$1.height -
|
|
290
|
+
const bottom = Math.min(display$1.height - ((_c = waterfallDisplayAreaRects.bottom) === null || _c === void 0 ? void 0 : _c.top), navigationIndicatorRect === null || navigationIndicatorRect === void 0 ? void 0 : navigationIndicatorRect.top);
|
|
291
291
|
const left = ((_d = waterfallDisplayAreaRects.left) === null || _d === void 0 ? void 0 : _d.left) + ((_e = waterfallDisplayAreaRects.left) === null || _e === void 0 ? void 0 : _e.width);
|
|
292
292
|
const right = display$1.width - ((_f = waterfallDisplayAreaRects.right) === null || _f === void 0 ? void 0 : _f.left);
|
|
293
293
|
safeArea = {
|