Fixiaobai
2023-11-03 f27ae4aa1a3b72bf8dc934efd6f084ba5a101a48
1
2
3
4
5
6
7
8
9
10
11
12
13
14
export default {
  getScreen: function() {
    var width = document.body.clientWidth
    if (width >= 1200) {
      return 3 // 大屏幕
    } else if (width >= 992) {
      return 2 // 中屏幕
    } else if (width >= 768) {
      return 1 // 小屏幕
    } else {
      return 0 // 超小屏幕
    }
  }
}