-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(textfield): add new prop text-field-label for user custom label
ad new prop text-field-label for user to custom textfield label fix #1
- Loading branch information
yogakurniawan
committed
May 1, 2020
1 parent
d495a57
commit d0ccae8
Showing
3 changed files
with
46 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,55 @@ | ||
<template> | ||
<v-container> | ||
<v-row class="text-center"> | ||
<v-col cols="12"> | ||
<v-row justify="center"> | ||
<v-col cols="6"> | ||
<vue-tel-input-vuetify | ||
:preferred-countries="['us', 'gb', 'ua']" | ||
:preferred-countries="['id', 'gb', 'ua']" | ||
:valid-characters-only="true" | ||
@input="onInput" | ||
/> | ||
</v-col> | ||
</v-row> | ||
<v-row justify="center"> | ||
<v-col cols="6"> | ||
<div v-if="phone.number" style="color: #e83e8c"> | ||
<span> | ||
Number: | ||
<strong>{{ phone.number }}</strong | ||
>, | ||
</span> | ||
<span> | ||
Is valid: | ||
<strong>{{ phone.valid }}</strong | ||
>, | ||
</span> | ||
<span> | ||
Country: | ||
<strong>{{ phone.country }}</strong> | ||
</span> | ||
</div> | ||
</v-col> | ||
</v-row> | ||
</v-container> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: "Example" | ||
name: "Example", | ||
data() { | ||
return { | ||
phone: { | ||
number: "", | ||
valid: false, | ||
country: undefined | ||
} | ||
}; | ||
}, | ||
methods: { | ||
onInput(formattedNumber, { number, valid, country }) { | ||
this.phone.number = number.international; | ||
this.phone.valid = valid; | ||
this.phone.country = country && country.name; | ||
} | ||
} | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters