Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
TerryZ committed Jun 9, 2018
1 parent 39a9542 commit f6b10c4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion dist/v-region.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/v-region.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "v-region",
"description": "A simple region selector, provide Chinese administrative division data",
"version": "1.4.0",
"version": "1.5.0",
"author": "TerryZ <[email protected]>",
"license": "MIT",
"main": "dist/v-region.js",
Expand Down
14 changes: 7 additions & 7 deletions src/Region.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
<option value="" selected v-if="blank">{{lang.pleaseSelect}}</option>
<option :value="t.key" v-for="t in listTown">{{t.value}}</option>
</select>
<div class="caller-container" @click="showDropdown(true)" v-if="ui" ref="caller">



<!-- selector mode -->
<div class="caller-container" @click.stop.prevent="showDropdown(true)" v-if="ui" ref="caller">
<slot></slot>
</div>
<v-dropdown v-if="ui" ref="dropdown">
Expand All @@ -34,10 +38,6 @@
<button type="button" title="完成" @click="showDropdown(false)" class="rg-done-button" >
<i class="iconfont icon-selected"></i>
</button>
<!-- <button type="button"
@click="showDropdown(false)"
title="关闭(Esc键)"
class="rg-close-button">×</button>-->
</div>
<div class="rg-search" v-if="search">
<input type="text" autocomplete="off" ref="input"
Expand Down Expand Up @@ -297,7 +297,7 @@
break;
case 2://area
if(this.area) val = true;
break;z
break;
case 3://town
if(this.town) val = true;
break;
Expand Down Expand Up @@ -337,7 +337,7 @@
this.$refs.dropdown.$emit('show', val, this.$refs.caller);
if(val) {
this.query = '';
this.$nextTick(()=>that.$refs.input.focus());
this.$nextTick(()=>that.$refs.input.focus({preventScroll:true}));
}
}
},
Expand Down

0 comments on commit f6b10c4

Please sign in to comment.