fix: rework setup to improve SSR compatibility
This commit is contained in:
parent
fd7d30a38a
commit
d8d163dbd0
22 changed files with 137 additions and 73 deletions
|
@ -5,6 +5,7 @@ defineProps<{
|
|||
}>()
|
||||
|
||||
const dropdown = $ref<any>()
|
||||
const colorMode = useColorModeRef()
|
||||
|
||||
provide(dropdownContextKey, {
|
||||
hide: () => dropdown.hide(),
|
||||
|
@ -12,7 +13,7 @@ provide(dropdownContextKey, {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<VDropdown v-bind="$attrs" ref="dropdown" :class="{ dark: isDark }" :placement="placement || 'auto'">
|
||||
<VDropdown v-bind="$attrs" ref="dropdown" :class="colorMode" :placement="placement || 'auto'">
|
||||
<slot />
|
||||
<template #popper="scope">
|
||||
<slot name="popper" v-bind="scope" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue