jonathanpmartins / v-money3

Vue3 currency input/directive mask
MIT License
103 stars 27 forks source link

Adding Lazy option and fix directives #88

Closed marcosgomesneto closed 9 months ago

marcosgomesneto commented 10 months ago

closes #74

NaiveUI Working Example

<n-input
    v-model:value="price"
    v-money="{
      decimal: ',',
      thousands: '.',
      precision: 2,
      masked: false,
      debug: true,
      lazy: false
    }"
/>
jonathanpmartins commented 9 months ago

I merged this pull request in, but I stopped development of this feature until the following topics are checked:

If the new feature is delivered it should have:

@marcosgomesneto For it to work with NaiveUI it must emit the input event?

marcosgomesneto commented 9 months ago

@jonathanpmartins

Yes, for it to work with Naive UI, an "input" event needs to be emitted.

In the next commit I will document, test and explain the functionality better.

Thanks

jonathanpmartins commented 9 months ago

I believe it would be beneficial to introduce a new option, perhaps named 'emittedEventName,' with a default value of 'change' but allowing users to switch it to 'input.' What are your thoughts on this suggestion?

marcosgomesneto commented 9 months ago

Yes, I believe this suggestion is more comprehensive than what I had suggested, as the user can define the name of the event as they wish. I also agree with the naming so that it is very clear what 'emittedEventName' is about.

hamonCordova commented 6 months ago

Was it merged? I think it would solve the problems using UI libs. With the latest version it not seems to work