fix: expose toggleContent for it was a method
This commit is contained in:
parent
7a4e6334f1
commit
3716e7f74c
1 changed files with 8 additions and 1 deletions
|
@ -94,7 +94,6 @@ const el = ref<HTMLElement | null>(null);
|
|||
const header = ref<HTMLElement | null>(null);
|
||||
const content = ref<HTMLElement | null>(null);
|
||||
|
||||
// FIXME: This function is not used, why?
|
||||
function toggleContent(show: boolean) {
|
||||
if (!props.foldable) return;
|
||||
showBody.value = show;
|
||||
|
@ -158,6 +157,14 @@ onMounted(() => {
|
|||
calcOmit();
|
||||
}).observe(content.value!);
|
||||
});
|
||||
|
||||
defineExpose({
|
||||
toggleContent,
|
||||
enter,
|
||||
afterEnter,
|
||||
leave,
|
||||
afterLeave,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
Loading…
Reference in a new issue