Skip to content

Save Button Component

Overview

The <save-button> component provides a standardized button for saving forms and data in the Qelos template ecosystem. It includes built-in loading states and consistent styling across the application.

Usage

html
<save-button @click="saveData" :loading="isSaving"></save-button>

Props

PropTypeDefaultDescription
loadingBooleanfalseWhether the button is in a loading state
disabledBooleanfalseWhether the button is disabled
typeString'primary'Button type (primary, success, warning, danger, info)
sizeString'default'Button size (large, default, small)
textString'Save'Button text
iconString'el-icon-check'Icon to display next to text

Events

EventParametersDescription
click(event: MouseEvent)Emitted when the button is clicked

Examples

Basic Usage

html
<save-button @click="saveForm"></save-button>

With Custom Text

html
<save-button text="Submit" @click="submitForm"></save-button>

With Loading State

html
<save-button :loading="isSubmitting" @click="submitWithLoading"></save-button>

Different Button Types

html
<save-button type="success" text="Approve" @click="approveItem"></save-button>
<save-button type="danger" text="Reject" @click="rejectItem"></save-button>

With Different Sizes

html
<save-button size="large" text="Save All Changes" @click="saveAllChanges"></save-button>
<save-button size="small" text="Quick Save" @click="quickSave"></save-button>

© Velocitech LTD. All rights reserved.

Released under the Apache License 2.0.