fix oss列表 jpeg 不回显问题
This commit is contained in:
parent
0539c2f927
commit
0ec756cf58
|
@ -109,12 +109,12 @@
|
||||||
<el-table-column label="文件展示" align="center" prop="url">
|
<el-table-column label="文件展示" align="center" prop="url">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-image
|
<el-image
|
||||||
v-if="previewListResource && scope.row.fileSuffix.indexOf('png','jpg','jpeg') > 0"
|
v-if="previewListResource && checkFileSuffix(scope.row.fileSuffix)"
|
||||||
style="width: 100px; height: 100px;"
|
style="width: 100px; height: 100px;"
|
||||||
:src="scope.row.url"
|
:src="scope.row.url"
|
||||||
:preview-src-list="[scope.row.url]"/>
|
:preview-src-list="[scope.row.url]"/>
|
||||||
<span v-text="scope.row.url"
|
<span v-text="scope.row.url"
|
||||||
v-if="scope.row.fileSuffix.indexOf('png','jpg','jpeg') < 0 || !previewListResource"/>
|
v-if="!checkFileSuffix(scope.row.fileSuffix) || !previewListResource"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||||
|
@ -247,6 +247,12 @@ export default {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
checkFileSuffix(fileSuffix) {
|
||||||
|
let arr = ["png", "jpg", "jpeg"];
|
||||||
|
return arr.some(type => {
|
||||||
|
return fileSuffix.indexOf(type) > -1;
|
||||||
|
});
|
||||||
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
|
|
Loading…
Reference in New Issue