feat:【ele】【crm】product/category 迁移

This commit is contained in:
YunaiV
2025-11-17 18:58:04 +08:00
parent f24c5f8be9
commit de46eb380a
5 changed files with 10 additions and 3 deletions

View File

@@ -1,4 +1,5 @@
<script setup lang="ts">
// TODO @xingyu要不要改成 yudao-ui-admin-vue3/src/components/OperateLogV2/src/OperateLogV2.vue 这种一行时间、userType、userName、action
import type { OperateLogProps } from './typing';
import { DICT_TYPE } from '@vben/constants';

View File

@@ -85,7 +85,7 @@ export function useGridColumns(): VxeTableGridOptions<CrmProductCategoryApi.Prod
{
field: 'actions',
title: '操作',
width: 200,
width: 250,
fixed: 'right',
slots: {
default: 'actions',

View File

@@ -68,6 +68,8 @@ const [Modal, modalApi] = useVbenModal({
// 加载数据
let data = modalApi.getData<CrmProductCategoryApi.ProductCategory>();
if (!data || !data.id) {
// 设置上级
await formApi.setValues(data);
return;
}
modalApi.lock();

View File

@@ -31,7 +31,9 @@ export function useFormSchema(): VbenFormSchema[] {
} as CrmProductCategoryApi.ProductCategory);
return handleTree(data);
},
fieldNames: { label: 'name', value: 'id', children: 'children' },
labelField: 'name',
valueField: 'id',
childrenField: 'children',
placeholder: '请选择上级分类',
showSearch: true,
treeDefaultExpandAll: true,
@@ -85,7 +87,7 @@ export function useGridColumns(): VxeTableGridOptions<CrmProductCategoryApi.Prod
{
field: 'actions',
title: '操作',
width: 200,
width: 250,
fixed: 'right',
slots: {
default: 'actions',

View File

@@ -68,6 +68,8 @@ const [Modal, modalApi] = useVbenModal({
// 加载数据
let data = modalApi.getData<CrmProductCategoryApi.ProductCategory>();
if (!data || !data.id) {
// 设置上级
await formApi.setValues(data);
return;
}
modalApi.lock();