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