Comparing version 1.1.0 to 1.1.1
{ | ||
"name": "vuetable", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "vue.js table component that will automatically request JSON data from server and display them nicely in HTML table with swap-able/extensible pagination component", | ||
@@ -17,3 +17,5 @@ "main": "src/vue-table.js", | ||
"browserify": { | ||
"transform": ["vueify"] | ||
"transform": [ | ||
"vueify" | ||
] | ||
}, | ||
@@ -20,0 +22,0 @@ "repository": { |
@@ -10,3 +10,3 @@ vuetable - data table simplify! | ||
- Define row actions and capture the click event to do whatever you want | ||
- Field display customizable via callback function inside Vue.js instance | ||
- Field display customizable via options and callback function inside Vue.js instance | ||
- Programmatically show/hide any field via reactivity of fields definition | ||
@@ -177,3 +177,3 @@ - Use your favorite CSS framework classes to nicely format your table and dispalyed data | ||
'birthdate', | ||
'group.name_en' | ||
'group.name_en', | ||
'gender', | ||
@@ -197,5 +197,20 @@ 'last_login', | ||
<a id="browser_compat"></a> | ||
## Browser Compatability | ||
As I use **Chrome** almost exclusively, it is gaurantee to work on this browser and it SHOULD also work for other **WebKit** based browsers as well. But I can't really gaurantee that since I don't use them regularly. | ||
However, `vuetable` will NOT WORK on **Internet Explorer** (even IE11) due to the use of `<template>` tag inside `<table>` according to [this](https://github.com/ratiw/vue-table/issues/25#issuecomment-220920656). In order to make it work with CSS framework table styling, I have to preserve the use of `<table>` and `<template>` tag inside it. | ||
It seems to work just fine in **Microsoft Edge** though. Anyway, if you find that it does not work on any other browser, you can let me know by posting in the [Issues](https://github.com/ratiw/vue-table/issues). Or if you are able to make it work on those browser, please let me know or create a pull request. | ||
<a id="contribute"></a> | ||
## Contributions | ||
Any contribution to the code (via pull request would be nice) or any part of the documentation and any idea and/or suggestion are very welcome. | ||
However, please do not feel bad if your pull requests or contributions do not get merged or implemented into `vuetable`. | ||
Your contributions can, not only help make `vuetable` better, but also push it away from what I intend to use it for. I just hope that you find it useful for your use or learn something useful from its source code. But remember, you can always fork it to make it work the way you want. | ||
<a id="license"></a> | ||
## License | ||
`vuetable` is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT). |
/* | ||
* vue-table.js v1.1.0 | ||
* vue-table.js v1.1.1 | ||
* (c) 2016 Rati Wannapanop | ||
@@ -279,6 +279,6 @@ * Released under the MIT License. | ||
+ '<template v-else>' | ||
+ '<td v-if="hasCallback(field)" class="{{field.dataClass}}">' | ||
+ '<td v-if="hasCallback(field)" class="{{field.dataClass}}" @dblclick="onCellDoubleClicked(item, field, $event)">' | ||
+ '{{{ callCallback(field, item) }}}' | ||
+ '</td>' | ||
+ '<td v-else class="{{field.dataClass}}">' | ||
+ '<td v-else class="{{field.dataClass}}" @dblclick="onCellDoubleClicked(item, field, $event)">' | ||
+ '{{{ getObjectValue(item, field.name, "") }}}' | ||
@@ -458,6 +458,19 @@ + '</td>' | ||
} | ||
} | ||
}, | ||
httpData: { | ||
type: Object, | ||
default: function() { | ||
return {} | ||
} | ||
}, | ||
httpOptions: { | ||
type: Object, | ||
default: function() { | ||
return {} | ||
} | ||
}, | ||
}, | ||
data: function() { | ||
return { | ||
version: '1.1.1', | ||
eventPrefix: 'vuetable:', | ||
@@ -549,3 +562,3 @@ tableData: null, | ||
var self = this | ||
this.$http.get(url) | ||
this.$http.get(url, this.httpData, this.httpOptions) | ||
.then(function(response) { | ||
@@ -752,2 +765,5 @@ self.tableData = self.getObjectValue(response.data, self.dataPath, null) | ||
}, | ||
onCellDoubleClicked: function(dataItem, field, event) { | ||
this.$dispatch(this.eventPrefix+'cell-dblclicked', dataItem, field, event) | ||
}, | ||
callPaginationConfig: function() { | ||
@@ -754,0 +770,0 @@ if (typeof this.$parent[this.paginationConfig] === 'function') { |
Sorry, the diff of this file is not supported yet
130112
813
214