E
E
Emil Rakhmatullin2021-01-19 19:25:44
Vue.js
Emil Rakhmatullin, 2021-01-19 19:25:44

How can I use custom icons in Buefy, provided that I include its individual components?

I connect like this:

import { Table, Input, Field, Switch, Radio, Select, Upload, Icon, Loading } from 'buefy'

Vue.use(Table)
Vue.use(Input)
Vue.use(Field)
Vue.use(Switch)
Vue.use(Radio)
Vue.use(Select)
Vue.use(Upload)
Vue.use(Icon)
Vue.use(Loading)


The documentation also has a solution like:
FontAwesome and Custom Icon Pack .

There is no example using customization of a single Icon component (although I tried to do it with it). I also tried to do this:
export default {
        created() {
            this.$buefy.config.setOptions(customIconConfig)
        }
    }

But I'm not available this.$buefy. I think it's because I don't connect the whole Buefy, but it's not sure...)))
Please help. What are the suggestions?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Pastukhov, 2021-01-19
@Emchik

The dock also has ConfigProgrammatic

ConfigProgrammatic.setOptions({
    defaultIconPack: 'fas',
    defaultContainerElement: '#content',
    // ...
})

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question