I know that we can re-initialize the data like this:
function initialData() {
return {
is_active: true,
is_collapsed: true,
resetable_data: 'value',
resetable_stat: 4
}
}
export default {
...
data() {
return {
initialData()
}
},
...
But I am wondering how we can re-initialize only a portion of the data. I mean something like:
function initialData() {
return {
resetable_data: 'value',
resetable_stat: 4
}
}
export default {
...
data() {
return {
is_active: true,
is_collapsed: true,
initialData()
}
},
...
Is there a way to do this?
data: { return {correct? Isn't itdata: function () { return {?...data(){...will fix it now.