safrazik / vue-file-agent

The most beautiful and full featured file upload component for Vue JS
https://safrazik.github.io/vue-file-agent/
MIT License
731 stars 93 forks source link

Sortable not working: Unknown custom element: <vfa-sortable-item> #88

Open atlcodecommandr opened 4 years ago

atlcodecommandr commented 4 years ago

I've added the following to main.js:

import { SlickList, SlickItem } from 'vue-slicksort';
Vue.component('vfa-sortable-list', SlickList);
Vue.component('vfa-sortable-item', SlickItem);

[Vue warn]: Unknown custom element: <vfa-sortable-item> - did you register the component correctly? For recursive components, make sure to provide the "name" option.

found in

safrazik commented 4 years ago

Make sure you're registering the components before mounting root element

// ...

Vue.component('vfa-sortable-list', SlickList);
Vue.component('vfa-sortable-item', SlickItem);

new Vue({
  render: h => h(App)
}).$mount("#app");

with script tag

<script>
  if (window.VueSlicksort) {
    Vue.component('vfa-sortable-list', window.VueSlicksort.SlickList);
    Vue.component('vfa-sortable-item', window.VueSlicksort.SlickItem);
  }
  new Vue({
    // ...
  }).$mount("#app");
</script>
atlcodecommandr commented 4 years ago

I’m doing it the first way and still having issues.

atlcodecommandr commented 4 years ago

Screen Shot 2020-08-20 at 9 25 38 AM

safrazik commented 4 years ago

Looks like the code is fine, are you sure you installed vue-slicksort?

npm install vue-slicksort --save
OR
yarn add vue-slicksort

Docs for: sortable prop

atlcodecommandr commented 4 years ago

Yeah i installed it right, and if I test it with the demo from their git with just SlickList, SlickItem it works fine.

michaeljcoyne commented 3 years ago

I am having this issue also with locally installed slick sort