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