vue-tables-2
Advanced tools
Comparing version 0.2.54 to 0.2.55
@@ -12,3 +12,3 @@ var template = require('./template.jsx'); | ||
exports.install = function(Vue, globalOptions, useVuex) { | ||
exports.install = function(Vue, globalOptions, useVuex, customTemplate) { | ||
@@ -19,3 +19,3 @@ Vue.use(VuePagination, useVuex); | ||
name:'client-table', | ||
render: template('client'), | ||
render: customTemplate?customTemplate:template('client'), | ||
props: { | ||
@@ -22,0 +22,0 @@ columns:{ |
@@ -16,3 +16,3 @@ import merge from 'merge'; | ||
exports.install = function (Vue, globalOptions, useVuex) { | ||
exports.install = function (Vue, globalOptions, useVuex, customTemplate) { | ||
@@ -25,3 +25,3 @@ let state = useVuex ? vuex('server') : normal(); | ||
name: 'server-table', | ||
render: template('server'), | ||
render: customTemplate?customTemplate:template('server'), | ||
props: { | ||
@@ -28,0 +28,0 @@ columns: { |
{ | ||
"name": "vue-tables-2", | ||
"description": "Vue.js 2 grid components", | ||
"version": "0.2.54", | ||
"version": "0.2.55", | ||
"keywords": [ | ||
@@ -6,0 +6,0 @@ "vue2", |
@@ -43,3 +43,3 @@ # Vue Tables 2 | ||
Vue.use(VueTables.client, [options], [useVuex]); | ||
Vue.use(VueTables.client, [options], [useVuex], [customTemplate]); | ||
@@ -49,3 +49,3 @@ Or/And | ||
Vue.use(require('vue-resource')); | ||
Vue.use(VueTables.server, [options], [useVuex]); | ||
Vue.use(VueTables.server, [options], [useVuex], [customTemplate]); | ||
@@ -56,2 +56,6 @@ The third argument is a boolean, indicating whether to use `vuex` for state management, or manage state on the component itself. | ||
The fourth argument allows you to pass a custom template for the entire table. | ||
You can find the main template file under `lib/template/template.jsx`. | ||
Copy it to your project and modify to your needs. | ||
If you want to listen for events, and you are not using `vuex`, require the event bus: | ||
@@ -58,0 +62,0 @@ |
55380
312