ElemLines.vue 765 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <template>
  2. <div :class="classes">
  3. <div class="lines-body">
  4. <div
  5. class="lines-item"
  6. v-for="n in this.data.lineCount"
  7. :key="n"
  8. :style="styles"
  9. ></div>
  10. </div>
  11. </div>
  12. </template>
  13. <script>
  14. export default {
  15. name: "elem-line-horizontal",
  16. props: {
  17. data: {
  18. type: Object
  19. }
  20. },
  21. computed: {
  22. classes() {
  23. return ["elem-lines"];
  24. },
  25. styles() {
  26. return {
  27. borderBottomStyle: this.data.style,
  28. borderBottomWidth: this.data.bold,
  29. borderBottomColor: this.data.color,
  30. paddingTop: this.data.lineSpacing + "px",
  31. margin: this.data.margin ? `0 ${this.data.margin}px` : "0"
  32. };
  33. }
  34. },
  35. data() {
  36. return {};
  37. },
  38. methods: {}
  39. };
  40. </script>