-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Update input.md docs - adding example for vue-autonumeric as 3rd party mask processor #8568
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
base: dev
Are you sure you want to change the base?
Conversation
Add example about how to use vue-autonumeric as 3rd party mask processor. Note that the existing example for v-money points to a package that is no longer actively maintained.
how would I add vue-autonumeric to a project in the first place without that aliasing and stuff? |
I remember that I updated my quasar.conf.js to support VueAutoNumeric in my Quasar production build: In the extendWebPack() { } part, I added: Without that, I remember I had a build error in my production build ("Module not found: Error: Can't resolve 'AutoNumeric'"). The rest of using VueAutoNumeric is quite simple: Then you can use the vue-autonumeric component for input fields in your template. |
I hoped i get around this config stuff |
I fear no....it is even documented that it is needed in https://www.npmjs.com/package/vue-autonumeric |
Aliasing doesn't seem to help
|
Oh let me guess, vue2 only? |
Maybe, I'm using it only with Vue 2/Quasar 1. See also autoNumeric/vue-autoNumeric#52 I fear though there is no good other alternative on Vue 3, as V-Money seems to be dead. |
I found this: https://www.npmjs.com/package/vue-numeric - it says it works with Vue 2. |
the rendering has breaking changes in vue3 https://v3.vuejs.org/guide/migration/render-function-api.html#_2-x-syntax so those won't work with quasar 2 |
I did a sniff test of the above alternative, VueNumeric, and found that it is not suitable for my needs. It supports the output of decimal numbers, but not masked, configurable input of decimals like VueAutoNumeric (= "as-you-type" formatting). The placeholder prop in VueNumeric does something totally different (displays default text if field is empty) as the same prop in VueAutoNumeric (= intelligent mask for decimal input). So there is no good alternative for VueAutoNumeric in sight - too bad. |
Found another potential alternative: https://dm4t2.github.io/vue-currency-input/ - it supports Vue 3 and looks promising. Haven't tried it yet. |
I tried VueCurrencyInput, https://dm4t2.github.io/vue-currency-input/ on Vue 2/Quasar 1 and it works very well. It looks like a good alternative for VueAutoNumeric. It supports Vue 3 as well. |
Add example about how to use vue-autonumeric as 3rd party mask processor.
Note that the existing example for v-money points to a package that is no longer actively maintained.
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing applications:
The PR fulfills these requirements:
dev
branch and not themaster
branchfix: #xxx[,#xxx]
, where "xxx" is the issue number)If adding a new feature, the PR's description includes:
Other information:
Suggest to update the q-input doc for this example on how to use vue-autonumeric. The existing example for v-money uses a component that is no longer actively maintained., and has significantly less features and downloads compared to vue-autonumeric.