We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
版本号:3.7.2
问题描述: 使用jeecgboot-vue3/src/hooks/system/useMethods.ts的exportXls方法到处文件,如果文件内容中存在“success”字符串时,直接判断是Result类型,导致JSON解析出错
jeecgboot-vue3/src/hooks/system/useMethods.ts
async function exportXls(name, url, params, isXlsx = false) { ....... reader.onload = async () => { if (reader.result) { // 这个判断不严谨,没考虑文件内容可能包含"success"字符串 if (reader.result.toString().indexOf('success') != -1) { const { success, message } = JSON.parse(reader.result.toString()); if (!success) { createMessage.warning('导出失败,失败原因:' + message); } else { exportExcel(name, isXlsx, data); } return; } } exportExcel(name, isXlsx, data); //update-end---author:wangshuai---date:2024-04-18---for: 导出excel失败提示,不进行导出--- }; }
错误截图:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
版本号:3.7.2
问题描述:
使用
jeecgboot-vue3/src/hooks/system/useMethods.ts
的exportXls方法到处文件,如果文件内容中存在“success”字符串时,直接判断是Result类型,导致JSON解析出错错误截图:
The text was updated successfully, but these errors were encountered: