perf: signin

pull/119/head
xingyu4j 2025-05-29 00:54:21 +08:00
parent 9cd67c1590
commit e1234978bf
2 changed files with 17 additions and 10 deletions

View File

@ -1,6 +1,10 @@
import type { VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import { h } from 'vue';
import { Tag } from 'ant-design-vue';
import { getRangePickerDefaultProps } from '#/utils';
/** 列表的搜索表单 */
@ -47,7 +51,18 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
{
field: 'point',
title: '获得积分',
slots: { default: 'point' },
slots: {
default: ({ row }) => {
return h(
Tag,
{
class: 'mr-5px',
color: row.point > 0 ? 'blue' : 'red',
},
() => (row.point > 0 ? `+${row.point}` : row.point),
);
},
},
},
{
field: 'createTime',

View File

@ -4,8 +4,6 @@ import type { MemberSignInRecordApi } from '#/api/member/signin/record';
import { Page } from '@vben/common-ui';
import { Tag } from 'ant-design-vue';
import { useVbenVxeGrid } from '#/adapter/vxe-table';
import { getSignInRecordPage } from '#/api/member/signin/record';
@ -43,12 +41,6 @@ const [Grid] = useVbenVxeGrid({
<template>
<Page auto-content-height>
<Grid table-title="">
<template #point="{ row }">
<Tag :color="row.point > 0 ? '#108ee9' : '#f50'">
{{ row.point > 0 ? `+${row.point}` : row.point }}
</Tag>
</template>
</Grid>
<Grid table-title="" />
</Page>
</template>