Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How use in Nuxt 3? #9

Open
lna1989 opened this issue Feb 5, 2024 · 1 comment
Open

How use in Nuxt 3? #9

lna1989 opened this issue Feb 5, 2024 · 1 comment

Comments

@lna1989
Copy link

lna1989 commented Feb 5, 2024

Please tell me how to use this component in Nuxt3.js?
I am trying to use the component locally according to the manual:

<template>
  <text-clamp text='hello world' :max-lines='2' />
</template>
<script lang='ts' setup>
import TextClamp from 'vue3-text-clamp';
</script>

but I get an error:
TypeError: Cannot read properties of undefined (reading 'defineComponent')
at file:///********/node_modules/vue3-text-clamp/lib/text-clamp.js:1:370

@waitstop
Copy link

waitstop commented May 7, 2024

Hi, for temporary fix i copy text-clamp.vue from repo to my components folder and use as usual.

<ClientOnly>
  <ClampText :max-lines="2" :text="material.description" />
</ClientOnly>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants