feat(web): refactor knowledge base form state management and field synchronization
- Add Form.useWatch hook to monitor _third_party_platform field changes directly - Implement useEffect to sync form value to thirdPartyPlatform state when platform changes - Remove redundant conditional field assignments for third-party and web parser configs - Consolidate third-party platform state initialization in setBaseFields function - Update Feishu parameter naming from generic (app_id, app_secret, folder_token) to prefixed format (feishu_app_id, feishu_app_secret, feishu_folder_token) - Rename third_party_platform field to _third_party_platform for consistency - Optimize useEffect dependencies to prevent unnecessary re-renders and state inconsistencies - Improve form field initialization logic to handle both create and edit modes correctly - Simplify third-party platform state management by centralizing it in setBaseFields instead of multiple locations
This commit is contained in:
@@ -100,6 +100,20 @@ const RecallTestResult = ({
|
||||
}
|
||||
};
|
||||
|
||||
// Show skeleton when initial loading
|
||||
if (loading && data.length === 0) {
|
||||
return (
|
||||
<div className='rb:flex rb:flex-col'>
|
||||
<div className='rb:flex rb:items-center rb:justify-start rb:gap-2 rb:mb-4'>
|
||||
<span className='rb:text-lg rb:font-medium'>{t('knowledgeBase.recallResult')}</span>
|
||||
</div>
|
||||
<Skeleton active paragraph={{ rows: 3 }} />
|
||||
<Skeleton active paragraph={{ rows: 3 }} className='rb:mt-4' />
|
||||
<Skeleton active paragraph={{ rows: 3 }} className='rb:mt-4' />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
if (data.length === 0 && showEmpty) {
|
||||
return (
|
||||
<NoData
|
||||
|
||||
Reference in New Issue
Block a user