提交 117d73a2 编写于 作者: Q qiang

fix(h5): offCompassChange

上级 2bdb8c9d
......@@ -15574,7 +15574,7 @@ let listener = null;
const onCompassChange = /* @__PURE__ */ defineOnApi(API_ON_COMPASS, () => {
startCompass();
});
const offCompassChange = /* @__PURE__ */ defineOnApi(API_OFF_COMPASS, () => {
const offCompassChange = /* @__PURE__ */ defineOffApi(API_OFF_COMPASS, () => {
stopCompass();
});
const startCompass = /* @__PURE__ */ defineAsyncApi(API_START_COMPASS, (_, { resolve, reject }) => {
......
......@@ -9,6 +9,7 @@ import {
API_STOP_COMPASS,
API_TYPE_STOP_COMPASS,
defineOnApi,
defineOffApi,
} from '@dcloudio/uni-api'
let listener: ((event: DeviceOrientationEvent) => void) | null = null
......@@ -20,7 +21,7 @@ export const onCompassChange = <API_TYPE_ON_COMPASS_CHANGE>(
)
export const offCompassChange = <API_TYPE_OFF_COMPASS_CHANGE>(
defineOnApi(API_OFF_COMPASS, () => {
defineOffApi(API_OFF_COMPASS, () => {
stopCompass()
})
)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册