修改图片压缩规则,优化样式

This commit is contained in:
eoao
2025-06-06 19:20:59 +08:00
parent 8054c0390c
commit ea309f9171
9 changed files with 46 additions and 37 deletions

View File

@@ -108,6 +108,7 @@ function initEditor() {
input.addEventListener('change', async (e) => {
let file = e.target.files[0];
file = await compressImage(file);
console.log(file.size / 1024)
const reader = new FileReader();
reader.onload = () => {
const id = 'blobid' + (new Date()).getTime();