-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Usage as directive #8
Comments
v-money already can be used as directive, but still doesn't work with vuetify because the root element is not the input. If I fix it, I'll try to do the same with vue-the-mask. |
Just fixed it for v-money. I'll let you know if it works for vue-the-mask |
v-money works great as directive! I am looking forward for the vue-the-mask |
@neves any news? v-mask sucks and i dont wanna stick with it! |
@gfviegas Try the latest alpha version using: |
nope... console error thrown: vue-the-mask.js?3d13:1 Uncaught ReferenceError: mask is not defined
at Object.defineProperty.value (vue-the-mask.js?3d13:1)
at t (vue-the-mask.js?3d13:1)
at Object.eval (vue-the-mask.js?3d13:1)
at t (vue-the-mask.js?3d13:1)
at e.exports.#.pattern (vue-the-mask.js?3d13:1)
at eval (vue-the-mask.js?3d13:1)
at eval (vue-the-mask.js?3d13:1)
at eval (vue-the-mask.js?3d13:1)
at Object.<anonymous> (app.js:1830)
at __webpack_require__ (app.js:660) I've tried several masks combination, with raw input tag and a custom input component but none of them worked. I'm using v-model and i've tried using the v-mask as you've inserted in the docs |
Oh, @neves , i've noticed that in docs.vue you've inserted the working example as: <div class="field" v-mask="'##/##/####'">
<input type="tel" placeholder="dd/mm/yyyy" />
</div> but it's telling to insert the v-mask on the input tag on the example code. Which one is right? |
@neves Should I import anything in my .vue file and declare it as a directive? EDIT: Actually I think it's a problem with your version. Even though I use the way I was using (with your component as usual), the error is thrown. It only goes away when I comment the |
Try the latest version, there was a typo. |
@neves the mask simply won't apply. Do i need to import anything and declare as a directive or a component? I'm currently doing so globally, in my main file: import VueTheMask from 'vue-the-mask'
Vue.use(VueTheMask) |
@gfviegas Try again 0.11.0-alpha.1 import VueTheMask from 'vue-the-mask'
Vue.use(VueTheMask) Or just directive inside component: import {mask} from 'vue-the-mask'
export default {
directives: {mask}
} |
Implemented in version v0.11.0-beta |
Caro @neves , sou meio novato em VueJS e adorei seu pacote, mas gostaria de saber como o uso em uma página Laravel. Dentro da tag <script> tenho:
E no input onde quero mascarar:
Mas não está rolando. Que bobagem estou fazendo? |
@marcellopato você importou o pacote de forma errada. Faça conforme abaixo que dará certo:
|
Obrigado @farnetani ! Agora deu certinho! |
Any chances to use this as directive to integrate with UI frameworks such as vuetify?
The text was updated successfully, but these errors were encountered: