Error instantiating a viukit icon

2019-08-20 09:37发布

问题:

Given:

import Vue from 'vue'
import Vuikit from 'vuikit'
import VuikitIcons from '@vuikit/icons'

Vue.use(Vuikit)
Vue.use(VuikitIcons)

...

Trying to instantiate an icon like this doesn't work:

  <vk-icon icon="cog" v-on:click="onClick"></vk-icon> // doesn't work

error:

Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.

I'm only able to instantiate it like this:

<vk-icons-cog  v-on:click.native="onClick"> // does work

is there anything I'm missing?

回答1:

Issue related to version 0.6.2 it works fine on 0.8.5