我一直在研究这个例子:https://capacitor.ionicframework.com/docs/basics/cordova https://capacitor.ionicframework.com/docs/basics/cordova
我跑过:
npm install cordova-plugin-qrscanner
npx cap sync
我可以看到该插件安装在我的node_modules 中。
我不知道该怎么做是调用 cordova-plugin 上的函数之一。我想知道我是否需要像 webpack 这样的打包器?
如果 cordova 插件包含本机 swift (或其他)代码,我也很困惑它是如何工作的。
请记住,您也可以安装本机包装器。它的工作原理应该与使用 Cordova 相同。
npm install @ionic-native/qr-scanner
From:
ionic cordova plugin add cordova-plugin-qrscanner
npm install @ionic-native/qr-scanner
To:
npm install cordova-plugin-qrscanner
npm install @ionic-native/qr-scanner
npx cap sync
https://ionicframework.com/docs/native/qr-scanner https://ionicframework.com/docs/native/qr-scanner
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)