本文档由 Apifox 自动生成,推荐使用 Apifox - API 文档、API 调试、API Mock、API 自动化测试!
<salla-button> web component shows a customizable button, in terms of size, color, style, status, position etc ,which can be used with any other web component, and that can be customized using the properties' parameters available.
| Property | Attribute | Description | Type | Default |
|---|---|---|---|---|
| Color | color | Customized Button color | "danger" | "dark" | "gray" | "light" | "primary" | "success" | "warning" | 'primary' |
| Disabled | disabled | Button disability status | boolean | 'false' |
| Fill | fill | Button fill style | "none" | "outline" | "solid" | 'solid' |
| href | href | Button with a link capability | string | undefined |
| Loader Position | loader-position | Set the loading animation's position | "after" | "center" | "end" | "start" | 'after' |
| Loading | loading | Activate Button loading | boolean | 'false' |
| Shape | shape | Button type Configs | "btn" | "icon" | "link" | 'btn' |
| Size | size | Button size Configs | "small" | "medium" | "large" | 'medium' |
| Width | width | Button extends the full available width | "normal" | "wide" | 'normal' |
methods allow for calling functions built by Salla to carry out certain actvities, such as enable and/or disable loading the component.| Method | Description | Return Type |
|---|---|---|
disable() | Inactivates the button by adding disabled attribute. Visually, it becomes unclickable and unhoverable. | Promise<void> |
enable() | Activates the button by removing disabled attribute. | Promise<void> |
load() | Runs loading animation to notify a user that there is a processing taking place. | Promise<HTMLElement> |
stop() | Stops loading animation after a process has completed | Promise<HTMLElement> |
setText(html: string) | Customizes the button's body text | Promise<HTMLElement> |
扫码加入 Apifox 微信交流群
在这里,获得 Apifox 使用上的任何帮助,快速上手让你的研测效率得到大幅提升

扫码加入交流群