✨ (transaction) implementation of currency input lib
This commit is contained in:
@@ -53,15 +53,15 @@
|
|||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="field has-addons">
|
<div class="field has-addons">
|
||||||
<p class="control is-expanded">
|
<p class="control is-expanded">
|
||||||
<input
|
<currency-input
|
||||||
type="number"
|
v-model="amount"
|
||||||
class="input"
|
|
||||||
v-model.number="amount"
|
|
||||||
placeholder="Montant"
|
placeholder="Montant"
|
||||||
inputmode="numeric"
|
class="input"
|
||||||
pattern="[0-9]*"
|
:currency="null"
|
||||||
min="0"
|
:locale="locale"
|
||||||
max="1000000"
|
:precision="2"
|
||||||
|
:allow-negative="false"
|
||||||
|
:value-range="{ min: 0, max: 1000000 }"
|
||||||
/>
|
/>
|
||||||
</p>
|
</p>
|
||||||
<p class="control">
|
<p class="control">
|
||||||
@@ -228,6 +228,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Component, Prop, Vue, Watch } from 'vue-property-decorator'
|
import { Component, Prop, Vue, Watch } from 'vue-property-decorator'
|
||||||
import { Getter } from 'vuex-class'
|
import { Getter } from 'vuex-class'
|
||||||
|
import { CurrencyInput } from 'vue-currency-input'
|
||||||
import IAccount from '@/models/IAccount'
|
import IAccount from '@/models/IAccount'
|
||||||
import ICurrency from '@/models/ICurrency'
|
import ICurrency from '@/models/ICurrency'
|
||||||
import ITransaction from '@/models/ITransaction'
|
import ITransaction from '@/models/ITransaction'
|
||||||
@@ -249,6 +250,7 @@ const today: Date = new Date()
|
|||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
components: {
|
components: {
|
||||||
|
'currency-input': CurrencyInput,
|
||||||
'earth-map': () => import('@/components/EarthMap.vue'),
|
'earth-map': () => import('@/components/EarthMap.vue'),
|
||||||
'fab-button': () => import('@/components/FabButton.vue'),
|
'fab-button': () => import('@/components/FabButton.vue'),
|
||||||
'transaction-split': () => import('@/components/TransactionSplit.vue'),
|
'transaction-split': () => import('@/components/TransactionSplit.vue'),
|
||||||
@@ -257,6 +259,8 @@ const today: Date = new Date()
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
export default class TransactionCreate extends Vue {
|
export default class TransactionCreate extends Vue {
|
||||||
|
@Getter
|
||||||
|
public locale!: string
|
||||||
@Getter
|
@Getter
|
||||||
public user!: IUser | null
|
public user!: IUser | null
|
||||||
@Prop({ type: Object, required: true })
|
@Prop({ type: Object, required: true })
|
||||||
|
|||||||
Reference in New Issue
Block a user