修复mb-select不能重置选择bug

优化mb-table左右翻页请求
This commit is contained in:
吕金泽 2022-01-31 10:27:59 +08:00
parent bdf4bc828a
commit 2c77cd057a
2 changed files with 3 additions and 2 deletions

View File

@ -101,7 +101,7 @@ export default {
}, },
methods: { methods: {
async loadData() { async loadData() {
if (this.value) { if (this.value || this.value == '') {
if ((!(this.value instanceof Array) && this.value.toString().indexOf(',') !== -1)) { if ((!(this.value instanceof Array) && this.value.toString().indexOf(',') !== -1)) {
this.selectValue = this.value.split(',') this.selectValue = this.value.split(',')
} else { } else {

View File

@ -199,14 +199,15 @@ export default {
if (e && e.keyCode == 37) { if (e && e.keyCode == 37) {
if(this.listCurrent != 1){ if(this.listCurrent != 1){
this.listCurrent -= 1 this.listCurrent -= 1
this.handlerPagination()
} }
} else if (e && e.keyCode == 39) { } else if (e && e.keyCode == 39) {
if(this.listCurrent != parseInt((this.total + this.limit - 1) / this.limit)){ if(this.listCurrent != parseInt((this.total + this.limit - 1) / this.limit)){
this.listCurrent += 1 this.listCurrent += 1
this.handlerPagination()
} }
} }
} }
this.handlerPagination()
} }
} }
} }