| | |
| | | import { useVModel } from '@vueuse/core' |
| | | import BigButton from './BigButton.vue' |
| | | import { ref, watch } from 'vue' |
| | | const props = withDefaults(defineProps<{ modelValue: boolean }>(), { |
| | | modelValue: false |
| | | const props = withDefaults(defineProps<{ modelValue: boolean; amount?: number }>(), { |
| | | modelValue: false, |
| | | amount: 0 |
| | | }) |
| | | const emit = defineEmits<{ |
| | | 'update:modelValue': [show: boolean] |
| | |
| | | } |
| | | watch(modelData, () => { |
| | | if (modelData.value) { |
| | | inputNumber.value = '' |
| | | inputNumber.value = (props.amount ?? '').toString() |
| | | } |
| | | }) |
| | | </script> |