Navigation.vue 1023 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <template>
  2. <div class="navigation">
  3. <p class="fixedTitle">经销商社交媒体数据平台</p>
  4. <div v-for="(nav, index) in navTitle" :key="index">
  5. <span>></span>
  6. <p @click="changepage(nav.url)">{{nav.title}}</p>
  7. </div>
  8. </div>
  9. </template>
  10. <script>
  11. export default {
  12. props: {
  13. navTitle: {
  14. type: Array,
  15. default: () => {
  16. return []
  17. }
  18. }
  19. },
  20. methods: {
  21. changepage: function(url) {
  22. // this.$router.push({ path: url });
  23. console.log(url);
  24. }
  25. }
  26. };
  27. </script>
  28. <style scoped lang="less">
  29. .navigation {
  30. width: 1190px;
  31. height: 20px;
  32. line-height: 20px;
  33. margin: 4px auto;
  34. display: flex;
  35. .fixedTitle {
  36. font-size: 12px;
  37. height: 20px;
  38. line-height: 20px;
  39. }
  40. div{
  41. display: flex;
  42. span{
  43. margin: 0 5px;
  44. }
  45. p{
  46. font-size: 12px;
  47. height: 20px;
  48. line-height: 20px;
  49. // &:hover{
  50. // cursor: pointer;
  51. // }
  52. }
  53. }
  54. }
  55. </style>