Skip to content

组件在前后dom节点的v-if指令更新时导致组件也更新@2.4.2 #6502

@chenfengjw163

Description

@chenfengjw163

Version

2.4.2

Reproduction link

https://jsfiddle.net/chenfeng/h2zcmwnm/

Steps to reproduce

<div id="app">
  <div v-if="show">
    div1
  </div>
  <demo></demo>
  <div v-if="show">
    div2
  </div>
</div>

如上结构,show更新时会导致demo组件重新渲染

tips:sorry 上一个issue用错vue的版本,现在改成2.4.2版本也是有同样问题。

What is expected?

demo组件和v-if指令无关时不能刷新

What is actually happening?

show更新时会导致demo组件重新渲染

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions