<template> <div :class="classes"> <div class="line-body" :style="styles"></div> </div> </template> <script> export default { name: "elem-line-horizontal", props: { data: { type: Object, }, }, computed: { classes() { return [ "elem-line", this.data.type === "LINE_HORIZONTAL" ? "elem-line-horizontal" : "elem-line-vertical", ]; }, styles() { return this.data.type === "LINE_HORIZONTAL" ? { borderBottomStyle: this.data.style, borderBottomWidth: this.data.bold, borderBottomColor: this.data.color, } : { borderLeftStyle: this.data.style, borderLeftWidth: this.data.bold, borderLeftColor: this.data.color, }; }, }, data() { return {}; }, methods: {}, }; </script>