• 首页
  • 关于我们
  • 新闻资讯
  • 产品展示
  • 荣誉展示
  • 联系我们
  • 在线留言
  • 13021256845
  • 您当前位置:首页 > 新闻资讯

    uniapp缩略图网址补全代码

    时间:2019-03-20 14:12:36 点击:

    屏幕快照 2019-03-20 下午2.09.35.png

    uniapp默认是的image的写法是这样的

    <image class="suimg" :src="item.thumb " mode="aspectFill"></image>

    单是很多时候我们的图片数据可能相对域名下的地址所以要在前面加上网址,所以写发上要在item.thumb前面加上一个网址,完整代码如下

    <image class="suimg" :src="site + item.thumb " mode="aspectFill"></image>

    这里还有一个问题如果我们写过微信小程序,代码是这样的

    <image class="suimg" :src="{{site}}{{ item.thumb}} " mode="aspectFill"></image>

    所以写的时候要区别一下,site是在data - return 里面定义的一个网址






    评论内容:

    2014-02-21 为什么要选择蜗牛客设计
    新闻资讯
    2019-09-21 flex布局的学习思路
    产品展示

    www.woniukee.com

    襄阳蜗牛客设计

    地 址:湖北·襄阳汉津路佳侨小区

    邮 编:100085

    总 机: (+86) 13021256845


    About Us

    There's lot of hate out there for a text that amounts to little more than garbled words in an old language. The villagers are out there with a vengeance to get that Frankenstein, wielding torches and pitchforks, wanting to tar and feather it at the least, running it out of town in shame.