let compileStr = Vue.compile(this.templateString)
this.template = compileStr.render
templateString: function (scope) {
let fun = function () {
console.log("afe")
}
return `
<div>
<el-button type="primary" @click="${fun}"></el-button>
<el-button type="primary"></el-button>
</div>
`
}
fun does not execute after clicking.
if changed to ${fun ()}, there is an error
Invalid handler for event "click": got undefined
is there any way to be able to compile and process, and click to execute fun? correctly What I am using now is to data the fun method
.