new FPMoney({
@@ -106,13 +105,8 @@ export default defineComponent({
@@ -125,15 +119,10 @@ export default defineComponent({
diff --git a/src/docs/vue.vue b/src/docs/vue.vue index b0ddf20..4706fb5 100644 --- a/src/docs/vue.vue +++ b/src/docs/vue.vue @@ -36,7 +36,6 @@ export default defineComponent({ // // this.value = Math.random() * 1000 // this.value = chance.integer({ min: 1000, max: 100000 }) // }, 5000) - // setTimeout(() => { // this.currencies = { // PER: { @@ -48,46 +47,42 @@ export default defineComponent({ // fraction: 2 // } // } - // this.currency = 'CAD' - - // setTimeout(() => { - // this.value = 500 - // }, 1000) - - // setTimeout(() => { - // this.currency = 'cad' - // }, 2000) - - // setTimeout(() => { - // this.currency = 'per' - // }, 3000) + // setTimeout(() => { + // this.value = 500 + // }, 1000) + // setTimeout(() => { + // this.currency = 'cad' + // }, 2000) + // setTimeout(() => { + // this.currency = 'per' + // }, 3000) // }, 3000) }, methods: { change(values: Values) { - console.log(values) + // console.log('onChange', values) } } }) @@ -104,14 +99,14 @@ export default defineComponent({ :show-selection="true" /> - +- Value: {{ value }}- +
- Format: {{ format }}
- Display: {{ display }}
+ Value: {{ value }}
+ Format: {{ format }}
+ Display: {{ display }}
Currency: {{ currency }}import fpmoney from 'fp-money/dist/fp-money-vue.js' @@ -139,16 +134,15 @@ export default defineComponent({
<fpmoney id="example" - v-model="value" <-- Required - // Dynamic, and will emit an update - :value.sync="int" <-- Optional - :format.sync="format" <-- Optional - :display.sync="display" <-- Optional - :currency.sync="currency" <-- Optional + v-model="value" <-- Required + v-model:format="format" <-- Optional + v-model:display="display" <-- Optional + v-model:currency="currency" <-- Optional + v-model:locale="locale" <-- Optional // Static, only initially set - :locale="locale" <-- Optional + :currencies="currencies" <-- Optional :disabled="false" <-- Optional :displayOnly="false" <-- Optional valueFormat="float | int" <-- Optional - default float