Skip to content

[grid] t-grid使用wx:for后,column不生效 #3408

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

Closed
CheneyDu0129 opened this issue Dec 28, 2024 · 3 comments
Closed

[grid] t-grid使用wx:for后,column不生效 #3408

CheneyDu0129 opened this issue Dec 28, 2024 · 3 comments
Labels
question This is a question, not a bug

Comments

@CheneyDu0129
Copy link

tdesign-miniprogram 版本

1.8.4

重现链接

No response

重现步骤

      <t-grid class="block" column="{{2}}" hover wx:for="{{cards}}" wx:key="title">
        <t-grid-item t-class-image="image" text="{{item.title}}" image="https://gitee.com/CheneyDu/32x8_/raw/main/original/{{item.title}}.gif" />
      </t-grid>

使用wx:for语法时,column设置为2,实际显示为1
image

期望结果

column显示正常

实际结果

column不论设置多少,都是单列显示

基础库版本

No response

补充说明

No response

Copy link
Contributor

👋 @CheneyDu0129,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@CheneyDu0129
Copy link
Author

CheneyDu0129 commented Dec 28, 2024

当我不使用wx:for时,此时column工作正常

@betavs betavs added the question This is a question, not a bug label Dec 30, 2024
@betavs
Copy link
Collaborator

betavs commented Dec 30, 2024

<t-grid class="block" column="{{2}}" hover>
  <t-grid-item
    wx:for="{{cards}}"
    wx:key="title"
    t-class-image="image"
    text="{{item.title}}"
    image="https://gitee.com/CheneyDu/32x8_/raw/main/original/{{item.title}}.gif"
  />
</t-grid>

@anlyyao anlyyao closed this as completed Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question This is a question, not a bug
Projects
None yet
Development

No branches or pull requests

3 participants