Created
September 13, 2019 21:33
-
-
Save MrJmpl3/48013cbe7acec12199943862347e84d0 to your computer and use it in GitHub Desktop.
Applying the advice of Vuetify
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import mixins from 'vuetify/src/util/mixins'; | |
import VTextField from 'vuetify/lib/components/VTextField'; | |
import VInput from 'vuetify/lib/components/VInput'; | |
export default mixins(VTextField) | |
.extend() | |
.extend({ | |
name: 'CtTextField', | |
props: { | |
dense: { | |
type: Boolean, | |
default: false | |
}, | |
color: { | |
type: String, | |
default: 'secondary' | |
} | |
}, | |
computed: { | |
classes() { | |
return { | |
...VInput.options.computed.classes.call(this), | |
'v-text-field': true, | |
'v-text-field--full-width': this.fullWidth, | |
'v-text-field--prefix': this.prefix, | |
'v-text-field--single-line': this.isSingle, | |
'v-text-field--solo': this.isSolo, | |
'v-text-field--solo-inverted': this.soloInverted, | |
'v-text-field--solo-flat': this.flat, | |
'v-text-field--filled': this.filled, | |
'v-text-field--is-booted': this.isBooted, | |
'v-text-field--enclosed': this.isEnclosed, | |
'v-text-field--reverse': this.reverse, | |
'v-text-field--outlined': this.outlined, | |
'v-text-field--placeholder': this.placeholder, | |
'v-text-field--rounded': this.rounded, | |
'v-text-field--shaped': this.shaped, | |
'ct-text-field': true, | |
'ct-text-field--dense': this.dense | |
}; | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment