_id.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <template>
  2. <div style="position: relative">
  3. <bxh :bxhType="'render'" :design="+$route.params.id"></bxh>
  4. <nuxt-link
  5. :to="{ name: 'design-id', params: { id: +$route.params.id } }">
  6. <div class="return"
  7. @mouseenter="changeImageSrc(true)"
  8. @mouseleave="changeImageSrc(false)">
  9. <img :src="src" />
  10. <div class="content">Return</div>
  11. </div>
  12. </nuxt-link>
  13. </div>
  14. </template>
  15. <script>
  16. export default {
  17. layout: "blank_layout",
  18. data() {
  19. return {
  20. src: require(`@/assets/img/bxh/return.png`),
  21. };
  22. },
  23. mounted() {},
  24. methods: {
  25. changeImageSrc(key) {
  26. if (key) {
  27. this.src = require(`@/assets/img/bxh/return_hover.png`);
  28. } else {
  29. this.src = require(`@/assets/img/bxh/return.png`);
  30. }
  31. },
  32. },
  33. };
  34. </script>
  35. <style lang="scss" scoped>
  36. .return {
  37. position: absolute;
  38. right: 100px;
  39. top: 0;
  40. color: #e5e5e6;
  41. height: 54px;
  42. display: flex;
  43. flex-direction: column;
  44. justify-content: center;
  45. align-items: center;
  46. &:hover {
  47. .content{
  48. color: #ff7714;
  49. }
  50. }
  51. }
  52. img {
  53. width: 18px;
  54. }
  55. .content {
  56. margin-top: 6px;
  57. }
  58. </style>