front-end almost done | started back-end

This commit is contained in:
Amir Mohamadi
2020-11-23 19:39:26 +03:30
parent 95149f0e72
commit 80a7abafb7
191 changed files with 60163 additions and 950 deletions
+33
View File
@@ -0,0 +1,33 @@
<template>
<div class="language">
<select v-model="selectedLocale">
<option v-for="item in locale" :value="item.value">{{item.name}}</option>
</select>
</div>
</template>
<script>
export default {
data() {
return {
selectedLocale: 'fa'
}
},
computed: {
locale() {
return this.$store.state.admin.languages
}
},
created() {
this.$axios.get('/api/public/locale')
.then(response => {
this.$store.commit('admin/updateLanguages', response.data)
})
},
watch: {
selectedLocale(oldVal, newVal) {
this.$store.commit('admin/changeLocale', this.selectedLocale)
}
}
}
</script>