Skip to content

Commit bde0e35

Browse files
committed
fix: 修复复制文档表格内容被保存为图片的问题
1 parent bb04293 commit bde0e35

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

src/hooks/useClipboard.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,20 @@ export const useClipboard = (
3636
group: "files",
3737
search: files.value.join(" "),
3838
});
39-
} else if (image) {
40-
Object.assign(data, image, {
41-
group: "image",
42-
});
4339
} else if (html && !copyPlain) {
4440
Object.assign(data, html);
4541
} else if (rtf && !copyPlain) {
4642
Object.assign(data, rtf);
4743
} else if (text) {
4844
const subtype = await getClipboardTextSubtype(text.value);
4945

50-
Object.assign(data, text, { subtype });
46+
Object.assign(data, text, {
47+
subtype,
48+
});
49+
} else if (image) {
50+
Object.assign(data, image, {
51+
group: "image",
52+
});
5153
}
5254

5355
const sqlData = data;

0 commit comments

Comments
 (0)