vue-tel-input icon indicating copy to clipboard operation
vue-tel-input copied to clipboard

I cant get data from this component except the phone number. How can I access the full component data properperty??

Open ghost opened this issue 4 years ago • 1 comments

ghost avatar Jan 15 '20 09:01 ghost

After scavenging, I realised that the data shown in the demo can be found on the component.

You can access the the component data attribute or computed attribute via reference.

<template>
  <vue-tel-input ref="sample" />
</template>
<script>
export default {
  ....
  computed: {
    phoneObject() {
      return this.$refs.['sample'].phoneObject;
    },
  },
}
</script>

ITBDarky avatar Jan 12 '22 09:01 ITBDarky