line.vue 707 Bytes
Newer Older
sin's avatar
sin committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
<template>
    <div :style="divstyle" ><div :style="linestyle"></div></div>
</template>

<script>
export default {
    name: 'page-line',
    props: {
        data: Object,
    },
    computed:{
        divstyle(){
            return{
                height:"30px",
                position:'relative',
                margin:'0px '+this.data.margintype+'px'
            };
        },
        linestyle(){
            return{
                position:'absolute',
                top:'14px',
                width:'100%',
                borderTop:'1px '+(this.data.type==undefined?'solid':this.data.type)+" "+(this.data.color==undefined?'#000':this.data.color),
            };
        }
    }
};
</script>