35 lines
579 B
Plaintext
35 lines
579 B
Plaintext
<template>
|
|
<view :style="{ height: safeHeight + 'px', width: width + 'px', backgroundColor: bgColor }" class="top-view">
|
|
</view>
|
|
</template>
|
|
<script>
|
|
import { screen } from './global.js'
|
|
export default {
|
|
data() {
|
|
return {
|
|
safeHeight: screen.top,
|
|
width: screen.width
|
|
}
|
|
},
|
|
props: {
|
|
bgColor: {
|
|
type: String,
|
|
default: '#fff'
|
|
}
|
|
},
|
|
onShow() {
|
|
// safeHeight:screen.top,
|
|
// width:screen.width,
|
|
},
|
|
mounted() {
|
|
this.width = screen.width;
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.top-view {
|
|
display: flex;
|
|
}
|
|
</style>
|