mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-10 11:13:42 +08:00
opt: 缩略图生成算法
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
color #ffffff
|
||||
overflow-x hidden
|
||||
|
||||
|
||||
.running-job-list {
|
||||
.job-item {
|
||||
//border: 1px solid #454545;
|
||||
|
||||
@@ -45,9 +45,9 @@ onMounted(() => {
|
||||
})
|
||||
|
||||
const computeSize = () => {
|
||||
const w = container.value.offsetWidth - 8 // 减去滚动条的宽度
|
||||
const w = container.value.offsetWidth - 10 // 减去滚动条的宽度
|
||||
let cols = Math.floor(w / props.width)
|
||||
itemWidth.value = Math.ceil(w / cols)
|
||||
itemWidth.value = Math.floor(w / cols)
|
||||
}
|
||||
|
||||
window.onresize = () => {
|
||||
|
||||
@@ -259,7 +259,7 @@ const getNext = () => {
|
||||
// 生成缩略图
|
||||
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"
|
||||
imageList[i]["img_thumb"] = imageList[i]["img_url"] + "?imageView2/4/w/300/h/0/q/75"
|
||||
}
|
||||
if (list.value.length === 0) {
|
||||
list.value = imageList
|
||||
|
||||
Reference in New Issue
Block a user