import React useEffect useState from react;import type ProSelectProps Params RequestDate from interface;import Select Spin from antd;import debounce from lodash;const ProSelect ReactFCProSelec
你可以直接在文件头部引入该组件,如下所示:
import React, { useEffect, useState } from 'react';
import type { ProSelectProps, Params, RequestDate } from './interface';
import { Select, Spin } from 'antd';
import { debounce } from 'lodash';
import ProSelect from '@/components/ProSelect'; // 引入组件
const DeparmentDiList: React.FC = () => {
// ...
const columns: ProColumns<NodeItems>[] = [
// ...
{
title: 'SPM',
dataIndex: 'spmUserName',
align: 'center',
valueType: 'select',
width: 60,
fieldProps: {
showSearch: true,
fieldNames: {
label: 'name',
value: 'code',
},
},
renderFormItem: () => {
// 使用组件
return <ProSelect options={projectList} />;
},
},
// ...
];
// ...
};
export default DeparmentDiList;
``
原文地址: https://www.cveoy.top/t/topic/fVoX 著作权归作者所有。请勿转载和采集!