Commit d7ed1c31 authored by youjie's avatar youjie

no message

parent 12c0a74b
...@@ -286,25 +286,12 @@ ...@@ -286,25 +286,12 @@
}; };
}, },
watch: { watch: {
document: { ViewType: {
handler: function (val, oldVal) { handler: function (val, oldVal) {
var clientWidth = document.body.clientWidth; this.com_onresize();
var w = clientWidth; window.onresize = () => {
//设置table的屏幕宽度 this.com_onresize();
this.tableWidth = w;
if(this.ViewType==1) return
if(this.tableWidth>=1920){
this.msg.pageSize = 16
}else if(this.tableWidth>=1200){
this.msg.pageSize = 16
}else if(this.tableWidth>=992){
this.msg.pageSize = 12
}else if(this.tableWidth>=768){
this.msg.pageSize = 12
}else if(this.tableWidth<768){
this.msg.pageSize = 10
} }
this.getList()
}, },
deep: true deep: true
}, },
...@@ -393,6 +380,19 @@ ...@@ -393,6 +380,19 @@
var w = clientWidth; var w = clientWidth;
//设置table的屏幕宽度 //设置table的屏幕宽度
this.tableWidth = w; this.tableWidth = w;
if(this.ViewType==1) return
if(this.tableWidth>=1920){
this.msg.pageSize = 16
}else if(this.tableWidth>=1200){
this.msg.pageSize = 16
}else if(this.tableWidth>=992){
this.msg.pageSize = 12
}else if(this.tableWidth>=768){
this.msg.pageSize = 12
}else if(this.tableWidth<768){
this.msg.pageSize = 10
}
this.getList()
}, },
}, },
...@@ -401,7 +401,7 @@ ...@@ -401,7 +401,7 @@
}, },
created() { created() {
this.getProvinceList("651", 1); this.getProvinceList("651", 1);
this.getList() if(this.ViewType==1) this.getList()
this.com_onresize(); this.com_onresize();
window.onresize = () => { window.onresize = () => {
this.com_onresize(); this.com_onresize();
......
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