Skip to content

When dynamically binding a ref to an element or custom component through v-for in the Drawer component, the method of binding ref for each element or custom component is executed twice #5544

Open
@hueralin

Description

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

Version

2.2.2

Environment

mac os:10.15.7 (19H1323);chrome:100.0.4896.127 (正式版本) (x86_64) ;vue:^3.0.0;ant-design-vue:^2.2.2;

Reproduction link

Edit on CodeSandbox

Steps to reproduce

复现代码:https://codesandbox.io/s/mystifying-paper-ls16ou?file=/src/App.vue
v-for 中的 ref 数组:https://v3.cn.vuejs.org/guide/migration/array-refs.html

What is expected?

期望 v-for 每渲染一个元素,绑定 ref 的方法执行一次

What is actually happening?

实际情况是,v-for 每渲染一个元素,绑定 ref 的方法执行了两次

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions