Skip to content

Commit b814c39

Browse files
committed
Test: 测试手机触控支持
1 parent 568d97b commit b814c39

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

package/components/NanoMain/index.vue

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import scrollbarOptions from '../../config/scrollbarOptions';
2929
import { OverlayScrollbarsComponent } from 'overlayscrollbars-vue';
3030
import { nextTick, onMounted, onUnmounted, ref, watch } from 'vue';
31-
import { onContentUpdated, useRoute } from 'vitepress';
31+
import { useRoute } from 'vitepress';
3232
import emitter from '../../emitter';
3333
3434
const route = useRoute();
@@ -44,24 +44,7 @@
4444
immediate: true
4545
});
4646
47-
function hashChange() {
48-
if (location.hash) {
49-
const _hashText = decodeURIComponent(location.hash.replace('#', ''));
50-
// console.log('scroll-to-hash', _hashText);
51-
emitter.emit('scroll-to-hash', _hashText);
52-
}
53-
}
54-
55-
onContentUpdated(() => {
56-
setTimeout(() => {
57-
hashChange();
58-
}, 240);
59-
});
60-
6147
onMounted(() => {
62-
setTimeout(() => {
63-
hashChange();
64-
}, 240);
6548
// Listen for scroll-to-hash events
6649
emitter.on('scroll-to-hash', (hash: string) => {
6750
if (hash === '' || hash === null || hash === undefined) {

0 commit comments

Comments
 (0)