<template>
  <div class="demo-input-number-basic">
    <div>使用数值：</div>
    <div class="demo-box">
      <ui-input-number
        v-model="value1"
        :max="100"
        :min="-5"
        :precision="3"
        placeholder="Basic usage"
        @input="lazy">
      </ui-input-number>
    </div>
    <div>使用对象：</div>
    <div class="demo-box">
      <ui-input-number
        v-model="value2"
        :max="100"
        :min="-5"
        placeholder="Basic usage"
        :precision="{
          length: 3,
          fill: true,
          content: 2,
        }"
        :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 {
      value1: 10,
      value2: 10,
    }
  },
  methods: {
    real(...args) {
      console.log("real", ...args)
    },
    lazy(...args) {
      console.log("lazy", ...args)
    },
  },
}
</script>
