added auto save and save button

This commit is contained in:
ori agranat
2019-10-29 23:58:06 +02:00
parent a72336270b
commit 1e02f114e1
21 changed files with 545 additions and 474 deletions

View File

@@ -5,7 +5,8 @@
<span>{{name}}</span>
</v-col>
<v-col :cols="9">
<v-select v-model="localValue" :items="indexList" item-text="name" item-value="index" dark color="#4baf62" item-color="green" :disabled="disabled"></v-select>
<v-select v-model="localValue" :items="indexList" item-text="name" item-value="index" dark
color="#4baf62" item-color="green" :disabled="disabled"/>
</v-col>
</v-row>
</div>
@@ -14,26 +15,26 @@
<script>
export default {
name: 'Select',
props:['list','name','value','disabled'],
props: ['list', 'name', 'value', 'disabled'],
data() {
return {
}
return {}
},
computed:{
localValue:{
get(){
computed: {
localValue: {
get() {
return this.value;
},
set(value){
this.$emit('input',value)
set(value) {
this.$emit('input', value)
}
},
indexList(){
indexList() {
let list = []
for(let i=0 ; i<this.list.length; i++){
for (let i = 0; i < this.list.length; i++) {
list.push({
name:this.list[i],
index:i});
name: this.list[i],
index: i
});
}
return list;
}