adata-ui 2.0.65 → 2.0.67
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,
|
|
@@ -39,14 +41,21 @@ const filterMoney = computed(() => {
|
|
|
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"
|