Skip to content
On this page

Button

When To Use

When there is a need for related function buttons, you can directly use the following buttons as a solution

Examples

Button functions are text copy, file upload and file save

<template>
  <a-space>
    <h-text-copy-button content="He3" icon type="primary"/>
    <h-file-upload-button />
    <h-content-save-button url="https://he3.app/" icon  type="primary"/>
  </a-space>
</template>

API

Props

Common

PropertyDescriptionTypeDefault
typebutton typeenumprimary
sizebutton sizeenumsmall
iconWhether to display the button iconboolean
disabledWhether to disablebooleanfalse

TextCopy

PropertyDescriptionTypedefault
contentwhat needs to be copiedstring
successMessagesuccess messagestring

FileUpload

PropertyDescriptionTypedefault
acceptAccepted file types, seeinput accept Attributestring

ContentSave

PropertyDescriptionTypedefault
contentsave contentstring
fileTypesave fileTypeFileType
urlfile linkstring

Event

FileUpload

Events NameDescriptionTypedefault
afterSelectedFile selection callback functionFunction

WARNING

Select one of the two parameters url and content to pass in, the former saves the file in the link, and the latter saves the incoming text as a text file

Slot

PropertyDescriptionTypedefault
defaultDefault slotcomponent