摘要: ant design的关闭ModalForm和Modal弹框,清除数据的方法: 1、ModalForm弹框modalProps中加destroyOnClose <ModalForm visible={visible} modalProps={{ destroyOnClose: true }} /> 阅读全文
posted @ 2022-11-17 22:09 土小狗 阅读(2044) 评论(0) 推荐(0) 编辑
摘要: 今天在使用Vue进行文件上传的代码编写时,发现报错: [Vue warn]: Error in v-on handler: "TypeError: Failed to execute 'readAsDataURL' on 'FileReader': parameter 1 is not of typ 阅读全文
posted @ 2022-11-17 22:05 土小狗 阅读(5952) 评论(0) 推荐(0) 编辑
摘要: file和base64 1. file文件转换为base64,得到base64格式图片 var reader = new FileReader(); reader.readAsDataURL(this.files[0]); reader.onload = function(){ console.lo 阅读全文
posted @ 2022-11-17 22:03 土小狗 阅读(5982) 评论(0) 推荐(1) 编辑
摘要: bug记录图片格式为base64 如 data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...9oADAMBAAIRAxEAPwD/AD/6AP/Z 解决方案 1、先把base64里面的空格转义 img = img.replace(/\s/g, encodeURICo 阅读全文
posted @ 2022-11-17 00:14 土小狗 阅读(1681) 评论(0) 推荐(0) 编辑
摘要: Luckysheet开发的excel导入导出库-Luckyexcel (opens new window)已经实现了excel导入功能(目前只支持xslx文件);支持多sheet更新导出边框问题更新导出类型不同时样式 使用方法:导入文件(仅限.xlsx文件)npm引入npm install luck 阅读全文
posted @ 2022-11-17 00:12 土小狗 阅读(1205) 评论(0) 推荐(0) 编辑