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>


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


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

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

  • 2023-08-19 18:57:08

    强制杀死nginx进程简单粗暴

    nginx: [error] open() "/run/nginx.pid" failed (2: No such file or directory),最简单的办法,杀死nginx进程,重启