For vue2 projects, use @94ai/common-ui
LLMs.md

Import template ​

Template download and file import step card, preserving the legacy props, events and slots. It emits notifications only; the application handles downloads and upload requests.

Download and import ​

Loading example…
Download and import

Interactive example ​

2导入模板 / Import template
Excel (.xlsx, .xls)Max 50 MiB
click: 0; upload: 0; error: 0;

Installation ​

ts
import NfImportTemplate from '@94ai-plus/nf-import-template'
import 'element-plus/dist/index.css'
import '@94ai-plus/nf-theme-chalk/nf-import-template.css'

app.use(NfImportTemplate)

Props ​

PropTypeDefault
orderstring'1'
descriptionstring''
btnTextstring''
tipstring''
subTipstring''
tipDirectionvertical / horizontalvertical
modedownLoad / download / uploaddownLoad
uploadMineTypestring[] (extensions)['.xlsx', '.xls']
limitSizenumber (MiB, file size < limit)50
showErrorbooleanfalse
errorTextstring''
loadingbooleanfalse

Events ​

EventPayload
clickMouseEvent (downLoad / download)
uploadFile (upload)
emit-error— (showError)

Slots ​

SlotContent
defaultdescription
tiptip + subTip

Migration notes ​

The actual defaults are mode="downLoad" and tipDirection="vertical"; download is also accepted. Extensions are case-insensitive. File size must be strictly less than limitSize MiB. Cancelled selections are safe, and the same file can be selected again. Applications must validate content and server limits.

showError: errorText || lastValidFileName. loading: no click/upload. $openMessage.error → ElMessage.error.