const owner = this;
const echarts = require("echarts");
require("echarts-wordcloud");
const chart = echarts.init(document.getElementById("wcmain"));
chart.on("click", (params) => {
// console.log(params);
owner.$router.push(`/search-results?keyword=${params.data.name}`);
});
is there any other way to correct the problem that this points to? Some people say that using call, which god knows how to use it?
can be used when it is changed to this way
this.call(this.$router.push(`/search-results?keyword=${params.data.name}`));
but how to correct the error _ this.call is not a function?