Components/ImageUploader
Universal Component

ImageUploader

Image picker with previews and remove controls.

This page was migrated by AI, please review carefully

Migration is complete, but please validate against source code and manual review.

ImageUploader

Image picker with previews and remove controls.

import { ref } from 'vue' const files = ref([])

Basic Usage

ImageUploader

Demo will load when visible.
<template>
  <TxImageUploader v-model="files" />
</template>

API (Lite)

PropertyTypeDefaultDescription
modelValueCurrent image list
multipleAllow selecting multiple files at once
acceptNative file input accept attribute
disabledDisable adding and removing images
maxMaximum image count

Events

PropertyTypeDefaultDescription
update:modelValue-Image list update
change-Image list change
remove-Triggered after removing an image

Interaction Contract

  • The current component opens the native file picker from the add button; it does not provide a drag-and-drop upload target.
  • Newly selected files create object URLs for preview and revoke them on remove or component unmount.
  • max limits newly added files; files beyond the remaining capacity are ignored.
  • disabled disables the add button, file input, and remove buttons.