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