<template>
  <div id="app">
    <Drage :left="200" :top="200" @blur="handleBlur" @focus="handleFocus">
      <div style="width: 200px; height: 200px; background: red"></div>
    </Drage>
  </div>
</template>

<script>
import Drage from "../src/myPlugin/Drage/drage"; // 引入
export default {
  name: "app",
  data() {
    return {};
  },
  components: {
    //注册插件
    Drage,
  },
  methods: {
    handleFocus(data) {
      console.log(data, "handleFocus");
    },
    handleBlur(data) {
      console.log(data, "handleBlur");
    },
  },
};
</script>

<style>
#app {
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
.title {
  width: 200px;
  height: 100px;
  background: red;
}
</style>
