12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <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>
|