flat:暂存

This commit is contained in:
Apcallover
2025-12-18 11:16:47 +08:00
6 changed files with 31 additions and 9 deletions

View File

@@ -30,3 +30,15 @@ uni-toast .uni-toast__content {
font-size: 30rpx !important; font-size: 30rpx !important;
} }
uni-modal .uni-modal{
max-width: 450rpx !important;
}
uni-modal .uni-modal__bd{
font-size: 34rpx !important;
min-height: 100rpx !important;
}
uni-modal .uni-modal__ft{
font-size: 36rpx !important;
line-height: 80rpx !important;
}

View File

@@ -470,7 +470,8 @@ function isImage(type) {
'apng', 'avif', 'heic', 'heif', 'jfif' 'apng', 'avif', 'heic', 'heif', 'jfif'
]; ];
const lowerType = type.toLowerCase(); const lowerType = type.toLowerCase();
return imageTypes.includes(lowerType);
return imageTypes.some(item=>lowerType.includes(item))
} }
function isFile(type) { function isFile(type) {
@@ -510,6 +511,7 @@ function uploadCamera(type = 'camera') {
// 继续上传 // 继续上传
$api.uploadFile(tempFilePaths[0], true).then((resData) => { $api.uploadFile(tempFilePaths[0], true).then((resData) => {
resData = JSON.parse(resData); resData = JSON.parse(resData);
console.log(file.type,'++')
if (isImage(file.type)) { if (isImage(file.type)) {
filesList.value.push({ filesList.value.push({
url: resData.msg, url: resData.msg,

View File

@@ -3,7 +3,9 @@
<image <image
v-else-if=" v-else-if="
type === 'application/msword' || type === 'application/msword' ||
type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' ||
type === 'doc' ||
type === 'docx'
" "
:src="docIcon" :src="docIcon"
class="file-icon" class="file-icon"
@@ -18,9 +20,9 @@
:src="pptIcon" :src="pptIcon"
class="file-icon" class="file-icon"
/> />
<image v-else-if="type === 'text/markdown'" :src="mdIcon" class="file-icon" /> <image v-else-if="type === 'text/markdown' || type === 'md'" :src="mdIcon" class="file-icon" />
<image v-else-if="type === 'text/plain'" :src="txtIcon" class="file-icon" /> <image v-else-if="type === 'text/plain' || type=== 'txt'" :src="txtIcon" class="file-icon" />
<image v-else-if="type === 'text/html'" :src="htmlIcon" class="file-icon" /> <image v-else-if="type === 'text/html' || type === 'html'" :src="htmlIcon" class="file-icon" />
<image <image
v-else-if=" v-else-if="
type === 'application/vnd.ms-excel' || type === 'application/vnd.ms-excel' ||

View File

@@ -23,11 +23,16 @@ const fileAbbreviation = computed(() => {
'text/markdown': 'MD', 'text/markdown': 'MD',
'text/plain': 'TXT', 'text/plain': 'TXT',
'text/html': 'HTML', 'text/html': 'HTML',
'xls': 'XLS',
'xlsx': 'XLSX',
'pdf':'PDF', 'pdf':'PDF',
'doc':'DOC',
'docx':'DOCX',
'ppt':'PPT', 'ppt':'PPT',
'pptx':'PPTX', 'pptx':'PPTX',
'xls': 'XLS',
'xlsx': 'XLSX',
'md':'MD',
'txt':'TXT',
'html':'HTML'
}; };
return typeMap[props.type] || 'OTHER'; return typeMap[props.type] || 'OTHER';
}); });

View File

@@ -80,6 +80,7 @@ function changePopup(e) {
// 重置所有状态 // 重置所有状态
function resetState() { function resetState() {
fileCount.value = 0
loading.value = false; loading.value = false;
stopPolling(); stopPolling();
} }

View File

@@ -537,7 +537,7 @@
id="fileInput" id="fileInput"
class="file-input" class="file-input"
multiple multiple
accept="image/*,.pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt" accept="image/*,.pdf,.doc,.docx,.xls,.xlsx,.csv,.ppt,.pptx,.txt,.md,.html"
/> />
</div> </div>
</div> </div>