<template>
  <div style="margin-top: 200px;">
    myinput: <myinput v-model="val" @focus="myfocus" />
    <div>{{ val }}</div>
    parent: <input v-model="val" />
  </div>
</template>

<script>
import myinput from "./myinput";
export default {
  name: "useMyinput",
  data() {
    return {
      val: 3,
    };
  },
  methods: {
    myfocus(e) {
      // console.log(this.val);
      console.log(e);
    },
  },
  components: {
    myinput,
  },
};
</script>
