I'm having trouble utilizing the mixin function in my template. Although Vue documentation states that mixins and components are merged, I am unable to call the function.
getImage is not a function
Mixin
export default {
data() {
return {
l: 2,
output: 'webp'
}
},
methods: {
getImage() {
return 'www.example.url'
}
}
}
Component
<template>
<v-img :src="getImage()" />
</template>
<script>
import imageMixin from '~/mixins/image'
export default {
name: 'New',
mixin: { imageMixin }
}
</script>
<style scoped></style>