traxxx-web/renderer/container.vue

48 lines
654 B
Vue
Raw Normal View History

<template>
<div
class="container"
@click="blur"
>
<Header />
<div
ref="content"
class="content"
>
<slot @scroll="scroll" />
</div>
</div>
</template>
<script setup>
import { ref, onMounted } from 'vue';
import events from '#/src/events.js';
import Header from '../components/header/header.vue';
const content = ref(null);
function blur() {
events.emit('blur');
}
onMounted(() => {
events.on('scrollUp', () => { content.value.scrollTop = 0; });
});
</script>
<style scoped>
.container {
height: 100%;
display: flex;
flex-direction: column;
overflow: hidden;
}
.content {
flex-grow: 1;
overflow-y: auto;
}
</style>