From d3a618f09ab510de5c4ca772c44f60c218b61964 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期六, 18 九月 2021 15:12:30 +0800 Subject: [PATCH] 2021-09-18 --- src/tabviews/zshare/fileupload/index.jsx | 19 +++++++++++-------- 1 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/tabviews/zshare/fileupload/index.jsx b/src/tabviews/zshare/fileupload/index.jsx index a10dbd5..3ef6469 100644 --- a/src/tabviews/zshare/fileupload/index.jsx +++ b/src/tabviews/zshare/fileupload/index.jsx @@ -61,8 +61,13 @@ accepts = ['.jpg', '.png', '.gif', '.jpeg'] accept = accepts.join(',') } else if (config.suffix) { - accepts = config.suffix.split(',') - accept = config.suffix + accepts = config.suffix.split(',').map(item => { + if (!/^\./ig.test(item)) { + item = '.' + item + } + return item + }) + accept = accepts.join(',') } let rduri = config.rduri || '' @@ -225,12 +230,10 @@ }) if (!pass) { - notification.warning({ - top: 92, - message: '鏂囦欢鏍煎紡閿欒锛�', - duration: 5 - }) - return + setTimeout(() => { + this.onFail('鏂囦欢鏍煎紡閿欒锛�') + }, 10) + return false } } -- Gitblit v1.8.0