You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
119 lines
2.3 KiB
119 lines
2.3 KiB
<template>
|
|
<div class="imageText warp" :class="['terminal'+terminal,'pos-' + componentContent.positionValue]">
|
|
<div class="img img-left">
|
|
<a class="item a-link" @click="jumpLink(componentContent.linkObj)"><img :src="componentContent.imageUrl" alt=""></a>
|
|
</div>
|
|
<div class="text">
|
|
<h3 class="h3">{{componentContent.title}}</h3>
|
|
<div v-html="componentContent.content"></div>
|
|
</div>
|
|
<div class="img img-right">
|
|
<a class="item a-link" @click="jumpLink(componentContent.linkObj)"><img :src="componentContent.imageUrl" alt=""></a>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import {funMixin} from '../config/mixin'
|
|
export default {
|
|
name: 'imageTextComponent',
|
|
mixins: [funMixin],
|
|
data () {
|
|
return {
|
|
}
|
|
},
|
|
props: {
|
|
terminal: {
|
|
type: Number,
|
|
default: 4
|
|
},
|
|
componentContent: {
|
|
type: Object
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.imageText{
|
|
width: 710upx;
|
|
margin: 0 auto;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 20upx 0;
|
|
.img{
|
|
width: 50%;
|
|
padding-bottom: 30%;
|
|
background-color: #cacaca;
|
|
position: relative;
|
|
img{
|
|
max-width: 100%;
|
|
height: 100%;
|
|
max-height: 100%;
|
|
position: absolute;
|
|
margin: auto;
|
|
top: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
left: 0;
|
|
}
|
|
}
|
|
.text{
|
|
width: 40%;
|
|
.h3{
|
|
font-size: 30upx;
|
|
margin-bottom: 24upx;
|
|
}
|
|
.p{
|
|
font-size: 16upx;
|
|
}
|
|
}
|
|
&.pos-top{
|
|
display: block;
|
|
text-align: center;
|
|
.img{
|
|
width: 100%;
|
|
}
|
|
.text{
|
|
width: 100%;
|
|
margin-top: 30upx;
|
|
}
|
|
.img-right{
|
|
display: none;
|
|
}
|
|
}
|
|
&.pos-bottom{
|
|
display: block;
|
|
text-align: center;
|
|
.img{
|
|
width: 100%;
|
|
}
|
|
.text{
|
|
width: 100%;
|
|
margin-bottom: 30upx;
|
|
}
|
|
.img-left{
|
|
display: none;
|
|
}
|
|
}
|
|
&.pos-left{
|
|
.img-right{
|
|
display: none;
|
|
}
|
|
}
|
|
&.pos-right{
|
|
.text{
|
|
padding-left: 20upx;
|
|
}
|
|
.img-left{
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
}
|
|
.terminal1,.terminal2,.terminal3{
|
|
width: 710upx;
|
|
margin: 0 auto;
|
|
}
|
|
</style>
|