fix: added as prop in FadedScrollableDiv
This commit is contained in:
parent
7c5696ee75
commit
c8146b7c3c
@ -1,16 +1,21 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<component
|
||||||
|
:is="props.as || 'div'"
|
||||||
ref="scrollableDiv"
|
ref="scrollableDiv"
|
||||||
:style="`maskImage: ${maskStyle}`"
|
:style="`maskImage: ${maskStyle}`"
|
||||||
@scroll="updateMaskStyle"
|
@scroll="updateMaskStyle"
|
||||||
>
|
>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</div>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed, onMounted } from 'vue'
|
import { ref, computed, onMounted } from 'vue'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
as: {
|
||||||
|
type: String,
|
||||||
|
default: 'div',
|
||||||
|
},
|
||||||
maskLength: {
|
maskLength: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 30,
|
default: 30,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user