<template>
  <guns-progress
    :value="props.value"
    :disabled="props.disabled"
    :record="props.record"
    :readonly="props.readonly"
    @change="dataValueChange"
    @update:value="updateValue"
  ></guns-progress>
</template>

<script setup name="FormProgress">

const props = defineProps({
  value: {
    type: Number,
    default: 0
  },
  record: {
    type: Object,
    default: {}
  },
  //是否禁用
  disabled: {
    type: Boolean,
    default: false
  },
  // 是否只读
  readonly: {
    type: Boolean,
    default: false
  }
});

const emits = defineEmits(['update:value', 'change', 'onChange']);

// 更改值
const dataValueChange = value => {
  emits('update:value', value);
  emits('change', value);
  emits('onChange', props.record);
};

const updateValue = value => {
  emits('update:value', value);
};
</script>

<style></style>
