arco-design / arco-design-vue

A Vue.js 3 UI Library based on Arco Design
https://arco.design/vue
MIT License
2.69k stars 526 forks source link

气泡卡片 Popover 隐藏不要销毁其中的元素 #3159

Closed mayiyahei1992 closed 4 months ago

mayiyahei1992 commented 4 months ago

增加一个 prop 是否要销毁其中的元素 这个很重要!!!

oljc commented 4 months ago

@mayiyahei1992 popover 组件继承 trigger 组件的全部属性,具体 API 可查看trigger 组件。

<template>
  <a-popover title="Title" trigger="click" :unmount-on-close="false">
    <a-button>Hover</a-button>
    <template #content>
      <p>Here is the text content</p>
    </template>
  </a-popover>
</template>