Popupmenu Todo:
- Show Task Completed
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import Vue from 'vue'
|
||||
import { Component, Watch } from 'vue-property-decorator'
|
||||
import { Component } from 'vue-property-decorator'
|
||||
|
||||
import { GlobalStore, UserStore } from '@store'
|
||||
import { GlobalStore } from '@store'
|
||||
|
||||
|
||||
@Component({})
|
||||
@@ -26,16 +26,19 @@ export default class CfgServer extends Vue {
|
||||
field: 'chiave',
|
||||
sortable: true
|
||||
},
|
||||
{ name: 'userid', label: 'UserId', field: 'userid', sortable: false },
|
||||
{ name: 'valore', label: 'Valore', field: 'valore', sortable: false }
|
||||
]
|
||||
|
||||
public visibleColumns: ['chiave', 'valore']
|
||||
public visibleColumns: ['chiave', 'userid', 'valore']
|
||||
public separator: 'horizontal'
|
||||
public filter: string = ''
|
||||
public selected: any[] = []
|
||||
public dark: boolean = true
|
||||
|
||||
public keysel: string = ''
|
||||
public userIdsel: string = ''
|
||||
|
||||
|
||||
get tableClass () {
|
||||
if (this.dark) {
|
||||
@@ -46,6 +49,7 @@ export default class CfgServer extends Vue {
|
||||
selItem(item) {
|
||||
console.log('item', item)
|
||||
this.keysel = item.chiave
|
||||
this.userIdsel = item.userid
|
||||
console.log('this.keysel', this.keysel)
|
||||
}
|
||||
|
||||
@@ -54,6 +58,7 @@ export default class CfgServer extends Vue {
|
||||
|
||||
const mydata = {
|
||||
chiave: this.keysel,
|
||||
userId: this.userIdsel,
|
||||
valore: newVal
|
||||
}
|
||||
// Save on Server
|
||||
|
||||
@@ -15,6 +15,14 @@
|
||||
</q-field>
|
||||
</q-popup-edit>
|
||||
</q-td>
|
||||
<q-td key="userid" :props="props">
|
||||
{{ props.row.userId }}
|
||||
<q-popup-edit v-model="props.row.userId" disable>
|
||||
<q-field count>
|
||||
<q-input v-model="props.row.userId" />
|
||||
</q-field>
|
||||
</q-popup-edit>
|
||||
</q-td>
|
||||
<q-td key="valore" :props="props">
|
||||
{{ props.row.valore }}
|
||||
<q-popup-edit v-model="props.row.valore" title="Aggiorna Valore" buttons @save="SaveValue" @show="selItem(props.row)">
|
||||
|
||||
@@ -36,8 +36,8 @@ export default class Testp1 extends Vue {
|
||||
|
||||
created() {
|
||||
this.mioobj = {
|
||||
arr1: [{chiave: 'key1', valore: 'val1'}],
|
||||
arr2: [{chiave: 'key2', valore: 'val2'}]
|
||||
arr1: [{chiave: 'key1', userId: 'ALL', valore: 'val1'}],
|
||||
arr2: [{chiave: 'key2', userId: 'ALL', valore: 'val2'}]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,18 +68,18 @@ export default class Testp1 extends Vue {
|
||||
}
|
||||
|
||||
TestBtn2() {
|
||||
GlobalStore.state.testp1.mioarray.push({chiave: 'pippo2', valore: GlobalStore.state.testp1.contatore.toString() })
|
||||
GlobalStore.state.testp1.mioarray.push({chiave: 'pippo2', userId: UserStore.state.userId, valore: GlobalStore.state.testp1.contatore.toString() })
|
||||
}
|
||||
|
||||
TestBtnModify() {
|
||||
// GlobalStore.state.testp1.mioarray[GlobalStore.state.testp1.mioarray.length - 1] = GlobalStore.state.testp1.mioarray[GlobalStore.state.testp1.mioarray.length - 1] + 1
|
||||
GlobalStore.mutations.setPaoArray({chiave: 'pippo', valore: '20' } )
|
||||
GlobalStore.mutations.setPaoArray({chiave: 'pippo', userId: UserStore.state.userId, valore: '20' } )
|
||||
|
||||
}
|
||||
|
||||
TestBtnCambiaTutto() {
|
||||
// GlobalStore.state.testp1.mioarray[GlobalStore.state.testp1.mioarray.length - 1] = GlobalStore.state.testp1.mioarray[GlobalStore.state.testp1.mioarray.length - 1] + 1
|
||||
GlobalStore.mutations.NewArray([{chiave: 'nuovorec1', valore: '1' }, {chiave: 'nuovorec2', valore: '2' }] )
|
||||
GlobalStore.mutations.NewArray([{chiave: 'nuovorec1', userId: UserStore.state.userId, valore: '1' }, {chiave: 'nuovorec2', userId: UserStore.state.userId, valore: '2' }] )
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user