slider.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <template>
  2. <div class="slider-box">
  3. <div v-for="item in list" :key="item.mdi" class="slider-box-item">
  4. <v-tooltip :text="item.tips" location="start">
  5. <template v-slot:activator="{ props }">
  6. <v-btn size="30" class="icons" variant="text" v-bind="props" :icon="item.mdi"></v-btn>
  7. </template>
  8. <div v-if="item.showImg" class="ma-3" style="text-align: center">
  9. <v-img cover aspect-ratio="1/1" src="https://minio.citupro.com/dev/static/mendunerCode.jpg" :width="170" style="height: 170px;"></v-img>
  10. <span class="tips-text">关注门墩儿直聘微信公众号</span>
  11. </div>
  12. <span v-else>{{ item.tips }}</span>
  13. </v-tooltip>
  14. </div>
  15. </div>
  16. </template>
  17. <script setup>
  18. defineOptions({ name: 'personalSlider' })
  19. const list = [
  20. { mdi: 'mdi-arrow-up-bold', tips: '返回顶部' },
  21. { mdi: 'mdi-qrcode', tips: '微信公众号', showImg: 'https://minio.citupro.com/dev/static/mendunerCode.jpg' },
  22. { mdi: 'mdi-face-agent', tips: '客服' },
  23. { mdi: 'mdi-list-box-outline', tips: '个人简历' }
  24. ]
  25. </script>
  26. <style lang="scss" scoped>
  27. .slider-box {
  28. width: 44px;
  29. height: 180px;
  30. background-color: #fff;
  31. border-radius: 22px;
  32. box-shadow: 0 4px 20px 0 rgba(0,0,0,.06);
  33. }
  34. .slider-box-item {
  35. width: 44px;
  36. height: 44px;
  37. padding: 6px 0;
  38. text-align: center;
  39. }
  40. .icons {
  41. color: #ccc;
  42. &:hover {
  43. color: var(--v-primary-base);
  44. }
  45. }
  46. .tip-text {
  47. font-size: 14px;
  48. color: #222;
  49. }
  50. </style>