feat: 登陆日志添加提示

master
luoer 2023-09-22 17:31:09 +08:00
parent a1002f8518
commit 446698c27e
3 changed files with 39 additions and 34 deletions

View File

@ -1,6 +1,15 @@
<template> <template>
<BreadPage> <BreadPage>
<Table v-bind="table"></Table> <template #content>
<div class="p-4">
<a-alert :closable="true">
仅展示近 90 天内的数据如需查看更多数据请联系管理员
</a-alert>
<div class="bg-white p-4 mt-2">
<Table v-bind="table"></Table>
</div>
</div>
</template>
</BreadPage> </BreadPage>
</template> </template>
@ -27,7 +36,7 @@ const table = useTable({
return ( return (
<span> <span>
<Tag color={status === null || status ? "green" : "red"} class="mr-2"> <Tag color={status === null || status ? "green" : "red"} class="mr-2">
{ status === null || status ? "成功" : "失败" } {status === null || status ? "成功" : "失败"}
</Tag> </Tag>
{description} {description}
</span> </span>
@ -65,11 +74,11 @@ const table = useTable({
type: "input", type: "input",
required: false, required: false,
nodeProps: { nodeProps: {
placeholder: '请输入登陆账号', placeholder: "请输入登陆账号",
}, },
itemProps: { itemProps: {
hideLabel: true, hideLabel: true,
} },
}, },
], ],
}, },

View File

@ -1,21 +1,20 @@
<template> <template>
<BreadPage> <BreadPage>
<template #content> <a-radio-group type="button" v-model="type">
<a-tabs default-active-key="1" size="large" class="bg-white m-4"> <a-radio value="all">全部</a-radio>
<a-tab-pane key="1" title="全部"> <a-radio value="all1">已激活</a-radio>
<Table v-bind="table" class="px-4 pb-4"> <a-radio value="all2">未激活</a-radio>
<template #action> </a-radio-group>
<a-button status="danger" type="outline" :disabled="true"> <Table v-bind="table" class="pt-4">
<template #icon> <template #action>
<i class="icon-park-outline-delete"></i> <a-button status="danger" type="outline" :disabled="true">
</template> <template #icon>
删除</a-button> <i class="icon-park-outline-delete"></i>
</template> </template>
</Table> 删除
</a-tab-pane> </a-button>
<a-tab-pane key="2" title="已通过(12)"></a-tab-pane> </template>
</a-tabs> </Table>
</template>
</BreadPage> </BreadPage>
</template> </template>
@ -23,7 +22,8 @@
import { api } from "@/api"; import { api } from "@/api";
import { Table, useTable } from "@/components"; import { Table, useTable } from "@/components";
import { dayjs } from "@/libs/dayjs"; import { dayjs } from "@/libs/dayjs";
import { Avatar } from "@arco-design/web-vue";
const type = ref("all");
const table = useTable({ const table = useTable({
data: async (model, paging) => { data: async (model, paging) => {
@ -36,16 +36,12 @@ const table = useTable({
width: 180, width: 180,
render: ({ record }) => ( render: ({ record }) => (
<div class="flex items-center"> <div class="flex items-center">
<Avatar size={32}> <a-avatar size={40}>
<img src={record.avatar || 'https://github.com/juetan.png'} alt="" /> <img src={record.avatar || "https://github.com/juetan.png"} alt="" />
</Avatar> </a-avatar>
<span class="ml-2 flex-1 flex flex-col overflow-hidden"> <span class="ml-2 flex-1 flex flex-col overflow-hidden">
<span> <span>{record.nickname}</span>
{record.nickname} <span class="text-gray-400 text-xs truncate">ID: {record.username}</span>
</span>
<span class="text-gray-400 text-xs truncate">
ID: {record.username}
</span>
</span> </span>
</div> </div>
), ),
@ -75,7 +71,7 @@ const table = useTable({
text: "修改", text: "修改",
}, },
{ {
text: '设置密码', text: "设置密码",
}, },
{ {
type: "delete", type: "delete",
@ -151,9 +147,9 @@ const table = useTable({
type: "custom", type: "custom",
component: ({ field, model }) => { component: ({ field, model }) => {
return ( return (
<Avatar size={40}> <a-avatar size={40}>
<img src={model?.[field]} alt="" /> <img src={model?.[field]} alt="" />
</Avatar> </a-avatar>
); );
}, },
}, },

View File

@ -2,7 +2,7 @@
// @blue-6: #09f; // @blue-6: #09f;
@arcoblue-6:#3b9; @arcoblue-6:#08f;
body { body {
.arco-layout-sider { .arco-layout-sider {