0๐
can you make a demo in codepen or something like that?
let importedComponent= (keyname)=> ({
async mounted() {
if(keyname in this)
this[keyname] = await this.$content.get({[keyname]: this[keyname])
else throw()
}
})
export default {
mixin: [
importedComponent("portfolio")
],
data() {
return {
portfolio: {
portfolioID: null
}
}
},
}
Source:stackexchange.com