mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-07 04:26:58 +00:00
fix type errors in SkNoteDetailed.vue
This commit is contained in:
parent
ffe0ecb4c5
commit
126d2119a3
1 changed files with 5 additions and 5 deletions
|
@ -246,7 +246,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, inject, onMounted, provide, ref, useTemplateRef, watch } from 'vue';
|
import { computed, inject, onMounted, onUnmounted, onUpdated, provide, ref, useTemplateRef, watch } from 'vue';
|
||||||
import * as mfm from '@transfem-org/sfm-js';
|
import * as mfm from '@transfem-org/sfm-js';
|
||||||
import * as Misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import { isLink } from '@@/js/is-link.js';
|
import { isLink } from '@@/js/is-link.js';
|
||||||
|
@ -862,7 +862,7 @@ function setScrolling() {
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
document.addEventListener('wheel', setScrolling);
|
window.document.addEventListener('wheel', setScrolling);
|
||||||
isScrolling = false;
|
isScrolling = false;
|
||||||
noteEl.value?.scrollIntoView({ block: 'center' });
|
noteEl.value?.scrollIntoView({ block: 'center' });
|
||||||
});
|
});
|
||||||
|
@ -870,14 +870,14 @@ onMounted(() => {
|
||||||
onUpdated(() => {
|
onUpdated(() => {
|
||||||
if (!isScrolling) {
|
if (!isScrolling) {
|
||||||
noteEl.value?.scrollIntoView({ block: 'center' });
|
noteEl.value?.scrollIntoView({ block: 'center' });
|
||||||
if (location.hash) {
|
if (window.location.hash) {
|
||||||
location.replace(location.hash); // Jump to highlighted reply
|
window.location.replace(window.location.hash); // Jump to highlighted reply
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
document.removeEventListener('wheel', setScrolling);
|
window.document.removeEventListener('wheel', setScrolling);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue