UNPKG

devextreme-vue

Version:

DevExtreme Vue UI and Visualization Components

101 lines (99 loc) 3 kB
/*! * devextreme-vue * Version: 25.1.3 * Build date: Wed Jun 25 2025 * * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file in the root of the project for details. * * https://github.com/DevExpress/devextreme-vue */ import { defineComponent } from "vue"; import { prepareComponentConfig } from "./core/index"; import Draggable from "devextreme/ui/draggable"; import { prepareConfigurationComponentConfig } from "./core/index"; const componentConfig = { props: { autoScroll: Boolean, boundary: {}, clone: Boolean, container: {}, cursorOffset: [Object, String], data: {}, dragDirection: String, dragTemplate: {}, elementAttr: Object, group: String, handle: String, height: [Number, String], onDisposing: Function, onDragEnd: Function, onDragMove: Function, onDragStart: Function, onInitialized: Function, onOptionChanged: Function, rtlEnabled: Boolean, scrollSensitivity: Number, scrollSpeed: Number, width: [Number, String] }, emits: { "update:isActive": null, "update:hoveredElement": null, "update:autoScroll": null, "update:boundary": null, "update:clone": null, "update:container": null, "update:cursorOffset": null, "update:data": null, "update:dragDirection": null, "update:dragTemplate": null, "update:elementAttr": null, "update:group": null, "update:handle": null, "update:height": null, "update:onDisposing": null, "update:onDragEnd": null, "update:onDragMove": null, "update:onDragStart": null, "update:onInitialized": null, "update:onOptionChanged": null, "update:rtlEnabled": null, "update:scrollSensitivity": null, "update:scrollSpeed": null, "update:width": null, }, computed: { instance() { return this.$_instance; } }, beforeCreate() { this.$_WidgetClass = Draggable; this.$_hasAsyncTemplate = true; this.$_expectedChildren = { cursorOffset: { isCollectionItem: false, optionName: "cursorOffset" } }; } }; prepareComponentConfig(componentConfig); const DxDraggable = defineComponent(componentConfig); const DxCursorOffsetConfig = { emits: { "update:isActive": null, "update:hoveredElement": null, "update:x": null, "update:y": null, }, props: { x: Number, y: Number } }; prepareConfigurationComponentConfig(DxCursorOffsetConfig); const DxCursorOffset = defineComponent(DxCursorOffsetConfig); DxCursorOffset.$_optionName = "cursorOffset"; export default DxDraggable; export { DxDraggable, DxCursorOffset };