浏览代码

文物鉴赏-二维文物:最多显示3张图

任一存 3 年之前
父节点
当前提交
676723811d
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/components/RelicDetail.vue

+ 1 - 1
src/components/RelicDetail.vue

@@ -167,7 +167,7 @@ export default {
       if (this.$route.query.imgNum === 1) {
         this.imageList = [`${this.$cdnPath}2D/${this.$route.query.bs}.jpg`]
       } else {
-        for (let index = 0; index < this.$route.query.imgNum; index++) {
+        for (let index = 0; index < this.$route.query.imgNum && index < 3; index++) {
           this.imageList.push(`${this.$cdnPath}2D/${this.$route.query.bs} (${index + 1}).jpg`)
         }
         console.log(this.imageList)