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

FlexboxItem 宽度异常 #2573

Closed
emondora opened this issue Mar 29, 2018 · 1 comment
Closed

FlexboxItem 宽度异常 #2573

emondora opened this issue Mar 29, 2018 · 1 comment

Comments

@emondora
Copy link
Contributor

Flexbox中有以下CSS代码,设置了宽度为0%,想请问下设置0%是基于什么考量?

.vux-flexbox-item {
    flex: 1;
    -webkit-flex: 1;
    min-width: 20px;
    width: 0%;
}

问题描述:
代码压缩打包后,width: 0%; 变为了 width:0;,导致在 Cell 中使用 flexbox-item 出现宽度异常。
请问是否可直接移除 width: 0%; 这部分代码?

HTML代码结构:

<cell>
  <div slot="title">支付方式</div>
  <flexbox>
    <span>图标</span>
    <flexbox-item>
      <p>演示文字</p>
      <small>工商银行</small>
      <small>(尾号 3333 | 快捷)</small>
    </flexbox-item>
  <flexbox>
</cell>

以下为width:0%的截图,宽度正常
normal

以下为width:0的截图,宽度异常
error

airyland added a commit to airyland/vux-loader that referenced this issue Apr 12, 2018
@airyland
Copy link
Owner

兼容旧版本 flexbox 的问题,移除 prod 配置里的 css 压缩插件(如果有的话),更新到 vux-loader@^1.2.7。

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

No branches or pull requests

2 participants