From f4d34f35a6eac03ac60765857bf21ddcc6b4d5f2 Mon Sep 17 00:00:00 2001 From: jackycheng <> Date: Wed, 8 Jan 2025 12:09:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=80=82=E9=85=8D@toco/components?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.tsx | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 15e2992..b9b973c 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,9 +1,29 @@ import React from 'react'; import Component, { renderFieldProps } from './lib'; +import { ProConfigProvider, BetaSchemaForm, ProFieldValueType, ProFormColumnsType } from '{{ UIPackageName }}'; import './App.css'; -import { ProConfigProvider, Form } from '{{ UIPackageName }}'; -const valueType = Component.displayName.charAt(0).toLowerCase() + Component.displayName.slice(1) +const valueType = (Component.displayName.charAt(0).toLowerCase() + Component.displayName.slice(1)) as ProFieldValueType; + +type Obj = { + test_valuetype: string; + test_comp: string; +}; + +const columns: ProFormColumnsType[] = [ + { + dataIndex: 'test_valuetype', + title: "ValueType", + valueType: valueType, + }, + { + dataIndex: 'test_comp', + title: "Children", + renderFormItem: (schema, config, form, action) => { + return + }, + } +]; const App: React.FC = () => { return ( @@ -13,12 +33,7 @@ const App: React.FC = () => { [valueType]: renderFieldProps, }} > -
- - - - - + );