controlled.vue 598 B

12345678910111213141516171819202122232425262728293031323334
  1. <template>
  2. <el-input-number
  3. v-model="num"
  4. :min="1"
  5. :max="10"
  6. controls-position="right"
  7. size="large"
  8. @change="handleChange"
  9. />
  10. <el-input-number
  11. v-model="num"
  12. class="mx-4"
  13. :min="1"
  14. :max="10"
  15. controls-position="right"
  16. @change="handleChange"
  17. />
  18. <el-input-number
  19. v-model="num"
  20. :min="1"
  21. :max="10"
  22. size="small"
  23. controls-position="right"
  24. @change="handleChange"
  25. />
  26. </template>
  27. <script lang="ts" setup>
  28. import { ref } from 'vue'
  29. const num = ref(1)
  30. const handleChange = (value: number) => {
  31. console.log(value)
  32. }
  33. </script>