|
|
@@ -16,28 +16,28 @@
|
|
|
|
|
|
<!-- 正常模式:宫格上传(完全对齐官方 upload-image 样式) -->
|
|
|
<view v-else class="uni-file-picker__container">
|
|
|
- <view class="file-picker__box cursor-pointer" v-for="(item, index) in innerFileList" :key="index"
|
|
|
- :style="typeof boxStyle === 'object' ? boxStyle : { cssText: boxStyle }" :data-tooltip="t('vu.tooltip.t3')" data-placement="top">
|
|
|
- <view class="file-picker__box-content" :style="borderStyle">
|
|
|
+ <view class="file-picker__box" v-for="(item, index) in innerFileList" :key="index"
|
|
|
+ :style="typeof boxStyle === 'object' ? boxStyle : { cssText: boxStyle }" >
|
|
|
+ <view class="file-picker__box-content " :style="borderStyle" >
|
|
|
<!-- 图片 -->
|
|
|
- <image v-if="isImage(item)" class="file-image" :src="item.url || item.path" mode="aspectFill"
|
|
|
+ <image v-if="isImage(item)" class="file-image cursor-pointer" :data-tooltip="tooltipText(item)" :src="item.url || item.path" mode="aspectFill"
|
|
|
:style="imgStyle" @click.stop="previewFile(item, index)" />
|
|
|
|
|
|
<!-- 视频 → 显示第一帧 + 播放图标 -->
|
|
|
- <view v-else-if="isVideo(item)" class="file-cover video-box" @click.stop="previewFile(item, index)">
|
|
|
+ <view v-else-if="isVideo(item)" class="file-cover video-box cursor-pointer" :data-tooltip="tooltipText(item)" @click.stop="previewFile(item, index)">
|
|
|
<image :src="item.url || item.path" class="file-image" mode="aspectFill" :style="imgStyle" />
|
|
|
<view class="video-play-icon">▶</view>
|
|
|
</view>
|
|
|
|
|
|
<!-- 其他文件(PDF/Word/Excel) -->
|
|
|
- <view v-else class="file-cover file-box" :class="getFileClass(item.name)"
|
|
|
+ <view v-else class="file-cover file-box cursor-pointer" :data-tooltip="tooltipText(item)" :class="getFileClass(item.name)"
|
|
|
@click.stop="previewFile(item, index)">
|
|
|
<text class="file-big-icon">{{ getFileIcon(item.name) }}</text>
|
|
|
<text class="file-ext-name">{{ getFileExt(item.name) }}</text>
|
|
|
</view>
|
|
|
|
|
|
<!-- 删除 -->
|
|
|
- <view v-if="delIcon" class="icon-del-box" @click.stop="deleteFile(index)">
|
|
|
+ <view v-if="delIcon" class="icon-del-box cursor-pointer" :data-tooltip="t('vu.tooltip.t17')" @click.stop="deleteFile(index)">
|
|
|
<view class="icon-del"></view>
|
|
|
<view class="icon-del rotate"></view>
|
|
|
</view>
|
|
|
@@ -181,7 +181,9 @@ const boxStyle = computed(() => {
|
|
|
}
|
|
|
return 'width:33.3%;height:0;'
|
|
|
})
|
|
|
-
|
|
|
+const tooltipText = (file)=>{
|
|
|
+ return (props.disablePreview || file.status === 'uploading' || file.status === 'error')?'':t('vu.tooltip.t16')
|
|
|
+}
|
|
|
// ==============================================
|
|
|
// 统一格式化函数(修复递归核心)
|
|
|
// ==============================================
|