adata-ui 2.0.66 → 2.0.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -10,6 +10,8 @@ const isOpen = defineModel({ default: false })
|
|
|
10
10
|
const { t } = useI18n()
|
|
11
11
|
|
|
12
12
|
const money = ref(0)
|
|
13
|
+
const errorAlert = ref(false)
|
|
14
|
+
|
|
13
15
|
const sumArr = ref([
|
|
14
16
|
{
|
|
15
17
|
id: 1,
|
|
@@ -34,19 +36,26 @@ const sumArr = ref([
|
|
|
34
36
|
])
|
|
35
37
|
|
|
36
38
|
const filterMoney = computed(() => {
|
|
37
|
-
return money.value
|
|
39
|
+
return money.value >= 1
|
|
38
40
|
})
|
|
39
41
|
|
|
40
42
|
function onSelectAmount(value: number) {
|
|
41
43
|
money.value = value
|
|
44
|
+
errorAlert.value = false
|
|
42
45
|
}
|
|
43
46
|
|
|
44
47
|
function onClose() {
|
|
45
48
|
isOpen.value = false
|
|
49
|
+
errorAlert.value = false
|
|
46
50
|
}
|
|
47
51
|
|
|
48
52
|
function handlePayment() {
|
|
49
|
-
|
|
53
|
+
if (money.value <= 1000000) {
|
|
54
|
+
emit('next', money.value)
|
|
55
|
+
errorAlert.value = false
|
|
56
|
+
} else {
|
|
57
|
+
errorAlert.value = true
|
|
58
|
+
}
|
|
50
59
|
}
|
|
51
60
|
</script>
|
|
52
61
|
|
|
@@ -72,9 +81,14 @@ function handlePayment() {
|
|
|
72
81
|
:label="`${t('payment.topUp.enterAmount')}`"
|
|
73
82
|
type="number"
|
|
74
83
|
pattern="[0-9]*"
|
|
75
|
-
maxlength="12"
|
|
76
84
|
clearable
|
|
77
85
|
/>
|
|
86
|
+
<a-alert
|
|
87
|
+
v-if="errorAlert"
|
|
88
|
+
color="red"
|
|
89
|
+
>
|
|
90
|
+
{{ t('modals.replenish_modal.error') }}
|
|
91
|
+
</a-alert>
|
|
78
92
|
<div class="flex gap-4">
|
|
79
93
|
<a-chips
|
|
80
94
|
v-for="item in sumArr"
|
|
@@ -6,7 +6,7 @@ const { $toast } = useNuxtApp()
|
|
|
6
6
|
const { commonAuth } = useAppConfig()
|
|
7
7
|
const { t, locale } = useI18n()
|
|
8
8
|
|
|
9
|
-
const { recoveryModal, resetPasswordOtpModal, intermediateState } = useIdModals()
|
|
9
|
+
const { loginModal, recoveryModal, resetPasswordOtpModal, intermediateState } = useIdModals()
|
|
10
10
|
const authApiURL = commonAuth.authApiURL
|
|
11
11
|
const emailField = ref('')
|
|
12
12
|
const loading = ref(false)
|
|
@@ -63,6 +63,7 @@ function handleEnter(e: KeyboardEvent) {
|
|
|
63
63
|
|
|
64
64
|
function onCancel() {
|
|
65
65
|
recoveryModal.value = false
|
|
66
|
+
loginModal.value = true
|
|
66
67
|
}
|
|
67
68
|
|
|
68
69
|
watch(recoveryModal, (value) => {
|