Commit dcf0488a authored by 杨奕's avatar 杨奕 Committed by GitHub

Pagination: ensure currentPage is updated in current-change handler (#10599)

parent 7dbe6460
......@@ -390,12 +390,10 @@ export default {
}
if (newVal !== undefined) {
this.$nextTick(() => {
this.internalCurrentPage = newVal;
if (oldVal !== newVal) {
this.$emit('update:currentPage', newVal);
}
});
this.internalCurrentPage = newVal;
if (oldVal !== newVal) {
this.$emit('update:currentPage', newVal);
}
} else {
this.$emit('update:currentPage', newVal);
}
......
......@@ -278,7 +278,7 @@ describe('DatePicker', () => {
input.focus();
setTimeout(_ => {
const picker = vm.$refs.compo.picker;
picker.$el.querySelector('td.available + td.today').click();
picker.$el.querySelector('td.available').click();
setTimeout(_ => {
const date = vm.$refs.compo.picker.date;
expect(date.getHours()).to.equal(12);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment