fix(frontend): 使用されているexposeを復活させる (#14764)
This commit is contained in:
parent
fb23b24f5c
commit
088e05ea66
|
@ -4,7 +4,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div ref="rootEl">
|
||||||
<div ref="headerEl" :class="$style.header">
|
<div ref="headerEl" :class="$style.header">
|
||||||
<slot name="header"></slot>
|
<slot name="header"></slot>
|
||||||
</div>
|
</div>
|
||||||
|
@ -22,12 +22,13 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, onUnmounted, provide, inject, Ref, ref, watch, shallowRef } from 'vue';
|
import { onMounted, onUnmounted, provide, inject, Ref, ref, watch, useTemplateRef } from 'vue';
|
||||||
|
|
||||||
import { CURRENT_STICKY_BOTTOM, CURRENT_STICKY_TOP } from '@@/js/const.js';
|
import { CURRENT_STICKY_BOTTOM, CURRENT_STICKY_TOP } from '@@/js/const.js';
|
||||||
|
|
||||||
const headerEl = shallowRef<HTMLElement>();
|
const rootEl = useTemplateRef('rootEl');
|
||||||
const footerEl = shallowRef<HTMLElement>();
|
const headerEl = useTemplateRef('headerEl');
|
||||||
|
const footerEl = useTemplateRef('footerEl');
|
||||||
|
|
||||||
const headerHeight = ref<string | undefined>();
|
const headerHeight = ref<string | undefined>();
|
||||||
const childStickyTop = ref(0);
|
const childStickyTop = ref(0);
|
||||||
|
@ -76,6 +77,10 @@ onMounted(() => {
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
observer.disconnect();
|
observer.disconnect();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
rootEl,
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang='scss' module>
|
<style lang='scss' module>
|
||||||
|
|
Loading…
Reference in a new issue