Commit a61f35fe by liwk

commit

1 parent 2665ebff
.sprite-icon { background-image: url(../images/sprite.png);background-size: 10px 10px;}
.icon-attract-customer-share { width: 10px; height: 10px; background-position: 0px 0px;}
\ No newline at end of file
.sprite-icon { background-image: url(../images/sprite.png);background-size: 40px 20px;}
.icon-attract-customer-share { width: 10px; height: 10px; background-position: -30px 0px;}
.icon-active { width: 20px; height: 20px; background-position: 0px 0px;}
\ No newline at end of file

427 Bytes | W: | H:

1.64 KB | W: | H:

src/assets/images/sprite.png
src/assets/images/sprite.png
src/assets/images/sprite.png
src/assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
<template>
<van-popup
v-model="show"
round
position="bottom"
class="popup"
@close="close"
>
<div class="content">
<div class="title flex">
会员套餐名称
<div class="all flex">
<template v-if="true">
<div class="sprite-icon icon-active"></div>
</template>
<template v-else>
<div class="radio"></div>
</template>
全选
</div>
</div>
<div class="img-box">
<template v-for="(item,ind) in 17">
<div
:key="ind"
class="item"
>
<img src="@/assets/images/test.jpg">
<div class="radio-box">
<template v-if="item.active">
<div class="sprite-icon icon-active"></div>
</template>
<template v-else>
<div class="radio">
</div>
</template>
</div>
</div>
</template>
</div>
<div class="footer flex">
<div
class="cancel text-center"
@click="close"
>取消</div>
<div class="confirm text-center">确定</div>
</div>
</div>
</van-popup>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'ResourcePopup',
props: ['value'],
data () {
return {
show: false
}
},
watch: {
'value' (n) {
this.show = n
}
},
mounted () {
},
methods: {
close () {
this.show = false
this.$emit('close')
}
}
}
</script>
<style scoped lang='scss'>
.popup {
height: 510px;
.content {
height: 100%;
.title {
height: 56px;
padding: 0 16px;
font-weight: 500;
font-size: 16px;
color: #333333;
.all {
margin-left: auto;
font-weight: 400;
color: #3a3a3a;
font-size: 14px;
.radio {
width: 20px;
height: 20px;
box-sizing: border-box;
border: 1.5px solid #999999;
border-radius: 100%;
overflow: hidden;
}
.sprite-icon,
.radio {
margin-right: 4px;
}
}
}
.img-box {
padding: 4px 26px;
display: flex;
flex-wrap: wrap;
box-sizing: border-box;
height: 405px;
overflow-y: scroll;
.item {
width: 102px;
height: 102px;
margin-bottom: 10px;
margin-right: 8px;
position: relative;
&:nth-of-type(3n + 3) {
margin-right: 0;
}
.radio-box {
position: absolute;
bottom: 2px;
right: 2px;
.radio {
width: 20px;
height: 20px;
background: #999999;
box-sizing: border-box;
border: 1.5px solid #fff;
border-radius: 100%;
overflow: hidden;
}
}
}
}
.footer {
height: 49px;
padding: 0 16px;
justify-content: space-between;
div {
width: 164px;
height: 38px;
border: 1px solid transparent;
font-size: 14px;
border-radius: 100px;
}
.cancel {
border-color: #dcdee0;
color: #323233;
}
.confirm {
border-color: #5850ff;
color: #fff;
background: #5850ff;
}
}
}
}
</style>
\ No newline at end of file
......@@ -27,7 +27,6 @@ export default {
},
methods: {
onLoad () {
console.log(123)
this.$emit('ReachBottom')
},
}
......
......@@ -13,7 +13,11 @@
class="box"
:key="index"
>
<div class="share">
<div
class="share text-center"
@click="share(i)"
>
转发
<div class="sprite-icon icon-attract-customer-share"></div>
</div>
<div class="title text-hide">渠道活码名称大概到这个位置…</div>
......@@ -24,10 +28,23 @@
<div class="remark">
备注:{{i.remark || '- -'}}
</div>
<div class="img-box"></div>
<div class="img-box">
<template v-for="(item,ind) in 9">
<div
:key="ind"
class="item"
>
<img src="@/assets/images/test.jpg">
</div>
</template>
</div>
</div>
</template>
</scroll-view>
<resource-popup
v-model="showPopup"
@close="showPopup = false"
/>
</div>
</template>
......@@ -36,13 +53,17 @@ export default {
name: '',
data () {
return {
showPopup: false
}
},
mounted () {
},
methods: {
share () {
this.showPopup = true
},
onReachBottom () {
console.log('触底')
this.$refs.scrollView.loading = false
this.$refs.scrollView.finished = true
}
......@@ -70,8 +91,16 @@ export default {
font-size: 12px;
.share {
position: absolute;
right: 0;
top: 0;
right: 10px;
top: 16px;
width: 63px;
height: 24px;
background: #5850ff;
border-radius: 12px;
color: #ffffff;
.sprite-icon {
margin-left: 5px;
}
}
.title {
width: 224px;
......@@ -93,6 +122,20 @@ export default {
.name-list {
color: #999999;
}
.img-box {
padding-top: 8px;
display: flex;
flex-wrap: wrap;
.item {
width: 102px;
height: 102px;
margin-top: 8px;
margin-right: 8px;
&:nth-of-type(3n + 3) {
margin-right: 0;
}
}
}
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!