[Vuejs]-Get Vuetify icons to work when loading page from filesystem

0👍

Finally figure out how to get this working how I needed it using the method described here.

 // plugins/vuetify.js

import Vue from 'vue'
import Vuetify from 'vuetify/lib'

Vue.use(Vuetify)

export default new Vuetify({
  icons: {
    iconfont: 'mdiSvg'
  }
})

And in the components that I am using the icons (using the mdi information icon for example)

<template>    
    ...
       <v-icon>{{svgPath}}</v-icon>
    ...
</template>
<script>
import {mdiInformation} from '@mdi/js'
  export default {
      ...
      data() {
          return {
              svgPath: mdiInformation
          }
      }
  }
</script>

Leave a comment