Skip to content
This repository was archived by the owner on Apr 1, 2022. It is now read-only.

Commit fbb176f

Browse files
committed
Correct sort arrow icon classes
1 parent 71e9846 commit fbb176f

File tree

6 files changed

+11
-9
lines changed

6 files changed

+11
-9
lines changed

dist/min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/dist/client.1880c24e.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/dist/client.ba80e24e.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/dist/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212

1313
<script src="//unpkg.com/jquery@2.1.4/dist/jquery.min.js"></script>
1414
<script src="//unpkg.com/bootstrap@3.3.5/dist/js/bootstrap.min.js"></script>
15-
<script type="text/javascript" src="client.ba80e24e.js"></script></body>
15+
<script type="text/javascript" src="client.1880c24e.js"></script></body>
1616
</html>

src/Table/HeadSort.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ export default {
2020
cls () {
2121
return [
2222
'fa',
23-
`fa-sort-${this.order}`.replace(/-$/, ''),
24-
{ 'text-muted': !this.order }
23+
{ 'fa-sort-down': this.order === 'desc',
24+
'fa-sort-up': this.order === 'asc',
25+
'text-muted': !this.order
26+
}
2527
]
2628
}
2729
},

test/Basic.spec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ test('sort', async t => {
4545
vm.query
4646
)
4747
await nextTick()
48-
t.true(uidSort.hasClass('fa-sort-desc'))
48+
t.true(uidSort.hasClass('fa-sort-down'))
4949

5050
ageSortBtn.trigger('click')
5151
t.deepEqual(
5252
{ limit: 10, offset: 0, sort: 'age', order: 'desc' },
5353
vm.query
5454
)
5555
await nextTick()
56-
t.true(ageSort.hasClass('fa-sort-desc'))
56+
t.true(ageSort.hasClass('fa-sort-down'))
5757

5858
ageSortBtn.trigger('click')
5959
t.deepEqual(
@@ -62,12 +62,12 @@ test('sort', async t => {
6262
)
6363
await nextTick()
6464
await nextTick()
65-
t.true(ageSort.hasClass('fa-sort-asc'))
65+
t.true(ageSort.hasClass('fa-sort-up'))
6666

6767
/* *** programmatic behavior *** */
6868
Object.assign(vm.query, { sort: 'uid', order: 'asc' })
6969
await nextTick()
70-
t.true(uidSort.hasClass('fa-sort-asc'))
70+
t.true(uidSort.hasClass('fa-sort-up'))
7171
})
7272

7373
test('pagination relevant', async t => {

0 commit comments

Comments
 (0)