简体   繁体   中英

I can't use typed js in my vue js project

When I try to call typed in my main.js, the router and the typed are down:

import { createApp } from 'vue'
import App from './App.vue'
import router from '@/router'
import VueTypedJs from 'vue-typed-js'

const app = createApp(App);

app.use(router);
app.use(VueTypedJs);
app.mount('#app');

Do you know why?

I try different way to call vue typed js but any can resolve this issue !

For sure I install before: npm install --save vue-typed-js and I use it ( that from the doc, exemple ):

<vue-typed-js :strings="['First text', 'Second Text']">
  <h1 class="typing"></h1>
</vue-typed-js>

The last contribution on vue-typed-js has been more than 3.5 years ago (April 2019).

Which means it only works with Vue2. It might be possible to make it work with Vue3, but you'll likely need to write the integration plugin yourself.


Note: I'm guessing someone will take the time to write a Vue3 compatible version at some point. Please let me know, so I can keep the answer relevant.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM