mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix(Sku): small image mode and text ellipsis (#6604)
This commit is contained in:
parent
796eb46bac
commit
62cd251327
@ -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>
|
||||
);
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user