index.vue 745 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <template>
  2. <el-card class="content-z">
  3. <a-tabs v-model="activeKey">
  4. <a-tab-pane
  5. v-for="item in tabs"
  6. :key="item.name"
  7. :tab="item.title"
  8. >
  9. <component
  10. :is="item.name"
  11. v-if="activeKey === item.name"
  12. />
  13. </a-tab-pane>
  14. </a-tabs>
  15. </el-card>
  16. </template>
  17. <script>
  18. import dy from './view/dy'
  19. import yy from './view/yy'
  20. export default {
  21. components: {
  22. dy,
  23. yy
  24. },
  25. data() {
  26. return {
  27. activeKey: 'dy',
  28. tabs: [{
  29. title: '待检验',
  30. name: 'dy'
  31. }, {
  32. title: '已检验',
  33. name: 'yy'
  34. }]
  35. }
  36. },
  37. computed: {},
  38. methods: {}
  39. }
  40. </script>
  41. <style scoped>
  42. @import '~@/assets/less/common.less'
  43. </style>