v-viewer大图预览没有图片

2021-04-28 12:05:12

这是一个人工失误的问题。修改 option中的url就好了

原因是因为我从原来的老工程中直接复制过来的代码。原来大图预览好好的。现在不知道为啥不能用了,也没有报错。包也是原来版本的包。哎。


最后多次尝试,发现和我配置选项立的url:‘data-source’有关。


options: {
  inline: button: navbar: title: toolbar: tooltip: movable: zoomable: rotatable: scalable: transition: fullscreen: keyboard: url: }


其实他的意思,是你预览大图的时候用 data-srouce上面的url。

展示和弹出图片源异源
‘url’: ‘data-source’ // 设置大图片的 url

这个不生效怎么破
<viewer>
<img class="photos reference-img" :src="scope.row[scope.column.property]+'?x-oss-process=image/quality,q_10'" :alt="scope.row.userId+'的图片'" :data-source="scope.row[scope.column.property]+'?x-oss-process=image/quality,q_60'" >
</viewer>


这是个好事,因为我知道了怎么使用预览大图和小图不一样的配置。


郁闷的是,这个问题之前就这么写的,没有问题,不知道为啥现在出现了问题。

浪费了我一个多小时。哎。

  • 2020-05-21 10:56:53

    fixed z-index失效

    作为一个假的前端,在调试一个页面时出现了如下bug。 左侧的菜单固定为fixed时,二级菜单无法设置有效的z-index,导致菜单隐藏在页面元素之下,明明页面元素的z-index是1,但是无论把菜单的z-index设置为多大,都不管用。

  • 2020-05-24 08:10:18

    echarts标题(title)配置

    show:true,//显示策略,默认值true,可选为:true(显示) | false(隐藏) text: '主标题',//主标题文本,'\n'指定换行 link:'',//主标题文本超链接,默认值true target: null,//指定窗口打开主标题超链接,支持'self' | 'blank',不指定等同为'blank'(新窗口) subtext: '副标题',//副标题文本,'\n'指定换行 sublink: '',//副标题文本超链接