diff --git a/src/views/components/h5Player/player.vue b/src/views/components/h5Player/player.vue index c94595a..ef644c1 100644 --- a/src/views/components/h5Player/player.vue +++ b/src/views/components/h5Player/player.vue @@ -240,14 +240,7 @@ export default { }); // _this.realplay(); console.log('length ===>',this.cameraList.length) - this.splitNum = - this.cameraList.length > 1 - ? 2 - : this.cameraList.length > 4 - ? 3 - : this.cameraList.length > 9 - ? 4 - : 2; + this.splitNum = (this.cameraList.length > 1 && this.cameraList.length <= 4) ? 2 : (this.cameraList.length > 4 && this.cameraList.length <= 9 ) ? 3 : this.cameraList.length > 9 ? 4 : 1; this.arrangeWindow() this.queryLive(); },