add user homepage.

This commit is contained in:
2023-02-15 22:24:36 +08:00
parent b5e1b3db3a
commit 2ea6cc7385
8 changed files with 141 additions and 36 deletions

View File

@@ -6,6 +6,7 @@ import { Rank } from "utils/types"
import { getRank } from "oj/api"
import { getACRate } from "utils/functions"
const router = useRouter()
const data = ref<Rank[]>([])
const total = ref(0)
const query = reactive({
@@ -39,7 +40,11 @@ const columns: DataTableColumn<Rank>[] = [
render: (row) =>
h(
NButton,
{ text: true, type: "info", onClick: () => {} },
{
text: true,
type: "info",
onClick: () => router.push("/user?name=" + row.user.username),
},
() => row.user.username
),
},