We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Darwin
v22.14.0
3.16.1
3.23.1
2.11.7
[email protected]
-
modules
devtools
css
routeRules
future
compatibilityDate
eslint
@nuxt/[email protected]
@vueuse/[email protected]
Nuxt
v3
https://codesandbox.io/p/devbox/silent-currying-qhjsy6
No response
The text was updated successfully, but these errors were encountered:
$attrs
btw,如果不想等待或使用 patch 等其他方式更新依赖的开发者,可以使用组件手动管理继承的 attrs 属性来解决这个问题:
<template> <u-popover mode="hover" :class="ns.e('popover')"> <p-inherit-attrs> <u-avatar> <p-slot> <p-icon :name="safeIcon(value)" /> </p-slot> </u-avatar> </p-inherit-attrs> <template #content> content </template> </u-popover> </template>
import { Fragment } from 'vue' import { createContext } from 'reka-ui' type InheritAttrsProps = null | Record<string, unknown> export const [injectContext, provideContext] = createContext<InheritAttrsProps>('PInheritAttrs') export default defineComponent({ name: 'PInheritAttrs', inheritAttrs: false, setup(_, { attrs, slots }) { provideContext(attrs) return () => h(Fragment, {}, [slots.default?.()]) }, })
import { injectContext } from "../p-inherit-attrs" import { Slot } from 'reka-ui' export default defineComponent({ name: 'PSlot', inheritAttrs: false, setup(_, { attrs, slots }) { const inheritAttrs = injectContext(null) return () => h(Slot, inheritAttrs, slots) }, })
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Environment
Darwin
v22.14.0
3.16.1
3.23.1
2.11.7
[email protected]
-
modules
,devtools
,css
,routeRules
,future
,compatibilityDate
,eslint
@nuxt/[email protected]
,@nuxt/[email protected]
,@vueuse/[email protected]
-
Is this bug related to Nuxt or Vue?
Nuxt
Version
v3
Reproduction
https://codesandbox.io/p/devbox/silent-currying-qhjsy6
Description
Additional context
No response
Logs
The text was updated successfully, but these errors were encountered: