item.vue 516 B

123456789101112131415161718192021222324252627282930313233343536
  1. <template>
  2. <div class="item">
  3. {{item}}
  4. <template v-if="total.length != index">
  5. -<el-checkbox :label="item+'-'+total[index]" />-
  6. </template>
  7. </div>
  8. </template>
  9. <script>
  10. export default {
  11. props: {
  12. item: {
  13. type: String,
  14. default: ''
  15. },
  16. total: {
  17. type: Array,
  18. default: []
  19. },
  20. index: {
  21. type: Number,
  22. default: 0
  23. }
  24. }
  25. }
  26. </script>
  27. <style lang="scss" scoped>
  28. .item {
  29. white-space: nowrap;
  30. .el-checkbox {
  31. margin-right: 0;
  32. }
  33. }
  34. </style>