vue-feather icon indicating copy to clipboard operation
vue-feather copied to clipboard

icon not display

Open krupasavadiya opened this issue 3 years ago • 3 comments

i am using
"feather-icons": "^4.28.0", "vue-feather": "^2.0.0-rc.1", "vue": "^3.2.26", node.js 14

also in main.js

import VueFeather from 'vue-feather';

app.component(VueFeather.name, VueFeather);

and in my component this below the line <vue-feather type="star"></vue-feather>

but this is not showing the star icon. am I missing something?

krupasavadiya avatar Jan 01 '22 07:01 krupasavadiya

I have no idea about this. Any more details?

fengyuanchen avatar Feb 07 '22 10:02 fengyuanchen

try calling: feather.replace() when your component is mounted.

Solotov avatar Dec 29 '22 19:12 Solotov

I have some throuble, I'm new in Vue3, but searching in docs I found how to define components, then I adapt. Now it's working for me :)

import './bootstrap';

import { createApp, defineCustomElement } from 'vue';
import App from './App.vue';

import VueFeather from 'vue-feather';

const app = createApp(App);

app.mount("#app");
customElements.define('vue-feather', defineCustomElement(VueFeather));

Tehen you can use anywhere <vue-feather type="star"></vue-feather>

RC0D3 avatar Oct 24 '23 18:10 RC0D3