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

TimePicker: fix incorrectly hide panel,fixed #210 #215

Merged
merged 2 commits into from
Oct 3, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
TimePicker: fix incorrectly hide panel,fixed #210
  • Loading branch information
QingWei-Li committed Oct 2, 2016
commit 9561f9b3e8d623901cc3b3553186dbb7b2b7d91d
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