computed: {
filteredDialogs: function () {
let filtered = [...this.dialogs]
return this.search === ''
? filtered
: filtered.filter(c => c.fullname.toLowerCase().indexOf(this.search.toLocaleLowerCase()) > -1)
}
},
const news = posts.map(p => ({ ...p, user: users.find(u => p.userId === u.id) }))
vm.markers = response.data.data.map(m => {
return {
name: m.name,
address: m.address,
position: { lat: m.lat, lng: m.lng }
}
})
<carousel @changed="changed" @updated="updated">
router.beforeEach((to, from, next) => {
const currentUser = localStorage.getItem("auth");
if (currentUser && to.path !== '/panel' ) {
next("panel");
} else {
next();
}
});
<input type="text" v-model="inputPhone">
<div v-for="phone in phones" @click="inputPhone = phone">
{{phone}}
</div>
<tr f-vor="item, index in items" :key="index" @click="selectRow(item)"> </tr>
selectRow(item) {
if (item.first === this.myInput) {
this.myInput = ''
} else { this.myInput = item.first }
}