Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report] XImg组件的src地址中出现"|"符号时,地址会被截断 #2744

Closed
mirari opened this Issue May 9, 2018 · 0 comments

Comments

Projects
None yet
2 participants
@mirari
Copy link

mirari commented May 9, 2018

VUX version

2.9.1-rc.1

OS/Browsers version

所有环境

Vue version

2.5.16

Code

 <x-img src="https://publish-pic-cpu.baidu.com/006a238a-6a79-4fe2-bfac-6fa74d654924.jpeg@w_228|c_1,h_152"></x-img>

Steps to reproduce

无需步骤

What is Expected?

保持显示一致

What is actually happening?

src直接在浏览器中访问,可以看到图片是横向小图。

在x-img中访问,会变成纵向长图。

原因就是部分图源在url地址里会加上额外的参数调整尺寸动态返回图片,恰好用到了|符号。

|符号在x-img所引用的插件blazy里是用来区分高清图片的。

blazy在options中提供了separator选项用来更改分隔符号,但x-img中使用了固定的缺省值初始化blazy,导致分隔符号无法定义。

建议x-img组件增加options属性,允许用户直接定义options属性覆盖blazy配置项。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.