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

Cell组件微信开发者工具和真机显示不一致 #1081

Closed
SuperHuangXu opened this issue Dec 14, 2018 · 1 comment
Closed

Cell组件微信开发者工具和真机显示不一致 #1081

SuperHuangXu opened this issue Dec 14, 2018 · 1 comment

Comments

@SuperHuangXu
Copy link

描述一下问题
Cell组件微信开发者工具和真机显示不一致

截图
微信开发者工具:
微信开发者工具

真机:
真机

真机上titlelabel左边对不齐。

环境

  • 设备: 小米note3 Android 8.1.0 ; MIUI 10.8.11.22
  • 基础库版本: 2.4.2
  • Vant Weapp 版本: v0.4.9
@SuperHuangXu
Copy link
Author

  <view
    style="{{ titleWidth ? 'max-width:' + titleWidth + ';min-width:' + titleWidth : '' }}"
    class="van-cell__title title-class"
  >
    <block wx:if="{{ title }}">
      {{ title }}
      <view wx:if="{{ label }}" class="van-cell__label label-class">{{ label }}</view>
    </block>
    <slot wx:else name="title" />
  </view>

改成

  <view
    style="{{ titleWidth ? 'max-width:' + titleWidth + ';min-width:' + titleWidth : '' }}"
    class="van-cell__title title-class"
  >
    <block wx:if="{{ title }}">{{ title }}
      <view wx:if="{{ label }}" class="van-cell__label label-class">{{ label }}</view>
    </block>
    <slot wx:else name="title" />
  </view>

即可。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant