Remove default v-input-file icon in Vuetify

走远了吗. 提交于 2020-01-11 14:27:05

问题


v-file-input is a new component that appeared in Vuetify v2.

<v-file-input multiple label="File input"></v-file-input>

The default behavior shows a prepended icon:

Is there a way to get rid of it ?


回答1:


Try this:

<v-file-input multiple label="File input" :prepend-icon="undefined"></v-file-input>

or

<v-file-input multiple label="File input" prepend-icon="fancyIconName"></v-file-input>



回答2:


<v-file-input multiple label="File input" prepend-icon=""></v-file-input>

You can disable (or change) it globally in whole app by initializing Vuetify like this:

new Vuetify({
    icons: {
      values: {
        file: ''
      },
    } 
  })

See the docs



来源:https://stackoverflow.com/questions/59370702/remove-default-v-input-file-icon-in-vuetify

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!