feat: 优化config
This commit is contained in:
		| @@ -188,7 +188,7 @@ export const MyController = React.forwardRef( | ||||
|   }, | ||||
| ); | ||||
| export const List = () => { | ||||
|   const { list, getConfig, setShowEdit, setFormData, deleteConfig, updateData, formData } = useConfigStore(); | ||||
|   const { list, getConfig, setShowEdit, setFormData, deleteConfig, updateData, formData, detectConfig } = useConfigStore(); | ||||
|   const [modal, contextHolder] = useModal(); | ||||
|   useEffect(() => { | ||||
|     getConfig(); | ||||
| @@ -221,8 +221,22 @@ export const List = () => { | ||||
|           </IconButton> | ||||
|         </div> | ||||
|       </div> | ||||
|  | ||||
|       <div className=' grow p-4 '> | ||||
|         <div className='w-full h-full bg-white rounded-lg p-2 scrollbar '> | ||||
|         <div className='flex pb-4 gap-4'> | ||||
|           <Tooltip title={t('从config的json的配置的数据同步过来。')}> | ||||
|             <Button | ||||
|               variant='contained' | ||||
|               color='primary' | ||||
|               size='small' | ||||
|               onClick={() => { | ||||
|                 detectConfig(); | ||||
|               }}> | ||||
|               {t('Detect')} | ||||
|             </Button> | ||||
|           </Tooltip> | ||||
|         </div> | ||||
|         <div className='w-full bg-white rounded-lg p-2 scrollbar ' style={{ height: 'calc(100% - 80px)' }}> | ||||
|           <div className='flex flex-wrap gap-2 '> | ||||
|             {list.map((item) => ( | ||||
|               <div className='card w-[300px] ' key={item.id}> | ||||
| @@ -237,7 +251,7 @@ export const List = () => { | ||||
|                     <div>{item.key}</div> | ||||
|                   </div> | ||||
|                 </div> | ||||
|                 <div className='card-footer flex justify-end'> | ||||
|                 <div className='card-footer flex justify-end mt-1'> | ||||
|                   <ButtonGroup variant='contained'> | ||||
|                     <Button | ||||
|                       onClick={() => { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user