<script>
import Moveable from "vue-moveable";

export default {
    components: { Moveable },
    data() {
        return {};
    },
    methods: {
        onDrag(e) {
            e.target.style.cssText += e.cssText;
        },
        onDragStart(e) {
            if ([
                "input",
                "select"
            ].indexOf(e.target.tagName.toLowerCase()) > -1) {
                e.stopDrag();
            }
        },
        onDrag$0(e) {
            e.target.style.cssText += e.cssText;
        },
        onDragStart$0(e) {
            if ([
                "input",
                "select"
            ].indexOf(e.target.tagName.toLowerCase()) > -1) {
                e.stopDrag();
            }
        },
        onDrag$1(e) {
            e.target.style.cssText += e.cssText;
        }
    }
};
</script>
<template>
    <div class="container">
        <p>No Stop</p>
        <input
            type="input"
            class="target1"/>
        <p>Stop Drag</p>
        <input
            type="input"
            class="target2"/>
        <p>Stop Drag</p>
        <select class="target3">
            <option>a</option>
            <option>b</option>
            <option>c</option>
        </select>
        <Moveable
            :target="'.target1'"
            :draggable="true"
            @drag="onDrag"/>
        <Moveable
            :target="'.target2'"
            :draggable="true"
            @dragStart="onDragStart"
            @drag="onDrag$0"/>
        <Moveable
            :target="'.target3'"
            :draggable="true"
            @dragStart="onDragStart$0"
            @drag="onDrag$1"/>
    </div>
</template>