Answer the question
In order to leave comments, you need to log in
How to modify props, or...?
I am rewriting legacy to Vue and I want to do it as a prop
sitewide = config.sitewide === true ? ';path=/' : ''
sitewide
, then the value must be ';path=/'
, otherwise it's an empty string. It is not clear how it is better to do this so as not to cut an additional variable?
Answer the question
In order to leave comments, you need to log in
props: {
siteWide: {
type: Boolean,
default: false,
}
},
computed: {
siteWidePath() {
return this.siteWide ? ';path=/' : '';
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question