This commit is contained in:
2025-03-04 11:41:36 +08:00
parent e7cbc71418
commit fbc2d19b70
6 changed files with 104 additions and 4 deletions

6
src/utils/helper.ts Normal file
View File

@@ -0,0 +1,6 @@
import { useDateFormat } from "@vueuse/core"
export function parseTime(utc: Date | string, format = "YYYY年M月D日") {
const time = useDateFormat(utc, format, { locales: "zh-CN" })
return time.value
}

View File

@@ -15,3 +15,11 @@ export interface TutorialIn {
title: string
content: string
}
export interface User {
username: string
date_joined: Date
last_login: Date
role: Role
is_active: boolean
}