export default {
components: {
widgetLocationSelector
},
data: function () {
return {
loading: '',
message: false,
errors: '',
maxCount: 250,
remainingCount: 250,
genderOptions: [
{ value: 1, text: 'Мужской' },
{ value: 2, text: 'Женский' }
],
form: {
country: 0,
city: 0,
phone: []
}
}
},
created: function () {
var store = this.$store
this.$http.get(store.state.apiURL + '/v1/users/' + store.state.user.id + '?expand=country,city', {}, {}).then(function (response) {
var data = response.body
if (data.country > 0) {
this.form.country = data.country
}
if (data.city > 0) {
this.form.city = data.city
}
})
},
https://jsfiddle.net/4qvy80z1/1/
Если два input то нет
https://jsfiddle.net/eywraw8t/65222/
ххмммм