KModal
Modal dialogs.
Install
bash
pnpm add @ikun-ui/modal
pnpm add @ikun-ui/modal
bash
yarn add @ikun-ui/modal
yarn add @ikun-ui/modal
bash
npm install @ikun-ui/modal
npm install @ikun-ui/modal
Basic 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 | any | {} | 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 |