This commit is contained in:
hzz 2024-05-28 16:18:41 +08:00
parent 1e4828f4e9
commit 4ddc4d76a3

View File

@ -33,14 +33,7 @@
<!-- <el-table-column label="" prop="path" :show-overflow-tooltip="true" /> --> <!-- <el-table-column label="" prop="path" :show-overflow-tooltip="true" /> -->
<el-table-column label="大屏图片" align="center"> <el-table-column label="大屏图片" align="center">
<template #default="scope"> <template #default="scope">
<el-image :src="scope.row.image" :preview-src-list="[scope.row.img]" fit="cover" <image-preview :src="scope.row.img" width="100px" height="100px" />
style="width: 100px; height: 100px">
<template #error>
<div class="image-slot">
<el-icon size="100"><icon-picture /></el-icon>
</div>
</template>
</el-image>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" prop="remark" :show-overflow-tooltip="true" width="180" /> <el-table-column label="备注" prop="remark" :show-overflow-tooltip="true" width="180" />
@ -171,12 +164,7 @@ function getList() {
// console.log(JSON.stringify(queryParams.value)); // console.log(JSON.stringify(queryParams.value));
getScreen(queryParams.value).then(res => { getScreen(queryParams.value).then(res => {
loading.value = false; loading.value = false;
screenList.value = res.rows.map(item => { screenList.value = res.rows
const regex = /^(http|https):\/\/[^ "]+$/;
let isTrue = regex.test(item.img);
item.image= isTrue ? item.img : import.meta.env.VITE_APP_BASE_API + item.img
return item
});
total.value = res.total; total.value = res.total;
}); });