首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >RadListView:未知自定义元素:<ReorderHandle>

RadListView:未知自定义元素:<ReorderHandle>
EN

Stack Overflow用户
提问于 2019-07-11 06:00:33
回答 1查看 442关注 0票数 0

reorderMode="Drag"中使用reorderMode="Drag"中的RadListView组件(如

[Vue warn]: Unknown custom element: <ReorderHandle> - did you register the component correctly? For recursive components, make sure to provide the "name" option.

如何根据这个ReorderHandle在Nativescript-vue中使用doc链接

任何有关此功能的帮助都将不胜感激。

这是我的密码

main.js

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

我的Vue组件

代码语言:javascript
复制
<RadListView ref="listView" for="(manager, index) in managers" :itemReorder="true" reorderMode="Drag">
    <v-template>
        <Label>{{ manager.name }}</Label>
        <ReorderHandle col="1" verticalAlignment="center">
            <Image android:src="res://reorder_icon" ios:src="res://reorder-icon" stretch="none" verticalAlignment="stretch" margin="16" />
        </ReorderHandle>
    </v-template>
</RadListView>
EN

回答 1

Stack Overflow用户

发布于 2019-07-12 09:50:02

这是一个Vue示例

正如您可以在代码中看到的那样,您不需要添加<ReorderHandle>

示例:

代码语言:javascript
复制
<template>
  <RadListView ref="listView"
               for="item in items"
               pullToRefresh="true"
               itemReorder="true"
               swipeActions="true"
               @itemTap="onItemTap"
               @pullToRefreshInitiated="onPullToRefreshInitiated"
               @itemReordered="onItemReordered"
               @itemSwipeProgressStarted="onSwipeStarted">
    <v-template>
      <GridLayout columns="50, *" rows="*" class="item">
        <Image :src="item.image" col="0" class="thumbnail" />
        <StackLayout col="1">
          <label :text="item.name" class="h2" col="1"/>
          <label :text="item.description" class="p" col="1"/>
        </StackLayout>
      </GridLayout>
    </v-template>

    <v-template name="itemswipe">
      <GridLayout columns="auto, *, auto" backgroundColor="White">
        <StackLayout id="mark-view" col="0" class="swipe-item left"
                     orientation="horizontal" @tap="onLeftSwipeClick">
          <Label text="mark" verticalAlignment="center" horizontalAlignment="center"/>
        </StackLayout>
        <StackLayout id="delete-view" col="2" class="swipe-item right"
                     orientation="horizontal" @tap="onRightSwipeClick">
          <Label text="delete" verticalAlignment="center" horizontalAlignment="center" />
        </StackLayout>
      </GridLayout>
    </v-template>
  </RadListView>
</template>

更多细节可以找到这里

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

https://stackoverflow.com/questions/56982488

复制
相关文章

相似问题

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