2023-12-30 05:29:53 +00:00
|
|
|
<template>
|
2024-01-03 01:52:41 +00:00
|
|
|
<div
|
|
|
|
class="container"
|
|
|
|
@click="blur"
|
|
|
|
>
|
2023-12-30 05:29:53 +00:00
|
|
|
<Header />
|
|
|
|
|
2024-01-05 23:30:30 +00:00
|
|
|
<div
|
|
|
|
ref="content"
|
|
|
|
class="content"
|
|
|
|
>
|
|
|
|
<slot @scroll="scroll" />
|
2023-12-30 05:29:53 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
2024-01-05 23:30:30 +00:00
|
|
|
import { ref, onMounted } from 'vue';
|
|
|
|
|
2024-01-03 01:52:41 +00:00
|
|
|
import events from '#/src/events.js';
|
|
|
|
|
2023-12-30 05:29:53 +00:00
|
|
|
import Header from '../components/header/header.vue';
|
|
|
|
|
2024-01-05 23:30:30 +00:00
|
|
|
const content = ref(null);
|
|
|
|
|
2024-01-03 01:52:41 +00:00
|
|
|
function blur() {
|
|
|
|
events.emit('blur');
|
|
|
|
}
|
2024-01-05 23:30:30 +00:00
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
events.on('scrollUp', () => { content.value.scrollTop = 0; });
|
|
|
|
});
|
2024-01-03 01:52:41 +00:00
|
|
|
</script>
|
2023-12-30 05:29:53 +00:00
|
|
|
|
2024-01-25 02:07:26 +00:00
|
|
|
<style>
|
|
|
|
.scroller {
|
|
|
|
height: 30rem;
|
|
|
|
overflow-y: auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
.item {
|
|
|
|
height: 32px;
|
|
|
|
padding: 0 12px;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|
2023-12-30 05:29:53 +00:00
|
|
|
<style scoped>
|
|
|
|
.container {
|
|
|
|
height: 100%;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
.content {
|
2024-01-10 01:00:38 +00:00
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
2023-12-30 05:29:53 +00:00
|
|
|
flex-grow: 1;
|
|
|
|
overflow-y: auto;
|
|
|
|
}
|
|
|
|
</style>
|