alibaba / GaiaX

动态模板引擎是一套轻量化、跨平台、高性能的纯原生移动端卡片渲染动态化解决方案
https://youku-gaiax.github.io/
Apache License 2.0
1.19k stars 142 forks source link

Android:通过display设置item内部view显隐,高度显示不正确 #281

Open leo-wxy opened 1 year ago

leo-wxy commented 1 year ago

Describe the bug

根据条件设置display:flex 或 none控制item内view的显隐,显示效果不符合预期

To Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error 基于Demo进行修改设置
    assets/assets_data_source/templates/gx-content-uper-scroll-item/index.css
    #gx-content-uper-scroll-item  {
    flex-direction:column;
    width:204px;
    }
assets/assets_data_source/templates/gx-content-uper-scroll-item/index.databinding
        "title": {
            "value": "$data.title",
            "extend": {
                "display": "$data.show == true ? 'flex' : 'none'"
            }
        }
assets/assets_data_source/templates/gx-content-uper-scroll/index.json
{
  "id": "gx-content-uper-scroll",
  "type": "gaia-template",
  "sub-type": "scroll",
  "direction": "vertical",
  "edge-insets": "{0,18,0,18}",
  "item-spacing": 7,
  "row-spacing": 0,
  "layers": [
    {
      "type": "gaia-template",
      "id": "gx-content-uper-scroll-item",
      "sub-type": "custom"
    }
  ]
}
uper.json
    {
      "data": {
        "img": "https://t7.baidu.com/it/u=1297102096,3476971300&fm=193&f=GIF",
        "title": "我是标题我是标题我是标题我是标题",
        "show": true
      }
    },
    {
      "data": {
        "img": "https://t7.baidu.com/it/u=1297102096,3476971300&fm=193&f=GIF",
        "title": "我是标题我是标题我是标题我是标题",
        "show": false
      }
    },

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots Screenshot_2022-11-24-10-16-28-797_com alibaba gaiax demo

If applicable, add screenshots to help explain your problem.

Phone (please complete the following information) :

Additional context Add any other context about the problem here.

biezhihua commented 1 year ago

@leo-wxy 预计下周跟进

biezhihua commented 1 year ago

@leo-wxy 你好,由于近期业务较忙,需要等待业务开发完提测后才能投入到开源相关的工作中。