OnTheFly: set a dynamic default

This commit is contained in:
nobohan 2022-02-14 22:03:11 +01:00
parent 785e690404
commit 99afd2e830

View File

@ -50,7 +50,7 @@ export default {
},
data() {
return {
type: 'person' //by default
type: null
}
},
computed: {
@ -62,7 +62,10 @@ export default {
get() {
return this.type;
}
}
},
},
mounted() {
this.type = (this.allowedTypes.length === 1 && this.allowedTypes.includes('thirdparty')) ? 'thirdparty' : 'person'
},
methods: {
isActive(tab) {