在 NS 7 应用程序中使用带有 Vue.js 的 Nativescript Filterable ListPIcker 插件

Using Nativescript Filterable ListPIcker plugin with Vue.js in NS 7 app

我希望在我的 Nativescript 7/ Vue.js 应用程序中使用以下插件: https://github.com/nstudio/nativescript-plugins/tree/master/packages/nativescript-filterable-listpicker

任何人都可以建议我如何在我的应用程序中注册组件,以及需要导入什么。

提前谢谢你,

编辑:已找到解决方案。我不明白我怎么能一遍又一遍地做完全相同的事情,突然之间它会突然出现....

就用这个:

import FilterableListpicker from "@nstudio/nativescript-filterable-listpicker";
Vue.registerElement("FilterableListpicker", () => require("@nstudio/nativescript-filterable-listpicker").FilterableListpicker);

记得在组件选项中也添加 FilterableListPicker。

祝你好运!

原回答: 很想知道这个问题的答案,因为我整整 2 天都在尝试修复错误。 我试过 nstudio(根据博客 post 及以上...)和 davecoffin 插件但没有成功。

davecoffin版本给出

Error in render: "TypeError: Class constructor FilterableListpicker cannot be invoked without 'new'"

而 nstudio 版本提供

Error in v-on handler (Promise/async): "TypeError: Cannot read property 'setAttribute' of undefined"