vue-file-agent
vue-file-agent copied to clipboard
Sortable not working: Unknown custom element: <vfa-sortable-item>
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 <VueFileAgent>
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>
I’m doing it the first way and still having issues.
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
Yeah i installed it right, and if I test it with the demo from their git with just SlickList, SlickItem it works fine.
I am having this issue also with locally installed slick sort