简体   繁体   English

vue-croppa作为组件异常行为,无法装入组件:未定义模板或渲染函数

[英]vue-croppa as component abnormal behavior, Failed to mount component: template or render function not defined

I am trying to use vue-croppa for image cropping and I installed it using npm as follows: 我正在尝试使用vue-croppa进行图像裁剪,并使用npm如下安装了它:

npm install --save vue-croppa

But when I use it as I normally would: 但是当我像往常一样使用它时:

import Croppa from 'vue-croppa'
export default {
  components: {
    Croppa
  }
}

I get error: 我得到错误:

[Vue warn]: Failed to mount component: template or render function not defined. [Vue警告]:无法安装组件:未定义模板或渲染功能。

Instead I have to do this: 相反,我必须这样做:

import Croppa from 'vue-croppa'
export default {
  components: {
    Croppa.component
  }
}

What could be wrong? 有什么事吗

https://github.com/zhanziyang/vue-croppa#1-import-vue-croppa-into-your-vuejs-project https://github.com/zhanziyang/vue-croppa#1-import-vue-croppa-into-your-vuejs-project
Look at the manual. 看手册。 It is not a component, but a plugin. 它不是组件,而是插件。 You have to Vue.use it 您必须使用Vue.use

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Laravel - [Vue 警告]:无法挂载组件:未定义模板或渲染函数 - Laravel - [Vue warn]: Failed to mount component: template or render function not defined Vue警告:无法安装组件:未定义模板或渲染功能 - Vue warn: Failed to mount component: template or render function not defined Vue.js 无法挂载组件:未定义模板或渲染函数 - Vue.js Failed to mount component: template or render function not defined 如何修复无法挂载组件:vue 中未定义模板或渲染函数 - how to fix Failed to mount component: template or render function not defined in vue Vue 无法挂载组件:未定义模板或渲染函数 - Vue Failed to mount component: template or render function not defined (Vue with Typescript) 无法挂载组件:未定义模板或渲染函数 - (Vue with Typescript) Failed to mount component: template or render function not defined Vue.js 2- 无法安装组件:模板或渲染 function 未定义 - Vue js 2- Failed to mount component: template or render function not defined Gulp [Vue 警告]:无法挂载组件:未定义模板或渲染函数 - Gulp [Vue warn]: Failed to mount component: template or render function not defined 无法挂载组件:未定义模板或渲染功能? - Failed to mount component: template or render function not defined? Vue组件循环自身:无法挂载组件:未定义模板或渲染函数 - Vue component looping through itself: Failed to mount component: template or render function not defined
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM