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

export default {
    components: { Moveable },
    setup() {
        const onDrag = e => {
            e.target.style.cssText += e.cssText;
        };
        const onDragStart = e => {
            if ([
                "input",
                "select"
            ].indexOf(e.target.tagName.toLowerCase()) > -1) {
                e.stopDrag();
            }
        };
        const onDrag$0 = e => {
            e.target.style.cssText += e.cssText;
        };
        const onDragStart$0 = e => {
            if ([
                "input",
                "select"
            ].indexOf(e.target.tagName.toLowerCase()) > -1) {
                e.stopDrag();
            }
        };
        const onDrag$1 = e => {
            e.target.style.cssText += e.cssText;
        };
        return { onDrag, onDragStart, onDrag$0, onDragStart$0, onDrag$1 };
    }
};
</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>