<template>
  <div class="demo-input-number-basic">
    <div>延迟校正（默认行为，change事件发生时校正）：</div>
    <div class="demo-box">
      <ui-input-number
        v-model="value"
        :max="100"
        :min="-5"
        placeholder="Basic usage"
        @input="lazy">
      </ui-input-number>
    </div>
    <div>实时校正：</div>
    <div class="demo-box">
      <ui-input-number
        v-model="value"
        :max="100"
        :min="-5"
        placeholder="Basic usage"
        :lazy="false"
        @input="real">
      </ui-input-number>
    </div>
  </div>
</template>

<script>
import { InputNumber } from "amumu-ui"
export default {
  components: {
    "ui-input-number": InputNumber,
  },
  data() {
    return {
      value: 10,
    }
  },
  methods: {
    real(...args) {
      console.log("real", ...args)
    },
    lazy(...args) {
      console.log("lazy", ...args)
    },
  },
}
</script>
