diff --git a/web/src/assets/css/sd-task-dialog.styl b/web/src/assets/css/sd-task-dialog.styl
index cb76c42..1395207 100644
--- a/web/src/assets/css/sd-task-dialog.styl
+++ b/web/src/assets/css/sd-task-dialog.styl
@@ -19,6 +19,17 @@
.img-container {
display flex
justify-content center
+
+ .image-slot {
+ display flex
+ height 100vh
+ align-items center
+ justify-content center
+
+ .el-icon {
+ font-size 60px
+ }
+ }
}
.task-info {
diff --git a/web/src/views/ImagesWall.vue b/web/src/views/ImagesWall.vue
index f0912b3..ebdc100 100644
--- a/web/src/views/ImagesWall.vue
+++ b/web/src/views/ImagesWall.vue
@@ -11,7 +11,7 @@
-
-
-
@@ -84,7 +84,21 @@
-
+
+
+
+ 正在加载图片
+
+
+
+
+
+
+
@@ -206,7 +220,7 @@ const list = ref([])
const loading = ref(true)
const isOver = ref(false)
const imgType = ref("mj") // 图片类别
-const listBoxHeight = window.innerHeight - 71
+const listBoxHeight = window.innerHeight - 74
const colWidth = ref(240)
const fullImgHeight = ref(window.innerHeight - 60)
const showTaskDialog = ref(false)
@@ -237,15 +251,25 @@ const getNext = () => {
// 获取运行中的任务
httpGet(`${url}?status=1&page=${page.value}&page_size=${pageSize.value}`).then(res => {
loading.value = false
- if (list.value.length === 0) {
- list.value = res.data
+ if (res.data.length === 0) {
+ isOver.value = true
return
}
- if (res.data.length < pageSize.value) {
+ // 生成缩略图
+ const imageList = res.data
+ for (let i = 0; i < imageList.length; i++) {
+ imageList[i]["img_thumb"] = imageList[i]["img_url"] + "?imageView2/4/w/300/q/75"
+ }
+ if (list.value.length === 0) {
+ list.value = imageList
+ return
+ }
+
+ if (imageList.length < pageSize.value) {
isOver.value = true
}
- list.value = list.value.concat(res.data)
+ list.value = list.value.concat(imageList)
}).catch(e => {
ElMessage.error("获取图片失败:" + e.message)