<template>
  <UploadPicComponent
    :value="props.value"
    :disabled="props.disabled"
    :record="props.record"
    :readonly="props.readonly"
    @onChange="onChange"
    @update:value="updateValue"
  ></UploadPicComponent>
</template>

<script setup name="FormUploadPic">
const props = defineProps({
  value: {
    type: String,
    default: ''
  },
  //是否禁用
  disabled: {
    type: Boolean,
    default: false
  },
  record: {
    type: Object,
    default: {}
  },
  // 是否只读
  readonly: {
    type: Boolean,
    default: false
  }
});

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

const onChange = record => {
  emits('onChange', record);
};

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

<style scoped lang="less"></style>
