mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-20 18:05:53 +08:00
commit message
This commit is contained in:
42
buyer/src/components/advertising/FixedTop.vue
Normal file
42
buyer/src/components/advertising/FixedTop.vue
Normal file
@@ -0,0 +1,42 @@
|
||||
<template>
|
||||
<!-- 头部广告 -->
|
||||
<div class="advertising" v-if="show" :style="{'background-color': data.bgColor}">
|
||||
<img :src="data.img" class="hover-pointer" @click="linkTo(data.url)"/>
|
||||
<Icon type="md-close-circle" size="20" @click="show = false" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
data: { // 传入的广告信息
|
||||
type: Object,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
show: true // 是否显示头部广告
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.advertising {
|
||||
height: 80px;
|
||||
width: 100%;
|
||||
background-color: $theme_color;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
> img {
|
||||
width: 1200px;
|
||||
height: 100%;
|
||||
}
|
||||
*:nth-child(2){
|
||||
position: relative;
|
||||
right: 36px;
|
||||
top: -57px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
2
buyer/src/components/advertising/README.md
Normal file
2
buyer/src/components/advertising/README.md
Normal file
@@ -0,0 +1,2 @@
|
||||
# 广告
|
||||
## FixedTop 顶部广告
|
||||
Reference in New Issue
Block a user