fitty icon indicating copy to clipboard operation
fitty copied to clipboard

trying to use fitty with vue 3 and it does nothing with no error?

Open L-o-o-t opened this issue 2 years ago • 1 comments

it just doesn't want to work? actually there is an error TypeError: null is not an object (evaluating 'e3.element.parentNode.clientWidth')

--------------
<script setup>
import { RouterLink, RouterView } from 'vue-router'
import HelloWorld from './components/HelloWorld.vue'

</script>

<template>
  <header>
    <img alt="Vue logo" class="logo" src="@/assets/logo.svg" width="125" height="125" />

    <div class="wrapper">
      <HelloWorld msg="You did it!" />

      <nav>
        <RouterLink to="/">Home</RouterLink>
        <RouterLink to="/about">About</RouterLink>
      </nav>
    </div>
  </header>

  <RouterView />
  <div id="my-element" style="height: 100px;width: 400px">Hello World</div>
</template>
<script>
import fitty from 'fitty'
fitty('#my-element',{
  minSize: 16,
  maxSize: 300,
});
</script>

L-o-o-t avatar Dec 11 '22 22:12 L-o-o-t

did you find a solution ? @L-o-o-t

aeon3k avatar Feb 24 '23 20:02 aeon3k