试图让 Vue-heatmapjs 在 nuxt 应用程序上工作
Trying to get Vue-heatmapjs working on a nuxt application
你好第一次在堆栈溢出上发帖很抱歉
我正在尝试让 vue-heatmapjs https://github.com/BrockReece/vue-heatmapjs 在我的 nuxt js 项目中工作。因为我没有 main.js,所以我把它放在一个插件中,我没有收到任何错误。该项目的滚动图似乎有效,但它只是点击图。
plugins: [
{ ssr: false, src: "~plugins/heatmap-plugin.js"}
],
import vue from 'vue'
import { Subject } from 'rxjs';
import Vueheatmap from 'vue-heatmapjs'
const stream = new Subject();
export const pauser = new Subject();
vue.config.productionTip = false;
vue.use(Vueheatmap, {
stream,
pauser,
heatmapPreload: [{ x: 50, y: 50, value: 100 }],
afterAdd(data) {
console.log(data)
// you can fire this back to your analytics server
},
});
stream.subscribe(console.log);
以上是我的插件代码
所以在大量搜索之后,因为这个热图应用程序的依赖项与我们当前的 nuxt 和 vue 设置不兼容,所以我重新设置了它并更改了依赖项并重写了很多代码。
Vue-rx 是我必须安装以及更新 rxjs 的关键之一
你好第一次在堆栈溢出上发帖很抱歉 我正在尝试让 vue-heatmapjs https://github.com/BrockReece/vue-heatmapjs 在我的 nuxt js 项目中工作。因为我没有 main.js,所以我把它放在一个插件中,我没有收到任何错误。该项目的滚动图似乎有效,但它只是点击图。
plugins: [
{ ssr: false, src: "~plugins/heatmap-plugin.js"}
],
import vue from 'vue'
import { Subject } from 'rxjs';
import Vueheatmap from 'vue-heatmapjs'
const stream = new Subject();
export const pauser = new Subject();
vue.config.productionTip = false;
vue.use(Vueheatmap, {
stream,
pauser,
heatmapPreload: [{ x: 50, y: 50, value: 100 }],
afterAdd(data) {
console.log(data)
// you can fire this back to your analytics server
},
});
stream.subscribe(console.log);
以上是我的插件代码
所以在大量搜索之后,因为这个热图应用程序的依赖项与我们当前的 nuxt 和 vue 设置不兼容,所以我重新设置了它并更改了依赖项并重写了很多代码。
Vue-rx 是我必须安装以及更新 rxjs 的关键之一