我很想知道如何在本地文本-vue中使用RadListView。
目前,我加载了RadListView:
// Rad List View
import RadListView from 'nativescript-ui-listview/vue';
Vue.use(RadListView);在组成部分中使用:
<template>
<Page>
<ActionBar>
<Label text="Home"/>
</ActionBar>
<StackLayout orientation="vertical">
<RadListView ref="listView" for="post in getFeed" height="50%">
<v-template>
<Label :text="post.id" />
</v-template>
</RadListView>
</StackLayout>
</Page>
</template>但是我有一个错误未定义ReferenceError: TKListViewDelegate没有定义:
(CoreFoundation) *** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: Uncaught ReferenceError: TKListViewDelegate is not defined
at (file: app/webpack:/@nativescript/template-blank-vue/node_modules/nativescript-ui-listview/ui-listview.ios.js:516:0) at ./node_modules/nativescript-ui-listview/ui-listview.ios.js(file: app/webpack:/@nativescript/template-blank-vue/node_modules/nativescript-ui-listview/ui-listview.ios.js:518:1)我的pakages.json:
"dependencies": {
"@nativescript/core": "^8.0.5",
"@nativescript/theme": "~3.0.1",
"@triniwiz/nativescript-socketio": "^4.0.1",
"@triniwiz/nativescript-toasty": "^4.1.3",
"nativescript-vue": "~2.9.0",
"nativescript-vue-devtools": "^1.5.1"
},
"devDependencies": {
"@nativescript/ios": "8.0.0",
"@nativescript/webpack": "beta",
"nativescript-ui-listview": "^9.1.0",
"nativescript-vue-template-compiler": "~2.9.0",
"tns-core-modules": "^6.5.27",
},发布于 2021-05-20 15:25:53
您需要安装RadListView NPM包。
tns plugin add nativescript-ui-listview发布于 2021-05-21 17:04:46
我建议使用这个插件:https://github.com/nativescript-community/ui-collectionview。它的性能更好,并不断更新。
https://stackoverflow.com/questions/67538023
复制相似问题