<!--label标签组件-->

<template>
    <div>
        <label v-for="item in labelJson"
               :style="{
                 fontSize:item.FontSize*bigScale + 'px',
                 position:'absolute',
                 left:item.Left*bigScale+'px',
                 top:item.Top*bigScale+'px',
                 width:item.Width*bigScale + 'px',
                 height:item.Height*bigScale + 'px',
                 zIndex:item.ZIndex,
                 display:item.IsVisibility ? 'block' : 'none',
                 color:`#${item.ForegroundStr.slice(3)}`,
                 textAlign:'center',
                 lineHeight:item.Height*bigScale + 'px',
            }">
            {{item.Text}}
        </label>
    </div>
</template>

<script>
    import {mapState} from 'vuex'
    import {getStaticFile} from "../../utils/tools"

    export default {
        data() {
            return {
                labelJson:[]
            }
        },

        async beforeCreate() {
            this.labelJson = await getStaticFile('EnityLable.Data')
        },

        computed: {
            ...mapState(['bigScale']),
        },

        methods: {

        }
    }
</script>

<style scoped>

</style>
