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