table.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <template>
  2. <div class="keyword-table">
  3. <Empty
  4. :autoFinish="autoFinish"
  5. :fail="fail"
  6. :text="fail ? '生成失败' : 'AI数据生成中...'"
  7. v-if="loading"
  8. ></Empty>
  9. <el-table :data="renderTableData" v-else>
  10. <el-table-column prop="keyword" align="center">
  11. <template #header>
  12. <el-tooltip popper-class="help-tip" effect="light" placement="top">
  13. <template #content style="padding: 20px">
  14. <span class="title">关键词</span>
  15. <span class="value"
  16. >当您搜索一个术语或短语(又名“关键字")时,通常会有数千个结果。如果某个域名出现在前 50
  17. 名结果中,我们将该搜索词视为其自然(SEO) 关键字之一。</span
  18. >
  19. </template>
  20. <img :src="Help" />
  21. </el-tooltip>
  22. 关键词
  23. </template>
  24. </el-table-column>
  25. <el-table-column prop="searchVolume" align="center">
  26. <template #header>
  27. <el-tooltip popper-class="help-tip" effect="light" placement="top">
  28. <template #content style="padding: 20px">
  29. <span class="title">搜索量</span>
  30. <span class="value"
  31. >这显示了上个月在美国 https://www.google.com/search?q=Google.com
  32. 上的搜索次数(或在我们其他国家/地区选项中,在所选国家/地区内用 Google
  33. 进行的搜索次数)。我们融合了来自多个来源的数据,以提供该关键词搜索活动的更好快照,因此它不会与
  34. Google 的搜索量指标完全相同。</span
  35. >
  36. </template>
  37. <img :src="Help" />
  38. </el-tooltip>
  39. 搜索量
  40. </template>
  41. </el-table-column>
  42. <el-table-column prop="competition" align="center">
  43. <template #header>
  44. <el-tooltip popper-class="help-tip" effect="light" placement="top">
  45. <template #content style="padding: 20px">
  46. <span class="title">关键词难度</span>
  47. <span class="value"
  48. >我们已经计算了在这个关键词上排名的难度。分数基于 1-100 的等级,100 是最难排名的。
  49. 将此数字与您定位的其他关键字进行比较,以了解如何确定 SEO 活动的优先级。</span
  50. >
  51. </template>
  52. <img :src="Help" />
  53. </el-tooltip>
  54. 关键词难度
  55. </template>
  56. </el-table-column>
  57. </el-table>
  58. </div>
  59. </template>
  60. <script lang="ts" setup>
  61. import Help from '../../assets/images/help.png';
  62. import { computed } from 'vue';
  63. import { useMainStore } from '@/store';
  64. import Empty from '@/components/CommonEmpty.vue';
  65. const mainStore = useMainStore();
  66. // const expanded = computed(() => mainStore.getExpanded);
  67. const tableData = computed(() => mainStore.suggestionsInfo.data);
  68. const loading = computed(() => mainStore.suggestionsInfo.loading);
  69. const autoFinish = computed(() => mainStore.suggestionsInfo.autoFinish);
  70. const fail = computed(() => mainStore.suggestionsInfo.fail);
  71. const renderTableData = computed(() => tableData.value.slice(0, 5));
  72. // const renderTableData = computed(() => expanded.value ? tableData.value : tableData.value.slice(0, 5));
  73. </script>
  74. <style lang="scss" scoped>
  75. .keyword-table {
  76. display: flex;
  77. justify-content: center;
  78. align-items: center;
  79. height: 100%;
  80. :deep(.el-table) {
  81. width: 100%;
  82. // height: 317px;
  83. .el-table__header {
  84. height: 52px;
  85. .el-table__cell {
  86. background: rgba(3, 110, 184, 0.1) !important;
  87. font-weight: bold;
  88. font-size: 16px;
  89. color: #282e30;
  90. }
  91. }
  92. .el-table__row {
  93. height: 52px;
  94. font-weight: bold;
  95. font-size: 14px;
  96. color: #282e30;
  97. }
  98. }
  99. :deep(.el-table__cell) {
  100. img {
  101. width: 22px;
  102. height: 22px;
  103. position: relative;
  104. top: 5px;
  105. cursor: pointer;
  106. }
  107. }
  108. }
  109. </style>