// 全部内容 新闻详情 import { useState } from 'react'; import { createForm } from '@formily/core'; import { Field } from '@formily/react'; import { FormProvider, createSchemaField } from '@formily/react'; import { Form, FormItem, Input, DatePicker, FormGrid, Upload, Checkbox, ArrayTable, Editable, } from '@formily/antd'; import { Switch, Select, Tree } from 'antd'; import { Collapse } from 'antd'; const { Panel } = Collapse; const form = createForm({ validateFirst: true, }); export type treeChildrenType = { title: string, key: string, children?: treeChildrenType[] } export type treeDataType = { title: string, key: string, children?: treeChildrenType[] } // 栏目和面板下拉框数据 const treeData: treeDataType[] = [ { title: '我的长沙', key: '0-0', children: [ { title: '华融湘江', key: '0-0-0', }, { title: '长沙农商行', key: '0-0-1', }, ], }, { title: '智慧岳阳', key: '1-0', children: [ { title: '岳阳电台', key: '1-0-0', } ], }, { title: '掌上浏阳', key: '2-0', children: [ { title: '浏阳首页', key: '2-0-0', } ], } ]; const Test = () => { const [selectValue, setSelectValue] = useState('') const [openSelect, setOpenSelect] = useState(false) const handleChange = (val: any) => { console.log(val) } return (