Skip to content

Latest commit

 

History

History
69 lines (55 loc) · 1.96 KB

File metadata and controls

69 lines (55 loc) · 1.96 KB

bc-field-image

Quick Start

<bc-field-image name="myfield" label="My Field" />

Props

Prop Type Default Description
name string '' Field identifier
label string '' Display label
value varies Field value
required boolean false Required
readonly boolean false Read-only
disabled boolean false Disabled
validation-status string 'none' Validation state
validation-message string '' Error message
hint string '' Helper text
size string 'md' sm/md/lg
clearable boolean false Clear button
tooltip string '' Tooltip
loading boolean false Loading state
autofocus boolean false Auto focus
default-value varies Default for reset
validate-on string 'blur' Validation trigger

Component-Specific Props

Prop Type Default Description
accept string 'image/*' Accepted types
max-size string '10MB' Max file size
preview boolean true Show preview
model string '' Upload model

Events

Event Payload
lcFieldChange {name, value, oldValue}
lcFieldFocus {name, value}
lcFieldBlur {name, value, dirty, touched}
lcFieldClear {name, oldValue}
lcFieldInvalid {name, value, errors}
lcFieldValid {name, value}

Methods

Method Returns
validate() Promise<{valid, errors}>
reset() Promise
clear() Promise
setValue(value, emit?) Promise
getValue() Promise
focusField() Promise
blurField() Promise
isDirty() Promise
isTouched() Promise
setError(msg) Promise
clearError() Promise

See validation, theming, data-fetching.