|
@@ -9,7 +9,9 @@ |
|
|
|
|
|
|
|
|
<view class="cu-form-group" style="border-top: none;"> |
|
|
<view class="cu-form-group" style="border-top: none;"> |
|
|
<view class="grid col-4 grid-square flex-sub"> |
|
|
<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 |
|
|
<image |
|
|
v-if="isImgFile(file)" |
|
|
v-if="isImgFile(file)" |
|
|
@click="fileClick(index)" |
|
|
@click="fileClick(index)" |
|
@@ -104,10 +106,9 @@ export default { |
|
|
sizeType: ['original', 'compressed'], |
|
|
sizeType: ['original', 'compressed'], |
|
|
sourceType: ['album', 'camera'], |
|
|
sourceType: ['album', 'camera'], |
|
|
success: ({ tempFilePaths,tempFiles }) => { |
|
|
success: ({ tempFilePaths,tempFiles }) => { |
|
|
console.log(tempFiles) |
|
|
|
|
|
const newList = JSON.parse(JSON.stringify(this.value || [])).concat( |
|
|
const newList = JSON.parse(JSON.stringify(this.value || [])).concat( |
|
|
// tempFilePaths//.map(t => ({ path: t, type: this.getFileExt(t) })) |
|
|
// 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('input', newList) |
|
|
this.$emit('change', newList) |
|
|
this.$emit('change', newList) |
|
@@ -209,4 +210,14 @@ export default { |
|
|
overflow: hidden; |
|
|
overflow: hidden; |
|
|
white-space: nowrap; |
|
|
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> |
|
|
</style> |