<template>
  <div class="rate-prop">
    <FormItem label="最大值">
      <InputNumber v-model="info.form.count" :min="0" controls-outside />
    </FormItem>
    <FormItem label="允许半选">
      <i-switch v-model="info.form.allowHalf" />
    </FormItem>
    <FormItem label="辅助文字">
      <i-switch v-model="info.form.showText" />
    </FormItem>
  </div>
</template>
<script>
export default {
  name: 'RateProp',
  props: {
    info: Object,
  },
  watch: {
    'info.form': {
      handler(value) {
        this.$set(this.info, 'default', 0)
        this.$set(value, 'count', 5)
      },
      deep: true,
      immediate: true,
    },
  },
}
</script>