36 lines
564 B
Vue
36 lines
564 B
Vue
<script setup lang="ts">
|
|
import ScrollPanel from 'primevue/scrollpanel';
|
|
|
|
const props = withDefaults(defineProps<{
|
|
step?: number
|
|
height: string
|
|
width?: string
|
|
}>(), {
|
|
step: 5,
|
|
width: '100%'
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<ScrollPanel
|
|
:step="props.step"
|
|
class="p-scrollpanel-content"
|
|
:style="{width: props.width, maxHeight: props.height}"
|
|
>
|
|
<slot/>
|
|
</ScrollPanel>
|
|
</template>
|
|
|
|
<style lang="css" scoped>
|
|
*{
|
|
margin: 0px;
|
|
padding: 0px;
|
|
}
|
|
|
|
.p-scrollpanel {
|
|
height: fit-content;
|
|
overflow-y: auto;
|
|
box-sizing: content-box;
|
|
}
|
|
</style>
|