Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/city select #617

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 12 additions & 1 deletion src/components/cityselect/src/cityselect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
<yd-mask v-model="show" @click.native="close" ref="mask" :opacity="maskerOpacity"></yd-mask>
<div class="yd-cityselect" :class="show ? 'yd-cityselect-active' : ''">
<div class="yd-cityselect-header">
<p class="yd-cityselect-title" @touchstart.stop.prevent="">{{title}}</p>
<p class="yd-cityselect-title">
<span class="yd-cityselect-title-text">{{title}}</span>
<!-- feature 新增确定按钮,增加筛选灵活性 -->
<a href="javascript:;" class="yd-cityselect-title-btn" @click="this.returnValue">确定</a>
</p>
<div v-show="ready" class="yd-cityselect-nav">
<a href="javascript:;"
:key="key"
Expand Down Expand Up @@ -168,6 +172,13 @@
this.navIndex = index;
},
itemEvent(index, name, value, children) {
// bugfix 每次点击第某列的时候 把之前点击保存某列之后的数据清空
for (var i = this.columnNum; i >= index; i--) {
this.active["itemValue" + i] = ""
this.active["itemName" + i] = ""
this.active["txt" + i] = ""
}

this.active['itemValue' + index] = value;
this.active['itemName' + index] = name;
this.nav['txt' + index] = name;
Expand Down
15 changes: 15 additions & 0 deletions src/styles/components/cityselect.less
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,21 @@
}
}

&-cityselect-title-btn {
position: absolute;
top: 9px;
right: 9px;
line-height: 25px;
font-size: 13px;
display: inline-block;
padding: 0 10px;
text-align: center;
border-radius: 3px;
background-color: #f23030;
color: #fff;
border: 1px solid #f23030;
}

&-cityselect-nav {
width: 100%;
padding-left: 10px;
Expand Down