saivarunk / vue-simple-upload

Simple File upload component for Vue.js
https://saivarunk.github.io/vue-simple-upload/
MIT License
148 stars 30 forks source link

Unknown custom element #4

Open qinfp123 opened 7 years ago

qinfp123 commented 7 years ago

1.) first of all, I'm NPM install vue-simple-upload in my project 2.) introduce import FileUpload from'vue-simple-upload/dist/FileUpload'on a new Vue page, components: {FileUpload} 3.) after that, use in my template 4.) page console error, said Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.

saivarunk commented 7 years ago

Try to register component like this

components: {
    'fileupload': FileUpload
  },
qinfp123 commented 7 years ago

1.)components: { 'fileupload': FileUpload } Registered in this way, the command line says "Module not, found:, Error:, Can't, resolve,'vue-simple-upload/dist/FileUpload'"