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.
 
 
 
 
 
zhishifufei_uniapp/components/Advert/index.vue

32 lines
521 B

<template>
<view class="advert-box" :style="{height: height + 'rpx'}">
<image :src="getImgPath(img)" mode="aspectFill"></image>
</view>
</template>
<script>
export default {
props: {
img: {
type: String,
default: () => '/static/frontend/advert.png'
},
height: {
type: Number,
default: () => 110
},
}
};
</script>
<style lang="scss" scoped>
.advert-box {
width: 690rpx;
margin: 30rpx auto 0;
background: transparent;
image {
width: 100%;
height: 100%;
}
}
</style>