userCenterProject.vue 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <template>
  2. <div class="application-history">
  3. <div style="height:50px;line-height:50px">
  4. <span :class="informationsClass==1?'information2':'information1'" @click="getInformation(1)" class="cursor">{{$i18n.locale=='en'? 'My Project': '我的项目'}}</span>
  5. <span :class="informationsClass==2?'information2':'information1'" @click="getInformation(2)" class="cursor">{{$i18n.locale=='en'? 'My Project Intention': '项目意向'}}</span>
  6. <span :class="informationsClass==3?'information2':'information1'" @click="getInformation(3)" class="cursor">{{$i18n.locale=='en'? 'My Project Recommendation': '项目推荐'}}</span>
  7. </div>
  8. <userCenterMyProject v-if="informationsClass==1"></userCenterMyProject>
  9. <userCenterMyProjectIntention v-if="informationsClass==2"></userCenterMyProjectIntention>
  10. <userCenterMyProjectRecommendation v-if="informationsClass==3"></userCenterMyProjectRecommendation>
  11. </div>
  12. </template>
  13. <script>
  14. import Base from "@/views/base/Base";
  15. import userCenterMyProject from "./userCenterMyProject";
  16. import userCenterMyProjectIntention from "./userCenterMyProjectIntention";
  17. import userCenterMyProjectRecommendation from "./userCenterMyProjectRecommendation";
  18. export default {
  19. name: "userCenterProject",
  20. extends: Base,
  21. components:{ userCenterMyProject, userCenterMyProjectIntention,userCenterMyProjectRecommendation },
  22. data() {
  23. return {
  24. informationsClass:'1',
  25. lang: localStorage.getItem('local')
  26. }
  27. },
  28. created() {
  29. this.$bus.on('setLang', lang=>{
  30. this.lang = lang;
  31. })
  32. },
  33. methods: {
  34. getInformation(num){
  35. this.informationsClass=num
  36. },
  37. }
  38. }
  39. </script>
  40. <style scoped>
  41. .application-history{
  42. background: #fff;
  43. min-height: 700px;
  44. }
  45. .information1 {
  46. display: inline-block;
  47. min-width: 123px;
  48. padding: 0 20px;
  49. height: 100%;
  50. border:1px solid rgba(228, 228, 228, 1);
  51. text-align: center;
  52. background: #f9f9f9;
  53. color: #999;
  54. }
  55. .information2 {
  56. display: inline-block;
  57. min-width: 123px;
  58. padding: 0 20px;
  59. height: 100%;
  60. border-top:3px solid #2c5589;
  61. text-align: center;
  62. color: #2c5589;
  63. }
  64. .information1:hover {
  65. color: #FF0036;
  66. }
  67. </style>