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

sliver 列表,内容不显示异常 #708

Open
pba-cra opened this issue Sep 27, 2021 · 7 comments
Open

sliver 列表,内容不显示异常 #708

pba-cra opened this issue Sep 27, 2021 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@pba-cra
Copy link

pba-cra commented Sep 27, 2021

使用的 Kraken 版本 | What version of kraken are you using

0.8

重现步骤 | Steps To Reproduce

重现代码 | Code example:
异常情况

<style>
    body {
        width:100vw;
        height: 100vh;
        display: flex;
    }
    #outerContainer{
        display: flex;
        flex:1;
    }
    #content{
        display: sliver;
        flex:1;
    }
</style>
<body>
    <div id='outerContainer' >
        <div id='content'>
            <div>asfasdf</div>
            <div>adfadfa</div>
            <div>asfasdf</div>
            <div>adfadfa</div>
            <div>asfasdf</div>
            <div>adfadfa</div>
        </div>
    </div>
</body>

修改#content为

  #content{
      display: sliver;
      width: 100%;
      height: 100%;
  }

显示正常

预期结果 | Expected results:
id为content中的子元素正常显示

实际结果 | Actual results:
id为content中的子元素 不显示,整个content是空白。

@pba-cra pba-cra added the bug Something isn't working label Sep 27, 2021
@wssgcg1213
Copy link
Member

Hello, 你使用的是 main 分支还是 pub 上的版本?

@pba-cra
Copy link
Author

pba-cra commented Sep 27, 2021

使用的是main分支上的哈

@pba-cra
Copy link
Author

pba-cra commented Sep 27, 2021

Hello, 你使用的是 main 分支还是 pub 上的版本?
使用的是main分支上的哈

@wssgcg1213
Copy link
Member

👌 我看一下这个 case ~

@wssgcg1213 wssgcg1213 self-assigned this Sep 27, 2021
@pba-cra
Copy link
Author

pba-cra commented Oct 27, 2021

👌 我看一下这个 case ~

这个问题 是否确定呢?这个有点卡进度,而且sliver是一个比较关键的点

@jingsarah
Copy link

请问这个问题解决了么?遇到了同样的内容不显示的问题

@w-tools
Copy link

w-tools commented Nov 20, 2021

1、这个sliver必须得操作dom动态创建元素节点,直接样式属性绑定会白屏
2、dom.style.display='sliver' 必须再次去设置一遍height即 dom.style.height='xxx' ,否则白屏
3、style变量初始值设置为sliver,偶现白屏,我是改为了mounted钩子中判断时kraken环境才设置为sliver,后续创建列表容器dom时再dom.style.display=this.style.list.display
4、dom.setAttribute('style', '');会报错虽然不影响渲染但是控制台会出现报错信息,所以得遍历后挨个设置dom.style[key]=this.style.list[key];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants