Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
基于tinper-bee组件库封装开发
手动上传组件,可以帮助你打开一个模态框选择文件进行上传、也包括拖拽式的上传方式,支持单个文件以及多个文件一起上传使用,上传完毕后,组件会显示查看附件信息
npm install ac-upload -S
通过ES6的方式进行加载使用
import AcUpload from 'ac-upload';//加载组件
import 'ac-upload/build/ac-upload.css';//加载组件样式
然后在render使用的时候传入相应组件需要的参数:
注:只要放在AcUpload组件之间的一个按钮即可
<AcUpload
title="图片上传"
action="/iuap_pap_quickstart/fileMananger/fastDfs/imgUpload"
name="filelist[]"
data={{ "other": "params" }}
accept="image/*"
multiple={true}
onError={(err) => console.log(err)}
onSuccess={(data) => console.log(data)}
>
<Button shape="border" colors="info">图片上传</Button>
</AcUpload>
序号 | 参数 | 类型 | 说明 |
---|---|---|---|
1 | title | string | 打开上传的模态框显示的标题文字 |
2 | multiple | bool | 是否允许多选 |
3 | action | string | 必选参数, 上传的地址 |
4 | accept | string | 接受上传的文件类型, 详见 input accept Attribute |
5 | data | object | 随着上传的时候附加一些参数,接收JSON对象 |
6 | name | string | 上传设置的参数file名字默认files[] |
7 | onSuccess | function | 上传成功后的回调,回调参数数组对象包含本次上传后的完成路径以及修改后的名称[{"accessAddress":"http://10.10.24.43:8080/wbalone/images/5441cbb2-27e6-4a9d-98b3-448f3f78de55_.png","fileName":"5441cbb2-27e6-4a9d-98b3-448f3f78de55_.png"}] |
8 | onError | function | 上传失败后的回调,用于处理后续失败操作 |
FAQs
tinper-bee ac upload components
The npm package ac-upload receives a total of 35 weekly downloads. As such, ac-upload popularity was classified as not popular.
We found that ac-upload demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 14 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.