feat:【antd】【ele】统一 infra 和 system 的代码风格

This commit is contained in:
YunaiV
2025-09-23 00:04:41 +08:00
parent b6d7dda0b3
commit af74cf6ad9
34 changed files with 65 additions and 75 deletions

View File

@@ -159,7 +159,7 @@ onMounted(async () => {
onClick: handleExpand,
},
{
label: '批量删除',
label: $t('ui.actionTitle.deleteBatch'),
type: 'primary',
danger: true,
icon: ACTION_ICON.DELETE,

View File

@@ -292,9 +292,7 @@ export function useDataGridFormSchema(): VbenFormSchema[] {
];
}
/**
* 字典数据表格列
*/
/** 字典数据表格列 */
export function useDataGridColumns(): VxeTableGridOptions['columns'] {
return [
{ type: 'checkbox', width: 40 },

View File

@@ -1,8 +1,5 @@
<script lang="ts" setup>
import type {
VxeGridListeners,
VxeTableGridOptions,
} from '#/adapter/vxe-table';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { SystemDictTypeApi } from '#/api/system/dict/type';
import { ref } from 'vue';

View File

@@ -21,8 +21,8 @@ export function useGridFormSchema(): VbenFormSchema[] {
component: 'Select',
componentProps: {
options: getDictOptions(DICT_TYPE.INFRA_BOOLEAN_STRING, 'boolean'),
placeholder: '请选择是否已读',
allowClear: true,
placeholder: '请选择是否已读',
},
},
{

View File

@@ -8,9 +8,8 @@ import { h } from 'vue';
import { DICT_TYPE } from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { getRangePickerDefaultProps } from '#/utils';
import { DictTag } from '#/components/dict-tag';
import { getRangePickerDefaultProps } from '#/utils';
/** 列表的搜索表单 */
export function useGridFormSchema(): VbenFormSchema[] {
@@ -126,9 +125,9 @@ export function useDetailSchema(): DescriptionItemSchema[] {
{
field: 'avatar',
label: '用户头像',
// TODO @芋艿:使用 antd 的 Image 组件
content: (data: SystemSocialUserApi.SocialUser) => {
if (data?.avatar) {
// TODO @芋艿:使用 antd 的 Image 组件
return h('img', {
src: data.avatar,
style: 'width: 30px; height: 30px; cursor: pointer;',