mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-09 18:28:08 +00:00
13 lines
261 B
TypeScript
13 lines
261 B
TypeScript
import { defineComponent } from 'vue'
|
|
|
|
export default defineComponent({
|
|
name: 'DevOnly',
|
|
inheritAttrs: false,
|
|
setup (_, props) {
|
|
if (import.meta.dev) {
|
|
return () => props.slots.default?.()
|
|
}
|
|
return () => props.slots.fallback?.()
|
|
},
|
|
})
|