detail.vue 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <template>
  2. <div>
  3. <!-- tab切换 -->
  4. <!-- <div class="switch">
  5. <div class="switch_left">
  6. <ul>
  7. <li
  8. v-for="item in tabOptions"
  9. :key="item.key"
  10. :class="{ active: activeComp == item.key }"
  11. @click="activeComp = item.key"
  12. >
  13. {{ item.name }}
  14. </li>
  15. </ul>
  16. <el-button size="small" @click="$router.go(-1)">返回</el-button>
  17. </div>
  18. </div> -->
  19. <div class="content-wrapper">
  20. <component :is="activeComp" :rowInfo="rowInfo"></component>
  21. </div>
  22. </div>
  23. </template>
  24. <script>
  25. import baseInfo from './components/baseInfo.vue'
  26. export default {
  27. components: {
  28. baseInfo
  29. },
  30. data () {
  31. return {
  32. activeComp: 'baseInfo',
  33. tabOptions: [
  34. { key: 'baseInfo', name: '舟皿信息' },
  35. ],
  36. rowInfo:null,
  37. }
  38. },
  39. created () {
  40. // this.rowInfo = JSON.parse(this.$route.query.row)
  41. },
  42. methods:{
  43. // async getDetilInfo(id){
  44. // const res = await getDetails({id:id})
  45. // if (res.success){
  46. // }
  47. // },
  48. }
  49. }
  50. </script>
  51. <style lang="scss" scoped>
  52. .content-wrapper {
  53. background-color: #fff;
  54. }
  55. .switch_left{
  56. width:100%;
  57. display:flex;
  58. align-items:center;
  59. justify-content: space-between;
  60. padding-right:20px;
  61. }
  62. </style>