add iso codes to phone data
This commit is contained in:
committed by
Pete Matsyburka
parent
4737b103c0
commit
e3bed5ae67
File diff suppressed because it is too large
Load Diff
@@ -180,8 +180,8 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
countries () {
|
||||
return phoneData.map(([name, dial, flag, tz]) => {
|
||||
return { name, dial, flag, tz }
|
||||
return phoneData.map(([iso, name, dial, flag, tz]) => {
|
||||
return { iso, name, dial, flag, tz }
|
||||
})
|
||||
},
|
||||
countriesDialIndex () {
|
||||
|
||||
@@ -95,7 +95,7 @@ export default {
|
||||
countryCode () {
|
||||
const browserTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone
|
||||
const browserTz = browserTimeZone.split('/')[1]
|
||||
const country = phoneData.find(([a, b, c, tz]) => tz.includes(browserTz))
|
||||
const country = phoneData.find(([a, b, c, e, tz]) => tz.includes(browserTz))
|
||||
|
||||
return country[0]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user