adata-ui 2.0.66 → 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
- emit('next', money.value)
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"
@@ -276,7 +276,6 @@ defineExpose({
276
276
  </div>
277
277
  </Transition>
278
278
  <input
279
- maxlength="12"
280
279
  :id="label"
281
280
  ref="input"
282
281
  v-model="modelValue"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "adata-ui",
3
3
  "type": "module",
4
- "version": "2.0.66",
4
+ "version": "2.0.67",
5
5
  "main": "./nuxt.config.ts",
6
6
  "scripts": {
7
7
  "dev": "nuxi dev .playground",