微信小程序混合开发时使用getApp()使用全局注册的属性或函数,那么需要在哪里注册这些属性或函数
-
微信小程序混合开发时使用getApp()获取全局注册的属性或函数,那么需要在哪里注册这些属性或函数呢?微信小程序是写在App()方法里的,那么在taro中怎么写呢
-
// 注册 import { Current } from '@tarojs/taro' Current.app.sensors = ()=> {} // 使用 import { Current } from '@tarojs/taro' Current.app.sensors.track()
https://github.com/NervJS/taro/issues/7110#issuecomment-691662816