<template>
  <div>
    <el-form-item label="时间" label-position="left" label-width="60px">
      <input-number
        placeholder="请输入"
        v-model="time"
        :min="0"
        :max="100000"
        controls-position="right"
        style="width: 100%"
      />
    </el-form-item>
  </div>
</template>

<script setup lang="ts">
import { computed } from 'vue'

const modelValue = defineModel<{
  time: number
}>('modelValue')

// time
const time = computed({
  get: () => modelValue.value?.time,
  set: (val: number) => {
    if (modelValue.value) {
      modelValue.value.time = val
    }
  }
})
</script>

<style scoped></style>
