图片背景组件
/*************************************/
使用:
<jb-img-map-bg :bg-width="width" :bg-height="height" class="topoBgImage"></jb-img-map-bg>
.topoBgImage
z-index -1
position absolute
/*************************************/
<template>
<div>
<el-image
:style="bmapStyle"
:src="url"
fit="fill"></el-image>
</div>
</template>
<script>
export default {
name: 'ImageMapBg',
props: {
bgWidth: {
type: Number,
require: true
},
bgHeight: {
type: Number,
require: true
}
},
data () {
return {
url: '/static/assets/topo/bg_world.bmp'
}
},
computed: {
bmapStyle () {
return { width: this.bgWidth + 'px', height: this.bgHeight + 'px' }
}
}
}
</script>
<style scoped>
</style>

浙公网安备 33010602011771号