vuetify.js

Accessing VUE JS's data from Axios

烈酒焚心 提交于 2019-11-30 05:22:37
I have a Vue JS (Vuetify) App that makes an ajax request that I would like to populate a div's content with the response, however I am having difficulties accessing the instance's data . All examples I have seen use this to point to the data object, but when I do I get this error Unable to set property 'message' of undefined or null reference The app is quite simple: main.js : import Vue from 'vue' import App from './App.vue' import Vuetify from 'vuetify' Vue.use(Vuetify) new Vue({ el: '#app', render: h => h(App) }) App.vue export default { data () { return { .... message: '', order: {}, ... }

How To change theme colors on Nuxt/Vuetify starter template

眉间皱痕 提交于 2019-11-30 03:38:49
问题 Change colors I'm trying to use Vue with Nuxt and Vuetify for the styles, on Vuetify exists many templates, one of them brings all. I tried to add colors on /assets/style/app.styl without effect. Also on /plugins/vueitfy.js add something like: Vue.use(Vuetify, { theme: { header: '#48393C', footer: '#2f3542' } }) Without effects, i think that the last way is the best way for do it. 回答1: There are two options to change the color theme 1. from the /plugins/vueitfy.js Vue.use(Vuetify, { theme: {

How to use mask in vuetify text-field?

随声附和 提交于 2019-11-30 01:40:46
问题 I'm trying to use the mask property of text-field component, like the example below. In the view, that works like a charm, but, when the form is posted, the mask format does not keep the value. For example, when I type "000.000.000-00", the value that the form posted was "00000000000". How can I keep the format value? <v-text-field :value="currentValue" @input="handleInput" :mask="###.###.###-##"></v-text-field> 回答1: You can use return-masked-value prop <v-text-field :value="currentValue"

Set initial vuetify v-select value

China☆狼群 提交于 2019-11-29 19:26:11
问题 Can someone help me set the default value for a v-select ? The caveat is that my v-select is populated with objects, which I think might be the reason why assigning my item-value to my desired initial value isn't working: <v-select item-text="name" v-model="defaultSelected" :items="people" > Vue.use(Vuetify); const vm = new Vue({ el: "#app", data: { defaultSelected: { name: "John", last: "Doe" }, people: [ { name: "Harry", last: "Potter" }, { name: "George", last: "Bush" } ] } }); Expected:

FontAwesome with Vuetify - How to include Font Awesome icons within the v-icon component

眉间皱痕 提交于 2019-11-29 18:00:15
问题 Hopefully someone will know where I have gone wrong here - I'm trying to implement the Font Awesome package with Vuetify. Font Awesome is all imported and ready to go (setup is indentical to projects which I have Font Awesome successfully integrated): My bare basics main.js file: import '@babel/polyfill' import Vue from 'vue' import './plugins/vuetify' import App from './App.vue' import store from './store' import './registerServiceWorker' import { library } from '@fortawesome/fontawesome-svg

Change font size in Vuetify based on viewport?

依然范特西╮ 提交于 2019-11-29 17:23:22
问题 I have a title: <v-card-text style="font-size:5em"> Some Heading Here </v-card-text> I would like to set font size to 3em when the view is XS. Right now I duplicated it as follows: <v-card-text hidden-xs-only style="font-size:5em"> Some Heading Here </v-card-text> <v-card-text visible-xs-only style="font-size:3em"> Some Heading Here </v-card-text> However I would like to avoid this duplication and solve the issue with CSS alone , but without having to write my own @media queries in the local

Vuetify how to mark field as required

核能气质少年 提交于 2019-11-29 14:43:57
When we try to fill forms in the internet, required fields are marked using a red color ' * ' mark to indicate that the field is a must. Like that is there a way to indicate users to required fields in vuetify.js? From v1.1.0 docs : The required prop no longer explicitly adds an asterisk to the label. All of its functionality to validation was removed for v1.0. So apparently nothing will set it as required anymore, we have to add it manually in the label: label="Name*" Or you could use CSS: .required label::after { content: "*"; } Tho you must add required class manually (name of the class is

Update Vuetify version

自作多情 提交于 2019-11-29 13:28:16
问题 To update the Vuetify component library in my project, I changed the version in package.json and ran the command npm install . Vuetify is now removed from the node_modules folder. How should I install it again? Why does npm install Vuetify not bring it back into node_modules ? 回答1: Run npm info vuetify to lookup for the list of versions that they have. Install the specific version that you want with the following. I am using the latest vuetify v1.0.0-beta.6 as an example. Example: npm install

Change default font in vuetify

跟風遠走 提交于 2019-11-29 11:45:34
问题 I can't figure out how to change the default font in vuetify. I've been looking for the right variable within ./node_modules/vuetify, but I can't locate it. I'd ideally not make any changes in the module, but would rather override such variables from outside the module. 回答1: The easiest way would be to simply set the font-family on body . If you are using webpack and importing the Vuetify stylus entry, main.styl , you can simply overwrite the $font-family variable with whatever font you want.

Vuetify text field border missing

吃可爱长大的小学妹 提交于 2019-11-29 10:59:56
I'm trying to implement Veutify's text field This is what it looks like for me right now: And this is what it looks like when the text field is in focus: These are my imports in main.js import Vue from 'vue'; import Vuetify from 'vuetify'; Vue.use(Vuetify); Am I missing an import or something? I ran in the same issue, you need to wrap your application in a <v-app> . The reason is that the border's color depends on the theme you're using. If you try to inspect the documentation you will see that the border's rule is something like .application--light .input-group .input-group__details :