1
haoxuan
2024-01-24 b4a603e7e1c123195f5515aa7c3b247e1784fb76
src/views/dashboard/components/ReportProductionModal.vue
@@ -24,8 +24,9 @@
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]
@@ -72,7 +73,7 @@
}
watch(modelData, () => {
  if (modelData.value) {
    inputNumber.value = ''
    inputNumber.value = (props.amount ?? '').toString()
  }
})
</script>