<template>
  <div class="hello">
  <input  v-model="phone"/>
  <button @click="submit">提交</button>
    <msg ref="popup"></msg>
     <typebutton>按钮</typebutton>
     <typebutton type="error">按钮</typebutton>
    <typebutton type="info">按钮2</typebutton>
  </div>
</template>

<script>
// import msg from '../plugins/msg'
// import typebutton from '../plugins/typebutton'
export default {
  name: 'HelloWorld',
  components: {
    // msg
    // typebutton
  },
  data () {
    return {
      phone: '',
      typebtn: ''
    }
  },
  methods: {
    submit() {
     if(!this.phone) {
        this.$refs.popup.isinfo = true
        infoon = null
        let infoon = setTimeout(() => {
         this.$refs.popup.isinfo = false
       }, 2000)
   
     }
    }
  }
}
</script>

<style scoped>
.hello{
  width: 100%;
}
</style>
