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
Property | Description | Type | Default |
---|---|---|---|
type | button type | enum | primary |
size | button size | enum | small |
icon | Whether to display the button icon | boolean | |
disabled | Whether to disable | boolean | false |
TextCopy
Property | Description | Type | default |
---|---|---|---|
content | what needs to be copied | string | |
successMessage | success message | string |
FileUpload
Property | Description | Type | default |
---|---|---|---|
accept | Accepted file types, seeinput accept Attribute | string |
ContentSave
Property | Description | Type | default |
---|---|---|---|
content | save content | string | |
fileType | save fileType | FileType | |
url | file link | string |
Event
FileUpload
Events Name | Description | Type | default |
---|---|---|---|
afterSelected | File selection callback function | Function |
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
Property | Description | Type | default |
---|---|---|---|
default | Default slot | component |