vue-table2next 0.0.7 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
<template v-if="field.children && Array.isArray(field.children)">
|
|
46
46
|
<component v-for="(fieldChildren, fieldChildrenIndex) in field.children"
|
|
47
47
|
:is="fieldChildren.name"
|
|
48
|
-
:key="'child_td_'+
|
|
48
|
+
:key="'child_td_'+ fieldChildren.name"
|
|
49
49
|
:row-data="item" :row-index="itemIndex" :row-field="field"
|
|
50
50
|
:vuetable="vuetable"
|
|
51
51
|
:class="bodyClass('vuetable-component', field)"
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
<template v-if="field.children && Array.isArray(field.children)">
|
|
78
78
|
<td v-for="(fieldChildren, fieldChildrenIndex) in field.children"
|
|
79
79
|
:class="bodyClass('vuetable-td-'+fieldChildren.name, fieldChildren)"
|
|
80
|
-
:key="'child_td_'+
|
|
80
|
+
:key="'child_td_'+ fieldChildren.name"
|
|
81
81
|
:style="{width: fieldChildren.width}"
|
|
82
82
|
v-html="renderNormalField(fieldChildren, item)"
|
|
83
83
|
@click="onCellClicked(item, itemIndex, fieldChildren, $event)"
|
|
@@ -353,6 +353,7 @@ export default {
|
|
|
353
353
|
lastScrollPosition: 0,
|
|
354
354
|
scrollBarWidth: '17px', //chrome default
|
|
355
355
|
scrollVisible: false,
|
|
356
|
+
sortColumnState: 0,
|
|
356
357
|
$_css: {}
|
|
357
358
|
}
|
|
358
359
|
},
|
|
@@ -879,6 +880,15 @@ export default {
|
|
|
879
880
|
},
|
|
880
881
|
|
|
881
882
|
singleColumnSort (field) {
|
|
883
|
+
this.sortColumnState++;
|
|
884
|
+
|
|
885
|
+
if (this.sortColumnState > 2) {
|
|
886
|
+
this.sortColumnState = 0;
|
|
887
|
+
this.removeSortColumn(0)
|
|
888
|
+
|
|
889
|
+
return;
|
|
890
|
+
}
|
|
891
|
+
|
|
882
892
|
if (this.sortOrder.length === 0) {
|
|
883
893
|
// this.clearSortOrder()
|
|
884
894
|
this.addSortColumn(field, 'asc')
|