Skip to content

Commit f66eca6

Browse files
committed
fix(insert): file type wrong
1 parent a38b471 commit f66eca6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/toolbars/hooks/Insert.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,12 @@ export default class Insert extends MenuBase {
7878
/**
7979
* 上传文件的逻辑
8080
* @param {string} type 上传文件的类型
81+
* @param {string} [accept] TODO: 限定可选择的文件类型,接收 mime type 或后缀名字符串(以逗号分隔)
8182
*/
82-
handleUpload(type = 'image') {
83+
handleUpload(type = 'image', accept) {
8384
// type为上传文件类型 image|video|audio|pdf|word
8485
const input = document.createElement('input');
85-
input.type = type || 'file';
86+
input.type = 'file';
8687
input.id = 'fileUpload';
8788
input.value = '';
8889
input.style.display = 'none';

0 commit comments

Comments
 (0)