Giter VIP home page Giter VIP logo

Comments (19)

tahpot avatar tahpot commented on August 14, 2024 9

+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 :(

from vuetable-2.

cristijora avatar cristijora commented on August 14, 2024 1

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.

from vuetable-2.

praveenkarmanya avatar praveenkarmanya commented on August 14, 2024 1

you can use this CDN URL: https://cdn.jsdelivr.net/npm/[email protected]/dist/vue-tables-2.min.js

from vuetable-2.

ratiw avatar ratiw commented on August 14, 2024

@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.

from vuetable-2.

Hsn723 avatar Hsn723 commented on August 14, 2024

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?

from vuetable-2.

ratiw avatar ratiw commented on August 14, 2024

@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.

from vuetable-2.

r-miezhelis avatar r-miezhelis commented on August 14, 2024

+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) ?

from vuetable-2.

ratiw avatar ratiw commented on August 14, 2024

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.

from vuetable-2.

syshex avatar syshex commented on August 14, 2024

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.

from vuetable-2.

WingmanImd avatar WingmanImd commented on August 14, 2024

@ratiw I'm also interested in this. I tried to build it yesterday but with no luck.

from vuetable-2.

clemsontiger avatar clemsontiger commented on August 14, 2024

would love to see this as well.

from vuetable-2.

clemsontiger avatar clemsontiger commented on August 14, 2024

@cristijora, thanks for this.

from vuetable-2.

clemsontiger avatar clemsontiger commented on August 14, 2024

@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.

<vuetable ref="vuetable"
                    api-url="http://vuetable.ratiw.net/api/users"            
                    :fields="fields"
                    pagination-path=""
                    :per-page="perPage"
                    :sort-order="sortOrder"
                    :append-params="moreParams"                     
                    :sort-order="sortOrder"                    
                    @vuetable:pagination-data="onPaginationData" >
                    <template slot="actions" scope="props">                       
                          <button class="btn btn-default" @click="onClick('edit-item', props.rowData)"><i class="fa fa-edit"></i>View</button>
                          <button class="btn btn-danger" @click="onClick('delete-item', props.rowData)"><i class="fa fa-remove"></i> Edit</button>                                    
                  </template>             
</vuetable>
<vuetable-pagination-info 
    ref="paginationInfo"                                 
    info-template="{from} to {to} of {total} records">
</vuetable-pagination-info>
<vuetable-pagination 
    ref="pagination" 
    @vuetable-pagination:change-page="onChangePage">
</vuetable-pagination>

it ends up displaying the pagination info twice:

1 to 20 of 200 records
Displaying 1 to 20 of 200 items

from vuetable-2.

cristijora avatar cristijora commented on August 14, 2024

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

from vuetable-2.

clemsontiger avatar clemsontiger commented on August 14, 2024

@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

<vuetable-pagination ref="pagination" :css="{activeClass: 'test'}"  @vuetable-pagination:change-page="onChangePage">  </vuetable-pagination>      

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.

from vuetable-2.

florisje avatar florisje commented on August 14, 2024

@clemsontiger did you ever fix that problem? been struggling with this today...

from vuetable-2.

clemsontiger avatar clemsontiger commented on August 14, 2024

@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.

from vuetable-2.

florisje avatar florisje commented on August 14, 2024

Your comment pointed me in the right direction. The icons css section moved to css.pagination.
This change caused that:
1502556
(checkout the screenshot with our error)

from vuetable-2.

ratiw avatar ratiw commented on August 14, 2024

@praveenkarmanya That was actually for another library, not for Vuetable-2.

from vuetable-2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.