Skip to content

Commit

Permalink
feat: add filter
Browse files Browse the repository at this point in the history
  • Loading branch information
LeezQ committed Jul 27, 2022
1 parent c94d9ad commit 60e48d3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/web/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,23 @@ import { i18n } from '~/modules/locales'
import '@unocss/reset/tailwind.css'
import './styles/main.css'
import 'uno.css'
import 'element-plus/dist/index.css'


import '~/router/permission'
import { parseTime } from '~/utils'

const pinia = createPinia()

const app = createApp(App)
app.use(pinia).use(i18n).use(router).mount('#app')

app.config.globalProperties.$filters = {
parseTime(time: string | Date, cFormat: string) {
return parseTime(time, cFormat)
}
}

for (const [key, component] of Object.entries(ElementPlusIconsVue))
app.component(key, component)

0 comments on commit 60e48d3

Please sign in to comment.