<template>
  <div>
    <x-license-plate @change="change" v-model="licensePlate" :autoShow="false"/>
  </div>
</template>

<script>
import XLicensePlate from './XLicensePlate.vue'
export default {
  name: 'XLicensePlateDemo',
  components: {
    XLicensePlate
  },
  props: {
    placeholder: {
      type: String,
      default: '请输入车牌号'
    }
  },
  data () {
    return {
      licensePlate: '陕A1G78D',
    }
  },
  filters: {},
  created () {
  },
  watch: {
    licensePlate (vale) {
      console.log('监听model变化', vale)
    }
  },
  methods: {
    change (a) {
      console.log(a, this.licensePlate)
      console.log('数组形式:' + a.array)
      console.log('字符串形式:' + a.value)
      console.log('是否验证通过:' + a.pass)
    }
  }
}
</script>
<style scoped>
.clickable-input input {
  pointer-events: none;
  cursor: pointer;
}
</style>
