NpButton

A wrapper around n-button that extends it with throttling and async capabilities.

Basic Usage

The default click event is throttled.

浏览器不支持,请手动复制 basic.en.vue

Async Button

Use the :click prop to replace the original @click event.

浏览器不支持,请手动复制 async.en.vue

Button Types

浏览器不支持,请手动复制 type.en.vue

Props

Props

PropDescriptionTypeDefault
throttle-delayThrottle delay in msnumber350
loading-delayLoading delay in msnumber250
clickClick handler() => Promise<void>-
typeTheme styleprimary/danger/warning/successdefault
propsOther button propsobject -> Button Propsopen in new window

Events

EventDescriptionCallback
clickTriggered on click() => void

Slots

SlotDescription
defaultCustom default content

Types

The component exports the following type definitions:

import type { NpButtonProps } from 'naive-plus'