Skip to content

Commit 0f82ace

Browse files
VdustRSamuell1
authored andcommitted
fix(MdTable): revert asc direction (vuematerial#1776)
1 parent bd1e14b commit 0f82ace

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/components/MdTable/MdTable.vue

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,12 @@
113113
let isNumber = typeof aAttr === 'number'
114114
115115
if (isNumber) {
116-
return isAsc ? (bAttr - aAttr) : (aAttr - bAttr)
116+
return isAsc ? (aAttr - bAttr) : (bAttr - aAttr)
117117
}
118118
119-
if (isAsc) {
120-
return bAttr.localeCompare(aAttr)
121-
}
122-
123-
return aAttr.localeCompare(bAttr)
119+
return isAsc ?
120+
aAttr.localeCompare(bAttr) :
121+
bAttr.localeCompare(aAttr)
124122
})
125123
}
126124
},

0 commit comments

Comments
 (0)