feat: add frontend
This commit is contained in:
7
frontend/plugins/axios-accessor.ts
Normal file
7
frontend/plugins/axios-accessor.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { initializeAxios } from '~/utils/api'
|
||||
|
||||
const accessor: ({$axios}: { $axios: any }) => void = ({ $axios }) => {
|
||||
initializeAxios($axios)
|
||||
}
|
||||
|
||||
export default accessor
|
13
frontend/plugins/filters.ts
Normal file
13
frontend/plugins/filters.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import Vue from 'vue'
|
||||
|
||||
Vue.filter('formatDate', (value: string) => {
|
||||
const date = new Date(value);
|
||||
return `${(date.getDate() > 9 ? '' : '0')
|
||||
+ date.getDate()}/${((date.getMonth() + 1) > 9 ? "" : "0")
|
||||
+ (date.getMonth() + 1)}/${date.getFullYear()}`;
|
||||
})
|
||||
|
||||
Vue.filter('formatRate', (value: number) => {
|
||||
return value.toFixed(1);
|
||||
})
|
||||
|
Reference in New Issue
Block a user