mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix(nuxt): set inheritAttrs: false
for fragment components (#28939)
This commit is contained in:
parent
8e4585c141
commit
66d0b8ccdc
@ -2,6 +2,7 @@ import { defineComponent } from 'vue'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'DevOnly',
|
||||
inheritAttrs: false,
|
||||
setup (_, props) {
|
||||
if (import.meta.dev) {
|
||||
return () => props.slots.default?.()
|
||||
|
@ -8,6 +8,7 @@ import { createError } from '../composables/error'
|
||||
import { islandComponents } from '#build/components.islands.mjs'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'IslandRenderer',
|
||||
props: {
|
||||
context: {
|
||||
type: Object as () => { name: string, props?: Record<string, any> },
|
||||
|
@ -45,6 +45,7 @@ async function loadComponents (source = appBaseURL, paths: NuxtIslandResponse['c
|
||||
|
||||
export default defineComponent({
|
||||
name: 'NuxtIsland',
|
||||
inheritAttrs: false,
|
||||
props: {
|
||||
name: {
|
||||
type: String,
|
||||
|
@ -18,6 +18,7 @@ export const NuxtTeleportIslandSymbol = Symbol('NuxtTeleportIslandComponent') as
|
||||
/* @__PURE__ */
|
||||
export default defineComponent({
|
||||
name: 'NuxtTeleportIslandComponent',
|
||||
inheritAttrs: false,
|
||||
props: {
|
||||
to: {
|
||||
type: String,
|
||||
|
@ -9,6 +9,7 @@ import { NuxtTeleportIslandSymbol } from './nuxt-teleport-island-component'
|
||||
/* @__PURE__ */
|
||||
export default defineComponent({
|
||||
name: 'NuxtTeleportIslandSlot',
|
||||
inheritAttrs: false,
|
||||
props: {
|
||||
name: {
|
||||
type: String,
|
||||
|
@ -7,7 +7,7 @@ import { devRootDir } from '#build/nuxt.config.mjs'
|
||||
|
||||
export default (url: string) => defineComponent({
|
||||
name: 'NuxtTestComponentWrapper',
|
||||
|
||||
inheritAttrs: false,
|
||||
async setup (props, { attrs }) {
|
||||
const query = parseQuery(new URL(url, 'http://localhost').search)
|
||||
const urlProps = query.props ? destr<Record<string, any>>(query.props as string) : {}
|
||||
|
Loading…
Reference in New Issue
Block a user