nuxt / vue-meta

Manage HTML metadata in Vue.js components with SSR support
https://vue-meta.nuxtjs.org
Other
4.08k stars 247 forks source link

How to use this on vue 2 with vuetify? #775

Open Moanrisy opened 2 years ago

Moanrisy commented 2 years ago

This is my main.js

import Vue from "vue";
import VueMeta from "vue-meta";
import App from "./App.vue";
import vuetify from "./plugins/vuetify";

Vue.config.productionTip = false;

Vue.use(VueMeta, {
  // optional pluginOptions
  refreshOnceOnNavigation: true,
});

new Vue({
  vuetify,
  render: (h) => h(App),
}).$mount("#app");

and this is component where I'm gonna use pannellum.js

<script>
export default {
  name: "View360Mode",
  metaInfo: () => ({
    script: [
      {
        src: "https://cdn.jsdelivr.net/npm/pannellum@2.5.6/build/pannellum.js",
        async: true,
        defer: true,
      },
    ],
  }),
};

pannellum.viewer("panorama", 

^ it keep saying pannellum is not defined