vueComponent / ant-design-vue

🌈 An enterprise-class UI components based on Ant Design and Vue. 🐜

Home Page:https://antdv.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dropdown下menu中有popconfirm,menu-item上的key失效

Xin-arwanas opened this issue · comments

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

Version

4.2.1

Environment

mac, chrome

Reproduction link

Edit on CodeSandbox

Steps to reproduce

dropdown下menu中有至少两个popconfirm,menu-item上的key失效,会出menuItem hover时另一个popconfirm的menuItem也被hover

<a-dropdown :trigger="['hover']">
    <a-button>1</a-button>
    <template #overlay>
      <a-menu>
        <a-menu-item :key="1">
          <a-button>1</a-button>
        </a-menu-item>
        <a-popconfirm>
          <a-menu-item :key="2">
            <a-button>2</a-button>
          </a-menu-item>
        </a-popconfirm>
        <a-popconfirm>
          <a-menu-item :key="3">
            <a-button>3</a-button>
          </a-menu-item>
        </a-popconfirm>
      </a-menu>
    </template>
</a-dropdown>

What is expected?

正确分配key,有两个及以上popconfirm时不会相互出现hover样式

What is actually happening?

hover其中一个popconfirm的menuItem时,另外的popconfirm menuItem也会被hover