2016-11-15 6 views
1

私はvue.jsの新人ですが、私はvuetablesvue-tables-2の両方を試したテーブルでデータをレンダリングする必要があります。ソースファイルと私は良い考えだとは思わない。 私のバックエンドはLaravel 5.3です。 vue-tables-2Vue.jsテーブル:vuetablesとvue-tables-2のエラー

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 

とは、私が得た:

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 

または他のオプション、私が持っていないこれらのエラーを修正する方法はあります私はvuetablesを使用する場合 は、私は次のエラーを得ましたか。

+0

http://stackoverflow.com/questions/33469929/you-may-need-an-appropriate-loader-to-handle-this-file-type-with-webpack-and-bこれが役立つかどうかを確認する –

答えて

1

私は現在semantic-uiを使用しています。私はそれが使いやすく、それにはtableを含む多くのUIコンポーネントがあります。 vuetablesvue-tables-2でテーブルコンポーネントのみを取得し、他のコンポーネントでは他のライブラリを使用する必要があります。

UIライブラリの他のオプションは、あなたが探索するためにも使用できますがあります。

+0

I私たちが使用する標準的なUIフレームワークなので、zurb Foundationを使用していますので、私はSemantic UIに切り替えることができません。それは涼しく見える。私はちょうど[角度スマートテーブル](https://github.com/lorenzofox3/Smart-Table)のようなテーブル用のパッケージが必要です。 –

+0

必要ならば、[ここ](https://cdnjs.com/libraries/semantic-ui)の関連ファイルのみを含めることで、sem-uiからテーブルコンポーネントを取得できます。 – Saurabh

1

vue-tables-2今、プリコンパイル用意しており、任意の変換を必要としません。

+0

@Philip Peters、答えを受け入れることができますか? – Matanya

関連する問題