nested-information.vue 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <template>
  2. <div style="display: flex; align-items: center">
  3. <el-popover placement="right" :width="400" trigger="click">
  4. <template #reference>
  5. <el-button style="margin-right: 16px">Click to activate</el-button>
  6. </template>
  7. <el-table :data="gridData">
  8. <el-table-column width="150" property="date" label="date" />
  9. <el-table-column width="100" property="name" label="name" />
  10. <el-table-column width="300" property="address" label="address" />
  11. </el-table>
  12. </el-popover>
  13. <el-popover :width="300" popper-style="box-shadow: rgb(14 18 22 / 35%) 0px 10px 38px -10px, rgb(14 18 22 / 20%) 0px 10px 20px -15px; padding: 20px;">
  14. <template #reference>
  15. <el-avatar src="https://avatars.githubusercontent.com/u/72015883?v=4" />
  16. </template>
  17. <template #default>
  18. <div class="demo-rich-conent" style="display: flex; gap: 16px; flex-direction: column">
  19. <el-avatar :size="60" src="https://avatars.githubusercontent.com/u/72015883?v=4" style="margin-bottom: 8px" />
  20. <div>
  21. <p class="demo-rich-content__name" style="margin: 0; font-weight: 500">Element Plus</p>
  22. <p class="demo-rich-content__mention" style="margin: 0; font-size: 14px; color: var(--el-color-info)">@element-plus</p>
  23. </div>
  24. <p class="demo-rich-content__desc" style="margin: 0">Element Plus, a Vue 3 based component library for developers, designers and product managers</p>
  25. </div>
  26. </template>
  27. </el-popover>
  28. </div>
  29. </template>
  30. <script lang="ts" setup>
  31. const gridData = [
  32. {
  33. date: '2016-05-02',
  34. name: 'Jack',
  35. address: 'New York City',
  36. },
  37. {
  38. date: '2016-05-04',
  39. name: 'Jack',
  40. address: 'New York City',
  41. },
  42. {
  43. date: '2016-05-01',
  44. name: 'Jack',
  45. address: 'New York City',
  46. },
  47. {
  48. date: '2016-05-03',
  49. name: 'Jack',
  50. address: 'New York City',
  51. },
  52. ]
  53. </script>