I'm using vue-tel-input
. It is working, but I want to remove the country code from the input field. I have tried using different modes (ie national
and international
), but it is showing either +91
or 0
, but I want to remove that 0
or 91
from the field and input
event.
onInput({ number, isValid, country }) {
this.mobile=number.significant;
this.country_code=country.dialCode;
},
You can hide both the leading 0
and the dial code ( +91
) by disabling the auto formatting. The trade off is this disables all formatting for the number.
<vue-tel-input :autoFormat="false" ... />
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.