Commit 9c22f692 by chenwq

员工

1 parent f7f4a731
<template>
<div id="staff" class="staff">
<img class="icon-head" :src="detail.activityBigImg" />
<div class="name">余皖平</div>
邀请您参加本次团购
</div>
</template>
<script>
var dom = ''
var wth = 0
export default {
name: 'Staff',
data() {
return {}
},
props: {
detail: {
type: Object,
default: () => { }
},
scrollY: {
type: Number,
default: 0
}
},
watch: {
scrollY(newVal, val) {
dom.style.left = newVal > 40 ? '-' + wth + 'px' : ''
}
},
mounted() {
dom = document.getElementById('staff')
wth = dom.offsetWidth + 10
},
methods: {}
}
</script>
<style lang="scss" scoped>
.staff {
position: fixed;
left: 0;
bottom: 100px;
z-index: 2;
display: flex;
box-sizing: border-box;
height: 48px;
line-height: 24px;
opacity: 0.9;
background: #ffffff;
box-shadow: 0 4px 12px 0 rgba(159, 166, 209, 0.25);
border-radius: 0 100px 100px 0;
padding: 12px 10px;
font-size: 14px;
color: #1b233d;
transition: left 0.3s;
.icon-head {
width: 24px;
height: 24px;
border-radius: 50%;
}
.name {
margin: 0 4px;
font-size: 16px;
font-weight: 600;
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!