14 changed files with 263 additions and 316 deletions
@ -0,0 +1,221 @@ |
|||
<template> |
|||
<div v-if="visible" class="van-overlay"></div> |
|||
<div v-if="visible" class="popup"> |
|||
<div class="popup-title">区域</div> |
|||
<!-- 关闭按钮 --> |
|||
<label class="close-button" @click="closePopup"></label> |
|||
|
|||
<!-- 弹窗的内容 --> |
|||
<div class="popup-content"> |
|||
|
|||
<div class="subsearch"> |
|||
<input class="searchbox" placeholder="请输入区域名称"/> |
|||
<van-icon class="ibtn-reset" name="clear" @click="cancel()" title="重置"/> |
|||
<button class='btn-search'>搜索</button> |
|||
<button class='btn-search btn-determine'>确定</button> |
|||
<button class='btn-search btn-empty'>清空</button> |
|||
</div> |
|||
|
|||
<div class="search-result"> |
|||
<van-pull-refresh v-model="refreshing" @refresh="onRefresh"> |
|||
|
|||
<van-list finished-text="没有更多了" @load="onLoad"> |
|||
<van-checkbox-group> |
|||
<van-checkbox v-model="checked">全市</van-checkbox> |
|||
<van-checkbox>福田区</van-checkbox> |
|||
<van-checkbox>罗湖区</van-checkbox> |
|||
<van-checkbox>盐田区</van-checkbox> |
|||
<van-checkbox>南山区</van-checkbox> |
|||
<van-checkbox>宝安区</van-checkbox> |
|||
<van-checkbox>龙岗区</van-checkbox> |
|||
<van-checkbox>龙华区</van-checkbox> |
|||
<van-checkbox>坪山区</van-checkbox> |
|||
<van-checkbox>光明区</van-checkbox> |
|||
<van-checkbox>大鹏新区</van-checkbox> |
|||
<van-checkbox>深汕特别合作区</van-checkbox> |
|||
</van-checkbox-group> |
|||
</van-list> |
|||
</van-pull-refresh> |
|||
</div> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
props: { |
|||
visible: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
content: { |
|||
type: String, |
|||
default: '' |
|||
} |
|||
}, |
|||
methods: { |
|||
closePopup() { |
|||
this.$emit('close'); |
|||
} |
|||
} |
|||
} |
|||
|
|||
</script> |
|||
<script> |
|||
|
|||
|
|||
</script> |
|||
|
|||
<style> |
|||
.popup { |
|||
position: fixed; |
|||
z-index: 999; |
|||
top: 3rem; |
|||
left: 0; |
|||
width: 100%; |
|||
height: calc(100% - 3rem); |
|||
background: #fff; |
|||
overflow: hidden; |
|||
} |
|||
|
|||
.popup-title { |
|||
margin: 0.3rem 0 0; |
|||
width: 100%; |
|||
height: 1rem; |
|||
border-bottom: 1px solid #f3f4f5; |
|||
text-align: center; |
|||
font-size: 0.45rem; |
|||
font-weight: 600; |
|||
} |
|||
|
|||
.close-button { |
|||
position: absolute; |
|||
top: 0.15rem; |
|||
right: 0.1rem; |
|||
width: 0.8rem; |
|||
height: 0.8rem; |
|||
background-color: rgba(255, 255, 255, .5); |
|||
border: 0.05rem solid rgba(255, 255, 255, .7); |
|||
border-radius: 50%; |
|||
transform: rotate(45deg); |
|||
} |
|||
|
|||
.close-button:before, |
|||
.close-button:after { |
|||
content: ''; |
|||
position: absolute; |
|||
top: 50%; |
|||
left: 50%; |
|||
background: #333; |
|||
border-radius: 50%; |
|||
transform: translate(-50%, -50%); |
|||
height: 0.4rem; |
|||
width: 0.02rem; |
|||
} |
|||
|
|||
.close-button:after { |
|||
height: 0.02rem; |
|||
width: 0.4rem; |
|||
} |
|||
|
|||
.popup-content { |
|||
margin: 0.25rem 3% 0; |
|||
padding-bottom: 1rem; |
|||
width: 94%; |
|||
height: calc(100% - 1.6rem); |
|||
overflow: hidden; |
|||
font-size: 0.37rem; |
|||
} |
|||
|
|||
.subsearch { |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
margin: 1%; |
|||
width: 96%; |
|||
height: 1.25rem; |
|||
font-size: 0.37rem; |
|||
white-space: nowrap; |
|||
} |
|||
|
|||
.subsearch .ibtn-reset { |
|||
margin: 0 0.5rem 0 -1rem; |
|||
width: 1rem; |
|||
color: #afabab; |
|||
font-size: 0.5rem; |
|||
} |
|||
|
|||
.subsearch .btn-search { |
|||
margin: 0 0.8rem 0 -0.2rem; |
|||
width: 20%; |
|||
height: 1rem; |
|||
background: #eeeff1 url(/src/assets/images/icon_sou.png) no-repeat; |
|||
background-position: left 0.3rem center; |
|||
background-size: auto 50%; |
|||
border-radius: 0 0.15rem 0.15rem 0; |
|||
border: 1px solid rgba(0, 0, 0, .1); |
|||
border-left: 1px solid #eee; |
|||
line-height: 10rem; |
|||
overflow: hidden; |
|||
} |
|||
|
|||
.subsearch .btn-search.btn-determine { |
|||
margin-right: 0.5rem; |
|||
width: 2.5rem; |
|||
border-radius: 0.15rem; |
|||
background: #1367fe; |
|||
border-color: #1367fe; |
|||
color: #fff; |
|||
line-height: 1; |
|||
} |
|||
|
|||
.subsearch .btn-search.btn-empty { |
|||
margin-right: 0; |
|||
width: 2.5rem; |
|||
border-radius: 0.15rem; |
|||
background: #f74e4d; |
|||
border-color: #f74e4d; |
|||
color: #fff; |
|||
line-height: 1; |
|||
} |
|||
|
|||
|
|||
.searchbox { |
|||
margin: 2% 0; |
|||
padding: 0.1rem 1.2rem 0.1rem 0.9rem; |
|||
width: 100%; |
|||
height: 1rem; |
|||
background: #f6f7fe url(../../assets/images/icon_sou.png) no-repeat; |
|||
background-position: left 0.25rem center; |
|||
background-size: auto 50%; |
|||
box-sizing: border-box; |
|||
border: 1px solid rgba(0, 0, 0, .1); |
|||
border-radius: 0.15rem 0 0 0.15rem; |
|||
color: #999999; |
|||
outline: none; |
|||
} |
|||
|
|||
.subtitle { |
|||
margin: 0.5rem 0 0.25rem; |
|||
color: #000; |
|||
font-size: 0.4rem; |
|||
/*font-weight: 600;*/ |
|||
clear: both; |
|||
} |
|||
|
|||
.search-result { |
|||
width: 100%; |
|||
height: calc(100% - 2.5rem); |
|||
padding-bottom: 1rem; |
|||
overflow-y: auto; |
|||
} |
|||
|
|||
.van-checkbox { |
|||
margin: 3% 2%; |
|||
padding: 3% 0; |
|||
border-bottom: 1px solid #f3f4f5; |
|||
} |
|||
|
|||
</style> |
|||
Loading…
Reference in new issue