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】并排两列 list 设置 header 后,在安卓上样式不正确 #2200

Closed
YongX opened this issue Jan 10, 2017 · 2 comments
Closed
Assignees

Comments

@YongX
Copy link

YongX commented Jan 10, 2017

问题描述:
当设置了并列的两个纵向滚动的 list 后,再给他们各自增加 header 组件在安卓上的显示不正确。 ios 能正常显示。

代码如下:

<template>
  <div class="list-wrap">
    <list class="menu-left">
      <header>
        <text class="header-left">left header</text>
      </header>
      <cell class="menu-item" repeat="menu">
        <text class="menu-name">{{ name }}</text>
      </cell>
    </list>
    <list class="menu-right">
      <header>
        <text class="header-right">right header</text>
      </header>
      <cell class="menu-item" repeat="menu">
        <text class="menu-name">{{ name }}</text>
      </cell>
    </list>
  </div>
</template>
<script>
  module.exports = {
    data: {
      menu: [
        { name: 1.2 },
        { name: 1.8 },
        { name: 1.9 },
        { name: 9.8 },
        { name: 6.8 },
      ],
    },
  };
</script>
<style>
  .list-wrap {
    margin-top: 30px;
    flex-direction: row;
    flex: 1;
    background-color: #fff;
  }
  
  .menu-left {
    flex: 4;
    background-color: #f8f8f8;
  }
  
  .menu-right {
    flex: 8;
  }
  
  .header-left {
    color: red;
  }
  
  .header-right {
    color: blue;
  }
  
  .menu-name {
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 36px;
    padding-bottom: 36px;
    lines: 3;
    text-overflow: ellipsis;
    color: #666;
    font-size: 24px;
  }
  
  .menu-item {
    border-top-width: 1px;
    border-top-style: solid;
    border-top-color: #ededed;
  }
</style>

期望各自的 list 都能正确渲染和处理自己下面的 header 组件。但实际在安卓中 header 组件看起来是占了整个屏幕的宽度。
截图如下:
wechatimg21

正常的ios截图如下:
45683a99-9a03-4d10-9b0e-25e454117153

系统版本信息:
wechatimg18

@misakuo
Copy link
Member

misakuo commented Jan 10, 2017

复现了,我看一下

@misakuo misakuo self-assigned this Jan 10, 2017
misakuo added a commit to sospartan/weex that referenced this issue Jan 11, 2017
@misakuo
Copy link
Member

misakuo commented Jan 11, 2017

已修复

@misakuo misakuo closed this as completed Jan 11, 2017
sospartan pushed a commit to sospartan/weex that referenced this issue Jan 11, 2017
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

2 participants