javascript - Laravel Nova 覆盖 vue 组件导致 [Vue 警告]:编译模板时出错
问题描述
我想 在我的 nova 上使用这个https://github.com/shipshapecode/vue-shepherd来实现一个用户指南。
我将文件webpack.mix.js.dist 更改为 webpack.mix.js(在 nova 目录内)。
然后我做了:
npm install
npm run watch
并在 /nova/resources/js/views/index.vue 和 /nova/resources/js/components.js 中进行了一些更改
/nova/resources/js/components.js
import VueShepherd from 'vue-shepherd'
Vue.use(VueShepherd)
/nova/resources/js/views/index.vue
mounted() {
this.$nextTick(() => {
const tour = this.$shepherd({
useModalOverlay: true
});
console.log(tour);
tour.addStep({
attachTo: { element: this.$el, on: 'top' },
text: 'Test'
});
tour.start();
});
},
然后我跑
php artisan nova:publish
为什么会发生以及如何避免该错误?谢谢
解决方案
您的 svg 中有标签样式,vue 不允许使用标签和 inside,所以,
- 从您的 svg 中删除标签
- 或将其用作
推荐阅读
- javascript - 如何在 jQuery 上获得唯一的选择器
- openmdao - OpenMDAO:什么时候需要定义偏导数?
- javascript - javascript读取对象作为函数的参数
- django - 模型级别的 Django 模型异或?
- ubuntu - 在 Ubuntu Bionic 上安装 Hyperledger Composer 先决条件时出错
- java - How to get variable value with thymeleaf
- javafx - 如何从 Spinner 获取用户输入 - Javafx
- android - 如何从 android 中的 /data/app 文件夹中读取数据(使用 android studio,我的意思是代码)?
- javascript - Toolttooltipster 让每个 JS 都独一无二
- ios - 最近的 iPhone PNG 截图 cgImage 是黑色的