首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用RadListView和本地文本-vue

使用RadListView和本地文本-vue
EN

Stack Overflow用户
提问于 2021-05-14 16:47:56
回答 2查看 255关注 0票数 1

我很想知道如何在本地文本-vue中使用RadListView。

目前,我加载了RadListView:

代码语言:javascript
复制
// Rad List View
import RadListView from 'nativescript-ui-listview/vue';
Vue.use(RadListView);

在组成部分中使用:

代码语言:javascript
复制
<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没有定义

代码语言:javascript
复制
(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:

代码语言:javascript
复制
"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",
},
EN

回答 2

Stack Overflow用户

发布于 2021-05-20 15:25:53

您需要安装RadListView NPM包。

代码语言:javascript
复制
tns plugin add nativescript-ui-listview
票数 0
EN

Stack Overflow用户

发布于 2021-05-21 17:04:46

我建议使用这个插件:https://github.com/nativescript-community/ui-collectionview。它的性能更好,并不断更新。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67538023

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档