19 lines
398 B
JavaScript
19 lines
398 B
JavaScript
|
export default {
|
||
|
data() {
|
||
|
return {
|
||
|
safeAreaTop: 0,
|
||
|
safeAreaBottom: 0,
|
||
|
safeAreaLeft: 0,
|
||
|
safeAreaRight: 0
|
||
|
}
|
||
|
},
|
||
|
onLoad() {
|
||
|
// #ifdef APP-PLUS
|
||
|
const {top, bottom, left, right} = uni.getSystemInfoSync().safeAreaInsets
|
||
|
this.safeAreaTop = top
|
||
|
this.safeAreaBottom = bottom
|
||
|
this.safeAreaLeft = left
|
||
|
this.safeAreaRight = right
|
||
|
// #endif
|
||
|
}
|
||
|
}
|