Commit bc2ef028 by 前端

修复20张图片预览限制

1 parent 67371d03
......@@ -195,6 +195,9 @@ export default {
let _this = this;
let list = this.list || [];
let arr = [];
if (list.length > 20) {
list.length = 20;
}
list.map((k) => {
if (k.pah == url) {
arr.unshift(k.path);
......@@ -204,9 +207,6 @@ export default {
}
}
});
if (arr.length > 20) {
arr.length = 20;
}
return arr;
},
},
......
......@@ -217,6 +217,9 @@ export default {
let _this = this;
let list = this.list || [];
let arr = [];
if (list.length > 20) {
list.length = 20;
}
list.map((k) => {
if (k.pah == url) {
arr.unshift(k.path);
......@@ -226,9 +229,7 @@ export default {
}
}
});
if (arr.length > 20) {
arr.length = 20;
}
return arr;
},
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!