1fdccf0b by lihua

产品目录上传文件支持csv

1 parent 3c8b8e8a
...@@ -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 ]
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!