I don't see any CDN version of vuetable-2 (only 1). I tried downloading the release file but it looks like I have to build it myself, and doing so results in npm install failing at [email protected] install: node install.js. Using node 6.6.0 and npm 3.10.8 by the way.
@NatsumiHoshino No CDN at the moment. I'm not even sure whether it is possible to compile this version into normal javascript lib as in the previous version.
I would suggest installing using NPM or Yarn. But if you prefer to download the zip, just move all the src\components\*.vue into your project. The rest is for the command line tools like webpack.
Thanks for the quick reply. I just started using vue.js in some parts of a bigger project, and I am currently using vue.js from the CDN. Will that pose a problem if I include vuetable-2 from NPM?
@NatsumiHoshino I don't think so. As long as vue.js is included before your compiled code, it should work. You can try and if you get stuck, just let me know. I'm not very experience with Javascript, NPM, or ES6 though, but I'll try my best.
+1 for vuetable-2 from a CDN.
I tried building via npm and just hit a world of pain and just need a vuetable-2.js file otherwise I can't use this package :(
+1 from a CDN.
I`ve application with vuetable and vue. I need migrate on vue2 and vuetable-2, but like a @tahpot i have a same problems.
Maybe you can make CDN file like as it was with vuetable (v. 1) ?
Ok, I will try to do that, but needs to do some research on using webpack to do that. If any of you have experience on that or appropriate resource, please let me know.
Any news on this ? I need to upgrade from vue to vue2 and at this moment and from all the components I'm using, this is the only one I'm missing.
@ratiw I'm also interested in this. I tried to build it yesterday but with no luck.
would love to see this as well.
I just did a PR with a change to support a js bundle for the whole library.
It already got merged into the development branch and the first js bundle can be found in this commit
If it's really urgent for some of you, you can simply just use this file directly or wait for the next release when the whole stuff will also get uploaded to cdn.
@cristijora, thanks for this.
@cristijora ,do you have a working example with the vuetable-2 file? I'm having some trouble with getting the paging setup. it shows the info, but not the paging.
~
:fields="fields"
pagination-path=""
:per-page="perPage"
:sort-order="sortOrder"
:append-params="moreParams"
:sort-order="sortOrder"
@vuetable:pagination-data="onPaginationData" >
~
~
info-template="{from} to {to} of {total} records">
@vuetable-pagination:change-page="onChangePage">
~
it ends up displaying the pagination info twice:
~
1 to 20 of 200 records
Displaying 1 to 20 of 200 items
~
Hey @clemsontiger
Here is a fiddle
Thanks for pointing out the issue. There was a typo in my PR where I registered the pagination info component twice.
For now you can register your component the way I did in the fiddle or:
Vue.component('vuetable-pagination', Vuetable.VuetablePagination);
I added a new PR with the fix
@cristijora thanks! one more thing, I'm trying to change a class for the pagination and it ends up throwing an error. I tried the same on the vue-table-2 tutorial and it worked, so I believe it has to do with the js file version. I tried this on your previous fiddle as well and get the same error.
TypeError: cannot read property 'first' of undefined
~
~
Seems to give this regardless of what classes I'm setting, and only goes away if I remove the ":css="..." attribute on the vuetable-pagination.
@clemsontiger did you ever fix that problem? been struggling with this today...
@florisje Unfortunately no, I believe I ended up just working with the built in classes, or went into the vuetable-2.js and modified the css prop for the various pagination classes directly. Haven't gotten back around to taking another look at it yet.
Your comment pointed me in the right direction. The icons css section moved to css.pagination.
This change caused that:
https://github.com/ratiw/vuetable-2/commit/1502556f77e676798d9540e9e60be222cb8d5292
(checkout the screenshot with our error)
you can use this CDN URL: https://cdn.jsdelivr.net/npm/[email protected]/dist/vue-tables-2.min.js
@praveenkarmanya That was actually for another library, not for Vuetable-2.
Most helpful comment
+1 for vuetable-2 from a CDN.
I tried building via npm and just hit a world of pain and just need a vuetable-2.js file otherwise I can't use this package :(