mirror of
https://github.com/ialley-workshop-open/uni-halo.git
synced 2026-09-12 16:40:40 +08:00
1.5 KiB
1.5 KiB
Component API
API Reference
uView Pro component props, events, and methods.
Common Props
Most components support:
custom-class- Custom class namecustom-style- Custom style objectdisabled- Disabled state
Common Events
Most components emit:
@click- Click event@change- Change event@focus- Focus event@blur- Blur event
Button Component
Props:
type- Button type (primary, success, info, warning, error)size- Button size (large, normal, small, mini)disabled- Disabled stateloading- Loading stateplain- Plain buttonshape- Button shape (circle, round)icon- Icon name
Events:
@click- Click event
Input Component
Props:
v-model- Input valuetype- Input type (text, number, password, textarea)size- Input size (large, normal, small)disabled- Disabled statereadonly- Readonly stateclearable- Show clear buttonborder- Show borderprefix-icon- Prefix iconsuffix-icon- Suffix icon
Events:
@input- Input event@change- Change event@focus- Focus event@blur- Blur event
Form Component
Props:
model- Form data objectrules- Validation ruleslabel-width- Label width
Methods:
validate- Validate formvalidateField- Validate specific fieldresetFields- Reset form fieldsclearValidate- Clear validation
Events:
@validate- Validation event
See also: examples/components/ for detailed component examples