vuetify.js

How to use mask in vuetify text-field?

独自空忆成欢 提交于 2019-11-30 18:23:39
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> You can use return-masked-value prop <v-text-field :value="currentValue" return-masked-value mask="###.###.###-##" @input="handleInput" ></v-text-field> Note that currently in v0.17

Wrapping v-icon with v-tooltip inside text-field?

无人久伴 提交于 2019-11-30 17:51:53
问题 I need help with creating a text-field, which has an icon inside with a tooltip attached to the icon. My code: <v-text-field v-model="url"> <span slot="label">Url <v-tooltip bottom> <v-icon slot="activator" color="primary" dark >home</v-icon> <span>Tooltip</span> </v-tooltip> </span> </v-text-field> Any ideas? Thanks. 回答1: Since v1.1 we can use append (and prepend ) slots for this: <v-text-field v-model="url" label="URL"> <v-tooltip slot="append" bottom> <v-icon slot="activator" color=

How does 'slot activator' work in vuetify?

自古美人都是妖i 提交于 2019-11-30 17:05:28
I am using Vuetify predefined Template 'Google Contacts'. Link: https://vuetifyjs.com/en/examples/layouts/googleContacts I am new in Vuetify and facing difficulties understanding some codes. One is 'slot activator' . Sample Code: <v-list-tile slot="activator"> <v-list-tile-content> <v-list-tile-title> {{ item.text }} </v-list-tile-title> </v-list-tile-content> </v-list-tile> Can anybody tell me how 'slot activator' works? When you declare a Vue component, you can create Named Slots , which is a Vue native feature (not from Vuetify): For example, suppose we have an app-layout component with the

Vuetify's autofocus works only on first modal open

拥有回忆 提交于 2019-11-30 14:46:13
问题 I am trying to use Vuetify's v-text-field autofocus however it works only first time. After I close the dialog, it doesn't work anymore. This is what I am trying to do: <v-text-field ref="focus" autofocus></v-text-field> While googling I found out that it was a bug that was fixed in some version but they had temporary solution which I also tried: watch: { dialog: (val) -> if !val debugger requestAnimationFrame( => @$refs.focus.focus() ) } Am I doing something wrong or it is still a bug?

Vue/vuetify, how to add router link to tab

落爺英雄遲暮 提交于 2019-11-30 14:32:49
I would like to use the vuetify tab component simply as a navigation control, to <v-tabs dark fixed icons centered> <v-tabs-bar class="cyan"> <v-tabs-slider color="yellow"></v-tabs-slider> <v-tabs-item router :to="{name: 'election/admin', id: this.$route.params['id']}"> Overview </v-tabs-item> </v-tabs-bar> </v-tabs> However, it doesn't seem t obe working. I thought that the to property in addition with router should work to replace href? EDIT 2018/11/15 Added new example: codepen <v-tabs v-model="activeTab"> <v-tab v-for="tab in tabs" :key="tab.name" :to="{name: tab.name, params: id}" > {{tab

Vuetify's autofocus works only on first modal open

一世执手 提交于 2019-11-30 13:11:34
I am trying to use Vuetify's v-text-field autofocus however it works only first time. After I close the dialog, it doesn't work anymore. This is what I am trying to do: <v-text-field ref="focus" autofocus></v-text-field> While googling I found out that it was a bug that was fixed in some version but they had temporary solution which I also tried: watch: { dialog: (val) -> if !val debugger requestAnimationFrame( => @$refs.focus.focus() ) } Am I doing something wrong or it is still a bug? Setting breakpoint I saw that it stops at that point. Can anybody lead me to the right direction? The only

Change default font in vuetify

元气小坏坏 提交于 2019-11-30 12:46:48
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. 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. I have noticed that, at least in recent versions of Vuetify, you need to specify both $body-font-family and

Change font size in Vuetify based on viewport?

折月煮酒 提交于 2019-11-30 11:47:45
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 .vue file. Is that possible? Alternatively, I'm ok with using predefined classes instead of specifying

Update Vuetify version

╄→гoц情女王★ 提交于 2019-11-30 09:15:43
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 ? 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 -S vuetify@1.0.0-beta.6 Alternatively, if you prefer yarn yarn add vuetify@1.0.0-beta.6 The -S flag used in

Vuetify: colors are not showing up

最后都变了- 提交于 2019-11-30 08:06:37
I'm trying to integrate Vuetify to my existing Vue project, but the colors are not showing up correctly. I'm following the guide at https://vuetifyjs.com/en/getting-started/quick-start -> existing applications. The css file seems to be somehow loaded correctly as buttons seems to be highlighted with shadows and there are some click effects. However the colors and the text are not showing up correctly: My main.js import Vue from "vue"; import App from "./App"; import Vuetify from "vuetify"; import router from "./router"; import "../node_modules/vuetify/dist/vuetify.min.css"; Vue.config