feat: dict css class

pull/153/head
xingyu4j 2025-06-21 14:46:26 +08:00
parent d2e4a26c84
commit c264945d8f
2 changed files with 9 additions and 1 deletions

View File

@ -317,10 +317,12 @@ export function useDataGridColumns(): VxeTableGridOptions['columns'] {
{
field: 'colorType',
title: '颜色类型',
slots: { default: 'colorType' },
},
{
field: 'cssClass',
title: 'CSS Class',
slots: { default: 'cssClass' },
},
{
title: '创建时间',

View File

@ -7,7 +7,7 @@ import { ref, watch } from 'vue';
import { useVbenModal } from '@vben/common-ui';
import { downloadFileFromBlobPart, isEmpty } from '@vben/utils';
import { message } from 'ant-design-vue';
import { message, Tag } from 'ant-design-vue';
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
import {
@ -177,6 +177,12 @@ watch(
]"
/>
</template>
<template #colorType="{ row }">
<Tag :color="row.colorType">{{ row.colorType }}</Tag>
</template>
<template #cssClass="{ row }">
<Tag :color="row.cssClass">{{ row.cssClass }}</Tag>
</template>
<template #actions="{ row }">
<TableAction
:actions="[