nested-information.vue 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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
  14. :width="300"
  15. popper-style="box-shadow: rgb(14 18 22 / 35%) 0px 10px 38px -10px, rgb(14 18 22 / 20%) 0px 10px 20px -15px; padding: 20px;"
  16. >
  17. <template #reference>
  18. <el-avatar src="https://avatars.githubusercontent.com/u/72015883?v=4" />
  19. </template>
  20. <template #default>
  21. <div
  22. class="demo-rich-conent"
  23. style="display: flex; gap: 16px; flex-direction: column"
  24. >
  25. <el-avatar
  26. :size="60"
  27. src="https://avatars.githubusercontent.com/u/72015883?v=4"
  28. style="margin-bottom: 8px"
  29. />
  30. <div>
  31. <p
  32. class="demo-rich-content__name"
  33. style="margin: 0; font-weight: 500"
  34. >
  35. Element Plus
  36. </p>
  37. <p
  38. class="demo-rich-content__mention"
  39. style="margin: 0; font-size: 14px; color: var(--el-color-info)"
  40. >
  41. @element-plus
  42. </p>
  43. </div>
  44. <p class="demo-rich-content__desc" style="margin: 0">
  45. Element Plus, a Vue 3 based component library for developers,
  46. designers and product managers
  47. </p>
  48. </div>
  49. </template>
  50. </el-popover>
  51. </div>
  52. </template>
  53. <script lang="ts" setup>
  54. const gridData = [
  55. {
  56. date: '2016-05-02',
  57. name: 'Jack',
  58. address: 'New York City',
  59. },
  60. {
  61. date: '2016-05-04',
  62. name: 'Jack',
  63. address: 'New York City',
  64. },
  65. {
  66. date: '2016-05-01',
  67. name: 'Jack',
  68. address: 'New York City',
  69. },
  70. {
  71. date: '2016-05-03',
  72. name: 'Jack',
  73. address: 'New York City',
  74. },
  75. ]
  76. </script>