nuxt-modules / device

Nuxt module for detecting device type.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

'__VLS_ctx.$device' is of type 'unknown'.

joseehilton147 opened this issue · comments

I have this strange error on my code.

im using the $device on layouts/default.vue like this:

<template>
	<div>
		<div v-if="$device.isDesktop" class="flex w-screen">
			<div class="h-50 bg-cyan-400 text-center text-4xl">NavBar</div>
			<div class="flex-1"><slot /></div>
		</div>

		<div v-else class="flex h-screen flex-col">
			<div class="h-50 bg-cyan-400 text-center text-4xl">Header</div>
			<div class="flex-1"><slot /></div>
		</div>
	</div>
</template>

and i got this strange error.

image

Same here

commented

Same here

Same here

Same here

Same here

Same here

Found a shimming solution: #136

Let's track in #136.