Set default attributes on QInput?
Vegedus last edited by
So basically, we’ve decided we want to always use the “Outlined” style of QInput. I’d like to set this as a default, so every QInput ever doesn’t have to have added the outline attribute to the component. What’s the best way to do this? All my googling turns up that you can do something like Notify.setDefaults(), but I can’t that to work for QInput. Should I simply edit the Stylus? I might want to set defaults for other quasar components as well, I’m still setting up the project, but QInput is the most important one for now.
metalsadman last edited by metalsadman
Wrap a qinput component with your desired props, then use that component throughout your app.
//myinput.vue <template> <q-input outlined ... /> .... // someform.vue import MyInput from '.../myinput.vue' <template> <my-input ... />