mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-16 07:57:33 +08:00
use custom number input box to replace the system input box
This commit is contained in:
@@ -11,11 +11,13 @@
|
||||
<v-card-text class="my-md-4 w-100 d-flex justify-center">
|
||||
<v-row>
|
||||
<v-col cols="12" md="6">
|
||||
<v-text-field type="number"
|
||||
:disabled="submitting"
|
||||
<number-input :disabled="submitting"
|
||||
:label="tt('Amount')"
|
||||
:placeholder="tt('Amount')"
|
||||
:persistent-placeholder="true"
|
||||
:min-value="USER_CUSTOM_EXCHANGE_RATE_MIN_VALUE"
|
||||
:max-value="USER_CUSTOM_EXCHANGE_RATE_MAX_VALUE"
|
||||
:max-decimal-count="4"
|
||||
v-model="defaultCurrencyAmount"/>
|
||||
</v-col>
|
||||
<v-col cols="12" md="6">
|
||||
@@ -28,11 +30,13 @@
|
||||
<v-icon :icon="mdiSwapVertical" size="24" />
|
||||
</v-col>
|
||||
<v-col cols="12" md="6">
|
||||
<v-text-field type="number"
|
||||
:disabled="submitting"
|
||||
<number-input :disabled="submitting"
|
||||
:label="tt('Amount')"
|
||||
:placeholder="tt('Amount')"
|
||||
:persistent-placeholder="true"
|
||||
:min-value="USER_CUSTOM_EXCHANGE_RATE_MIN_VALUE"
|
||||
:max-value="USER_CUSTOM_EXCHANGE_RATE_MAX_VALUE"
|
||||
:max-decimal-count="4"
|
||||
v-model="targetCurrencyAmount"/>
|
||||
</v-col>
|
||||
<v-col cols="12" md="6">
|
||||
@@ -68,6 +72,11 @@ import { useI18n } from '@/locales/helpers.ts';
|
||||
import { useUserStore } from '@/stores/user.ts';
|
||||
import { useExchangeRatesStore } from '@/stores/exchangeRates.ts';
|
||||
|
||||
import {
|
||||
USER_CUSTOM_EXCHANGE_RATE_MAX_VALUE,
|
||||
USER_CUSTOM_EXCHANGE_RATE_MIN_VALUE
|
||||
} from '@/consts/exchange_rate.ts';
|
||||
|
||||
import {
|
||||
mdiSwapVertical
|
||||
} from '@mdi/js';
|
||||
|
||||
@@ -10,13 +10,17 @@
|
||||
</f7-navbar>
|
||||
|
||||
<f7-list form strong inset dividers class="margin-vertical">
|
||||
<f7-list-input
|
||||
type="number"
|
||||
:disabled="submitting"
|
||||
:label="tt('Amount')"
|
||||
:placeholder="tt('Amount')"
|
||||
v-model:value="defaultCurrencyAmount"
|
||||
></f7-list-input>
|
||||
<template #list>
|
||||
<list-number-input
|
||||
:disabled="submitting"
|
||||
:label="tt('Amount')"
|
||||
:placeholder="tt('Amount')"
|
||||
:min-value="USER_CUSTOM_EXCHANGE_RATE_MIN_VALUE"
|
||||
:max-value="USER_CUSTOM_EXCHANGE_RATE_MAX_VALUE"
|
||||
:max-decimal-count="4"
|
||||
v-model="defaultCurrencyAmount"
|
||||
></list-number-input>
|
||||
</template>
|
||||
|
||||
<f7-list-item
|
||||
class="list-item-with-header-and-title list-item-no-item-after"
|
||||
@@ -39,13 +43,17 @@
|
||||
</f7-block>
|
||||
|
||||
<f7-list form strong inset dividers class="margin-vertical">
|
||||
<f7-list-input
|
||||
type="number"
|
||||
:disabled="submitting"
|
||||
:label="tt('Amount')"
|
||||
:placeholder="tt('Amount')"
|
||||
v-model:value="targetCurrencyAmount"
|
||||
></f7-list-input>
|
||||
<template #list>
|
||||
<list-number-input
|
||||
:disabled="submitting"
|
||||
:label="tt('Amount')"
|
||||
:placeholder="tt('Amount')"
|
||||
:min-value="USER_CUSTOM_EXCHANGE_RATE_MIN_VALUE"
|
||||
:max-value="USER_CUSTOM_EXCHANGE_RATE_MAX_VALUE"
|
||||
:max-decimal-count="4"
|
||||
v-model="targetCurrencyAmount"
|
||||
></list-number-input>
|
||||
</template>
|
||||
|
||||
<f7-list-item
|
||||
class="list-item-with-header-and-title list-item-no-item-after"
|
||||
@@ -88,6 +96,11 @@ import { useExchangeRatesStore } from '@/stores/exchangeRates.ts';
|
||||
|
||||
import type { LocalizedCurrencyInfo } from '@/core/currency.ts';
|
||||
|
||||
import {
|
||||
USER_CUSTOM_EXCHANGE_RATE_MAX_VALUE,
|
||||
USER_CUSTOM_EXCHANGE_RATE_MIN_VALUE
|
||||
} from '@/consts/exchange_rate.ts';
|
||||
|
||||
const props = defineProps<{
|
||||
f7router: Router.Router;
|
||||
}>();
|
||||
|
||||
Reference in New Issue
Block a user