mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-29 09:02:03 +00:00
12 lines
237 B
TypeScript
12 lines
237 B
TypeScript
import { defineComponent } from 'vue'
|
|
|
|
export default defineComponent({
|
|
name: 'DevOnly',
|
|
setup (_, props) {
|
|
if (import.meta.dev) {
|
|
return () => props.slots.default?.()
|
|
}
|
|
return () => props.slots.fallback?.()
|
|
}
|
|
})
|