Rap 原分销系统代码Web
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1ee89531354dabb08b2aa556a6b5a7d49537e95d.svn-base 787B

5 months ago
123456789101112131415161718192021222324252627282930
  1. <template>
  2. <el-tabs v-model="activeName" type="card">
  3. <el-tab-pane v-for="item in data" :key="item.name" :lazy="true" :label="item.name" :name="item.name">
  4. <Java :value="item.content" :height="height" />
  5. </el-tab-pane>
  6. </el-tabs>
  7. </template>
  8. <script>
  9. import Java from '@/components/JavaEdit/index'
  10. import { generator } from '@/api/generator/generator'
  11. export default {
  12. name: 'Preview',
  13. components: { Java },
  14. data() {
  15. return {
  16. data: null, height: '', activeName: 'Entity'
  17. }
  18. },
  19. created() {
  20. this.height = document.documentElement.clientHeight - 180 + 'px'
  21. const tableName = this.$route.params.tableName
  22. generator(tableName, 1).then(data => {
  23. this.data = data
  24. }).catch(() => {
  25. this.$router.go(-1)
  26. })
  27. }
  28. }
  29. </script>