@tencentcloud/sdk-mcp 1.3.9 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +2 -2
- package/resource/doc/{tuicallkit/android/faq.md → callkit/faq/android-faq.md} +75 -308
- package/resource/doc/{tuicallkit/faq/common/error_code.md → callkit/faq/common/error-code.md} +2 -2
- package/resource/doc/{tuicallkit/flutter/faq.md → callkit/faq/flutter-faq.md} +83 -315
- package/resource/doc/{tuicallkit/iOS/faq.md → callkit/faq/ios-faq.md} +76 -313
- package/resource/doc/{tuicallkit/vue/faq.md → callkit/faq/web-faq.md} +78 -311
- package/resource/doc/callkit/preset/android/api.md +330 -0
- package/resource/doc/{tuicallkit → callkit/preset}/android/integration.md +63 -420
- package/resource/doc/callkit/preset/flutter/api.md +401 -0
- package/resource/doc/{tuicallkit → callkit/preset}/flutter/integration.md +53 -273
- package/resource/doc/callkit/preset/ios/api.md +282 -0
- package/resource/doc/{tuicallkit/iOS → callkit/preset/ios}/integration.md +39 -120
- package/resource/doc/callkit/preset/react/api.md +600 -0
- package/resource/doc/{tuicallkit → callkit/preset}/react/integration.md +6 -6
- package/resource/doc/callkit/preset/vue/api.md +600 -0
- package/resource/doc/{tuicallkit → callkit/preset}/vue/integration.md +5 -5
- package/resource/doc/{chatuikit → chatkit}/android/faq.md +29 -37
- package/resource/doc/{chatuikit → chatkit}/android/features/theme.md +22 -166
- package/resource/doc/{chatuikit → chatkit}/android/integration.md +30 -126
- package/resource/doc/chatkit/faq/android_sdk/client-api.md +280 -0
- package/resource/doc/{chatuikit → chatkit}/faq/common/product.md +4 -17
- package/resource/doc/{chatuikit → chatkit}/faq/common/server.md +1 -2
- package/resource/doc/chatkit/faq/flutter_sdk/client-api.md +183 -0
- package/resource/doc/{chatuikit → chatkit}/faq/flutter_sdk/faq.md +3 -3
- package/resource/doc/chatkit/faq/ios_sdk/client-api.md +279 -0
- package/resource/doc/{chatuikit → chatkit}/faq/web_sdk/error_code.md +1 -1
- package/resource/doc/{chatuikit → chatkit}/faq/web_sdk/faq.md +4 -4
- package/resource/doc/{chatuikit → chatkit}/flutter/features/theme.md +22 -166
- package/resource/doc/{chatuikit → chatkit}/flutter/integration.md +20 -95
- package/resource/doc/{chatuikit/iOS → chatkit/ios}/faq.md +29 -37
- package/resource/doc/{chatuikit/iOS → chatkit/ios}/features/theme.md +27 -176
- package/resource/doc/{chatuikit/iOS → chatkit/ios}/integration.md +78 -280
- package/resource/doc/{chatuikit/vue → chatkit/react}/components/avatar.md +0 -1
- package/resource/doc/{chatuikit → chatkit}/react/components/chat-header.md +7 -12
- package/resource/doc/{chatuikit → chatkit}/react/components/chat-setting.md +10 -17
- package/resource/doc/{chatuikit → chatkit}/react/components/chat.md +1 -1
- package/resource/doc/{chatuikit → chatkit}/react/components/component-list.md +0 -1
- package/resource/doc/{chatuikit → chatkit}/react/components/contact-list.md +122 -703
- package/resource/doc/chatkit/react/components/conversation-actions.md +174 -0
- package/resource/doc/chatkit/react/components/conversation-list.md +333 -0
- package/resource/doc/chatkit/react/components/conversation-preview.md +116 -0
- package/resource/doc/chatkit/react/components/conversation-search.md +57 -0
- package/resource/doc/{chatuikit → chatkit}/react/components/message-input.md +36 -186
- package/resource/doc/{chatuikit → chatkit}/react/components/message-list.md +21 -113
- package/resource/doc/chatkit/react/components/search.md +282 -0
- package/resource/doc/{chatuikit → chatkit}/react/components/tuikit.md +5 -26
- package/resource/doc/{chatuikit → chatkit}/react/integration.md +37 -104
- package/resource/doc/{chatuikit/react → chatkit/vue}/components/avatar.md +0 -1
- package/resource/doc/{chatuikit → chatkit}/vue/components/chat-header.md +7 -13
- package/resource/doc/{chatuikit → chatkit}/vue/components/chat-setting.md +13 -18
- package/resource/doc/{chatuikit → chatkit}/vue/components/chat.md +1 -2
- package/resource/doc/{chatuikit → chatkit}/vue/components/component-list.md +0 -1
- package/resource/doc/chatkit/vue/components/contact-list.md +271 -0
- package/resource/doc/chatkit/vue/components/conversation-actions.md +228 -0
- package/resource/doc/{chatuikit → chatkit}/vue/components/conversation-list.md +42 -316
- package/resource/doc/chatkit/vue/components/conversation-preview.md +213 -0
- package/resource/doc/chatkit/vue/components/conversation-search.md +50 -0
- package/resource/doc/{chatuikit → chatkit}/vue/components/message-input.md +1 -23
- package/resource/doc/{chatuikit → chatkit}/vue/components/message-list.md +23 -134
- package/resource/doc/{chatuikit → chatkit}/vue/components/search.md +73 -640
- package/resource/doc/chatkit/vue/components/tuikit.md +45 -0
- package/resource/doc/{chatuikit → chatkit}/vue/components/userpicker.md +4 -4
- package/resource/doc/{chatuikit → chatkit}/vue/faq.md +1 -1
- package/resource/doc/{chatuikit → chatkit}/vue/integration.md +53 -121
- package/resource/doc/livekit/core-sdk/live/android/api-reference/AudioEffectStore.md +283 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/BarrageStore.md +148 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/BattleStore.md +316 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/CameraView.md +57 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/CoGuestStore.md +419 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/CoHostStore.md +325 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/DeviceStore.md +436 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/GiftStore.md +165 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/LikeStore.md +49 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/LiveAudienceStore.md +239 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/LiveCoreView.md +74 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/LiveSeatStore.md +417 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/LoginStore.md +207 -0
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-audience-list.md +17 -88
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-audio-effect.md +34 -192
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-barrage.md +26 -139
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-base-beauty.md +16 -99
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-co-guest-interaction.md +54 -161
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-gift.md +75 -455
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-host-interaction.md +91 -338
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-integration.md +108 -492
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-live-list.md +27 -165
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/AudioEffectStore.md +279 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/BarrageStore.md +158 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/BaseBeautyStore.md +155 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/BattleStore.md +304 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/CoGuestStore.md +394 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/CoHostStore.md +303 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/DeviceStore.md +410 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/GiftStore.md +160 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/LikeStore.md +51 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/LiveAudienceStore.md +231 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/LiveCoreView.md +143 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/LiveSeatStore.md +375 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/LoginStore.md +170 -0
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-audience-list.md +13 -91
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-audio-effect.md +34 -177
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-barrage.md +18 -102
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-base-beauty.md +24 -164
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-co-guest-interaction.md +56 -161
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-gift.md +66 -460
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-host-interaction.md +117 -364
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-integration.md +160 -543
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-live-list.md +22 -161
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/AudioEffectStore.md +287 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/BarrageStore.md +165 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/BaseBeautyStore.md +143 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/BattleStore.md +298 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/CoGuestStore.md +349 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/CoHostStore.md +297 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/DeviceStore.md +471 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/GiftStore.md +179 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/LikeStore.md +49 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/LiveAudienceStore.md +238 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/LiveCoreView.md +74 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/LiveSeatStore.md +412 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/LoginStore.md +173 -0
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-audience-list.md +23 -96
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-audio-effect.md +33 -195
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-barrage.md +35 -150
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-base-beauty.md +20 -105
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-co-guest-interaction.md +35 -140
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-gift.md +77 -457
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-host-interaction.md +70 -317
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-integration.md +90 -473
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-live-list.md +28 -163
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-audience-list.md +17 -88
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-audio-effect.md +34 -192
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-barrage.md +26 -139
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-co-guest-interaction.md +53 -262
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-gift.md +75 -455
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-host-interaction.md +60 -272
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-integration.md +63 -440
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-room-list.md +23 -151
- package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-audience-list.md +13 -91
- package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-audio-effect.md +34 -177
- package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-barrage.md +18 -102
- package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-co-guest-interaction.md +44 -201
- package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-gift.md +66 -460
- package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-integration.md +57 -419
- package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-room-list.md +24 -157
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-audience-list.md +23 -96
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-audio-effect.md +33 -195
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-barrage.md +35 -150
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-co-guest-interaction.md +45 -254
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-gift.md +77 -457
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-host-interaction.md +52 -261
- package/resource/doc/livekit/core-sdk/voice/ios/voice-integration.md +478 -0
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-room-list.md +36 -167
- package/resource/doc/livekit/{voice → core-sdk/voice}/uni-app/voice-audience-list.md +15 -45
- package/resource/doc/livekit/{voice → core-sdk/voice}/uni-app/voice-audio-effect.md +23 -137
- package/resource/doc/livekit/{voice → core-sdk/voice}/uni-app/voice-barrage.md +25 -131
- package/resource/doc/livekit/{voice → core-sdk/voice}/uni-app/voice-co-guest-interaction.md +70 -366
- package/resource/doc/livekit/{voice → core-sdk/voice}/uni-app/voice-gift.md +70 -424
- package/resource/doc/livekit/core-sdk/voice/uni-app/voice-integration.md +323 -0
- package/resource/doc/livekit/{voice → core-sdk/voice}/uni-app/voice-room-list.md +24 -116
- package/resource/doc/livekit/faq/common/{error_code.md → error-code.md} +2 -3
- package/resource/doc/livekit/preset/live/vue/api-reference/index.md +780 -0
- package/resource/doc/livekit/preset/live/vue/components/barrage.md +291 -0
- package/resource/doc/livekit/{live → preset/live}/vue/components/co-guest-panel.md +9 -48
- package/resource/doc/livekit/{live → preset/live}/vue/components/live-audience-list.md +27 -145
- package/resource/doc/livekit/{live → preset/live}/vue/components/live-scene-panel.md +13 -76
- package/resource/doc/livekit/{live → preset/live}/vue/components/live-view.md +33 -224
- package/resource/doc/livekit/preset/live/vue/components/stream-mixer.md +211 -0
- package/resource/doc/livekit/preset/live/vue/faq.md +1 -0
- package/resource/doc/livekit/preset/live/vue/live-list-integration.md +244 -0
- package/resource/doc/livekit/preset/live/vue/live-player-desk-integration.md +301 -0
- package/resource/doc/livekit/preset/live/vue/live-player-h5-integration.md +307 -0
- package/resource/doc/livekit/preset/live/vue/live-pusher-integration.md +754 -0
- package/resource/doc/roomkit/android/features/call-user-to-room.md +234 -0
- package/resource/doc/roomkit/android/features/room-participant-state.md +850 -0
- package/resource/doc/roomkit/android/features/room-state.md +358 -0
- package/resource/doc/roomkit/android/features/schedule-room.md +336 -0
- package/resource/doc/roomkit/android/integration.md +433 -0
- package/resource/doc/roomkit/{common/error_code.md → faq/common/error-code.md} +1 -1
- package/resource/doc/roomkit/flutter/features/call-user-to-room.md +228 -0
- package/resource/doc/roomkit/flutter/features/room-participant-state.md +796 -0
- package/resource/doc/roomkit/flutter/features/room-state.md +324 -0
- package/resource/doc/roomkit/flutter/features/schedule-room.md +324 -0
- package/resource/doc/roomkit/flutter/integration.md +405 -0
- package/resource/doc/roomkit/ios/features/call-user-to-room.md +226 -0
- package/resource/doc/roomkit/ios/features/room-participant-state.md +821 -0
- package/resource/doc/roomkit/ios/features/room-state.md +320 -0
- package/resource/doc/roomkit/ios/features/schedule-room.md +318 -0
- package/resource/doc/roomkit/ios/integration.md +384 -0
- package/resource/doc/roomkit/vue/faq.md +1 -0
- package/resource/doc/roomkit/vue/features/call-user-to-room.md +17 -53
- package/resource/doc/roomkit/vue/features/device-detection.md +30 -48
- package/resource/doc/roomkit/vue/features/device-state.md +24 -44
- package/resource/doc/roomkit/vue/features/free-beauty-panel.md +13 -36
- package/resource/doc/roomkit/vue/features/room-chat.md +31 -89
- package/resource/doc/roomkit/vue/features/room-participant-state.md +28 -50
- package/resource/doc/roomkit/vue/features/room-state.md +25 -36
- package/resource/doc/roomkit/vue/features/room-view.md +30 -127
- package/resource/doc/roomkit/vue/features/schedule-room.md +9 -40
- package/resource/doc/roomkit/vue/features/screen-share.md +22 -90
- package/resource/doc/roomkit/vue/features/virtual-background.md +13 -34
- package/resource/doc/roomkit/vue/integration.md +21 -80
- package/resource/doc/rtcengine/faq/common/userSig.md +17 -141
- package/resource/doc/rtcengine/faq/web/web.md +15 -22
- package/resource/doc/rtcengine/web/api.md +17 -21
- package/resource/doc/rtcengine/web/how_to_integrated_web_sdk.md +4 -10
- package/resource/doc/rtcengine/web/how_to_run_web_sdk_demo.md +4 -8
- package/resource/doc/rtcengine/web/plugin/20-advanced-customized-capture-rendering.md +3 -3
- package/resource/doc/rtcengine/web/plugin/21-advanced-auto-play-policy.md +2 -3
- package/resource/doc/rtcengine/web/plugin/22-advanced-audio-mixer.md +6 -6
- package/resource/doc/rtcengine/web/plugin/23-advanced-support-detection.md +2 -2
- package/resource/doc/rtcengine/web/plugin/24-advanced-network-quality.md +2 -4
- package/resource/doc/rtcengine/web/plugin/25-advanced-device-change.md +1 -2
- package/resource/doc/rtcengine/web/plugin/26-advanced-publish-cdn-stream.md +2 -6
- package/resource/doc/rtcengine/web/plugin/27-advanced-small-stream.md +13 -14
- package/resource/doc/rtcengine/web/plugin/28-advanced-beauty.md +10 -90
- package/resource/doc/rtcengine/web/plugin/31-advanced-plugins-overview.md +5 -8
- package/resource/doc/rtcengine/web/plugin/34-advanced-proxy.md +31 -35
- package/resource/doc/rtcengine/web/plugin/35-advanced-ai-denoiser.md +0 -2
- package/resource/doc/rtcengine/web/plugin/36-advanced-virtual-background.md +7 -49
- package/resource/doc/rtcengine/web/plugin/37-advanced-voice-changer.md +1 -1
- package/resource/doc/rtcengine/web/plugin/39-advanced-video-decoder.md +0 -3
- package/resource/doc/rtcengine/web/plugin/40-advanced-video-mixer.md +20 -20
- package/resource/doc/rtcengine/web/plugin/41-advanced-small-stream-auto-switcher.md +1 -1
- package/resource/doc/rtcengine/web/plugin/42-advanced-realtime-transcriber.md +4 -4
- package/resource/doc/rtcengine/web/plugin/43-advanced-face-detection.md +3 -3
- package/resource/doc/trtc/C++/ITRTCCloud.md +718 -2847
- package/resource/doc/trtc/C++/ITRTCStatistics.md +53 -308
- package/resource/doc/trtc/C++/ITXAudioEffectManager.md +207 -1041
- package/resource/doc/trtc/C++/ITXDeviceManager.md +127 -768
- package/resource/doc/trtc/C++/TRTCCloudCallback.md +634 -2259
- package/resource/doc/trtc/C++/TRTCTypeDef.md +726 -3465
- package/resource/doc/trtc/C++/TXLiteAVCode.md +117 -916
- package/resource/doc/trtc/android/TRTCCloud.md +638 -2612
- package/resource/doc/trtc/android/TRTCCloudDef.md +769 -3697
- package/resource/doc/trtc/android/TRTCCloudListener.md +609 -2070
- package/resource/doc/trtc/android/TRTCStatistics.md +48 -278
- package/resource/doc/trtc/android/TXAudioEffectManager.md +207 -1049
- package/resource/doc/trtc/android/TXBeautyManager.md +127 -704
- package/resource/doc/trtc/android/TXDeviceManager.md +51 -318
- package/resource/doc/trtc/android/TXLiteAVCode.md +115 -900
- package/resource/doc/trtc/iOS/TRTCCloud.md +726 -2930
- package/resource/doc/trtc/iOS/TRTCCloudDelegate.md +580 -2099
- package/resource/doc/trtc/iOS/TRTCStatistics.md +48 -278
- package/resource/doc/trtc/iOS/TXAudioEffectManager.md +179 -896
- package/resource/doc/trtc/iOS/TXBeautyManager.md +128 -710
- package/resource/doc/trtc/iOS/TXDeviceManager.md +129 -772
- package/resource/doc/trtc/iOS/TXLiteAVCode.md +117 -915
- package/resource/doc/trtc/iOS/TXLiveSDKTypeDef.md +747 -3559
- package/server.js +1 -5
- package/server.js.map +1 -1
- package/tools/call/get_callkit_api.js +32 -0
- package/tools/call/get_callkit_api.js.map +1 -0
- package/tools/call/get_native_call_uikit_integration.js +34 -0
- package/tools/call/get_native_call_uikit_integration.js.map +1 -0
- package/tools/call/{get-web-call-integration.js → get_web_call_uikit_integration.js} +13 -8
- package/tools/call/get_web_call_uikit_integration.js.map +1 -0
- package/tools/chat/get_native_chat_uikit_feature_detail.js +34 -0
- package/tools/chat/get_native_chat_uikit_feature_detail.js.map +1 -0
- package/tools/chat/get_native_chat_uikit_integration.js +45 -0
- package/tools/chat/get_native_chat_uikit_integration.js.map +1 -0
- package/tools/chat/get_web_chat_uikit_component_detail.js +34 -0
- package/tools/chat/get_web_chat_uikit_component_detail.js.map +1 -0
- package/tools/chat/get_web_chat_uikit_integration.js +45 -0
- package/tools/chat/get_web_chat_uikit_integration.js.map +1 -0
- package/tools/common/get_faq.js +265 -0
- package/tools/common/get_faq.js.map +1 -0
- package/tools/common/{get-usersig.js → get_usersig.js} +6 -3
- package/tools/common/get_usersig.js.map +1 -0
- package/tools/common/present_framework_choice.js +63 -0
- package/tools/common/present_framework_choice.js.map +1 -0
- package/tools/definitions/get_callkit_api_def.js +28 -0
- package/tools/definitions/get_callkit_api_def.js.map +1 -0
- package/tools/definitions/get_faq_def.js +18 -19
- package/tools/definitions/get_faq_def.js.map +1 -1
- package/tools/definitions/get_native_call_uikit_integration_def.js +15 -34
- package/tools/definitions/get_native_call_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_native_chat_uikit_feature_detail_def.js +31 -0
- package/tools/definitions/get_native_chat_uikit_feature_detail_def.js.map +1 -0
- package/tools/definitions/get_native_chat_uikit_integration_def.js +16 -41
- package/tools/definitions/get_native_chat_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_native_livekit_core_features_def.js +33 -0
- package/tools/definitions/get_native_livekit_core_features_def.js.map +1 -0
- package/tools/definitions/get_native_livekit_core_integration_def.js +33 -0
- package/tools/definitions/get_native_livekit_core_integration_def.js.map +1 -0
- package/tools/definitions/get_native_trtc_sdk_docs_def.js +32 -0
- package/tools/definitions/get_native_trtc_sdk_docs_def.js.map +1 -0
- package/tools/definitions/get_usersig_def.js +17 -24
- package/tools/definitions/get_usersig_def.js.map +1 -1
- package/tools/definitions/get_web_call_uikit_integration_def.js +15 -7
- package/tools/definitions/get_web_call_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_web_chat_uikit_component_detail_def.js +17 -49
- package/tools/definitions/get_web_chat_uikit_component_detail_def.js.map +1 -1
- package/tools/definitions/get_web_chat_uikit_integration_def.js +16 -19
- package/tools/definitions/get_web_chat_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_web_live_uikit_integration_def.js +13 -18
- package/tools/definitions/get_web_live_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_web_livekit_api_def.js +27 -0
- package/tools/definitions/get_web_livekit_api_def.js.map +1 -0
- package/tools/definitions/get_web_livekit_component_detail_def.js +29 -0
- package/tools/definitions/get_web_livekit_component_detail_def.js.map +1 -0
- package/tools/definitions/get_web_room_uikit_integration_def.js +13 -46
- package/tools/definitions/get_web_room_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_web_roomkit_feature_detail_def.js +30 -0
- package/tools/definitions/get_web_roomkit_feature_detail_def.js.map +1 -0
- package/tools/definitions/get_web_trtc_sdk_api_def.js +25 -0
- package/tools/definitions/get_web_trtc_sdk_api_def.js.map +1 -0
- package/tools/definitions/get_web_trtc_sdk_integration_def.js +25 -0
- package/tools/definitions/get_web_trtc_sdk_integration_def.js.map +1 -0
- package/tools/definitions/get_web_trtc_sdk_plugin_def.js +25 -0
- package/tools/definitions/get_web_trtc_sdk_plugin_def.js.map +1 -0
- package/tools/definitions/present_framework_choice_def.js +23 -12
- package/tools/definitions/present_framework_choice_def.js.map +1 -1
- package/tools/index.js +47 -61
- package/tools/index.js.map +1 -1
- package/tools/live/get_native_livekit_core_features.js +65 -0
- package/tools/live/get_native_livekit_core_features.js.map +1 -0
- package/tools/live/get_native_livekit_core_integration.js +59 -0
- package/tools/live/get_native_livekit_core_integration.js.map +1 -0
- package/tools/live/get_web_live_uikit_integration.js +48 -0
- package/tools/live/get_web_live_uikit_integration.js.map +1 -0
- package/tools/live/get_web_livekit_api.js +32 -0
- package/tools/live/get_web_livekit_api.js.map +1 -0
- package/tools/live/get_web_livekit_component_detail.js +34 -0
- package/tools/live/get_web_livekit_component_detail.js.map +1 -0
- package/tools/room/{get-web-room-integration.js → get_web_room_uikit_integration.js} +13 -14
- package/tools/room/get_web_room_uikit_integration.js.map +1 -0
- package/tools/room/{get-web-room-feature-detail.js → get_web_roomkit_feature_detail.js} +30 -31
- package/tools/room/get_web_roomkit_feature_detail.js.map +1 -0
- package/tools/rtcengine/get_web_trtc_sdk_api.js +31 -0
- package/tools/rtcengine/get_web_trtc_sdk_api.js.map +1 -0
- package/tools/rtcengine/get_web_trtc_sdk_integration.js +31 -0
- package/tools/rtcengine/get_web_trtc_sdk_integration.js.map +1 -0
- package/tools/rtcengine/get_web_trtc_sdk_plugin.js +31 -0
- package/tools/rtcengine/get_web_trtc_sdk_plugin.js.map +1 -0
- package/tools/trtc/get_native_trtc_sdk_docs.js +73 -0
- package/tools/trtc/get_native_trtc_sdk_docs.js.map +1 -0
- package/utils/generate-structured-result.js +61 -17
- package/utils/generate-structured-result.js.map +1 -1
- package/utils/report-cls-client.js +12 -1
- package/utils/report-cls-client.js.map +1 -1
- package/utils/report-es-client.js +1 -1
- package/resource/doc/chatuikit/android/workflow.md +0 -713
- package/resource/doc/chatuikit/faq/android_sdk/client-api.md +0 -1376
- package/resource/doc/chatuikit/faq/flutter_sdk/client-api.md +0 -860
- package/resource/doc/chatuikit/faq/ios_sdk/client-api.md +0 -1371
- package/resource/doc/chatuikit/flutter/workflow.md +0 -816
- package/resource/doc/chatuikit/iOS/workflow.md +0 -0
- package/resource/doc/chatuikit/react/components/conversation-list.md +0 -765
- package/resource/doc/chatuikit/react/components/search.md +0 -885
- package/resource/doc/chatuikit/react/create-group.md +0 -22
- package/resource/doc/chatuikit/react/init.md +0 -25
- package/resource/doc/chatuikit/react/workflow.md +0 -254
- package/resource/doc/chatuikit/uniapp-app/faq.md +0 -0
- package/resource/doc/chatuikit/uniapp-app/integration.md +0 -619
- package/resource/doc/chatuikit/uniapp-app/workflow.md +0 -576
- package/resource/doc/chatuikit/vue/components/contact-list.md +0 -679
- package/resource/doc/chatuikit/vue/components/tuikit.md +0 -110
- package/resource/doc/chatuikit/vue/create-group.md +0 -26
- package/resource/doc/chatuikit/vue/init.md +0 -35
- package/resource/doc/chatuikit/vue/workflow.md +0 -395
- package/resource/doc/livekit/live/android/workflow.md +0 -322
- package/resource/doc/livekit/live/flutter/workflow.md +0 -353
- package/resource/doc/livekit/live/ios/workflow.md +0 -352
- package/resource/doc/livekit/live/vue/components/barrage.md +0 -615
- package/resource/doc/livekit/live/vue/components/stream-mixer.md +0 -442
- package/resource/doc/livekit/live/vue/faq.md +0 -0
- package/resource/doc/livekit/live/vue/live-list-integration.md +0 -195
- package/resource/doc/livekit/live/vue/live-player-desk-integration.md +0 -293
- package/resource/doc/livekit/live/vue/live-player-h5-integration.md +0 -381
- package/resource/doc/livekit/live/vue/live-pusher-integration.md +0 -598
- package/resource/doc/livekit/live/vue/states/live-state.md +0 -2656
- package/resource/doc/livekit/live/vue/workflow.md +0 -219
- package/resource/doc/livekit/voice/android/workflow.md +0 -333
- package/resource/doc/livekit/voice/flutter/workflow.md +0 -359
- package/resource/doc/livekit/voice/ios/voice-integration.md +0 -853
- package/resource/doc/livekit/voice/ios/workflow.md +0 -358
- package/resource/doc/livekit/voice/uni-app/voice-integration.md +0 -613
- package/resource/doc/livekit/voice/uni-app/workflow.md +0 -369
- package/resource/doc/native_live/android/V2TXLiveCode_api_android.md +0 -334
- package/resource/doc/native_live/android/V2TXLiveDef_api_android.md +0 -434
- package/resource/doc/native_live/android/V2TXLivePlayerObserver_api_android.md +0 -685
- package/resource/doc/native_live/android/V2TXLivePlayer_api_android.md +0 -712
- package/resource/doc/native_live/android/V2TXLivePremier_api_android.md +0 -284
- package/resource/doc/native_live/android/V2TXLivePusherObserver_api_android.md +0 -849
- package/resource/doc/native_live/android/V2TXLivePusher_api_android.md +0 -1046
- package/resource/doc/native_live/flutter/V2TXLiveCode_api_flutter.md +0 -460
- package/resource/doc/native_live/flutter/V2TXLiveDef_api_flutter.md +0 -558
- package/resource/doc/native_live/flutter/V2TXLivePlayerObserver_api_flutter.md +0 -879
- package/resource/doc/native_live/flutter/V2TXLivePlayer_api_flutter.md +0 -668
- package/resource/doc/native_live/flutter/V2TXLivePremier_api_flutter.md +0 -456
- package/resource/doc/native_live/flutter/V2TXLivePusherObserver_api_flutter.md +0 -332
- package/resource/doc/native_live/flutter/V2TXLivePusher_api_flutter.md +0 -748
- package/resource/doc/native_live/iOS/V2TXLiveCode_api_iOS.md +0 -328
- package/resource/doc/native_live/iOS/V2TXLiveDef_api_iOS.md +0 -505
- package/resource/doc/native_live/iOS/V2TXLivePlayerObserver_api_iOS.md +0 -507
- package/resource/doc/native_live/iOS/V2TXLivePlayer_api_iOS.md +0 -676
- package/resource/doc/native_live/iOS/V2TXLivePremier_api_iOS.md +0 -284
- package/resource/doc/native_live/iOS/V2TXLivePusherObserver_api_iOS.md +0 -820
- package/resource/doc/native_live/iOS/V2TXLivePusher_api_iOS.md +0 -1065
- package/resource/doc/roomkit/vue/features/workflow.md +0 -553
- package/resource/doc/roomkit/vue/workflow.md +0 -733
- package/resource/doc/tuicallkit/android/workflow.md +0 -432
- package/resource/doc/tuicallkit/faq/android_sdk/call-observer-api.md +0 -786
- package/resource/doc/tuicallkit/faq/android_sdk/callkit-api.md +0 -663
- package/resource/doc/tuicallkit/faq/flutter_sdk/call-define-api.md +0 -932
- package/resource/doc/tuicallkit/faq/flutter_sdk/call-observer-api.md +0 -926
- package/resource/doc/tuicallkit/faq/flutter_sdk/callkit-api.md +0 -452
- package/resource/doc/tuicallkit/faq/ios_sdk/call-observer-api.md +0 -779
- package/resource/doc/tuicallkit/faq/ios_sdk/callkit-api.md +0 -635
- package/resource/doc/tuicallkit/flutter/workflow.md +0 -331
- package/resource/doc/tuicallkit/react/api.md +0 -1512
- package/resource/doc/tuicallkit/react/faq.md +0 -986
- package/resource/doc/tuicallkit/vue/api.md +0 -1512
- package/tools/call/get-native-call-integration.js +0 -43
- package/tools/call/get-native-call-integration.js.map +0 -1
- package/tools/call/get-web-call-api.js +0 -27
- package/tools/call/get-web-call-api.js.map +0 -1
- package/tools/call/get-web-call-integration.js.map +0 -1
- package/tools/chat/get-native-chat-feature-detail.js +0 -30
- package/tools/chat/get-native-chat-feature-detail.js.map +0 -1
- package/tools/chat/get-native-chat-integration.js +0 -45
- package/tools/chat/get-native-chat-integration.js.map +0 -1
- package/tools/chat/get-web-chat-component-detail.js +0 -31
- package/tools/chat/get-web-chat-component-detail.js.map +0 -1
- package/tools/chat/get-web-chat-integration.js +0 -45
- package/tools/chat/get-web-chat-integration.js.map +0 -1
- package/tools/chat/get-web-chat-uikit-init.js +0 -28
- package/tools/chat/get-web-chat-uikit-init.js.map +0 -1
- package/tools/chat/get-web-create-group-doc.js +0 -28
- package/tools/chat/get-web-create-group-doc.js.map +0 -1
- package/tools/common/get-faq.js +0 -91
- package/tools/common/get-faq.js.map +0 -1
- package/tools/common/get-usersig.js.map +0 -1
- package/tools/common/present-framework-choice.js +0 -16
- package/tools/common/present-framework-choice.js.map +0 -1
- package/tools/common/present-scenario-choice.js +0 -16
- package/tools/common/present-scenario-choice.js.map +0 -1
- package/tools/common/record-prompt.js +0 -55
- package/tools/common/record-prompt.js.map +0 -1
- package/tools/common/record-result.js +0 -60
- package/tools/common/record-result.js.map +0 -1
- package/tools/definitions/get_native_chat_feature_detail_def.js +0 -32
- package/tools/definitions/get_native_chat_feature_detail_def.js.map +0 -1
- package/tools/definitions/get_native_live_api_def.js +0 -22
- package/tools/definitions/get_native_live_api_def.js.map +0 -1
- package/tools/definitions/get_native_live_uikit_extra_features_def.js +0 -109
- package/tools/definitions/get_native_live_uikit_extra_features_def.js.map +0 -1
- package/tools/definitions/get_native_live_uikit_integration_def.js +0 -75
- package/tools/definitions/get_native_live_uikit_integration_def.js.map +0 -1
- package/tools/definitions/get_native_live_uikit_interaction_def.js +0 -63
- package/tools/definitions/get_native_live_uikit_interaction_def.js.map +0 -1
- package/tools/definitions/get_trtc_native_api_def.js +0 -17
- package/tools/definitions/get_trtc_native_api_def.js.map +0 -1
- package/tools/definitions/get_web_call_uikit_api_def.js +0 -23
- package/tools/definitions/get_web_call_uikit_api_def.js.map +0 -1
- package/tools/definitions/get_web_chat_uikit_init_def.js +0 -23
- package/tools/definitions/get_web_chat_uikit_init_def.js.map +0 -1
- package/tools/definitions/get_web_create_group_doc_def.js +0 -18
- package/tools/definitions/get_web_create_group_doc_def.js.map +0 -1
- package/tools/definitions/get_web_live_state_detail_def.js +0 -19
- package/tools/definitions/get_web_live_state_detail_def.js.map +0 -1
- package/tools/definitions/get_web_live_uikit_component_detail_def.js +0 -27
- package/tools/definitions/get_web_live_uikit_component_detail_def.js.map +0 -1
- package/tools/definitions/get_web_room_feature_detail_def.js +0 -92
- package/tools/definitions/get_web_room_feature_detail_def.js.map +0 -1
- package/tools/definitions/present_scenario_choice_def.js +0 -53
- package/tools/definitions/present_scenario_choice_def.js.map +0 -1
- package/tools/definitions/record_prompt_def.js +0 -58
- package/tools/definitions/record_prompt_def.js.map +0 -1
- package/tools/definitions/record_result_def.js +0 -46
- package/tools/definitions/record_result_def.js.map +0 -1
- package/tools/live/get-native-live-uikit-integration.js +0 -177
- package/tools/live/get-native-live-uikit-integration.js.map +0 -1
- package/tools/live/get-web-live-component-detail.js +0 -31
- package/tools/live/get-web-live-component-detail.js.map +0 -1
- package/tools/live/get-web-live-state-detail.js +0 -31
- package/tools/live/get-web-live-state-detail.js.map +0 -1
- package/tools/live/get-web-live-uikit-integration.js +0 -52
- package/tools/live/get-web-live-uikit-integration.js.map +0 -1
- package/tools/live/get_native_live_uikit_extra_features.js +0 -105
- package/tools/live/get_native_live_uikit_extra_features.js.map +0 -1
- package/tools/live/get_native_live_uikit_interaction.js +0 -194
- package/tools/live/get_native_live_uikit_interaction.js.map +0 -1
- package/tools/native_live/get-native-live-api.js +0 -31
- package/tools/native_live/get-native-live-api.js.map +0 -1
- package/tools/room/get-web-room-feature-detail.js.map +0 -1
- package/tools/room/get-web-room-integration.js.map +0 -1
- package/tools/rtcengine/get-rtcengine-web-sdk-integration.js +0 -28
- package/tools/rtcengine/get-rtcengine-web-sdk-integration.js.map +0 -1
- package/tools/rtcengine/get-trtc-sdk-faq.js +0 -32
- package/tools/rtcengine/get-trtc-sdk-faq.js.map +0 -1
- package/tools/rtcengine/get-trtc-web-sdk-api.js +0 -28
- package/tools/rtcengine/get-trtc-web-sdk-api.js.map +0 -1
- package/tools/rtcengine/get-trtc-web-sdk-faq.js +0 -30
- package/tools/rtcengine/get-trtc-web-sdk-faq.js.map +0 -1
- package/tools/rtcengine/get-trtc-web-sdk-integration.js +0 -29
- package/tools/rtcengine/get-trtc-web-sdk-integration.js.map +0 -1
- package/tools/rtcengine/get-trtc-web-sdk-plugin.js +0 -45
- package/tools/rtcengine/get-trtc-web-sdk-plugin.js.map +0 -1
- package/tools/trtc/get-trtc-native-api.js +0 -31
- package/tools/trtc/get-trtc-native-api.js.map +0 -1
- package/utils/handle-component-name.js +0 -33
- package/utils/handle-component-name.js.map +0 -1
- /package/resource/doc/{rtcengine/web → callkit/core-sdk}/.gitkeep +0 -0
- /package/resource/doc/{chatuikit → chatkit}/faq/common/server_error_code.md +0 -0
- /package/resource/doc/{chatuikit → chatkit}/flutter/faq.md +0 -0
- /package/resource/doc/{chatuikit → chatkit}/react/faq.md +0 -0
|
@@ -1,885 +0,0 @@
|
|
|
1
|
-
## 组件概述
|
|
2
|
-
|
|
3
|
-
Search 是一个功能完整的搜索解决方案,包含了搜索框、搜索结果展示、高级搜索等功能的完整组件集合。适用于即时通讯、在线会议、在线教育等场景的用户、群组、消息搜索。
|
|
4
|
-
|
|
5
|
-
> **说明:**
|
|
6
|
-
>
|
|
7
|
-
|
|
8
|
-
> 此功能属于增值服务,需要您购买云端搜索插件,请点击 [购买](https://console.cloud.tencent.com/im/plugin/TUICloudSearch)。
|
|
9
|
-
>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-

|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
## 组件架构
|
|
16
|
-
``` bash
|
|
17
|
-
Search (主组件)
|
|
18
|
-
├── SearchBar # 搜索框组件
|
|
19
|
-
├── SearchResults # 搜索结果组件
|
|
20
|
-
├── SearchAdvanced # 高级搜索组件
|
|
21
|
-
└── SearchResultsItem # 搜索结果项组件
|
|
22
|
-
├── User # 用户结果项
|
|
23
|
-
├── Group # 群组结果项
|
|
24
|
-
├── Message # 消息结果项
|
|
25
|
-
└── Conversation # 会话结果项
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## 搜索模式
|
|
29
|
-
<table>
|
|
30
|
-
<tr>
|
|
31
|
-
<td rowspan="1" colSpan="1" >**迷你模式**</td>
|
|
32
|
-
|
|
33
|
-
<td rowspan="1" colSpan="1" >**标准模式**</td>
|
|
34
|
-
|
|
35
|
-
<td rowspan="1" colSpan="1" >**嵌入式模式**</td>
|
|
36
|
-
</tr>
|
|
37
|
-
|
|
38
|
-
<tr>
|
|
39
|
-
<td rowspan="1" colSpan="1" >- 适用于侧边栏或小容器<br>- 显示有限结果数量<br>- 支持展开查看更多</td>
|
|
40
|
-
|
|
41
|
-
<td rowspan="1" colSpan="1" >- 适用于全屏搜索界面<br>- 完整功能展示<br>- 支持高级搜索</td>
|
|
42
|
-
|
|
43
|
-
<td rowspan="1" colSpan="1" >- 适用于聊天界面<br>- 专注消息搜索<br>- 优化的布局</td>
|
|
44
|
-
</tr>
|
|
45
|
-
|
|
46
|
-
<tr>
|
|
47
|
-
<td rowspan="1" colSpan="1" ><br></td>
|
|
48
|
-
|
|
49
|
-
<td rowspan="1" colSpan="1" ><br></td>
|
|
50
|
-
|
|
51
|
-
<td rowspan="1" colSpan="1" ><br></td>
|
|
52
|
-
</tr>
|
|
53
|
-
</table>
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
## Props
|
|
57
|
-
<table>
|
|
58
|
-
<tr>
|
|
59
|
-
<td rowspan="1" colSpan="1" >属性名</td>
|
|
60
|
-
|
|
61
|
-
<td rowspan="1" colSpan="1" >类型</td>
|
|
62
|
-
|
|
63
|
-
<td rowspan="1" colSpan="1" >默认值</td>
|
|
64
|
-
|
|
65
|
-
<td rowspan="1" colSpan="1" >说明</td>
|
|
66
|
-
</tr>
|
|
67
|
-
|
|
68
|
-
<tr>
|
|
69
|
-
<td rowspan="1" colSpan="1" >variant</td>
|
|
70
|
-
|
|
71
|
-
<td rowspan="1" colSpan="1" >`VariantType`</td>
|
|
72
|
-
|
|
73
|
-
<td rowspan="1" colSpan="1" >`VariantType.MINI`</td>
|
|
74
|
-
|
|
75
|
-
<td rowspan="1" colSpan="1" >搜索模式:`mini`(迷你)、`standard`(标准)、`embedded`(嵌入式)</td>
|
|
76
|
-
</tr>
|
|
77
|
-
|
|
78
|
-
<tr>
|
|
79
|
-
<td rowspan="1" colSpan="1" >SearchBar</td>
|
|
80
|
-
|
|
81
|
-
<td rowspan="1" colSpan="1" >`React.ComponentType<SearchBarProps>`</td>
|
|
82
|
-
|
|
83
|
-
<td rowspan="1" colSpan="1" >`DefaultSearchBar`</td>
|
|
84
|
-
|
|
85
|
-
<td rowspan="1" colSpan="1" >自定义搜索框组件</td>
|
|
86
|
-
</tr>
|
|
87
|
-
|
|
88
|
-
<tr>
|
|
89
|
-
<td rowspan="1" colSpan="1" >SearchResults</td>
|
|
90
|
-
|
|
91
|
-
<td rowspan="1" colSpan="1" >`React.ComponentType<SearchResultsProps>`</td>
|
|
92
|
-
|
|
93
|
-
<td rowspan="1" colSpan="1" >`DefaultSearchResults`</td>
|
|
94
|
-
|
|
95
|
-
<td rowspan="1" colSpan="1" >自定义搜索结果组件</td>
|
|
96
|
-
</tr>
|
|
97
|
-
|
|
98
|
-
<tr>
|
|
99
|
-
<td rowspan="1" colSpan="1" >SearchAdvanced</td>
|
|
100
|
-
|
|
101
|
-
<td rowspan="1" colSpan="1" >`React.ComponentType<SearchAdvancedProps>`</td>
|
|
102
|
-
|
|
103
|
-
<td rowspan="1" colSpan="1" >`DefaultSearchAdvanced`</td>
|
|
104
|
-
|
|
105
|
-
<td rowspan="1" colSpan="1" >自定义高级搜索组件</td>
|
|
106
|
-
</tr>
|
|
107
|
-
|
|
108
|
-
<tr>
|
|
109
|
-
<td rowspan="1" colSpan="1" >SearchResultsPresearch</td>
|
|
110
|
-
|
|
111
|
-
<td rowspan="1" colSpan="1" >`React.ComponentType`</td>
|
|
112
|
-
|
|
113
|
-
<td rowspan="1" colSpan="1" >-</td>
|
|
114
|
-
|
|
115
|
-
<td rowspan="1" colSpan="1" >搜索前占位符组件</td>
|
|
116
|
-
</tr>
|
|
117
|
-
|
|
118
|
-
<tr>
|
|
119
|
-
<td rowspan="1" colSpan="1" >SearchResultsLoading</td>
|
|
120
|
-
|
|
121
|
-
<td rowspan="1" colSpan="1" >`React.ComponentType`</td>
|
|
122
|
-
|
|
123
|
-
<td rowspan="1" colSpan="1" >-</td>
|
|
124
|
-
|
|
125
|
-
<td rowspan="1" colSpan="1" >加载中占位符组件</td>
|
|
126
|
-
</tr>
|
|
127
|
-
|
|
128
|
-
<tr>
|
|
129
|
-
<td rowspan="1" colSpan="1" >SearchResultsEmpty</td>
|
|
130
|
-
|
|
131
|
-
<td rowspan="1" colSpan="1" >`React.ComponentType`</td>
|
|
132
|
-
|
|
133
|
-
<td rowspan="1" colSpan="1" >-</td>
|
|
134
|
-
|
|
135
|
-
<td rowspan="1" colSpan="1" >空结果占位符组件</td>
|
|
136
|
-
</tr>
|
|
137
|
-
|
|
138
|
-
<tr>
|
|
139
|
-
<td rowspan="1" colSpan="1" >SearchResultItem</td>
|
|
140
|
-
|
|
141
|
-
<td rowspan="1" colSpan="1" >`React.ComponentType<ResultItemProps>`</td>
|
|
142
|
-
|
|
143
|
-
<td rowspan="1" colSpan="1" >-</td>
|
|
144
|
-
|
|
145
|
-
<td rowspan="1" colSpan="1" >自定义搜索结果项组件</td>
|
|
146
|
-
</tr>
|
|
147
|
-
|
|
148
|
-
<tr>
|
|
149
|
-
<td rowspan="1" colSpan="1" >debounceTime</td>
|
|
150
|
-
|
|
151
|
-
<td rowspan="1" colSpan="1" >`number`</td>
|
|
152
|
-
|
|
153
|
-
<td rowspan="1" colSpan="1" >`300`</td>
|
|
154
|
-
|
|
155
|
-
<td rowspan="1" colSpan="1" >搜索防抖时间(毫秒)</td>
|
|
156
|
-
</tr>
|
|
157
|
-
|
|
158
|
-
<tr>
|
|
159
|
-
<td rowspan="1" colSpan="1" >autoFocus</td>
|
|
160
|
-
|
|
161
|
-
<td rowspan="1" colSpan="1" >`boolean`</td>
|
|
162
|
-
|
|
163
|
-
<td rowspan="1" colSpan="1" >`false`</td>
|
|
164
|
-
|
|
165
|
-
<td rowspan="1" colSpan="1" >是否自动聚焦搜索框</td>
|
|
166
|
-
</tr>
|
|
167
|
-
|
|
168
|
-
<tr>
|
|
169
|
-
<td rowspan="1" colSpan="1" >className</td>
|
|
170
|
-
|
|
171
|
-
<td rowspan="1" colSpan="1" >`string`</td>
|
|
172
|
-
|
|
173
|
-
<td rowspan="1" colSpan="1" >-</td>
|
|
174
|
-
|
|
175
|
-
<td rowspan="1" colSpan="1" >自定义样式类名</td>
|
|
176
|
-
</tr>
|
|
177
|
-
|
|
178
|
-
<tr>
|
|
179
|
-
<td rowspan="1" colSpan="1" >style</td>
|
|
180
|
-
|
|
181
|
-
<td rowspan="1" colSpan="1" >`React.CSSProperties`</td>
|
|
182
|
-
|
|
183
|
-
<td rowspan="1" colSpan="1" >-</td>
|
|
184
|
-
|
|
185
|
-
<td rowspan="1" colSpan="1" >自定义样式</td>
|
|
186
|
-
</tr>
|
|
187
|
-
|
|
188
|
-
<tr>
|
|
189
|
-
<td rowspan="1" colSpan="1" >onKeywordChange</td>
|
|
190
|
-
|
|
191
|
-
<td rowspan="1" colSpan="1" >`(keyword: string) => void`</td>
|
|
192
|
-
|
|
193
|
-
<td rowspan="1" colSpan="1" >-</td>
|
|
194
|
-
|
|
195
|
-
<td rowspan="1" colSpan="1" >搜索关键词变化回调</td>
|
|
196
|
-
</tr>
|
|
197
|
-
|
|
198
|
-
<tr>
|
|
199
|
-
<td rowspan="1" colSpan="1" >onSearchComplete</td>
|
|
200
|
-
|
|
201
|
-
<td rowspan="1" colSpan="1" >`(results: Map<SearchType, SearchResult>) => void`</td>
|
|
202
|
-
|
|
203
|
-
<td rowspan="1" colSpan="1" >-</td>
|
|
204
|
-
|
|
205
|
-
<td rowspan="1" colSpan="1" >搜索完成回调</td>
|
|
206
|
-
</tr>
|
|
207
|
-
|
|
208
|
-
<tr>
|
|
209
|
-
<td rowspan="1" colSpan="1" >onResultItemClick</td>
|
|
210
|
-
|
|
211
|
-
<td rowspan="1" colSpan="1" >`(data: SearchResultItem, type: SearchType) => void`</td>
|
|
212
|
-
|
|
213
|
-
<td rowspan="1" colSpan="1" >-</td>
|
|
214
|
-
|
|
215
|
-
<td rowspan="1" colSpan="1" >搜索结果点击回调</td>
|
|
216
|
-
</tr>
|
|
217
|
-
|
|
218
|
-
<tr>
|
|
219
|
-
<td rowspan="1" colSpan="1" >onError</td>
|
|
220
|
-
|
|
221
|
-
<td rowspan="1" colSpan="1" >`(error: Error) => void`</td>
|
|
222
|
-
|
|
223
|
-
<td rowspan="1" colSpan="1" >-</td>
|
|
224
|
-
|
|
225
|
-
<td rowspan="1" colSpan="1" >搜索错误回调</td>
|
|
226
|
-
</tr>
|
|
227
|
-
</table>
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
## 基础使用
|
|
231
|
-
``` typescript
|
|
232
|
-
import { Search, VariantType } from '@tencentcloud/chat-uikit-react';
|
|
233
|
-
|
|
234
|
-
function App() {
|
|
235
|
-
return (
|
|
236
|
-
<Search
|
|
237
|
-
variant={VariantType.STANDARD}
|
|
238
|
-
onResultItemClick={(data, type) => {
|
|
239
|
-
console.log('搜索结果点击:', data, type);
|
|
240
|
-
}}
|
|
241
|
-
/>
|
|
242
|
-
);
|
|
243
|
-
}
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
## 自定义能力
|
|
247
|
-
|
|
248
|
-
`Search` 为用户自定义提供了丰富且多维度的 Props 接口,允许用户自定义功能、UI、模块等。
|
|
249
|
-
|
|
250
|
-
`Search` 组件提供了多个可替换的子组件,允许用户自定义 `SearchBar`, `SearchResults`, `SearchAdvanced`, `SearchResultItem`, `SearchResultsPresearch`, `SearchResultsLoading`, `SearchResultsEmpty`, 等。同时,用户还可以利用默认子组件进行二次开发定制。
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
【自定义 SearchBar】
|
|
255
|
-
|
|
256
|
-
**Props**
|
|
257
|
-
<table>
|
|
258
|
-
<tr>
|
|
259
|
-
<td rowspan="1" colSpan="1" >属性名</td>
|
|
260
|
-
|
|
261
|
-
<td rowspan="1" colSpan="1" >类型</td>
|
|
262
|
-
|
|
263
|
-
<td rowspan="1" colSpan="1" >默认值</td>
|
|
264
|
-
|
|
265
|
-
<td rowspan="1" colSpan="1" >说明</td>
|
|
266
|
-
</tr>
|
|
267
|
-
|
|
268
|
-
<tr>
|
|
269
|
-
<td rowspan="1" colSpan="1" >data</td>
|
|
270
|
-
|
|
271
|
-
<td rowspan="1" colSpan="1" >`SearchResultItem`</td>
|
|
272
|
-
|
|
273
|
-
<td rowspan="1" colSpan="1" >-</td>
|
|
274
|
-
|
|
275
|
-
<td rowspan="1" colSpan="1" >搜索结果数据</td>
|
|
276
|
-
</tr>
|
|
277
|
-
|
|
278
|
-
<tr>
|
|
279
|
-
<td rowspan="1" colSpan="1" >type</td>
|
|
280
|
-
|
|
281
|
-
<td rowspan="1" colSpan="1" >`SearchType`</td>
|
|
282
|
-
|
|
283
|
-
<td rowspan="1" colSpan="1" >-</td>
|
|
284
|
-
|
|
285
|
-
<td rowspan="1" colSpan="1" >搜索结果类型</td>
|
|
286
|
-
</tr>
|
|
287
|
-
|
|
288
|
-
<tr>
|
|
289
|
-
<td rowspan="1" colSpan="1" >keyword</td>
|
|
290
|
-
|
|
291
|
-
<td rowspan="1" colSpan="1" >`string`</td>
|
|
292
|
-
|
|
293
|
-
<td rowspan="1" colSpan="1" >-</td>
|
|
294
|
-
|
|
295
|
-
<td rowspan="1" colSpan="1" >搜索关键词</td>
|
|
296
|
-
</tr>
|
|
297
|
-
|
|
298
|
-
<tr>
|
|
299
|
-
<td rowspan="1" colSpan="1" >onClick</td>
|
|
300
|
-
|
|
301
|
-
<td rowspan="1" colSpan="1" >`(data: SearchResultItem, type: SearchType) => void`</td>
|
|
302
|
-
|
|
303
|
-
<td rowspan="1" colSpan="1" >-</td>
|
|
304
|
-
|
|
305
|
-
<td rowspan="1" colSpan="1" >点击回调</td>
|
|
306
|
-
</tr>
|
|
307
|
-
|
|
308
|
-
<tr>
|
|
309
|
-
<td rowspan="1" colSpan="1" >className</td>
|
|
310
|
-
|
|
311
|
-
<td rowspan="1" colSpan="1" >`string`</td>
|
|
312
|
-
|
|
313
|
-
<td rowspan="1" colSpan="1" >-</td>
|
|
314
|
-
|
|
315
|
-
<td rowspan="1" colSpan="1" >自定义样式类名</td>
|
|
316
|
-
</tr>
|
|
317
|
-
</table>
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
**示例**
|
|
321
|
-
``` typescript
|
|
322
|
-
const CustomSearchBar = ({ value, onChange, onClear, placeholder }) => (
|
|
323
|
-
<div className="custom-search-bar">
|
|
324
|
-
<input
|
|
325
|
-
type="text"
|
|
326
|
-
value={value}
|
|
327
|
-
onChange={onChange}
|
|
328
|
-
placeholder={placeholder}
|
|
329
|
-
/>
|
|
330
|
-
{value && <button onClick={onClear}>清除</button>}
|
|
331
|
-
</div>
|
|
332
|
-
);
|
|
333
|
-
|
|
334
|
-
<Search SearchBar={CustomSearchBar} />
|
|
335
|
-
```
|
|
336
|
-
|
|
337
|
-
【自定义 SearchResults】
|
|
338
|
-
|
|
339
|
-
**Props**
|
|
340
|
-
<table>
|
|
341
|
-
<tr>
|
|
342
|
-
<td rowspan="1" colSpan="1" >属性名</td>
|
|
343
|
-
|
|
344
|
-
<td rowspan="1" colSpan="1" >类型</td>
|
|
345
|
-
|
|
346
|
-
<td rowspan="1" colSpan="1" >默认值</td>
|
|
347
|
-
|
|
348
|
-
<td rowspan="1" colSpan="1" >说明</td>
|
|
349
|
-
</tr>
|
|
350
|
-
|
|
351
|
-
<tr>
|
|
352
|
-
<td rowspan="1" colSpan="1" >results</td>
|
|
353
|
-
|
|
354
|
-
<td rowspan="1" colSpan="1" >`Map<SearchType, SearchResult>`</td>
|
|
355
|
-
|
|
356
|
-
<td rowspan="1" colSpan="1" >-</td>
|
|
357
|
-
|
|
358
|
-
<td rowspan="1" colSpan="1" >搜索结果数据</td>
|
|
359
|
-
</tr>
|
|
360
|
-
|
|
361
|
-
<tr>
|
|
362
|
-
<td rowspan="1" colSpan="1" >isLoading</td>
|
|
363
|
-
|
|
364
|
-
<td rowspan="1" colSpan="1" >`boolean`</td>
|
|
365
|
-
|
|
366
|
-
<td rowspan="1" colSpan="1" >-</td>
|
|
367
|
-
|
|
368
|
-
<td rowspan="1" colSpan="1" >是否正在加载</td>
|
|
369
|
-
</tr>
|
|
370
|
-
|
|
371
|
-
<tr>
|
|
372
|
-
<td rowspan="1" colSpan="1" >error</td>
|
|
373
|
-
|
|
374
|
-
<td rowspan="1" colSpan="1" >`Error \| null`</td>
|
|
375
|
-
|
|
376
|
-
<td rowspan="1" colSpan="1" >-</td>
|
|
377
|
-
|
|
378
|
-
<td rowspan="1" colSpan="1" >错误信息</td>
|
|
379
|
-
</tr>
|
|
380
|
-
|
|
381
|
-
<tr>
|
|
382
|
-
<td rowspan="1" colSpan="1" >keyword</td>
|
|
383
|
-
|
|
384
|
-
<td rowspan="1" colSpan="1" >`string`</td>
|
|
385
|
-
|
|
386
|
-
<td rowspan="1" colSpan="1" >-</td>
|
|
387
|
-
|
|
388
|
-
<td rowspan="1" colSpan="1" >搜索关键词</td>
|
|
389
|
-
</tr>
|
|
390
|
-
|
|
391
|
-
<tr>
|
|
392
|
-
<td rowspan="1" colSpan="1" >typeLabels</td>
|
|
393
|
-
|
|
394
|
-
<td rowspan="1" colSpan="1" >`Record<SearchType, string>`</td>
|
|
395
|
-
|
|
396
|
-
<td rowspan="1" colSpan="1" >-</td>
|
|
397
|
-
|
|
398
|
-
<td rowspan="1" colSpan="1" >搜索类型标签</td>
|
|
399
|
-
</tr>
|
|
400
|
-
|
|
401
|
-
<tr>
|
|
402
|
-
<td rowspan="1" colSpan="1" >onLoadMore</td>
|
|
403
|
-
|
|
404
|
-
<td rowspan="1" colSpan="1" >`(type: SearchType) => void`</td>
|
|
405
|
-
|
|
406
|
-
<td rowspan="1" colSpan="1" >-</td>
|
|
407
|
-
|
|
408
|
-
<td rowspan="1" colSpan="1" >加载更多回调</td>
|
|
409
|
-
</tr>
|
|
410
|
-
|
|
411
|
-
<tr>
|
|
412
|
-
<td rowspan="1" colSpan="1" >onResultItemClick</td>
|
|
413
|
-
|
|
414
|
-
<td rowspan="1" colSpan="1" >`(data: SearchResultItem, type: SearchType) => void`</td>
|
|
415
|
-
|
|
416
|
-
<td rowspan="1" colSpan="1" >-</td>
|
|
417
|
-
|
|
418
|
-
<td rowspan="1" colSpan="1" >结果项点击回调</td>
|
|
419
|
-
</tr>
|
|
420
|
-
|
|
421
|
-
<tr>
|
|
422
|
-
<td rowspan="1" colSpan="1" >SearchResultsLoading</td>
|
|
423
|
-
|
|
424
|
-
<td rowspan="1" colSpan="1" >`React.ComponentType`</td>
|
|
425
|
-
|
|
426
|
-
<td rowspan="1" colSpan="1" >`Loading`</td>
|
|
427
|
-
|
|
428
|
-
<td rowspan="1" colSpan="1" >自定义加载组件</td>
|
|
429
|
-
</tr>
|
|
430
|
-
|
|
431
|
-
<tr>
|
|
432
|
-
<td rowspan="1" colSpan="1" >SearchResultsPresearch</td>
|
|
433
|
-
|
|
434
|
-
<td rowspan="1" colSpan="1" >`React.ComponentType`</td>
|
|
435
|
-
|
|
436
|
-
<td rowspan="1" colSpan="1" >-</td>
|
|
437
|
-
|
|
438
|
-
<td rowspan="1" colSpan="1" >搜索前占位符组件</td>
|
|
439
|
-
</tr>
|
|
440
|
-
|
|
441
|
-
<tr>
|
|
442
|
-
<td rowspan="1" colSpan="1" >SearchResultsEmpty</td>
|
|
443
|
-
|
|
444
|
-
<td rowspan="1" colSpan="1" >`React.ComponentType`</td>
|
|
445
|
-
|
|
446
|
-
<td rowspan="1" colSpan="1" >`EmptyResult`</td>
|
|
447
|
-
|
|
448
|
-
<td rowspan="1" colSpan="1" >空结果占位符组件</td>
|
|
449
|
-
</tr>
|
|
450
|
-
|
|
451
|
-
<tr>
|
|
452
|
-
<td rowspan="1" colSpan="1" >SearchResultItem</td>
|
|
453
|
-
|
|
454
|
-
<td rowspan="1" colSpan="1" >`React.ComponentType<ResultItemProps>`</td>
|
|
455
|
-
|
|
456
|
-
<td rowspan="1" colSpan="1" >`DefaultSearchResultsItem`</td>
|
|
457
|
-
|
|
458
|
-
<td rowspan="1" colSpan="1" >自定义结果项组件</td>
|
|
459
|
-
</tr>
|
|
460
|
-
|
|
461
|
-
<tr>
|
|
462
|
-
<td rowspan="1" colSpan="1" >variant</td>
|
|
463
|
-
|
|
464
|
-
<td rowspan="1" colSpan="1" >`VariantType`</td>
|
|
465
|
-
|
|
466
|
-
<td rowspan="1" colSpan="1" >`VariantType.STANDARD`</td>
|
|
467
|
-
|
|
468
|
-
<td rowspan="1" colSpan="1" >显示模式</td>
|
|
469
|
-
</tr>
|
|
470
|
-
|
|
471
|
-
<tr>
|
|
472
|
-
<td rowspan="1" colSpan="1" >searchType</td>
|
|
473
|
-
|
|
474
|
-
<td rowspan="1" colSpan="1" >`SearchType \| 'all'`</td>
|
|
475
|
-
|
|
476
|
-
<td rowspan="1" colSpan="1" >`'all'`</td>
|
|
477
|
-
|
|
478
|
-
<td rowspan="1" colSpan="1" >当前搜索类型</td>
|
|
479
|
-
</tr>
|
|
480
|
-
</table>
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
**示例**
|
|
484
|
-
``` typescript
|
|
485
|
-
const CustomSearchResults = ({ results, keyword, onResultItemClick }) => (
|
|
486
|
-
<div className="custom-results">
|
|
487
|
-
{Array.from(results.entries()).map(([type, result]) => (
|
|
488
|
-
<div key={type}>
|
|
489
|
-
<h3>{type}</h3>
|
|
490
|
-
{result.resultList.map((item, index) => (
|
|
491
|
-
<div key={index} onClick={() => onResultItemClick(item, type)}>
|
|
492
|
-
{/* 自定义结果项 */}
|
|
493
|
-
</div>
|
|
494
|
-
))}
|
|
495
|
-
</div>
|
|
496
|
-
))}
|
|
497
|
-
</div>
|
|
498
|
-
);
|
|
499
|
-
|
|
500
|
-
<Search SearchResults={CustomSearchResults} />
|
|
501
|
-
```
|
|
502
|
-
|
|
503
|
-
【自定义 SearchAdvanced】
|
|
504
|
-
|
|
505
|
-
**Props**
|
|
506
|
-
<table>
|
|
507
|
-
<tr>
|
|
508
|
-
<td rowspan="1" colSpan="1" >属性名</td>
|
|
509
|
-
|
|
510
|
-
<td rowspan="1" colSpan="1" >类型</td>
|
|
511
|
-
|
|
512
|
-
<td rowspan="1" colSpan="1" >默认值</td>
|
|
513
|
-
|
|
514
|
-
<td rowspan="1" colSpan="1" >说明</td>
|
|
515
|
-
</tr>
|
|
516
|
-
|
|
517
|
-
<tr>
|
|
518
|
-
<td rowspan="1" colSpan="1" >variant</td>
|
|
519
|
-
|
|
520
|
-
<td rowspan="1" colSpan="1" >`VariantType`</td>
|
|
521
|
-
|
|
522
|
-
<td rowspan="1" colSpan="1" >-</td>
|
|
523
|
-
|
|
524
|
-
<td rowspan="1" colSpan="1" >显示模式</td>
|
|
525
|
-
</tr>
|
|
526
|
-
|
|
527
|
-
<tr>
|
|
528
|
-
<td rowspan="1" colSpan="1" >searchType</td>
|
|
529
|
-
|
|
530
|
-
<td rowspan="1" colSpan="1" >`SearchTabType`</td>
|
|
531
|
-
|
|
532
|
-
<td rowspan="1" colSpan="1" >-</td>
|
|
533
|
-
|
|
534
|
-
<td rowspan="1" colSpan="1" >当前搜索类型</td>
|
|
535
|
-
</tr>
|
|
536
|
-
|
|
537
|
-
<tr>
|
|
538
|
-
<td rowspan="1" colSpan="1" >advancedParams</td>
|
|
539
|
-
|
|
540
|
-
<td rowspan="1" colSpan="1" >`Map<SearchType, SearchParamsMap[SearchType]>`</td>
|
|
541
|
-
|
|
542
|
-
<td rowspan="1" colSpan="1" >-</td>
|
|
543
|
-
|
|
544
|
-
<td rowspan="1" colSpan="1" >高级搜索参数</td>
|
|
545
|
-
</tr>
|
|
546
|
-
|
|
547
|
-
<tr>
|
|
548
|
-
<td rowspan="1" colSpan="1" >onAdvancedParamsChange</td>
|
|
549
|
-
|
|
550
|
-
<td rowspan="1" colSpan="1" >`(type: SearchType, params: SearchParamsMap[SearchType]) => void`</td>
|
|
551
|
-
|
|
552
|
-
<td rowspan="1" colSpan="1" >-</td>
|
|
553
|
-
|
|
554
|
-
<td rowspan="1" colSpan="1" >参数变化回调</td>
|
|
555
|
-
</tr>
|
|
556
|
-
</table>
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
**示例**
|
|
560
|
-
``` typescript
|
|
561
|
-
const CustomSearchAdvanced = ({ variant, searchType, advancedParams, onAdvancedParamsChange }) => (
|
|
562
|
-
<div className="custom-advanced">
|
|
563
|
-
{/* 自定义高级搜索功能 */}
|
|
564
|
-
</div>
|
|
565
|
-
);
|
|
566
|
-
|
|
567
|
-
<Search SearchAdvanced={CustomSearchAdvanced} />
|
|
568
|
-
```
|
|
569
|
-
|
|
570
|
-
【自定义 SearchResultItem】
|
|
571
|
-
|
|
572
|
-
**Props**
|
|
573
|
-
<table>
|
|
574
|
-
<tr>
|
|
575
|
-
<td rowspan="1" colSpan="1" >属性名</td>
|
|
576
|
-
|
|
577
|
-
<td rowspan="1" colSpan="1" >类型</td>
|
|
578
|
-
|
|
579
|
-
<td rowspan="1" colSpan="1" >默认值</td>
|
|
580
|
-
|
|
581
|
-
<td rowspan="1" colSpan="1" >说明</td>
|
|
582
|
-
</tr>
|
|
583
|
-
|
|
584
|
-
<tr>
|
|
585
|
-
<td rowspan="1" colSpan="1" >data</td>
|
|
586
|
-
|
|
587
|
-
<td rowspan="1" colSpan="1" >`SearchResultItem`</td>
|
|
588
|
-
|
|
589
|
-
<td rowspan="1" colSpan="1" >-</td>
|
|
590
|
-
|
|
591
|
-
<td rowspan="1" colSpan="1" >搜索结果数据</td>
|
|
592
|
-
</tr>
|
|
593
|
-
|
|
594
|
-
<tr>
|
|
595
|
-
<td rowspan="1" colSpan="1" >type</td>
|
|
596
|
-
|
|
597
|
-
<td rowspan="1" colSpan="1" >`SearchType`</td>
|
|
598
|
-
|
|
599
|
-
<td rowspan="1" colSpan="1" >-</td>
|
|
600
|
-
|
|
601
|
-
<td rowspan="1" colSpan="1" >搜索结果类型</td>
|
|
602
|
-
</tr>
|
|
603
|
-
|
|
604
|
-
<tr>
|
|
605
|
-
<td rowspan="1" colSpan="1" >keyword</td>
|
|
606
|
-
|
|
607
|
-
<td rowspan="1" colSpan="1" >`string`</td>
|
|
608
|
-
|
|
609
|
-
<td rowspan="1" colSpan="1" >-</td>
|
|
610
|
-
|
|
611
|
-
<td rowspan="1" colSpan="1" >搜索关键词</td>
|
|
612
|
-
</tr>
|
|
613
|
-
|
|
614
|
-
<tr>
|
|
615
|
-
<td rowspan="1" colSpan="1" >onClick</td>
|
|
616
|
-
|
|
617
|
-
<td rowspan="1" colSpan="1" >`(data: SearchResultItem, type: SearchType) => void`</td>
|
|
618
|
-
|
|
619
|
-
<td rowspan="1" colSpan="1" >-</td>
|
|
620
|
-
|
|
621
|
-
<td rowspan="1" colSpan="1" >点击回调</td>
|
|
622
|
-
</tr>
|
|
623
|
-
|
|
624
|
-
<tr>
|
|
625
|
-
<td rowspan="1" colSpan="1" >className</td>
|
|
626
|
-
|
|
627
|
-
<td rowspan="1" colSpan="1" >`string`</td>
|
|
628
|
-
|
|
629
|
-
<td rowspan="1" colSpan="1" >-</td>
|
|
630
|
-
|
|
631
|
-
<td rowspan="1" colSpan="1" >自定义样式类名</td>
|
|
632
|
-
</tr>
|
|
633
|
-
</table>
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
**示例**
|
|
637
|
-
``` typescript
|
|
638
|
-
const CustomSearchItem = ({ data, type, keyword, onClick }) => (
|
|
639
|
-
<div className="custom-item">
|
|
640
|
-
{type === SearchType.MESSAGE && (
|
|
641
|
-
<Conversation
|
|
642
|
-
data={data}
|
|
643
|
-
keyword={keyword}
|
|
644
|
-
onClick={onClick}
|
|
645
|
-
/>
|
|
646
|
-
)}
|
|
647
|
-
{type === SearchType.USER && (
|
|
648
|
-
<User
|
|
649
|
-
data={data}
|
|
650
|
-
keyword={keyword}
|
|
651
|
-
onClick={onClick}
|
|
652
|
-
/>
|
|
653
|
-
)}
|
|
654
|
-
{type === SearchType.GROUP && (
|
|
655
|
-
<Group
|
|
656
|
-
data={data}
|
|
657
|
-
keyword={keyword}
|
|
658
|
-
onClick={onClick}
|
|
659
|
-
/>
|
|
660
|
-
)}
|
|
661
|
-
{type === SearchType.CHAT_MESSAGE && (
|
|
662
|
-
<Message
|
|
663
|
-
data={data}
|
|
664
|
-
keyword={keyword}
|
|
665
|
-
onClick={onClick}
|
|
666
|
-
/>
|
|
667
|
-
)}
|
|
668
|
-
</div>
|
|
669
|
-
);
|
|
670
|
-
|
|
671
|
-
<Search SearchResultItem={CustomSearchItem} />
|
|
672
|
-
```
|
|
673
|
-
|
|
674
|
-
【自定义占位组件】
|
|
675
|
-
|
|
676
|
-
**Props**
|
|
677
|
-
<table>
|
|
678
|
-
<tr>
|
|
679
|
-
<td rowspan="1" colSpan="1" >属性名</td>
|
|
680
|
-
|
|
681
|
-
<td rowspan="1" colSpan="1" >类型</td>
|
|
682
|
-
|
|
683
|
-
<td rowspan="1" colSpan="1" >默认值</td>
|
|
684
|
-
|
|
685
|
-
<td rowspan="1" colSpan="1" >说明</td>
|
|
686
|
-
</tr>
|
|
687
|
-
|
|
688
|
-
<tr>
|
|
689
|
-
<td rowspan="1" colSpan="1" >SearchResultsPresearch</td>
|
|
690
|
-
|
|
691
|
-
<td rowspan="1" colSpan="1" >`React.ComponentType`</td>
|
|
692
|
-
|
|
693
|
-
<td rowspan="1" colSpan="1" >-</td>
|
|
694
|
-
|
|
695
|
-
<td rowspan="1" colSpan="1" >搜索前占位符组件</td>
|
|
696
|
-
</tr>
|
|
697
|
-
|
|
698
|
-
<tr>
|
|
699
|
-
<td rowspan="1" colSpan="1" >SearchResultsLoading</td>
|
|
700
|
-
|
|
701
|
-
<td rowspan="1" colSpan="1" >`React.ComponentType`</td>
|
|
702
|
-
|
|
703
|
-
<td rowspan="1" colSpan="1" >-</td>
|
|
704
|
-
|
|
705
|
-
<td rowspan="1" colSpan="1" >加载中占位符组件</td>
|
|
706
|
-
</tr>
|
|
707
|
-
|
|
708
|
-
<tr>
|
|
709
|
-
<td rowspan="1" colSpan="1" >SearchResultsEmpty</td>
|
|
710
|
-
|
|
711
|
-
<td rowspan="1" colSpan="1" >`React.ComponentType`</td>
|
|
712
|
-
|
|
713
|
-
<td rowspan="1" colSpan="1" >-</td>
|
|
714
|
-
|
|
715
|
-
<td rowspan="1" colSpan="1" >空结果占位符组件</td>
|
|
716
|
-
</tr>
|
|
717
|
-
</table>
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
**示例**
|
|
721
|
-
``` typescript
|
|
722
|
-
<Search
|
|
723
|
-
SearchResultsPresearch={() => <div>输入关键词开始搜索</div>}
|
|
724
|
-
SearchResultsLoading={() => <div>搜索中...</div>}
|
|
725
|
-
SearchResultsEmpty={() => <div>未找到相关结果</div>}
|
|
726
|
-
/>
|
|
727
|
-
```
|
|
728
|
-
|
|
729
|
-
## SearchState
|
|
730
|
-
|
|
731
|
-
SearchState 是基于 Zustand 的搜索状态管理钩子,为 Search 组件提供完整的状态管理能力。它支持多种搜索模式(标准模式、嵌入式模式),管理搜索关键词、搜索结果、加载状态、错误处理等功能。如果自定义组件能力不能支持您的业务,可以使用 SearchState 实现您的需求。
|
|
732
|
-
|
|
733
|
-
#### 数据
|
|
734
|
-
<table>
|
|
735
|
-
<tr>
|
|
736
|
-
<td rowspan="1" colSpan="1" >属性名</td>
|
|
737
|
-
|
|
738
|
-
<td rowspan="1" colSpan="1" >类型</td>
|
|
739
|
-
|
|
740
|
-
<td rowspan="1" colSpan="1" >说明</td>
|
|
741
|
-
</tr>
|
|
742
|
-
|
|
743
|
-
<tr>
|
|
744
|
-
<td rowspan="1" colSpan="1" >keyword</td>
|
|
745
|
-
|
|
746
|
-
<td rowspan="1" colSpan="1" >`string`</td>
|
|
747
|
-
|
|
748
|
-
<td rowspan="1" colSpan="1" >当前搜索关键词</td>
|
|
749
|
-
</tr>
|
|
750
|
-
|
|
751
|
-
<tr>
|
|
752
|
-
<td rowspan="1" colSpan="1" >results</td>
|
|
753
|
-
|
|
754
|
-
<td rowspan="1" colSpan="1" >`Map<SearchType, SearchResult<SearchType>>`</td>
|
|
755
|
-
|
|
756
|
-
<td rowspan="1" colSpan="1" >搜索结果集合</td>
|
|
757
|
-
</tr>
|
|
758
|
-
|
|
759
|
-
<tr>
|
|
760
|
-
<td rowspan="1" colSpan="1" >isLoading</td>
|
|
761
|
-
|
|
762
|
-
<td rowspan="1" colSpan="1" >`boolean`</td>
|
|
763
|
-
|
|
764
|
-
<td rowspan="1" colSpan="1" >是否正在搜索</td>
|
|
765
|
-
</tr>
|
|
766
|
-
|
|
767
|
-
<tr>
|
|
768
|
-
<td rowspan="1" colSpan="1" >error</td>
|
|
769
|
-
|
|
770
|
-
<td rowspan="1" colSpan="1" >`Error \| null`</td>
|
|
771
|
-
|
|
772
|
-
<td rowspan="1" colSpan="1" >搜索错误信息</td>
|
|
773
|
-
</tr>
|
|
774
|
-
|
|
775
|
-
<tr>
|
|
776
|
-
<td rowspan="1" colSpan="1" >searchAdvancedParams</td>
|
|
777
|
-
|
|
778
|
-
<td rowspan="1" colSpan="1" >`Map<ISearchType, SearchParamsMap[SearchType]>`</td>
|
|
779
|
-
|
|
780
|
-
<td rowspan="1" colSpan="1" >高级搜索参数</td>
|
|
781
|
-
</tr>
|
|
782
|
-
|
|
783
|
-
<tr>
|
|
784
|
-
<td rowspan="1" colSpan="1" >selectedSearchType</td>
|
|
785
|
-
|
|
786
|
-
<td rowspan="1" colSpan="1" >`SearchType \| 'all'`</td>
|
|
787
|
-
|
|
788
|
-
<td rowspan="1" colSpan="1" >当前选中的搜索类型</td>
|
|
789
|
-
</tr>
|
|
790
|
-
</table>
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
#### 操作方法
|
|
794
|
-
<table>
|
|
795
|
-
<tr>
|
|
796
|
-
<td rowspan="1" colSpan="1" >方法名</td>
|
|
797
|
-
|
|
798
|
-
<td rowspan="1" colSpan="1" >类型</td>
|
|
799
|
-
|
|
800
|
-
<td rowspan="1" colSpan="1" >说明</td>
|
|
801
|
-
</tr>
|
|
802
|
-
|
|
803
|
-
<tr>
|
|
804
|
-
<td rowspan="1" colSpan="1" >setKeyword</td>
|
|
805
|
-
|
|
806
|
-
<td rowspan="1" colSpan="1" >`(k: string) => void`</td>
|
|
807
|
-
|
|
808
|
-
<td rowspan="1" colSpan="1" >设置搜索关键词</td>
|
|
809
|
-
</tr>
|
|
810
|
-
|
|
811
|
-
<tr>
|
|
812
|
-
<td rowspan="1" colSpan="1" >loadMore</td>
|
|
813
|
-
|
|
814
|
-
<td rowspan="1" colSpan="1" >`(type?: SearchType) => Promise<void>`</td>
|
|
815
|
-
|
|
816
|
-
<td rowspan="1" colSpan="1" >加载更多搜索结果</td>
|
|
817
|
-
</tr>
|
|
818
|
-
|
|
819
|
-
<tr>
|
|
820
|
-
<td rowspan="1" colSpan="1" >setSelectedType</td>
|
|
821
|
-
|
|
822
|
-
<td rowspan="1" colSpan="1" >`(type: SearchType \| 'all') => void`</td>
|
|
823
|
-
|
|
824
|
-
<td rowspan="1" colSpan="1" >设置搜索类型</td>
|
|
825
|
-
</tr>
|
|
826
|
-
|
|
827
|
-
<tr>
|
|
828
|
-
<td rowspan="1" colSpan="1" >setSearchMessageAdvancedParams</td>
|
|
829
|
-
|
|
830
|
-
<td rowspan="1" colSpan="1" >`(params: SearchCloudMessagesParams) => void`</td>
|
|
831
|
-
|
|
832
|
-
<td rowspan="1" colSpan="1" >设置消息搜索高级参数</td>
|
|
833
|
-
</tr>
|
|
834
|
-
|
|
835
|
-
<tr>
|
|
836
|
-
<td rowspan="1" colSpan="1" >setSearchUserAdvancedParams</td>
|
|
837
|
-
|
|
838
|
-
<td rowspan="1" colSpan="1" >`(params: SearchCloudUsersParams) => void`</td>
|
|
839
|
-
|
|
840
|
-
<td rowspan="1" colSpan="1" >设置用户搜索高级参数</td>
|
|
841
|
-
</tr>
|
|
842
|
-
|
|
843
|
-
<tr>
|
|
844
|
-
<td rowspan="1" colSpan="1" >setSearchGroupAdvancedParams</td>
|
|
845
|
-
|
|
846
|
-
<td rowspan="1" colSpan="1" >`(params: SearchCloudGroupsParams) => void`</td>
|
|
847
|
-
|
|
848
|
-
<td rowspan="1" colSpan="1" >设置群组搜索高级参数</td>
|
|
849
|
-
</tr>
|
|
850
|
-
</table>
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
## 使用示例
|
|
854
|
-
``` typescript
|
|
855
|
-
import { useSearchState, VariantType } from '@tencentcloud/chat-uikit-react';
|
|
856
|
-
const {
|
|
857
|
-
keyword,
|
|
858
|
-
results,
|
|
859
|
-
isLoading,
|
|
860
|
-
error,
|
|
861
|
-
setKeyword,
|
|
862
|
-
setSelectedType,
|
|
863
|
-
loadMore
|
|
864
|
-
} = useSearchState(VariantType.STANDARD);
|
|
865
|
-
|
|
866
|
-
```
|
|
867
|
-
|
|
868
|
-
## 常见问题
|
|
869
|
-
|
|
870
|
-
### Q: 如何自定义搜索结果的显示格式?
|
|
871
|
-
|
|
872
|
-
A: 使用 `SearchResultItem` 属性传入自定义组件。
|
|
873
|
-
|
|
874
|
-
### Q: 如何处理搜索性能问题?
|
|
875
|
-
|
|
876
|
-
A: 调整 `debounceTime`,使用 React.memo,考虑结果缓存。
|
|
877
|
-
|
|
878
|
-
### Q: 移动端如何优化?
|
|
879
|
-
|
|
880
|
-
A: 组件自动适配移动端,也可通过 CSS 进一步定制。
|
|
881
|
-
|
|
882
|
-
### Q: 如何支持多语言?
|
|
883
|
-
|
|
884
|
-
A: 组件内置国际化支持,通过 `useUIKit` 获取翻译。
|
|
885
|
-
|