在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
import Vue from 'nativescript-vue'
import RadListView from 'nativescript-ui-listview/vue';
Vue.use(RadListView);我的Vue组件
<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>发布于 2019-07-12 09:50:02
这是一个Vue示例。
正如您可以在代码中看到的那样,您不需要添加<ReorderHandle>
示例:
<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>更多细节可以找到这里。
https://stackoverflow.com/questions/56982488
复制相似问题