华西海圻ELN前端工程
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.

42 lines
865 B

  1. <template>
  2. <div>
  3. <LineLabel v-if = "label" :label="label"></LineLabel>
  4. <div class="mt-20">
  5. <el-table :data="dataSource">
  6. <el-table-column v-for="(item) in columns" :prop="item.prop" :key="item.prop" :label="$t(item.label)">
  7. </el-table-column>
  8. </el-table>
  9. </div>
  10. </div>
  11. </template>
  12. <script>
  13. import LineLabel from "./LineLabel.vue";
  14. export default {
  15. components: {
  16. LineLabel,
  17. },
  18. props: {
  19. //[{label:"名称",prop:"name"}]
  20. columns: {
  21. type: Array,
  22. default: [],
  23. },
  24. dataSource: {
  25. type: Array,
  26. default: [],
  27. },
  28. label: {
  29. type: String,
  30. default: "",
  31. }
  32. }
  33. }
  34. </script>
  35. <style lang="scss" scoped>
  36. .mt-20 {
  37. margin-top: 20px;
  38. }
  39. </style>