产品目录上传文件支持csv
Showing
2 changed files
with
3 additions
and
3 deletions
| ... | @@ -36,7 +36,7 @@ const toolBar = computed(() => { | ... | @@ -36,7 +36,7 @@ const toolBar = computed(() => { |
| 36 | }) | 36 | }) |
| 37 | 37 | ||
| 38 | const onUpload = async (file, list) => { | 38 | const onUpload = async (file, list) => { |
| 39 | const isExcel = file.raw.type === 'application/vnd.ms-excel' || file.raw.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; | 39 | const isExcel = file.raw.type === 'application/vnd.ms-excel' || file.raw.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' || file.raw.type == 'text/csv'; |
| 40 | if (!isExcel) { | 40 | if (!isExcel) { |
| 41 | const fileUpload = fileUploadRef.value[0] || fileUploadRef.value | 41 | const fileUpload = fileUploadRef.value[0] || fileUploadRef.value |
| 42 | fileUpload?.handleRemove(file) | 42 | fileUpload?.handleRemove(file) | ... | ... |
| ... | @@ -582,8 +582,8 @@ const setUploadInfo = () => { | ... | @@ -582,8 +582,8 @@ const setUploadInfo = () => { |
| 582 | auto: false, | 582 | auto: false, |
| 583 | cover: true, | 583 | cover: true, |
| 584 | fileList: [], | 584 | fileList: [], |
| 585 | accept: '.xlsx, .xls', | 585 | accept: '.xlsx, .xls, .csv', |
| 586 | tips: '当前支持xls、xlsx文件,默认使用第一个sheet' | 586 | tips: '当前支持xls、xlsx、csv文件,默认使用第一个sheet' |
| 587 | } | 587 | } |
| 588 | } | 588 | } |
| 589 | ] | 589 | ] | ... | ... |
-
Please register or sign in to post a comment