|
|
@@ -23,6 +23,8 @@
|
|
|
<p style="margin: 3px;font-size: 14px">
|
|
|
工作台:<span style="color: #333333">{{ workbench.workStation}}</span>
|
|
|
</p>
|
|
|
+ <p style="margin: 3px;font-size: 14px">支持png/jpeg/jpg/webp</p>
|
|
|
+
|
|
|
<van-button size="mini" type="primary" plain icon="replay" @click.stop="getWorkbench"></van-button>
|
|
|
</div>
|
|
|
<div class="scan-returned-content">
|
|
|
@@ -104,12 +106,17 @@ function getWorkbench(){
|
|
|
const beforeReadImage = (file) => {
|
|
|
const files = Array.isArray(file) ? file : [file]
|
|
|
for (const f of files) {
|
|
|
+ if (file.name.toLowerCase().endsWith('.heic') ||
|
|
|
+ file.name.toLowerCase().endsWith('.heif')) {
|
|
|
+ showFailToast('不支持的图片格式')
|
|
|
+ return false
|
|
|
+ }
|
|
|
const isImage = /^image\//.test(f.type)
|
|
|
if (!isImage) {
|
|
|
showFailToast('仅支持图片文件')
|
|
|
return false
|
|
|
}
|
|
|
- if (f.size > 10 * 1024 * 1024) {
|
|
|
+ if (f.size > 15 * 1024 * 1024) {
|
|
|
showFailToast('图片大小不能超过10MB')
|
|
|
return false
|
|
|
}
|