KModal
Modal dialogs.
Install
bash
pnpm add @ikun-ui/modalbash
yarn add @ikun-ui/modalbash
npm install @ikun-ui/modalBasic usage
Enable the built-in footer button
Different footer layouts
Define the footer button layout through the layout attribute
Custom header and footer
Implement custom header and footer through slots
Modal Props
| Name | Type | Default | Description |
|---|---|---|---|
| title | string | - | content of Modal title |
| footer | boolean | false | Show bottom footer button |
| show | boolean | false | show the Modal |
| layout | 'center' / 'right' | center | footer button layout |
| cls | string | - | Additional class |
| attrs | Record<string, string> | {} | Additional attributes |
Modal Events
| Name | Description | Type |
|---|---|---|
| cancel | Fired when the cancel button is clicked | (e: Event)=> void |
| confirm | Fired when the confirm button is clicked | (e: Event)=> void |
| close | Triggered when the Modal is closed | (show: Event)=> void |
Modal Slots
| Name | Description |
|---|---|
| default | Customize Modal content |
| header | Customize Modal header |
| footer | Customize Modal footer |