@tencentcloud/sdk-mcp 1.0.6 → 1.0.8
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 +7 -8
- package/index.js.map +1 -1
- package/libs/lib-generate-test-usersig-es.min.d.ts +6 -0
- package/libs/lib-generate-test-usersig-es.min.js +2 -0
- package/package.json +2 -1
- package/resource/doc/chatuikit/react/components/avatar.md +105 -0
- package/resource/doc/chatuikit/react/components/chat.md +38 -0
- package/resource/doc/chatuikit/react/components/chatheader.md +153 -0
- package/resource/doc/chatuikit/react/components/component-list.md +36 -0
- package/resource/doc/chatuikit/react/components/conversation-list.md +765 -0
- package/resource/doc/chatuikit/react/components/message-input.md +799 -0
- package/resource/doc/chatuikit/react/components/message-list.md +385 -0
- package/resource/doc/chatuikit/react/components/tuikit.md +64 -0
- package/resource/doc/chatuikit/react/integration.md +68 -0
- package/resource/doc/chatuikit/react/login.md +25 -0
- package/resource/doc/chatuikit/vue/components/MessageInput.md +546 -0
- package/resource/doc/chatuikit/vue/components/avatar.md +105 -0
- package/resource/doc/chatuikit/vue/components/chat.md +38 -0
- package/resource/doc/chatuikit/vue/components/chatheader.md +153 -0
- package/resource/doc/chatuikit/vue/components/component-list.md +90 -0
- package/resource/doc/chatuikit/vue/components/conversation-list.md +590 -0
- package/resource/doc/chatuikit/vue/components/login.md +29 -0
- package/resource/doc/chatuikit/vue/components/message-input.md +546 -0
- package/resource/doc/chatuikit/vue/components/message-list.md +548 -0
- package/resource/doc/chatuikit/vue/components/tuikit.md +110 -0
- package/resource/doc/chatuikit/vue/components/userpicker.md +256 -0
- package/resource/doc/chatuikit/vue/integration.md +218 -0
- package/resource/doc/chatuikit/vue/login.md +29 -0
- package/resource/doc/chatuikit/vue3/components/MessageInput.md +546 -0
- package/resource/doc/chatuikit/vue3/components/MessageList.md +385 -0
- package/resource/doc/chatuikit/vue3/components/avatar.md +105 -0
- package/resource/doc/chatuikit/vue3/components/chatheader.md +153 -0
- package/resource/doc/chatuikit/vue3/components/component-list.md +88 -0
- package/resource/doc/chatuikit/vue3/components/userpicker.md +256 -0
- package/resource/doc/chatuikit/vue3/integration.md +218 -0
- package/server.js +10 -181
- package/server.js.map +1 -1
- package/{streamableHttp.js → streamable-http.js} +8 -13
- package/streamable-http.js.map +1 -0
- package/tools/call/get-call-faq.js +31 -0
- package/tools/call/get-call-faq.js.map +1 -0
- package/tools/call/get-native-call-integration-guide.js +35 -0
- package/tools/call/get-native-call-integration-guide.js.map +1 -0
- package/tools/call/get-native-call-integration.js +35 -0
- package/tools/call/get-native-call-integration.js.map +1 -0
- package/tools/call/get-web-call-integration-guide.js +34 -0
- package/tools/call/get-web-call-integration-guide.js.map +1 -0
- package/tools/call/get-web-call-integration.js +34 -0
- package/tools/call/get-web-call-integration.js.map +1 -0
- package/tools/chat/get-chat-faq.js +31 -0
- package/tools/chat/get-chat-faq.js.map +1 -0
- package/tools/chat/get-native-chat-integration-guide.js +33 -0
- package/tools/chat/get-native-chat-integration-guide.js.map +1 -0
- package/tools/chat/get-native-chat-integration.js +33 -0
- package/tools/chat/get-native-chat-integration.js.map +1 -0
- package/tools/chat/get-web-chat-component-detail.js +36 -0
- package/tools/chat/get-web-chat-component-detail.js.map +1 -0
- package/tools/chat/get-web-chat-integration-guide.js +42 -0
- package/tools/chat/get-web-chat-integration-guide.js.map +1 -0
- package/tools/chat/get-web-chat-integration.js +36 -0
- package/tools/chat/get-web-chat-integration.js.map +1 -0
- package/tools/chat/get-web-chat-uikit-login.js +30 -0
- package/tools/chat/get-web-chat-uikit-login.js.map +1 -0
- package/tools/common/get-usersig.js +35 -0
- package/tools/common/get-usersig.js.map +1 -0
- package/tools/common/present-framework-choice.js +32 -0
- package/tools/common/present-framework-choice.js.map +1 -0
- package/tools/common/record-prompt.js +31 -0
- package/tools/common/record-prompt.js.map +1 -0
- package/tools/common/record-result.js +35 -0
- package/tools/common/record-result.js.map +1 -0
- package/tools/index.js +39 -0
- package/tools/index.js.map +1 -0
- package/tools/rtcengine/get-rtcengine-integration-guide.js +32 -0
- package/tools/rtcengine/get-rtcengine-integration-guide.js.map +1 -0
- package/tools/rtcengine/get-rtcenigne-faq.js +31 -0
- package/tools/rtcengine/get-rtcenigne-faq.js.map +1 -0
- package/utils/aegis-client.js +8 -0
- package/utils/aegis-client.js.map +1 -0
- package/utils/generate-usersig.js +14 -0
- package/utils/generate-usersig.js.map +1 -0
- package/utils/get-doc-content.js +46 -0
- package/utils/get-doc-content.js.map +1 -0
- package/utils/handle-component-name.js +12 -0
- package/utils/handle-component-name.js.map +1 -0
- package/utils/handle-framework.js +9 -0
- package/utils/handle-framework.js.map +1 -0
- package/resource/doc/chatuikit/react/integrate_tuichat_only_react.md +0 -185
- package/resource/doc/chatuikit/react/integrate_tuichat_react.md +0 -212
- package/resource/doc/chatuikit/vue/integrate_tuichat_only_vue.md +0 -149
- package/resource/doc/chatuikit/vue/integrate_tuichat_vue.md +0 -248
- package/streamableHttp.js.map +0 -1
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/CHANGELOG.md +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/LICENSE +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/README.md +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/aegis.min.js +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/constant/config.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/constant/global.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/constant/index.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/constant/report-ignore.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/core.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/hooks/afterRequestHooks.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/hooks/beforeRequestHooks.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/hooks/modifyRequestHooks.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/index.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/interface/config.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/interface/env.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/interface/index.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/interface/log.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/interface/send.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/format.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/index.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/length-limit.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/pv.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/remove-payload.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/repeat-limit.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/report.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/sample.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/throttle.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/trace/index.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/trace/jwt.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/trace/ot-js.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/trace/uuid.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/whitelist.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/write-before.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/plugin.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/polyfill.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/util/destroy.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/util/event-emitter.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/util/index.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/node-sdk/src/index.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/node-sdk/src/interface/selector.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/node-sdk/src/pipes/batch-report-pipe.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/node-sdk/src/protocol/protocol_base.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/node-sdk/src/protocol/protocol_http.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/node-sdk/src/selector/ip_selector.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/node-sdk/src/selector/polaris_selector.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/node-sdk/src/selector/selector_base.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/node-sdk/src/util/eval_require.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/package.json +0 -0
- /package/{@tencent → libs/@tencent}/polaris/README.md +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/consumer/health.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/consumer/health.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/consumer/health.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/consumer/index.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/consumer/index.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/consumer/index.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/consumer/monitor.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/consumer/monitor.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/consumer/monitor.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/consumer/selector.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/consumer/selector.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/consumer/selector.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/errors.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/errors.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/errors.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/global.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/global.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/global.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/index.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/index.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/index.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/instance.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/instance.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/instance.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/bucket.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/bucket.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/bucket.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/index.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/index.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/index.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimit.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimit.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimit.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/base.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/base.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/base.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/global.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/global.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/global.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/index.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/index.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/index.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/local.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/local.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/local.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/location.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/location.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/location.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/logging.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/logging.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/logging.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/metadata.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/metadata.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/metadata.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/breaker/polaris.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/breaker/polaris.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/breaker/polaris.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/base.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/base.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/base.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/edf.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/edf.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/edf.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/hashring.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/hashring.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/hashring.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/sticky.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/sticky.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/sticky.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/swrr.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/swrr.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/swrr.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/wr.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/wr.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/wr.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/wrr.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/wrr.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/wrr.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/logging/console.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/logging/console.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/logging/console.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/local-server/index.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/local-server/index.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/local-server/index.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/base.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/base.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/base.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/discover.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/discover.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/discover.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/index.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/index.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/index.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/monitor.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/monitor.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/monitor.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/ratelimit.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/ratelimit.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/ratelimit.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/grpc/bidi.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/grpc/bidi.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/grpc/bidi.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/grpc/index.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/grpc/index.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/grpc/index.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/grpc/pb/discover.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/grpc/pb/monitor.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/grpc/pb/ratelimit.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/http/index.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/http/index.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/http/index.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/discover-pb/api.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/discover-pb/client.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/discover-pb/model.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/discover-pb/ratelimit.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/discover-pb/request.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/discover-pb/response.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/discover-pb/routing.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/discover-pb/service.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/discover-pb/types.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/index.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/index.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/index.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/monitor-pb/api.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/monitor-pb/circuitbreak.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/monitor-pb/request.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/monitor-pb/response.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/monitor-pb/sdkcache.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/monitor-pb/sdkconfiguration.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/monitor-pb/sdktoken.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/monitor-pb/types.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/pool.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/pool.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/pool.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/ratelimit-pb/api.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/ratelimit-pb/ratelimit.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/ratelimit-pb/types.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/rules.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/rules.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/rules.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/types.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/types.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/types.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/utils.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/utils.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/utils.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/registry/memory.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/registry/memory.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/registry/memory.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/polaris/nearby.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/polaris/nearby.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/polaris/nearby.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/polaris/rule.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/polaris/rule.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/polaris/rule.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/trpc/canary.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/trpc/canary.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/trpc/canary.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/trpc/env.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/trpc/env.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/trpc/env.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/trpc/set.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/trpc/set.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/trpc/set.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/shaping/unirate.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/shaping/unirate.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/shaping/unirate.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/shaping/warmup.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/shaping/warmup.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/shaping/warmup.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/weight/polaris.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/weight/polaris.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/weight/polaris.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/polaris.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/polaris.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/polaris.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/provider/index.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/provider/index.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/provider/index.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/registry.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/registry.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/registry.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/rules.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/rules.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/rules.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/scripts/postinstall.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/scripts/postinstall.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/scripts/postinstall.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/service.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/service.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/service.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/skeleton.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/skeleton.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/skeleton.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/utils.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/utils.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/utils.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/weak.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/weak.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/weak.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/package.json +0 -0
- /package/resource/doc/chatuikit/{iOS → ios}/client_api_iOS.md +0 -0
- /package/resource/doc/chatuikit/{iOS → ios}/integrate_tuichat_only_iOS.md +0 -0
- /package/resource/doc/chatuikit/{iOS → ios}/integrate_tuikit_iOS.md +0 -0
- /package/resource/doc/chatuikit/{iOS → ios}/ui_api_iOS.md +0 -0
- /package/resource/doc/tuicallkit/{iOS → ios}/api_TUICallKit.md +0 -0
- /package/resource/doc/tuicallkit/{iOS → ios}/api_TUICallObserver.md +0 -0
- /package/resource/doc/tuicallkit/{iOS → ios}/how_to_integrated_iOS_callkit.md +0 -0
- /package/resource/doc/tuicallkit/{iOS → ios}/how_to_run_iOS_callkit_demo.md +0 -0
|
@@ -0,0 +1,546 @@
|
|
|
1
|
+
## 概述
|
|
2
|
+
|
|
3
|
+
MessageInput 是一个功能完整的消息输入组件,专为 Vue3 应用设计,提供了文本编辑、表情选择、文件附件、发送按钮等核心聊天输入功能。该组件支持丰富的自定义选项,包括输入行为配置、工具栏定制、组件替换和插槽扩展,能够满足不同聊天场景的个性化需求。
|
|
4
|
+
|
|
5
|
+
## 基础用法
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
<script>
|
|
9
|
+
import { MessageInput } from "@tencentcloud/chat-uikit-vue3";
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<template>
|
|
13
|
+
<MessageInput />
|
|
14
|
+
</template>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Props 配置
|
|
18
|
+
|
|
19
|
+
| 字段 | 类型 | 默认值 | 描述 |
|
|
20
|
+
|------|------|--------|------|
|
|
21
|
+
| autoFocus | boolean | true | 是否自动聚焦到输入框 |
|
|
22
|
+
| disabled | boolean | false | 是否禁用输入组件 |
|
|
23
|
+
| hideSendButton | boolean | false | 是否隐藏发送按钮 |
|
|
24
|
+
| placeholder | string | '' | 输入框占位符文本 |
|
|
25
|
+
| attachmentPickerMode | 'collapsed' \| 'expanded' | 'collapsed' | 附件选择器显示模式 |
|
|
26
|
+
| actions | MessageInputActions | ['EmojiPicker', 'ImagePicker', 'FilePicker', 'VideoPicker'] | 工具栏操作按钮配置 |
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
## Slots 配置
|
|
30
|
+
|
|
31
|
+
| 字段 | 类型 | 默认值 | 描述 |
|
|
32
|
+
|------|------|--------|------|
|
|
33
|
+
| headerToolbar | () => VNode[] | undefined | 头部工具栏插槽 |
|
|
34
|
+
| footerToolbar | () => VNode[] | undefined | 底部工具栏插槽 |
|
|
35
|
+
| leftInline | () => VNode[] | undefined | 左侧内联插槽 |
|
|
36
|
+
| rightInline | () => VNode[] | undefined | 右侧内联插槽 |
|
|
37
|
+
| inputPrefix | () => VNode[] | undefined | 输入框前缀插槽 |
|
|
38
|
+
| inputSuffix | () => VNode[] | undefined | 输入框后缀插槽 |
|
|
39
|
+
| TextEditor | Component \| null | null | 自定义文本编辑器组件配置 |
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
### 类型定义
|
|
43
|
+
``` typescript
|
|
44
|
+
type BuiltInAction =
|
|
45
|
+
| 'EmojiPicker'
|
|
46
|
+
| 'ImagePicker'
|
|
47
|
+
| 'FilePicker'
|
|
48
|
+
| 'VideoPicker'
|
|
49
|
+
| 'AttachmentPicker';
|
|
50
|
+
|
|
51
|
+
export type CustomAction = {
|
|
52
|
+
key: string;
|
|
53
|
+
label?: string | undefined;
|
|
54
|
+
component?: Component | undefined;
|
|
55
|
+
className?: string | undefined;
|
|
56
|
+
style?: CSSProperties | undefined;
|
|
57
|
+
iconSize?: number | undefined;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export type MessageInputActions = Array<BuiltInAction | CustomAction>;
|
|
61
|
+
|
|
62
|
+
export type MessageInputAttachmentPickerMode = 'collapsed' | 'expanded';
|
|
63
|
+
|
|
64
|
+
export interface MessageInputSlots {
|
|
65
|
+
headerToolbar?: () => VNode[];
|
|
66
|
+
footerToolbar?: () => VNode[];
|
|
67
|
+
leftInline?: () => VNode[];
|
|
68
|
+
rightInline?: () => VNode[];
|
|
69
|
+
inputPrefix?: () => VNode[];
|
|
70
|
+
inputSuffix?: () => VNode[];
|
|
71
|
+
textEditor?: () => VNode[];
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// MessageInputProps 接口定义
|
|
75
|
+
export interface MessageInputProps {
|
|
76
|
+
autoFocus?: boolean;
|
|
77
|
+
disabled?: boolean;
|
|
78
|
+
hideSendButton?: boolean;
|
|
79
|
+
placeholder?: string;
|
|
80
|
+
attachmentPickerMode?: MessageInputAttachmentPickerMode;
|
|
81
|
+
actions?: MessageInputActions;
|
|
82
|
+
slots?: MessageInputSlots;
|
|
83
|
+
TextEditor?: Component | null;
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## 自定义功能详解
|
|
88
|
+
|
|
89
|
+
### autoFocus
|
|
90
|
+
- 类型:boolean
|
|
91
|
+
|
|
92
|
+
- 详细说明:autoFocus 用于设置是否在组件挂载时自动聚焦到输入框,默认值为 `true`。
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
### disabled
|
|
96
|
+
- 类型:boolean
|
|
97
|
+
|
|
98
|
+
- 详细说明:disabled 用于设置是否禁用整个输入组件,包括文本输入和所有操作按钮,默认值为 `false`。
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
### hideSendButton
|
|
102
|
+
- 类型:boolean
|
|
103
|
+
|
|
104
|
+
- 详细说明:hideSendButton 用于设置是否隐藏发送按钮,适用于需要自定义发送触发方式的场景,默认值为 `false`。
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
### placeholder
|
|
108
|
+
- 类型:string
|
|
109
|
+
|
|
110
|
+
- 详细说明:placeholder 用于设置输入框的占位符文本,默认值为空字符串。
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
### attachmentPickerMode
|
|
114
|
+
- 类型:'collapsed' | 'expanded'
|
|
115
|
+
|
|
116
|
+
- 详细说明:attachmentPickerMode 用于设置附件选择器的显示模式,默认值为 `'collapsed'`。
|
|
117
|
+
|
|
118
|
+
- **collapsed**:收起模式,点击后展开选项。
|
|
119
|
+
|
|
120
|
+
- **expanded**:展开模式,直接显示所有选项。
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
### actions
|
|
124
|
+
- 类型:MessageInputActions
|
|
125
|
+
|
|
126
|
+
- 详细说明:actions 用于配置工具栏中显示的操作按钮,默认值为 `['EmojiPicker', 'ImagePicker', 'FilePicker', 'VideoPicker']`。
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
#### 示例1:自定义工具栏按钮顺序
|
|
130
|
+
``` typescript
|
|
131
|
+
<template>
|
|
132
|
+
<MessageInput :actions="customActions" />
|
|
133
|
+
</template>
|
|
134
|
+
|
|
135
|
+
<script lang="ts" setup>
|
|
136
|
+
import { MessageInput } from '@tencentcloud/uikit-component-vue3';
|
|
137
|
+
|
|
138
|
+
// 自定义按钮顺序:文件、图片、视频、表情
|
|
139
|
+
const customActions = ['FilePicker', 'ImagePicker', 'VideoPicker', 'EmojiPicker'];
|
|
140
|
+
</script>
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
#### 示例2:添加自定义操作按钮
|
|
144
|
+
``` typescript
|
|
145
|
+
<template>
|
|
146
|
+
<MessageInput :actions="customActions" />
|
|
147
|
+
</template>
|
|
148
|
+
|
|
149
|
+
<script lang="ts" setup>
|
|
150
|
+
import { defineComponent, h } from 'vue';
|
|
151
|
+
import { MessageInput } from '@tencentcloud/uikit-component-vue3';
|
|
152
|
+
|
|
153
|
+
// 自定义位置分享按钮组件
|
|
154
|
+
const LocationPicker = defineComponent({
|
|
155
|
+
name: 'LocationPicker',
|
|
156
|
+
setup() {
|
|
157
|
+
const handleLocationShare = () => {
|
|
158
|
+
// 获取用户位置并发送
|
|
159
|
+
if (navigator.geolocation) {
|
|
160
|
+
navigator.geolocation.getCurrentPosition((position) => {
|
|
161
|
+
const { latitude, longitude } = position.coords;
|
|
162
|
+
console.log(`分享位置: ${latitude}, ${longitude}`);
|
|
163
|
+
alert(`分享位置: ${latitude}, ${longitude}`); // For demonstration
|
|
164
|
+
});
|
|
165
|
+
} else {
|
|
166
|
+
alert('浏览器不支持地理定位。');
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
return () =>
|
|
171
|
+
h('button',
|
|
172
|
+
{
|
|
173
|
+
onClick: handleLocationShare,
|
|
174
|
+
style: { padding: '4px 8px', border: 'none', background: 'transparent' },
|
|
175
|
+
title: '分享位置',
|
|
176
|
+
},
|
|
177
|
+
'📍',
|
|
178
|
+
);
|
|
179
|
+
},
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
const customActions = [
|
|
183
|
+
'EmojiPicker',
|
|
184
|
+
'ImagePicker',
|
|
185
|
+
{
|
|
186
|
+
key: 'location',
|
|
187
|
+
label: 'Location',
|
|
188
|
+
component: LocationPicker,
|
|
189
|
+
},
|
|
190
|
+
'AttachmentPicker',
|
|
191
|
+
];
|
|
192
|
+
</script>
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
#### 示例3:客服系统快捷回复
|
|
196
|
+
``` typescript
|
|
197
|
+
<template>
|
|
198
|
+
<MessageInput :actions="actions" />
|
|
199
|
+
</template>
|
|
200
|
+
|
|
201
|
+
<script lang="ts" setup>
|
|
202
|
+
import { defineComponent, h, ref } from 'vue';
|
|
203
|
+
import { MessageInput } from '@tencentcloud/uikit-component-vue3';
|
|
204
|
+
import { useMessageInputState } from '@tencentcloud/uikit-component-vue3/src/states/MessageInputState';
|
|
205
|
+
|
|
206
|
+
// 快捷回复组件
|
|
207
|
+
const QuickReplyPicker = defineComponent({
|
|
208
|
+
name: 'QuickReplyPicker',
|
|
209
|
+
setup() {
|
|
210
|
+
const { setContent } = useMessageInputState();
|
|
211
|
+
const showPicker = ref(false);
|
|
212
|
+
|
|
213
|
+
const quickReplies = [
|
|
214
|
+
'您好,很高兴为您服务!',
|
|
215
|
+
'请稍等,我来为您查询...',
|
|
216
|
+
'感谢您的咨询,还有其他问题吗?',
|
|
217
|
+
'问题已为您解决,祝您生活愉快!',
|
|
218
|
+
];
|
|
219
|
+
|
|
220
|
+
const handleQuickReply = (text: string) => {
|
|
221
|
+
setContent(text);
|
|
222
|
+
showPicker.value = false;
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
return () =>
|
|
226
|
+
h('div', { style: { position: 'relative' } }, [
|
|
227
|
+
h('button',
|
|
228
|
+
{
|
|
229
|
+
title: '快捷回复',
|
|
230
|
+
onClick: () => (showPicker.value = !showPicker.value),
|
|
231
|
+
},
|
|
232
|
+
'⚡',
|
|
233
|
+
),
|
|
234
|
+
showPicker.value &&
|
|
235
|
+
h('div',
|
|
236
|
+
{
|
|
237
|
+
style: {
|
|
238
|
+
position: 'absolute',
|
|
239
|
+
bottom: '100%',
|
|
240
|
+
left: 0,
|
|
241
|
+
background: 'white',
|
|
242
|
+
border: '1px solid #ccc',
|
|
243
|
+
borderRadius: '4px',
|
|
244
|
+
padding: '8px',
|
|
245
|
+
minWidth: '200px',
|
|
246
|
+
zIndex: 100, // Ensure it's above other elements
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
quickReplies.map((reply, index) =>
|
|
250
|
+
h('div',
|
|
251
|
+
{
|
|
252
|
+
key: index,
|
|
253
|
+
onClick: () => handleQuickReply(reply),
|
|
254
|
+
style: {
|
|
255
|
+
padding: '4px 8px',
|
|
256
|
+
cursor: 'pointer',
|
|
257
|
+
borderRadius: '2px',
|
|
258
|
+
'&:hover': { backgroundColor: '#f0f0f0' },
|
|
259
|
+
},
|
|
260
|
+
},
|
|
261
|
+
reply,
|
|
262
|
+
),
|
|
263
|
+
),
|
|
264
|
+
),
|
|
265
|
+
]);
|
|
266
|
+
},
|
|
267
|
+
});
|
|
268
|
+
|
|
269
|
+
const actions = [
|
|
270
|
+
{
|
|
271
|
+
key: 'quickReply',
|
|
272
|
+
label: '快捷回复',
|
|
273
|
+
component: QuickReplyPicker,
|
|
274
|
+
},
|
|
275
|
+
'EmojiPicker',
|
|
276
|
+
'FilePicker',
|
|
277
|
+
];
|
|
278
|
+
</script>
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
#### 示例4:自定义表情面板
|
|
283
|
+
``` typescript
|
|
284
|
+
<template>
|
|
285
|
+
<MessageInput :EmojiPicker="CustomEmojiPicker" />
|
|
286
|
+
</template>
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
<script lang="ts" setup>
|
|
290
|
+
import { defineComponent, h, ref } from 'vue';
|
|
291
|
+
import { MessageInput } from '@tencentcloud/uikit-component-vue3';
|
|
292
|
+
import { useMessageInputState } from '@tencentcloud/uikit-component-vue3/src/states/MessageInputState';
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
const CustomEmojiPicker = defineComponent({
|
|
296
|
+
name: 'CustomEmojiPicker',
|
|
297
|
+
setup() {
|
|
298
|
+
const { insertContent } = useMessageInputState();
|
|
299
|
+
const showPicker = ref(false);
|
|
300
|
+
const activeCategory = ref('common');
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
const emojiCategories = {
|
|
304
|
+
'common': ['😀', '😂', '🥰', '😍', '🤔', '😭', '😡', '👍'],
|
|
305
|
+
'hand': ['👋', '🤝', '👏', '🙏', '✌️', '🤞', '🤟', '👌'],
|
|
306
|
+
'animal': ['🐶', '🐱', '🐭', '🐹', '🐰', '🦊', '🐻', '🐼'],
|
|
307
|
+
};
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
const insertEmoji = (emoji: string) => {
|
|
311
|
+
insertContent(emoji);
|
|
312
|
+
showPicker.value = false;
|
|
313
|
+
};
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
return () =>
|
|
317
|
+
h('div', { style: { position: 'relative' } }, [
|
|
318
|
+
h('button',
|
|
319
|
+
{
|
|
320
|
+
onClick: () => (showPicker.value = !showPicker.value),
|
|
321
|
+
style: { border: 'none', background: 'transparent', cursor: 'pointer' },
|
|
322
|
+
},
|
|
323
|
+
'😊',
|
|
324
|
+
),
|
|
325
|
+
showPicker.value &&
|
|
326
|
+
h('div',
|
|
327
|
+
{
|
|
328
|
+
style: {
|
|
329
|
+
position: 'absolute',
|
|
330
|
+
bottom: '100%',
|
|
331
|
+
left: 0,
|
|
332
|
+
background: 'white',
|
|
333
|
+
border: '1px solid #ccc',
|
|
334
|
+
borderRadius: '8px',
|
|
335
|
+
padding: '12px',
|
|
336
|
+
width: '280px',
|
|
337
|
+
boxShadow: '0 4px 12px rgba(0,0,0,0.1)',
|
|
338
|
+
zIndex: 100, // Ensure it's above other elements
|
|
339
|
+
},
|
|
340
|
+
},
|
|
341
|
+
[
|
|
342
|
+
// 分类标签
|
|
343
|
+
h('div', { style: { display: 'flex', marginBottom: '8px' } },
|
|
344
|
+
Object.keys(emojiCategories).map((category) =>
|
|
345
|
+
h('button',
|
|
346
|
+
{
|
|
347
|
+
key: category,
|
|
348
|
+
onClick: () => (activeCategory.value = category),
|
|
349
|
+
style: {
|
|
350
|
+
padding: '4px 8px',
|
|
351
|
+
border: 'none',
|
|
352
|
+
background: activeCategory.value === category ? '#1890ff' : 'transparent',
|
|
353
|
+
color: activeCategory.value === category ? 'white' : '#666',
|
|
354
|
+
borderRadius: '4px',
|
|
355
|
+
cursor: 'pointer',
|
|
356
|
+
fontSize: '12px',
|
|
357
|
+
},
|
|
358
|
+
},
|
|
359
|
+
category,
|
|
360
|
+
),
|
|
361
|
+
),
|
|
362
|
+
),
|
|
363
|
+
// 表情网格
|
|
364
|
+
h('div',
|
|
365
|
+
{
|
|
366
|
+
style: {
|
|
367
|
+
display: 'grid',
|
|
368
|
+
gridTemplateColumns: 'repeat(8, 1fr)',
|
|
369
|
+
gap: '4px',
|
|
370
|
+
},
|
|
371
|
+
},
|
|
372
|
+
emojiCategories[activeCategory.value].map((emoji) =>
|
|
373
|
+
h('button',
|
|
374
|
+
{
|
|
375
|
+
key: emoji,
|
|
376
|
+
onClick: () => insertEmoji(emoji),
|
|
377
|
+
style: {
|
|
378
|
+
border: 'none',
|
|
379
|
+
background: 'transparent',
|
|
380
|
+
fontSize: '20px',
|
|
381
|
+
cursor: 'pointer',
|
|
382
|
+
padding: '4px',
|
|
383
|
+
borderRadius: '4px',
|
|
384
|
+
},
|
|
385
|
+
},
|
|
386
|
+
emoji,
|
|
387
|
+
),
|
|
388
|
+
),
|
|
389
|
+
),
|
|
390
|
+
],
|
|
391
|
+
),
|
|
392
|
+
]);
|
|
393
|
+
},
|
|
394
|
+
});
|
|
395
|
+
</script>
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
## Slots 详解
|
|
399
|
+
- 类型:MessageInputSlots
|
|
400
|
+
|
|
401
|
+
- 详细说明:用于在输入组件的特定位置插入自定义内容。
|
|
402
|
+
|
|
403
|
+
``` typescript
|
|
404
|
+
interface MessageInputSlots {
|
|
405
|
+
headerToolbar?: () => VNode[];
|
|
406
|
+
footerToolbar?: () => VNode[];
|
|
407
|
+
leftInline?: () => VNode[];
|
|
408
|
+
rightInline?: () => VNode[];
|
|
409
|
+
inputPrefix?: () => VNode[];
|
|
410
|
+
inputSuffix?: () => VNode[];
|
|
411
|
+
textEditor?: () => VNode[];
|
|
412
|
+
}
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
#### 示例1:自定义 footerToolbar 插槽
|
|
417
|
+
``` typescript
|
|
418
|
+
<template>
|
|
419
|
+
<MessageInput>
|
|
420
|
+
<template #footerToolbar>
|
|
421
|
+
<div style="padding: 4px 12px; font-size: 12px; color: #999; text-align: right;">
|
|
422
|
+
press Ctrl+Enter to wrap
|
|
423
|
+
</div>
|
|
424
|
+
</template>
|
|
425
|
+
</MessageInput>
|
|
426
|
+
</template>
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
#### 示例2:输入框前后缀功能
|
|
431
|
+
``` typescript
|
|
432
|
+
<template>
|
|
433
|
+
<MessageInput>
|
|
434
|
+
<template #inputPrefix>
|
|
435
|
+
|
|
436
|
+
</template>
|
|
437
|
+
<template #inputSuffix>
|
|
438
|
+
<button
|
|
439
|
+
style="border: none; background: transparent; cursor: pointer;"
|
|
440
|
+
@click="handleVoiceInput"
|
|
441
|
+
>
|
|
442
|
+
🎤
|
|
443
|
+
</button>
|
|
444
|
+
</template>
|
|
445
|
+
</MessageInput>
|
|
446
|
+
</template>
|
|
447
|
+
|
|
448
|
+
<script lang="ts" setup>
|
|
449
|
+
import { MessageInput } from '@tencentcloud/uikit-component-vue3';
|
|
450
|
+
|
|
451
|
+
const handleAtUser = () => {
|
|
452
|
+
// 触发@用户选择
|
|
453
|
+
console.log('打开@用户选择');
|
|
454
|
+
};
|
|
455
|
+
|
|
456
|
+
const handleVoiceInput = () => {
|
|
457
|
+
// 开始语音输入
|
|
458
|
+
console.log('开始语音输入');
|
|
459
|
+
};
|
|
460
|
+
</script>
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
### TextEditor
|
|
465
|
+
|
|
466
|
+
类型:Component | null
|
|
467
|
+
|
|
468
|
+
详细说明:TextEditor 用于替换默认的文本编辑器组件,默认值为 `null`。
|
|
469
|
+
|
|
470
|
+
#### 示例:自定义文本编辑器
|
|
471
|
+
``` typescript
|
|
472
|
+
<template>
|
|
473
|
+
<MessageInput>
|
|
474
|
+
<template #textEditor>
|
|
475
|
+
<RichTextEditor />
|
|
476
|
+
</template>
|
|
477
|
+
</MessageInput>
|
|
478
|
+
</template>
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
<script lang="ts" setup>
|
|
482
|
+
import { defineComponent, h, ref, onMounted } from 'vue';
|
|
483
|
+
import { MessageInput } from '@tencentcloud/uikit-component-vue3';
|
|
484
|
+
import { useMessageInputState } from '@tencentcloud/uikit-component-vue3/src/states/MessageInputState';
|
|
485
|
+
|
|
486
|
+
|
|
487
|
+
const RichTextEditor = defineComponent({
|
|
488
|
+
name: 'RichTextEditor',
|
|
489
|
+
setup() {
|
|
490
|
+
const { sendMessage } = useMessageInputState();
|
|
491
|
+
const editorRef = ref<HTMLDivElement | null>(null);
|
|
492
|
+
const inputRawValue = ref('');
|
|
493
|
+
|
|
494
|
+
const handleInput = (e: Event) => {
|
|
495
|
+
const target = e.target as HTMLDivElement;
|
|
496
|
+
inputRawValue.value = (e.target as HTMLDivElement).textContent || '';
|
|
497
|
+
};
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
const handleKeyDown = (e: KeyboardEvent) => {
|
|
501
|
+
if (e.key === 'Enter') {
|
|
502
|
+
sendMessage(inputRawValue.value);
|
|
503
|
+
if (editorRef.value) {
|
|
504
|
+
editorRef.value.textContent = '';
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
};
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
onMounted(() => {
|
|
511
|
+
if (editorRef.value) {
|
|
512
|
+
editorRef.value.textContent = inputRawValue.value || '';
|
|
513
|
+
}
|
|
514
|
+
});
|
|
515
|
+
|
|
516
|
+
return () =>
|
|
517
|
+
h('div',
|
|
518
|
+
{
|
|
519
|
+
style: {
|
|
520
|
+
flex: 1,
|
|
521
|
+
border: '1px solid #d9d9d9',
|
|
522
|
+
borderRadius: '6px',
|
|
523
|
+
padding: '8px 12px',
|
|
524
|
+
minHeight: '32px',
|
|
525
|
+
maxHeight: '120px',
|
|
526
|
+
overflow: 'auto',
|
|
527
|
+
},
|
|
528
|
+
},
|
|
529
|
+
h('div',
|
|
530
|
+
{
|
|
531
|
+
ref: editorRef,
|
|
532
|
+
contentEditable: true,
|
|
533
|
+
style: {
|
|
534
|
+
outline: 'none',
|
|
535
|
+
minHeight: '20px',
|
|
536
|
+
lineHeight: '20px',
|
|
537
|
+
},
|
|
538
|
+
onInput: handleInput,
|
|
539
|
+
onKeydown: handleKeyDown,
|
|
540
|
+
},
|
|
541
|
+
),
|
|
542
|
+
);
|
|
543
|
+
},
|
|
544
|
+
});
|
|
545
|
+
</script>
|
|
546
|
+
```
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# Avatar 组件文档
|
|
2
|
+
|
|
3
|
+
## 概述
|
|
4
|
+
|
|
5
|
+
Avatar 组件用于显示用户头像和状态,支持多种形状和大小的头像展示。它可以用于聊天应用、社交平台、用户管理系统等场景,提供用户身份的可视化表示。
|
|
6
|
+
|
|
7
|
+
## Props 速查表
|
|
8
|
+
|
|
9
|
+
| 字段 | 类型 | 默认值 | 描述 |
|
|
10
|
+
| --- | --- | --- | --- |
|
|
11
|
+
| src | string | undefined | 头像图片的 URL |
|
|
12
|
+
| size | 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs' | number | 'md' | 头像的大小,支持多种预设大小或自定义大小 |
|
|
13
|
+
| shape | 'circular' | 'square' | 'rounded' | 'circular' | 头像的形状,支持圆形、方形和圆角矩形 |
|
|
14
|
+
| alt | string | '' | 图片的替代文本,用于生成文本头像 |
|
|
15
|
+
| children | ReactNode | undefined | 自定义内容,优先于 src 和 alt 的内容 |
|
|
16
|
+
| className | string | undefined | 自定义 CSS 类名 |
|
|
17
|
+
| style | React.CSSProperties | undefined | 自定义样式 |
|
|
18
|
+
| onClick | () => void | undefined | 点击事件处理函数 |
|
|
19
|
+
| isShowOnlineStatus | boolean | false | 是否显示在线状态指示器 |
|
|
20
|
+
| isOnline | boolean | false | 用户是否在线 |
|
|
21
|
+
| unreadCount | number | 0 | 未读消息数量,若为 true 则显示小红点,若为数字则显示具体数量 |
|
|
22
|
+
| maxUnreadCount | number | 99 | 最大未读消息数量,超过则显示 +N |
|
|
23
|
+
| isDotUnreadCount | boolean | false | 是否显示小红点 |
|
|
24
|
+
| children | ReactNode | undefined | 自定义内容,优先于 src 和 alt 的内容 |
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
## Props 详细介绍
|
|
28
|
+
|
|
29
|
+
### `src`
|
|
30
|
+
|
|
31
|
+
`类型`: `string`
|
|
32
|
+
`描述`: 头像图片的 URL,若未提供则显示默认头像。
|
|
33
|
+
`默认值`: `undefined`
|
|
34
|
+
|
|
35
|
+
### `size`
|
|
36
|
+
|
|
37
|
+
`类型`: `'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs' | number`
|
|
38
|
+
`描述`: 头像的大小,支持多种预设大小或自定义大小。
|
|
39
|
+
`默认值`: `'md'`
|
|
40
|
+
|
|
41
|
+
### `shape`
|
|
42
|
+
|
|
43
|
+
`类型`: `'circular' | 'square' | 'rounded'`
|
|
44
|
+
`描述`: 头像的形状,支持圆形、方形和圆角矩形。
|
|
45
|
+
`默认值`: `'circular'`
|
|
46
|
+
|
|
47
|
+
### `alt`
|
|
48
|
+
|
|
49
|
+
`类型`: `string`
|
|
50
|
+
`描述`: 图片的替代文本,用于生成文本头像。
|
|
51
|
+
`默认值`: `''`
|
|
52
|
+
|
|
53
|
+
### `children`
|
|
54
|
+
|
|
55
|
+
`类型`: `ReactNode`
|
|
56
|
+
`描述`: 自定义内容,优先于 src 和 alt 的内容。
|
|
57
|
+
`默认值`: `undefined`
|
|
58
|
+
|
|
59
|
+
### `className`
|
|
60
|
+
|
|
61
|
+
`类型`: `string | undefined`
|
|
62
|
+
`描述`: 自定义 CSS 类名。
|
|
63
|
+
`默认值`: `undefined`
|
|
64
|
+
|
|
65
|
+
### `style`
|
|
66
|
+
|
|
67
|
+
`类型`: `React.CSSProperties | undefined`
|
|
68
|
+
`描述`: 自定义样式。
|
|
69
|
+
`默认值`: `undefined`
|
|
70
|
+
|
|
71
|
+
### `onClick`
|
|
72
|
+
|
|
73
|
+
`类型`: `() => void`
|
|
74
|
+
`描述`: 点击事件处理函数。
|
|
75
|
+
`默认值`: `undefined`
|
|
76
|
+
|
|
77
|
+
### `isShowOnlineStatus`
|
|
78
|
+
|
|
79
|
+
`类型`: `boolean`
|
|
80
|
+
`描述`: 是否显示在线状态指示器。
|
|
81
|
+
`默认值`: `false`
|
|
82
|
+
|
|
83
|
+
### `isOnline`
|
|
84
|
+
|
|
85
|
+
`类型`: `boolean`
|
|
86
|
+
`描述`: 用户是否在线。
|
|
87
|
+
`默认值`: `false`
|
|
88
|
+
|
|
89
|
+
### `unreadCount`
|
|
90
|
+
|
|
91
|
+
`类型`: `number`
|
|
92
|
+
`描述`: 未读消息数量,若为 true 则显示小红点,若为数字则显示具体数量。
|
|
93
|
+
`默认值`: `0`
|
|
94
|
+
|
|
95
|
+
### `maxUnreadCount`
|
|
96
|
+
|
|
97
|
+
`类型`: `number`
|
|
98
|
+
`描述`: 最大未读消息数量,超过则显示 +N。
|
|
99
|
+
`默认值`: `99`
|
|
100
|
+
|
|
101
|
+
### isDotUnreadCount
|
|
102
|
+
|
|
103
|
+
`类型`: `boolean`
|
|
104
|
+
`描述`: 是否显示小红点。
|
|
105
|
+
`默认值`: `false`
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Chat 组件文档
|
|
2
|
+
|
|
3
|
+
## 概述
|
|
4
|
+
|
|
5
|
+
Chat 组件负责渲染聊天界面,包含聊天窗口头部组件 ChatHeader 、消息列表组件 MessageList、 消息输入组件 MessageInput。
|
|
6
|
+
|
|
7
|
+
## 组件构成
|
|
8
|
+
|
|
9
|
+
Chat 组件包含以下内容:
|
|
10
|
+
- **ChatHeader**:聊天窗口头部组件
|
|
11
|
+
|
|
12
|
+
- **MessageList**:消息列表组件,消息列表组件中包含消息操作能力,组件详细的属性需要查阅 MessageList 组件文档。
|
|
13
|
+
|
|
14
|
+
- **MessageInput**:消息输入组件
|
|
15
|
+
|
|
16
|
+
## 基础用法
|
|
17
|
+
|
|
18
|
+
Chat 组件无需任何必需属性即可使用。
|
|
19
|
+
``` typescript
|
|
20
|
+
<template>
|
|
21
|
+
<UIKitProvider>
|
|
22
|
+
<Chat style="flex: 1;">
|
|
23
|
+
<ChatHeader />
|
|
24
|
+
<MessageList />
|
|
25
|
+
<MessageInput />
|
|
26
|
+
</Chat>
|
|
27
|
+
</UIKitProvider>
|
|
28
|
+
</template>
|
|
29
|
+
<script setup lang="ts">
|
|
30
|
+
import {
|
|
31
|
+
UIKitProvider,
|
|
32
|
+
Chat,
|
|
33
|
+
ChatHeader,
|
|
34
|
+
MessageList,
|
|
35
|
+
MessageInput,
|
|
36
|
+
} from '@tencentcloud/chat-uikit-vue3';
|
|
37
|
+
</script>
|
|
38
|
+
```
|