Преглед на файлове

上传组件区分是否上传增加蒙版

新疆影视学院高职
杨晓琪 преди 2 години
родител
ревизия
6e2238832f
променени са 1 файла, в които са добавени 14 реда и са изтрити 3 реда
  1. +14
    -3
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/upload-file.vue

+ 14
- 3
Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/upload-file.vue Целия файл

@@ -9,7 +9,9 @@

<view class="cu-form-group" style="border-top: none;">
<view class="grid col-4 grid-square flex-sub">
<view v-for="(file, index) in value" :key="index" class="bg-img">
<view v-for="(file, index) in value" :key="index" class="bg-img" style="position: relative;">
<!-- :style="{borderColor:file.noUpdated?'#EEE8AA':'#fff'}" -->
<view v-if="file.noUpdated" class="mask"></view>
<image
v-if="isImgFile(file)"
@click="fileClick(index)"
@@ -104,10 +106,9 @@ export default {
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: ({ tempFilePaths,tempFiles }) => {
console.log(tempFiles)
const newList = JSON.parse(JSON.stringify(this.value || [])).concat(
// tempFilePaths//.map(t => ({ path: t, type: this.getFileExt(t) }))
tempFilePaths.map((t,i) => ({ path: t, type: tempFiles[i].type, size:tempFiles[i].size, name:tempFiles[i].name} ))
tempFilePaths.map((t,i) => ({ path: t, type: tempFiles[i].type, size:tempFiles[i].size, name:tempFiles[i].name, noUpdated:true} ))
)
this.$emit('input', newList)
this.$emit('change', newList)
@@ -209,4 +210,14 @@ export default {
overflow: hidden;
white-space: nowrap;
}
.mask{
position: absolute;
top: 0;left: 0;
width: 100%;
height: 100%;
// background: rgba(255,252,153,0.2);
background: rgba(0,0,0,0.7);
z-index: 100;
pointer-events: none;
}
</style>

Зареждане…
Отказ
Запис