chore: fix example
This commit is contained in:
parent
8ebb503f73
commit
27a72bd8f1
@ -7,9 +7,9 @@
|
||||
<tr>
|
||||
<th v-for="key in columns"
|
||||
@click="sortBy(key)"
|
||||
:class="{ active: sortKey == key }">
|
||||
:class="{ active: state.sortKey == key }">
|
||||
{{ capitalize(key) }}
|
||||
<span class="arrow" :class="sortOrders[key] > 0 ? 'asc' : 'dsc'">
|
||||
<span class="arrow" :class="state.sortOrders[key] > 0 ? 'asc' : 'dsc'">
|
||||
</span>
|
||||
</th>
|
||||
</tr>
|
||||
@ -26,7 +26,7 @@
|
||||
</script>
|
||||
<!-- DemoGrid component script -->
|
||||
<script>
|
||||
const { reactive, computed } = Vue
|
||||
const { reactive, computed, toRefs } = Vue
|
||||
|
||||
const capitalize = str => str.charAt(0).toUpperCase() + str.slice(1)
|
||||
|
||||
@ -71,7 +71,7 @@ const DemoGrid = {
|
||||
}
|
||||
|
||||
return {
|
||||
...state,
|
||||
state,
|
||||
filteredData,
|
||||
sortBy,
|
||||
capitalize
|
||||
|
Loading…
x
Reference in New Issue
Block a user