Here is my page.vue file:
<template>
<div>
<v-runtime-template :template="template"></v-runtime-template>
</div>
</template>
<script>
import VRuntimeTemplate from "v-runtime-template";
export default {
data: () => ({
template: `
<span>{{sample}}</span>
`
}),
components: {
VRuntimeTemplate
},
computed:{
sample(){ return "sampledata" }
}
};
This is content from my package.json file:
"vue": "^2.6.11",
"v-runtime-template": "^1.10.0"
The issue I am facing is the following error in the console:
vue.esm.js?a026:628 [Vue warn]: Property or method "sample" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property..
I have searched through some Github issues, such as this one, which discussed a similar problem.
If anyone has any insights on how to resolve this issue with my simple implementation of the v-runtime-template library, I would greatly appreciate it. Thank you.