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

Descriptions Item 组件不能使用 v-for #2793

Closed
1 task done
ununian opened this issue Sep 4, 2020 · 1 comment
Closed
1 task done

Descriptions Item 组件不能使用 v-for #2793

ununian opened this issue Sep 4, 2020 · 1 comment
Labels

Comments

@ununian
Copy link
Contributor

ununian commented Sep 4, 2020

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

2.0.0-beta.5

Environment

win10

Reproduction link

https://vuecomponent.github.io/issue-helper/

Steps to reproduce

<template>
  <div>
    <a-descriptions title="User Info" bordered :column="2">
      <a-descriptions-item label="test">
        test
      </a-descriptions-item>
      <a-descriptions-item v-for="(prop, index) in vals" :key="index" :label="prop.name">
        {{ prop.type }}
      </a-descriptions-item>
    </a-descriptions>
    <div v-for="(prop, index) in vals" :key="index">
      {{ prop.type }}
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      vals: [
        { id: 1, name: 'prop1', type: 'text' },
        { id: 2, name: 'prop2', type: 'text' },
      ],
    };
  },
};
</script>

What is expected?

显示 3 个 descriptions-item 和 2个 div

What is actually happening?

只显示了 1 个固定的 descriptions-item 和 2 个div
image


vue3中 v-for 渲染为 Fragment,descriptions代码里面 clone 子项的时候没有考虑到 Fragment的情况

@github-actions
Copy link

github-actions bot commented Sep 8, 2021

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants