Modal buttons
How to use buttons on your modal
Add buttons to your modal
YourComponent.vue
<l-modal :name="'test'" :buttons="buttons">
<template #title>
Some title
</template>
<template #content>
Some content
</template>
</l-modal>
Create array with your buttons
YourComponent.vue
data() {
return {
buttons: [
{
text: 'Some btn text',
title: 'Test button title',
type: 'submit' or 'button',
class: '**some-custom-class**',
options: {
disabled: true,
},
click: () => {
**your action after click**
}
},
{
...
}
]
}
}
Result
Buttons arguments
Argument | Type | Description |
---|---|---|
text | string | Button text |
title | string | Button title |
type | string | Button type |
class | string | Button custom classes |
click | function | Button click handler, |
options | object | Button options(like disabled and etc), |
Table of Contents