我尝试在我的应用程序中实现指南针的使用,但Apache Cordova的文档说该插件已过时
https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-device-orientation/
按照他们提到的帖子,记录提到的事件(指南针需要校准,设备方向(,但从不运行。
https://blog.phonegap.com/migrating-from-the-cordova-device-orientation-plugin-8442b869e6cc
如果我尝试运行navigator.compass或window.compass,它会提到它是未定义的
我目前正在将 Phonegap 模板与 Vue 一起使用 https://github.com/phonegap/phonegap-template-vue-f7-blank
你删除了科尔多瓦插件吗?