fix(Sku): small image mode and text ellipsis (#6604)

This commit is contained in:
来铧敏 2020-06-24 11:27:51 +08:00 committed by GitHub
parent 796eb46bac
commit 62cd251327
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,9 +47,8 @@ export default createComponent({
genImage(classPrefix) {
const { imgUrl } = this;
if (imgUrl && this.largePicturePreview) {
if (this.lazyLoad) {
if (imgUrl) {
if (this.largePicturePreview && this.lazyLoad) {
return (
<img class={`${classPrefix}-img`} src={imgUrl} vLazy={imgUrl} />
);
@ -83,7 +82,13 @@ export default createComponent({
/>
)}
{this.genImage(classPrefix)}
<span class={`${classPrefix}-name`}>{this.skuValue.name}</span>
<div class={`${classPrefix}-name`}>
<span
class={this.largePicturePreview ? 'van-multi-ellipsis--l2' : ''}
>
{this.skuValue.name}
</span>
</div>
</span>
);
},