index.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <script setup name="IndexTitle">
  2. import { ArrowRight } from '@element-plus/icons-vue'
  3. const Props = defineProps({
  4. title: {
  5. type: String,
  6. default: '默认标题'
  7. }
  8. })
  9. const Emits = defineEmits(['seeMore'])
  10. </script>
  11. <template>
  12. <div class="index-title-container flex-row flex-aic flex-jc-sb">
  13. <div class="title">{{ title }}</div>
  14. <div class="more flex-row flex-aic" @click="seeMore && seeMore()">
  15. <span>查看更多</span>
  16. <el-icon class="icon" :size="12">
  17. <ArrowRight />
  18. </el-icon>
  19. </div>
  20. </div>
  21. </template>
  22. <style lang="scss" scoped>
  23. @import "~/styles/variable.scss";
  24. .index-title-container {
  25. padding-left: 16px;
  26. border-left: 4px solid $color-primary;
  27. .title {
  28. font-size: 18px;
  29. font-weight: 600;
  30. color: #333333;
  31. line-height: 2em;
  32. }
  33. .more {
  34. cursor: pointer;
  35. font-size: 14px;
  36. font-weight: 400;
  37. color: #57C3C2;
  38. color: $color-primary;
  39. span {
  40. display: inline-block;
  41. margin-right: 6px;
  42. }
  43. .icon {
  44. border-radius: 50%;
  45. border: 1px solid $color-primary;
  46. }
  47. }
  48. }
  49. </style>