import { CreateElement } from 'vue' ; import Draggable from 'vuedraggable' ; import VirtualList from 'vue-virtual-scroll-list' ; import { Vue , Component , Prop , Provide } from 'vue-property-decorator' ; import createBroker from './broker' ; import DraggablePolicy from './broker/draggable-policy' ; import { sortableEventHandlers } from './broker' ; const Broker = createBroker ( VirtualList ) ; @ Component export default class DraggableVirtualList < T > extends Vue { @ Prop ( ) value ! : Array < T > ; @ Provide ( ) Draggable = Draggable ; @ Provide ( ) DraggablePolicy = DraggablePolicy ; public render ( h ) { return h ( Broker , { props : this . $props , attrs : this . $attrs , on : { input : this . $emit . bind ( this , 'input' ) , ... sortableEventHandlers ( this ) , } , } ) ; } }