refactor: use lodash for capitalize

This commit is contained in:
Gauthier Roebroeck 2020-03-12 15:51:38 +08:00
parent 241b441c56
commit 3176cd2858
2 changed files with 1 additions and 5 deletions

View file

@ -120,7 +120,6 @@
</template>
<script lang="ts">
import { capitalize } from '@/functions/text'
import Vue from 'vue'
import { SeriesStatus } from '@/types/enum-series'
@ -165,7 +164,7 @@ export default Vue.extend({
},
seriesStatus (): any[] {
return Object.keys(SeriesStatus).map(x => ({
text: capitalize(x),
text: this.$_.capitalize(x),
value: x
}))
},

View file

@ -1,3 +0,0 @@
export function capitalize (s: string) {
return `${s[0].toUpperCase()}${s.slice(1).toLowerCase()}`
}