导入图片用require 不能直接导入

导入图片用require

 img: [
      //错误导入
        {
          img:"../../assets/pice11.png"    
          title: "是图片1"
        },
      //正确导入
        {
          img: require("../../assets/pice11.png"),
          title: "这是图片2"
        }
      ]
posted @ 2019-06-02 22:50  193557749  阅读(852)  评论(0)    收藏  举报