@tarojs/plugin-platform-harmony-ets 4.0.0-beta.87 → 4.0.0-beta.89
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/index.d.ts +1 -1
- package/dist/index.js +15 -14
- package/dist/index.js.map +1 -1
- package/dist/runtime-ets/dom/element/element.ts +2 -2
- package/dist/runtime-ets/dom/element/index.ts +2 -2
- package/dist/runtime-ets/utils/index.ts +1 -0
- package/dist/runtime-framework/solid/app.ts +1 -1
- package/dist/runtime-utils.js +4 -4
- package/dist/runtime-utils.js.map +1 -1
- package/dist/runtime.js +4 -4
- package/dist/runtime.js.map +1 -1
- package/package.json +14 -13
- package/types/runtime.d.ts +1 -1
package/dist/runtime-utils.js
CHANGED
|
@@ -459,7 +459,7 @@ const base64ToArrayBuffer = /* @__PURE__ */ temporarilyNotSupport('base64ToArray
|
|
|
459
459
|
/** 创建离屏 canvas 实例 */
|
|
460
460
|
const createOffscreenCanvas = /* @__PURE__ */ temporarilyNotSupport('createOffscreenCanvas');
|
|
461
461
|
/** 创建 canvas 的绘图上下文 CanvasContext 对象 */
|
|
462
|
-
|
|
462
|
+
|
|
463
463
|
const createCanvasContext = (canvasId) => {
|
|
464
464
|
const dom = eventSource.get(`canvasId-${canvasId}`);
|
|
465
465
|
// return dom as TaroCanvasElement
|
|
@@ -586,7 +586,7 @@ const getBatteryInfoSync = () => ({
|
|
|
586
586
|
isCharging: [BatteryChargeState.ENABLE, BatteryChargeState.FULL].includes(batteryInfo.chargingStatus),
|
|
587
587
|
level: batteryInfo.batterySOC
|
|
588
588
|
});
|
|
589
|
-
const getBatteryInfo = (
|
|
589
|
+
const getBatteryInfo = ({ success, fail, complete } = {}) => __awaiter(void 0, void 0, void 0, function* () {
|
|
590
590
|
const handle = new MethodHandler({ name: 'getBatteryInfo', success, fail, complete });
|
|
591
591
|
try {
|
|
592
592
|
return handle.success(getBatteryInfoSync());
|
|
@@ -831,7 +831,7 @@ const getNetworkType = (options = {}) => {
|
|
|
831
831
|
});
|
|
832
832
|
};
|
|
833
833
|
const networkStatusManager = new CallbackManager();
|
|
834
|
-
const networkStatusListener = (
|
|
834
|
+
const networkStatusListener = (data, code = 0) => __awaiter(void 0, void 0, void 0, function* () {
|
|
835
835
|
if (code > 0) {
|
|
836
836
|
return networkStatusManager.trigger({ isConnected: false, networkType: 'none' });
|
|
837
837
|
}
|
|
@@ -2073,7 +2073,7 @@ function formatLocation(location) {
|
|
|
2073
2073
|
altitude: location.altitude,
|
|
2074
2074
|
accuracy: location.accuracy,
|
|
2075
2075
|
speed: location.speed,
|
|
2076
|
-
verticalAccuracy: 0,
|
|
2076
|
+
verticalAccuracy: 0,
|
|
2077
2077
|
horizontalAccuracy: 0 // OHOS 不支持返回此参数,直接设置为默认值
|
|
2078
2078
|
};
|
|
2079
2079
|
return wxLocate;
|