Skip to content

Commit

Permalink
TimePicker: fix incorrectly hide panel,fixed ElemeFE#210
Browse files Browse the repository at this point in the history
  • Loading branch information
QingWei-Li committed Oct 2, 2016
1 parent fc4262d commit 9561f9b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*2016-XX-XX*

- 修复 Tabs 切换后 Tab-panel 被销毁的问题
- 修复 TimePicker 错误的隐藏面板

### 1.0.0-rc.5

Expand Down
2 changes: 1 addition & 1 deletion packages/date-picker/src/panel/time.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</transition>
</template>

<script type="text/ecmascript-6">
<script type="text/babel">
import { limitRange } from '../util';
import Vue from 'vue';
Expand Down
6 changes: 3 additions & 3 deletions packages/date-picker/src/picker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export default {
watch: {
pickerVisible(val) {
val === true ? this.showPicker() : this.hidePicker();
val ? this.showPicker() : this.hidePicker();
},
value(val) {
this.dispatch('form-item', 'el.form.change');
Expand Down Expand Up @@ -289,8 +289,8 @@ export default {
handleFocus() {
const type = this.type;
if (HAVE_TRIGGER_TYPES.indexOf(type) !== -1) {
this.pickerVisible = !this.pickerVisible;
if (HAVE_TRIGGER_TYPES.indexOf(type) !== -1 && !this.pickerVisible) {
this.pickerVisible = true;
}
this.$emit('focus', this);
},
Expand Down

0 comments on commit 9561f9b

Please sign in to comment.