Comments (4)
可以通过 on-before-upload
实现
from naive-ui.
ping @jahnli @jizai1125 是否有可能重新打开这个issue
考虑原生添加该属性去更开箱即用的提供上传文件大小限制功能?
from naive-ui.
没看到相关 api
from naive-ui.
const beforeUpload = ({ file }: { file: UploadFileInfo; fileList: UploadFileInfo[] }) => {
const fileSize = parseFloat(((file.file?.size ?? 0) / 1024 / 1024).toFixed(1));
if (fileSize > astrictFileSize) {
return false;
}
return true;
};
from naive-ui.
Related Issues (20)
- 需求:Sider折叠状态下,当Menu列表中的选项过多超出屏幕视口高度时,提供滚动条
- n-select组件能否提供一个禁用键盘操作的选项?
- Rich text editor HOT 2
- 希望Slider可以增加多样化自定义的刻度功能 HOT 2
- 虚拟列表嵌套滚动条,滚动条失效
- n-config-provider 在多重嵌套时, cls-prefix属性不能正确继承
- [NModal] 受控模式下触发Vue错误 HOT 1
- DataTable组件新增行双击事件 HOT 1
- 全屏状态下n-image-group被遮挡看不见 HOT 8
- select箭头键翻页时,hover态会切回鼠标位置所在的选项 HOT 1
- 建议表格筛选添加一些新的选项,例如文本输入和条件检索之类的
- 希望增加一个cron表达式组件 HOT 1
- Cascader 组件中的数据在不同分组中 选择会出现混乱 label 和value 一致时 HOT 1
- 希望给NButton增加工具提示属性 HOT 5
- Create dialog without icon HOT 2
- card卡片 属性title与header Slot同时使用header无法显示
- 关于Tree组件的拖拽
- n-tree 组件的TreeOption类型添加泛型
- 支持自定义组件的标签名
- 我觉得可能存在内存溢出的风险。
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from naive-ui.