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

How to import all icons without one by one

Open muhammadjabir445 opened this issue 2 years ago • 4 comments

How to import all icons without one by one

muhammadjabir445 avatar Feb 15 '22 03:02 muhammadjabir445

kek

thisVioletHydra avatar Feb 22 '22 23:02 thisVioletHydra

Sorry for the forEach mess, didnt´t seem to work, when using Unicon.add(uc); ! But aside that is does the job

//Vue 2 import
import Unicon from 'vue-unicons/dist/vue-unicons-vue2.es'
import * as uc from 'vue-unicons/dist/icons'

/*...*/

const objArray: Array<object> = [];
    Object.keys(uc).forEach(key => objArray.push(
    uc[key]
));
Unicon.add(objArray)
Vue.use(Unicon)

DanielTerletzkiy avatar Mar 20 '22 23:03 DanielTerletzkiy

@DanielTerletzkiy @muhammadjabir445 @thisVioletHydra Hey guys, have you solved this issue ?

adrielkirch avatar Nov 11 '22 16:11 adrielkirch

try vite plugin importus, maybe help u

thisVioletHydra avatar Nov 11 '22 17:11 thisVioletHydra