Существует ли какой-либо инструмент подсказки, встроенный в Nuxt JS? В настоящее время я пытался использовать v-tooltip, но, к сожалению, я не могу его использовать. Сразу же происходит сбой.
Я создал файл в папке плагинов с именем tooltip. js и прикрепил туда следующий код:
import Vue from 'vue'
import VTooltip from 'v-tooltip'
Vue.use(VTooltip)
Затем в nuxt.config. js в объекте плагинов я прикрепил этот файл.
Ошибка при использовании:
ERROR Failed to compile with 1 errors friendly-errors 11:04:04
ERROR in ./components/Dashboard/Navigation/index.vue?vue&type=template&id=a70e9826&
Module Error (from ./node_modules/vue-loader/lib/loaders/templateLoader.js): friendly-errors 11:04:04
(Emitted value instead of an instance of Error)
Errors compiling template:
tag <button> has no matching end tag.
13 | <div class="user-panel">
14 | <div class="notification">
15 | <button v-tooltip="'You have new messages.'">
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16 | <i class="fas fa-envelope">
17 | <div v-if="notification_active" class="notification-dot"></div>
friendly-errors 11:04:04
@ ./components/Dashboard/Navigation/index.vue?vue&type=template&id=a70e9826& 1:0-209 1:0-209
@ ./components/Dashboard/Navigation/index.vue
@ ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib??vue-loader-options!./layouts/dashboard.vue?vue&type=script&lang=js&
@ ./layouts/dashboard.vue?vue&type=script&lang=js&
@ ./layouts/dashboard.vue
@ ./.nuxt/App.js
@ ./.nuxt/index.js
@ ./.nuxt/client.js
@ multi eventsource-polyfill webpack-hot-middleware/client?reload=true&timeout=30000&ansiColors=&overlayStyles=&name=client&path=/__webpack_hmr/client ./.nuxt/client.js
friendly-errors 11:04:04
» Updated components\Dashboard\Navigation\index.vue