vue-tables-2
Advanced tools
Comparing version 0.2.65 to 0.2.66
@@ -1,2 +0,1 @@ | ||
var template = require('./template.jsx'); | ||
import VuePagination from 'vue-pagination-2' | ||
@@ -12,2 +11,4 @@ import vuex from './state/vuex' | ||
var template = require('./template.jsx'); | ||
exports.install = function(Vue, globalOptions, useVuex, customTemplate) { | ||
@@ -14,0 +15,0 @@ |
import merge from 'merge'; | ||
import stateData from './state/data'; | ||
import vuex from './state/vuex'; | ||
import normal from './state/normal'; | ||
import Table from './table'; | ||
@@ -10,8 +14,2 @@ var data = require('./mixins/data'); | ||
import stateData from './state/data'; | ||
import vuex from './state/vuex'; | ||
import normal from './state/normal'; | ||
import Table from './table'; | ||
exports.install = function (Vue, globalOptions, useVuex, customTemplate) { | ||
@@ -18,0 +16,0 @@ |
{ | ||
"name": "vue-tables-2", | ||
"description": "Vue.js 2 grid components", | ||
"version": "0.2.65", | ||
"version": "0.2.66", | ||
"keywords": [ | ||
@@ -34,3 +34,3 @@ "vue2", | ||
"scripts": { | ||
"build-min": "browserify index.js --s VueTables | uglifyjs -c > ../dist/vue-tables.min.js" | ||
"build-min": "browserify index.js --s VueTables | uglifyjs -c > dist/vue-tables.min.js" | ||
}, | ||
@@ -37,0 +37,0 @@ "licenses": "MIT", |
@@ -156,3 +156,20 @@ # Vue Tables 2 | ||
In addition a `this` context will be available, which refers to the root vue instance. This allows you to call your own instance methods directly. | ||
Note: when using a `.vue` file `jsx` must be imported from a dedicated `.jsx` file in order to compile correctly. E.g | ||
edit.jsx | ||
export default function(h, row) { | ||
return <a class='fa fa-edit' href={'#/' + row.id + '/edit'}></a> | ||
} | ||
app.vue | ||
import edit from 'edit.jsx' | ||
<script> | ||
templates:{ | ||
edit | ||
} | ||
</script> | ||
A Second option to for creating templates is to encapsulate the template within a component and pass the name. The component must have a `data` property, which will receive the row object. E.g: | ||
@@ -159,0 +176,0 @@ |
57389
364