We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a38b471 commit f66eca6Copy full SHA for f66eca6
src/toolbars/hooks/Insert.js
@@ -78,11 +78,12 @@ export default class Insert extends MenuBase {
78
/**
79
* 上传文件的逻辑
80
* @param {string} type 上传文件的类型
81
+ * @param {string} [accept] TODO: 限定可选择的文件类型,接收 mime type 或后缀名字符串(以逗号分隔)
82
*/
- handleUpload(type = 'image') {
83
+ handleUpload(type = 'image', accept) {
84
// type为上传文件类型 image|video|audio|pdf|word
85
const input = document.createElement('input');
- input.type = type || 'file';
86
+ input.type = 'file';
87
input.id = 'fileUpload';
88
input.value = '';
89
input.style.display = 'none';
0 commit comments