Skip to content

Commit e51189d

Browse files
committed
feat: update Nuxt configuration and enhance pan component functionality
1 parent 0028a73 commit e51189d

File tree

3 files changed

+3
-17
lines changed

3 files changed

+3
-17
lines changed

docs/components/demo/pan/index.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ function template({ rotateY, rotateX }: TransformProperties) {
88
99
const controls = useAnimationControls()
1010
function handlePan(_: PointerEvent, info: PanInfo) {
11+
_.preventDefault()
1112
controls.set({
1213
rotateY: info.offset.x / 2,
1314
rotateX: -info.offset.y / 2,
@@ -23,7 +24,7 @@ function handlePanEnd() {
2324
</script>
2425

2526
<template>
26-
<div class="flex flex-col items-center justify-center h-screen">
27+
<div class="flex flex-col items-center justify-center ">
2728
<Motion
2829
class="card"
2930
:transform-template="template"

docs/components/layout/Aside.vue

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,8 @@
11
<script setup lang="ts">
22
const props = defineProps<{ isMobile: boolean }>()
33
defineEmits(['close'])
4-
const { navDirFromPath } = useContentHelpers()
54
const { navigation } = useContent()
65
const config = useConfig()
7-
const tree = computed(() => {
8-
const route = useRoute()
9-
const path = route.path.split('/')
10-
if (config.value?.aside.useLevel) {
11-
const leveledPath = path.splice(0, 2).join('/')
12-
13-
const dir = navDirFromPath(leveledPath, navigation.value)
14-
return dir ?? []
15-
}
16-
17-
return navigation.value
18-
})
19-
onMounted(() => {
20-
console.log(tree.value, navigation)
21-
})
226
237
const path = computed(() => useRoute().path)
248
</script>

docs/nuxt.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export default defineNuxtConfig({
1616
experimental: {
1717
payloadExtraction: false,
1818
},
19+
1920
compatibilityDate: '2024-12-16',
2021
devtools: { enabled: true },
2122
vite: {

0 commit comments

Comments
 (0)