Files
frontend-app/components/common/top-safe.nvue
T

35 lines
579 B
Plaintext
Raw Normal View History

2025-12-16 09:13:48 +08:00
<template>
2026-06-25 19:44:48 +08:00
<view :style="{ height: safeHeight + 'px', width: width + 'px', backgroundColor: bgColor }" class="top-view">
2025-12-16 09:13:48 +08:00
</view>
</template>
<script>
2026-06-25 19:44:48 +08:00
import { screen } from './global.js'
export default {
data() {
return {
safeHeight: screen.top,
width: screen.width
}
},
props: {
bgColor: {
type: String,
default: '#fff'
}
},
onShow() {
2025-12-16 09:13:48 +08:00
// safeHeight:screen.top,
// width:screen.width,
2026-06-25 19:44:48 +08:00
},
mounted() {
this.width = screen.width;
2025-12-16 09:13:48 +08:00
}
2026-06-25 19:44:48 +08:00
}
2025-12-16 09:13:48 +08:00
</script>
<style lang="scss" scoped>
2026-06-25 19:44:48 +08:00
.top-view {
display: flex;
}
2025-12-16 09:13:48 +08:00
</style>