Commit c60acfd1 authored by chenqikuai's avatar chenqikuai

剪刘海

parent c4dc5670
...@@ -89,12 +89,16 @@ export default defineComponent({ ...@@ -89,12 +89,16 @@ export default defineComponent({
default: false default: false
} }
}, },
mounted(){
console.log(document.documentElement.clientWidth, window.screen.width, 'show width');
console.log(window.devicePixelRatio, 'show window.devicePixelRatio');
},
computed: { computed: {
isBangs() { isBangs() {
return true return true
}, },
heightOfNotch() { // 刘海屏的刘海高度 单位px heightOfNotch() { // 刘海屏的刘海高度 单位px
return notchHeight.value; return notchHeight.value / window.devicePixelRatio;
// return 103; // return 103;
} }
} }
......
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