1

I am new to vue.js but I need to render data in a table I have tried both vuetables and vue-tables-2 but they both produce error that require me to edit their source file and I do not think it is a good idea. My backend is Laravel 5.3. When I used vuetables I got the following error:

ERROR in ./~/vue-loader/lib/template-compiler.js?id=data-v-369be50a!./~/vue-loader/lib/selector.js?type=template&index=0!./~/vuetable/src/components/VuetablePagination.vue
template syntax error class="{{wrapperClass}}": Interpolation inside attributes has been removed. Use v-bind or the colon shorthand instead. For example, instead of <div class="{{ val }}">, use <div :class="val">.
 @ ./~/vuetable/src/components/VuetablePagination.vue 8:23-158
 @ ./resources/assets/js/app.js

And with vue-tables-2 I got:

    ERROR in ./~/vue-tables-2/lib/template.jsx
Module parse failed: /home/vagrant/Code/project/node_modules/vue-tables-2/lib/template.jsx Unexpected token (15:7)
You may need an appropriate loader to handle this file type.
| var perPage = require('./template/per-page.jsx')(h, this);
| 
| return <div class={"VueTables VueTables--" + this.source}>
|   <div class="row">
|     <div class="col-md-6">
 @ ./~/vue-tables-2/lib/v-client-table.js 1:15-40
 @ ./~/vue-tables-2/index.js
 @ ./resources/assets/js/app.js

Is there a way to fix these errors or which other options do I have?

Matanya
  • 6,233
  • 9
  • 47
  • 80
Phillis Peters
  • 2,232
  • 3
  • 19
  • 40
  • http://stackoverflow.com/questions/33469929/you-may-need-an-appropriate-loader-to-handle-this-file-type-with-webpack-and-b see if this helps – JJPandari Nov 17 '16 at 09:34

2 Answers2

2

vue-tables-2 is now served pre-compiled and doesn't require any transforms.

Matanya
  • 6,233
  • 9
  • 47
  • 80
1

I am currently using semantic-ui. I found it easy to use and it have lot of UI components including table. While with vuetables and vue-tables-2 you will get only table component and for other component you will have to use some other library.

There are other options of UI libraries also available for you to explore:

Saurabh
  • 71,488
  • 40
  • 181
  • 244
  • I am using zurb Foundation as it is the standard UI framework we use so I can not switch to Semantic UI. It looks cool though. I just need a package specifically for tables like [angular-smart-table](https://github.com/lorenzofox3/Smart-Table). – Phillis Peters Nov 15 '16 at 09:45
  • If you want you can just take table component from sematic-ui by including only relevant files from [here](https://cdnjs.com/libraries/semantic-ui). – Saurabh Nov 15 '16 at 09:50