优化页面
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
{"version":3,"file":"index.js","sources":["TUIKit/plugins/plugin-components/index.ts"],"sourcesContent":["import TUIChatEngine, { IMessageModel } from '@tencentcloud/chat-uikit-engine';\nimport { isCustomerServicePluginMessage } from './message-customer/index';\nimport { JSONToObject } from '../../utils/type-check';\n\nexport function isCallMessage(message: IMessageModel): boolean {\n const payloadData = JSONToObject(message?.payload?.data);\n if (payloadData?.businessID === 1 && payloadData?.data) {\n const payloadDataData = JSONToObject(payloadData.data);\n if (payloadDataData.businessID === 'av_call') {\n return true;\n }\n }\n return false;\n}\n\nexport function isRoomSignalingMessage(message: IMessageModel): boolean {\n const payloadData = JSONToObject(message?.payload?.data);\n return (\n payloadData?.businessID === 'ROOM_INVITE_ACTION'\n || payloadData?.businessID === 'tuikit_engine_room'\n );\n}\n\nexport function isRoomCardMessage(message: IMessageModel): boolean {\n const payloadData = JSONToObject(message?.payload?.data);\n return payloadData?.businessID === 'group_room_message';\n}\n\nexport function isPluginMessage(message: IMessageModel): boolean {\n return (\n message.type === TUIChatEngine.TYPES.MSG_CUSTOM\n && (isCallMessage(message)\n || isCustomerServicePluginMessage(message as any)\n || isRoomCardMessage(message)\n || isRoomSignalingMessage(message))\n );\n}\n"],"names":["JSONToObject","TUIChatEngine","isCustomerServicePluginMessage"],"mappings":";;;;AAIO,SAAS,cAAc,SAAiC;;AAC7D,QAAM,cAAcA,uBAAA,cAAa,wCAAS,YAAT,mBAAkB,IAAI;AACvD,OAAI,2CAAa,gBAAe,MAAK,2CAAa,OAAM;AAChD,UAAA,kBAAkBA,uBAAAA,aAAa,YAAY,IAAI;AACjD,QAAA,gBAAgB,eAAe,WAAW;AACrC,aAAA;AAAA,IACT;AAAA,EACF;AACO,SAAA;AACT;AAEO,SAAS,uBAAuB,SAAiC;;AACtE,QAAM,cAAcA,uBAAA,cAAa,wCAAS,YAAT,mBAAkB,IAAI;AACvD,UACE,2CAAa,gBAAe,yBACzB,2CAAa,gBAAe;AAEnC;AAEO,SAAS,kBAAkB,SAAiC;;AACjE,QAAM,cAAcA,uBAAA,cAAa,wCAAS,YAAT,mBAAkB,IAAI;AACvD,UAAO,2CAAa,gBAAe;AACrC;AAEO,SAAS,gBAAgB,SAAiC;AAC/D,SACE,QAAQ,SAASC,cAAAA,GAAc,MAAM,eACjC,cAAc,OAAO,KACtBC,sDAAAA,+BAA+B,OAAc,KAC7C,kBAAkB,OAAO,KACzB,uBAAuB,OAAO;AAErC;;;;"}
|
||||
{"version":3,"file":"index.js","sources":["TUIKit/plugins/plugin-components/index.ts"],"sourcesContent":["import TUIChatEngine, { IMessageModel } from '@tencentcloud/chat-uikit-engine';\r\nimport { isCustomerServicePluginMessage } from './message-customer/index';\r\nimport { JSONToObject } from '../../utils/type-check';\r\n\r\nexport function isCallMessage(message: IMessageModel): boolean {\r\n const payloadData = JSONToObject(message?.payload?.data);\r\n if (payloadData?.businessID === 1 && payloadData?.data) {\r\n const payloadDataData = JSONToObject(payloadData.data);\r\n if (payloadDataData.businessID === 'av_call') {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}\r\n\r\nexport function isRoomSignalingMessage(message: IMessageModel): boolean {\r\n const payloadData = JSONToObject(message?.payload?.data);\r\n return (\r\n payloadData?.businessID === 'ROOM_INVITE_ACTION'\r\n || payloadData?.businessID === 'tuikit_engine_room'\r\n );\r\n}\r\n\r\nexport function isRoomCardMessage(message: IMessageModel): boolean {\r\n const payloadData = JSONToObject(message?.payload?.data);\r\n return payloadData?.businessID === 'group_room_message';\r\n}\r\n\r\nexport function isPluginMessage(message: IMessageModel): boolean {\r\n return (\r\n message.type === TUIChatEngine.TYPES.MSG_CUSTOM\r\n && (isCallMessage(message)\r\n || isCustomerServicePluginMessage(message as any)\r\n || isRoomCardMessage(message)\r\n || isRoomSignalingMessage(message))\r\n );\r\n}\r\n"],"names":["JSONToObject","TUIChatEngine","isCustomerServicePluginMessage"],"mappings":";;;;AAIO,SAAS,cAAc,SAAiC;;AAC7D,QAAM,cAAcA,uBAAA,cAAa,wCAAS,YAAT,mBAAkB,IAAI;AACvD,OAAI,2CAAa,gBAAe,MAAK,2CAAa,OAAM;AAChD,UAAA,kBAAkBA,uBAAAA,aAAa,YAAY,IAAI;AACjD,QAAA,gBAAgB,eAAe,WAAW;AACrC,aAAA;AAAA,IACT;AAAA,EACF;AACO,SAAA;AACT;AAEO,SAAS,uBAAuB,SAAiC;;AACtE,QAAM,cAAcA,uBAAA,cAAa,wCAAS,YAAT,mBAAkB,IAAI;AACvD,UACE,2CAAa,gBAAe,yBACzB,2CAAa,gBAAe;AAEnC;AAEO,SAAS,kBAAkB,SAAiC;;AACjE,QAAM,cAAcA,uBAAA,cAAa,wCAAS,YAAT,mBAAkB,IAAI;AACvD,UAAO,2CAAa,gBAAe;AACrC;AAEO,SAAS,gBAAgB,SAAiC;AAC/D,SACE,QAAQ,SAASC,cAAAA,GAAc,MAAM,eACjC,cAAc,OAAO,KACtBC,sDAAAA,+BAA+B,OAAc,KAC7C,kBAAkB,OAAO,KACzB,uBAAuB,OAAO;AAErC;;;;"}
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
{"version":3,"file":"message-call-group.js","sources":["TUIKit/plugins/plugin-components/message-call/message-call-group.vue","/Users/plw/Documents/outsource/tk-mini-program/TUIKit/plugins/plugin-components/message-call/message-call-group.vue?type=component"],"sourcesContent":["<template>\n <div\n v-if=\"isCallMessage && conversationType === TYPES.CONV_GROUP\"\n :class=\"{ 'blink-text': isBlink }\"\n >\n {{ custom }}\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from '../../../adapter-vue';\nimport TUIChatEngine, { IMessageModel } from '@tencentcloud/chat-uikit-engine';\n\ninterface IProps {\n message: IMessageModel;\n signalingInfo: any;\n customContent: any;\n blinkMessageIDList?: string[];\n}\n\nconst props = withDefaults(defineProps<IProps>(), {\n message: () => ({}) as IMessageModel,\n signalingInfo: () => ({}),\n customContent: () => ({}),\n blinkMessageIDList: () => [],\n});\n\nconst TYPES = TUIChatEngine.TYPES;\nconst isCallMessage = computed(() => !!props.signalingInfo);\nconst conversationType = computed(() => props.message?.conversationType);\nconst custom = computed(() => props.customContent?.custom);\n\nconst isBlink = computed(() => {\n if (props.message?.ID) {\n return props.blinkMessageIDList?.includes(props.message.ID);\n }\n return false;\n});\n</script>\n\n<style scoped lang=\"scss\">\n@keyframes blink-text {\n 50% {\n color: #ff9c19;\n }\n}\n\n.blink-text {\n animation: blinkText 1s linear 3;\n}\n</style>\n","import Component from '/Users/plw/Documents/outsource/tk-mini-program/TUIKit/plugins/plugin-components/message-call/message-call-group.vue'\nwx.createComponent(Component)"],"names":["TUIChatEngine","computed"],"mappings":";;;;;;;;;;;;AAoBA,UAAM,QAAQ;AAOd,UAAM,QAAQA,cAAc,GAAA;AAC5B,UAAM,gBAAgBC,cAAAA,SAAS,MAAM,CAAC,CAAC,MAAM,aAAa;AAC1D,UAAM,mBAAmBA,cAAAA,SAAS,MAAA;;AAAM,yBAAM,YAAN,mBAAe;AAAA,KAAgB;AACvE,UAAM,SAASA,cAAAA,SAAS,MAAA;;AAAM,yBAAM,kBAAN,mBAAqB;AAAA,KAAM;AAEnD,UAAA,UAAUA,cAAAA,SAAS,MAAM;;AACzB,WAAA,WAAM,YAAN,mBAAe,IAAI;AACrB,gBAAO,WAAM,uBAAN,mBAA0B,SAAS,MAAM,QAAQ;AAAA,MAC1D;AACO,aAAA;AAAA,IAAA,CACR;;;;;;;;;;;;ACpCD,GAAG,gBAAgB,SAAS;"}
|
||||
{"version":3,"file":"message-call-group.js","sources":["TUIKit/plugins/plugin-components/message-call/message-call-group.vue","../../HBuilderX/plugins/uniapp-cli-vite/uniComponent:/RDov6aG555uuL3RrLW1pbmktcHJvZ3JhbS9UVUlLaXQvcGx1Z2lucy9wbHVnaW4tY29tcG9uZW50cy9tZXNzYWdlLWNhbGwvbWVzc2FnZS1jYWxsLWdyb3VwLnZ1ZQ"],"sourcesContent":["<template>\r\n <div\r\n v-if=\"isCallMessage && conversationType === TYPES.CONV_GROUP\"\r\n :class=\"{ 'blink-text': isBlink }\"\r\n >\r\n {{ custom }}\r\n </div>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { computed } from '../../../adapter-vue';\r\nimport TUIChatEngine, { IMessageModel } from '@tencentcloud/chat-uikit-engine';\r\n\r\ninterface IProps {\r\n message: IMessageModel;\r\n signalingInfo: any;\r\n customContent: any;\r\n blinkMessageIDList?: string[];\r\n}\r\n\r\nconst props = withDefaults(defineProps<IProps>(), {\r\n message: () => ({}) as IMessageModel,\r\n signalingInfo: () => ({}),\r\n customContent: () => ({}),\r\n blinkMessageIDList: () => [],\r\n});\r\n\r\nconst TYPES = TUIChatEngine.TYPES;\r\nconst isCallMessage = computed(() => !!props.signalingInfo);\r\nconst conversationType = computed(() => props.message?.conversationType);\r\nconst custom = computed(() => props.customContent?.custom);\r\n\r\nconst isBlink = computed(() => {\r\n if (props.message?.ID) {\r\n return props.blinkMessageIDList?.includes(props.message.ID);\r\n }\r\n return false;\r\n});\r\n</script>\r\n\r\n<style scoped lang=\"scss\">\r\n@keyframes blink-text {\r\n 50% {\r\n color: #ff9c19;\r\n }\r\n}\r\n\r\n.blink-text {\r\n animation: blinkText 1s linear 3;\r\n}\r\n</style>\r\n","import Component from 'D:/项目/tk-mini-program/TUIKit/plugins/plugin-components/message-call/message-call-group.vue'\nwx.createComponent(Component)"],"names":["TUIChatEngine","computed"],"mappings":";;;;;;;;;;;;AAoBA,UAAM,QAAQ;AAOd,UAAM,QAAQA,cAAc,GAAA;AAC5B,UAAM,gBAAgBC,cAAAA,SAAS,MAAM,CAAC,CAAC,MAAM,aAAa;AAC1D,UAAM,mBAAmBA,cAAAA,SAAS,MAAA;;AAAM,yBAAM,YAAN,mBAAe;AAAA,KAAgB;AACvE,UAAM,SAASA,cAAAA,SAAS,MAAA;;AAAM,yBAAM,kBAAN,mBAAqB;AAAA,KAAM;AAEnD,UAAA,UAAUA,cAAAA,SAAS,MAAM;;AACzB,WAAA,WAAM,YAAN,mBAAe,IAAI;AACrB,gBAAO,WAAM,uBAAN,mBAA0B,SAAS,MAAM,QAAQ;AAAA,MAC1D;AACO,aAAA;AAAA,IAAA,CACR;;;;;;;;;;;;ACpCD,GAAG,gBAAgB,SAAS;"}
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"index.js","sources":["TUIKit/tui-customer-service-plugin/index.ts"],"sourcesContent":["import TUICustomerPluginServer from './server';\nimport { isMessageInvisible } from './utils/index';\n\nconst TUICustomerServer = TUICustomerPluginServer.getInstance();\n\n// 判断消息是否为客服号的自定义消息\nconst isCustomerServicePluginMessage = TUICustomerServer.isCustomerServicePluginMessage.bind(TUICustomerServer);\n// 设置客服号\nconst setCustomerServiceAccounts = TUICustomerServer.setCustomerServiceAccounts.bind(TUICustomerServer);\n// 获取客服号\nconst getCustomerServiceAccounts = TUICustomerServer.getCustomerServiceAccounts.bind(TUICustomerServer);\n\nexport {\n isCustomerServicePluginMessage,\n isMessageInvisible,\n setCustomerServiceAccounts,\n getCustomerServiceAccounts,\n};\n"],"names":["TUICustomerPluginServer"],"mappings":";;AAGA,MAAM,oBAAoBA,uCAAAA,kBAAwB;AAGlD,MAAM,iCAAiC,kBAAkB,+BAA+B,KAAK,iBAAiB;AAE3E,kBAAkB,2BAA2B,KAAK,iBAAiB;AAEnE,kBAAkB,2BAA2B,KAAK,iBAAiB;;"}
|
||||
{"version":3,"file":"index.js","sources":["TUIKit/tui-customer-service-plugin/index.ts"],"sourcesContent":["import TUICustomerPluginServer from './server';\r\nimport { isMessageInvisible } from './utils/index';\r\n\r\nconst TUICustomerServer = TUICustomerPluginServer.getInstance();\r\n\r\n// 判断消息是否为客服号的自定义消息\r\nconst isCustomerServicePluginMessage = TUICustomerServer.isCustomerServicePluginMessage.bind(TUICustomerServer);\r\n// 设置客服号\r\nconst setCustomerServiceAccounts = TUICustomerServer.setCustomerServiceAccounts.bind(TUICustomerServer);\r\n// 获取客服号\r\nconst getCustomerServiceAccounts = TUICustomerServer.getCustomerServiceAccounts.bind(TUICustomerServer);\r\n\r\nexport {\r\n isCustomerServicePluginMessage,\r\n isMessageInvisible,\r\n setCustomerServiceAccounts,\r\n getCustomerServiceAccounts,\r\n};\r\n"],"names":["TUICustomerPluginServer"],"mappings":";;AAGA,MAAM,oBAAoBA,uCAAAA,kBAAwB;AAGlD,MAAM,iCAAiC,kBAAkB,+BAA+B,KAAK,iBAAiB;AAE3E,kBAAkB,2BAA2B,KAAK,iBAAiB;AAEnE,kBAAkB,2BAA2B,KAAK,iBAAiB;;"}
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"message-customer-service.js","sources":["TUIKit/plugins/plugin-components/message-customer/message-customer-service.vue","/Users/plw/Documents/outsource/tk-mini-program/TUIKit/plugins/plugin-components/message-customer/message-customer-service.vue?type=component"],"sourcesContent":["<template>\n <TUICustomerServicePlugin :message=\"props.message\" />\n</template>\n<script setup lang=\"ts\">\nimport { IMessageModel } from '@tencentcloud/chat-uikit-engine';\nimport TUICustomerServicePlugin from '../../../tui-customer-service-plugin/index.vue';\ninterface IProps {\n message: IMessageModel;\n}\nconst props = withDefaults(defineProps<IProps>(), {\n message: () => ({} as IMessageModel),\n});\n</script>\n<style lang=\"scss\" scoped>\n/* stylelint-disable-next-line no-empty-source */\n</style>\n","import Component from '/Users/plw/Documents/outsource/tk-mini-program/TUIKit/plugins/plugin-components/message-customer/message-customer-service.vue'\nwx.createComponent(Component)"],"names":[],"mappings":";;;;;AAKA,MAAA,2BAAqC,MAAA;;;;;;;AAIrC,UAAM,QAAQ;;;;;;;;;;;ACRd,GAAG,gBAAgB,SAAS;"}
|
||||
{"version":3,"file":"message-customer-service.js","sources":["TUIKit/plugins/plugin-components/message-customer/message-customer-service.vue","../../HBuilderX/plugins/uniapp-cli-vite/uniComponent:/RDov6aG555uuL3RrLW1pbmktcHJvZ3JhbS9UVUlLaXQvcGx1Z2lucy9wbHVnaW4tY29tcG9uZW50cy9tZXNzYWdlLWN1c3RvbWVyL21lc3NhZ2UtY3VzdG9tZXItc2VydmljZS52dWU"],"sourcesContent":["<template>\r\n <TUICustomerServicePlugin :message=\"props.message\" />\r\n</template>\r\n<script setup lang=\"ts\">\r\nimport { IMessageModel } from '@tencentcloud/chat-uikit-engine';\r\nimport TUICustomerServicePlugin from '../../../tui-customer-service-plugin/index.vue';\r\ninterface IProps {\r\n message: IMessageModel;\r\n}\r\nconst props = withDefaults(defineProps<IProps>(), {\r\n message: () => ({} as IMessageModel),\r\n});\r\n</script>\r\n<style lang=\"scss\" scoped>\r\n/* stylelint-disable-next-line no-empty-source */\r\n</style>\r\n","import Component from 'D:/项目/tk-mini-program/TUIKit/plugins/plugin-components/message-customer/message-customer-service.vue'\nwx.createComponent(Component)"],"names":[],"mappings":";;;;;AAKA,MAAA,2BAAqC,MAAA;;;;;;;AAIrC,UAAM,QAAQ;;;;;;;;;;;ACRd,GAAG,gBAAgB,SAAS;"}
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"message-plugin-layout.js","sources":["TUIKit/plugins/plugin-components/message-plugin-layout.vue","/Users/plw/Documents/outsource/tk-mini-program/TUIKit/plugins/plugin-components/message-plugin-layout.vue?type=component"],"sourcesContent":["<template>\n <div class=\"message-plugin\">\n <!-- The following is displayed in the form of messageTip -->\n <div\n v-if=\"props.showStyle === 'tip'\"\n class=\"message-plugin-tip\"\n >\n <slot name=\"messageTip\" />\n </div>\n <!-- The following is displayed in the form of messageBubble -->\n <div\n v-else-if=\"props.showStyle === 'bubble'\"\n class=\"message-plugin-bubble-content\"\n @longpress=\"handleToggleMessageItem($event, messageModel, true)\"\n @click.prevent.right=\"handleToggleMessageItem($event, messageModel)\"\n @touchstart=\"handleH5LongPress($event, messageModel, 'touchstart')\"\n @touchend=\"handleH5LongPress($event, messageModel, 'touchend')\"\n @mouseover=\"handleH5LongPress($event, messageModel, 'touchend')\"\n >\n <MessageBubble\n :messageItem=\"messageModel\"\n :content=\"messageModel.getMessageContent()\"\n :blinkMessageIDList=\"props.blinkMessageIDList\"\n :classNameList=\"props.bubbleClassNameList\"\n @resendMessage=\"resendMessage(messageModel)\"\n >\n <!-- web message-bubble is a named slot, content area slotName is messageElement -->\n <template #messageElement>\n <slot\n v-if=\"!isUniFrameWork\"\n name=\"messageBubble\"\n />\n </template>\n <!-- uni-app message-bubble is an anonymous slot, no slotName -->\n <slot\n v-if=\"isUniFrameWork\"\n name=\"messageBubble\"\n />\n </MessageBubble>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from '../../adapter-vue';\nimport { TUIStore, IMessageModel } from '@tencentcloud/chat-uikit-engine';\nimport MessageBubble from '../../components/TUIChat/message-list/message-elements/message-bubble.vue';\nimport { isUniFrameWork } from '../../utils/env';\n\ninterface IProps {\n message: IMessageModel;\n showStyle: string;\n bubbleClassNameList?: string[];\n blinkMessageIDList?: string[];\n}\n\nconst props = withDefaults(defineProps<IProps>(), {\n message: () => ({} as IMessageModel),\n showStyle: '',\n bubbleClassNameList: () => [] as string[],\n blinkMessageIDList: () => [] as string[],\n});\n\nconst emits = defineEmits(['resendMessage', 'handleToggleMessageItem', 'handleH5LongPress']);\nconst messageModel = computed(() => TUIStore.getMessageModel(props.message?.ID));\n\n// The following is for external interaction such as messageTool, no special processing is required, do not change\nconst resendMessage = (message: IMessageModel) => {\n emits('resendMessage', message);\n};\nconst handleToggleMessageItem = (e: any, message: IMessageModel, isLongpress = false) => {\n emits('handleToggleMessageItem', e, message, isLongpress);\n};\nconst handleH5LongPress = (e: any, message: IMessageModel, type: string) => {\n emits('handleH5LongPress', e, message, type);\n};\n</script>\n\n<style lang=\"scss\" scoped>\n.message-plugin-tip {\n color: #999;\n font-size: 12px;\n overflow-wrap: anywhere;\n display: flex;\n place-content: center center;\n align-items: center;\n text-align: center;\n margin: 0 10px 10px;\n}\n\n.message-tip-highlight {\n animation: highlight 1000ms infinite;\n\n @keyframes highlight {\n 50% {\n color: #ff9c19;\n }\n }\n\n @keyframes highlight {\n 50% {\n color: #ff9c19;\n }\n }\n}\n\n:deep(.message-bubble-room) {\n .message-bubble-main-content {\n .message-body {\n .message-body-main {\n .message-body-content {\n &.content-in,\n &.content-out {\n background-color: transparent;\n border-radius: 0;\n padding: 0;\n }\n }\n }\n }\n }\n}\n</style>\n","import Component from '/Users/plw/Documents/outsource/tk-mini-program/TUIKit/plugins/plugin-components/message-plugin-layout.vue'\nwx.createComponent(Component)"],"names":["computed","TUIStore"],"mappings":";;;;;;;AA8CA,MAAA,gBAA0B,MAAA;;;;;;;;;;;AAU1B,UAAM,QAAQ;AAOd,UAAM,QAAQ;AACR,UAAA,eAAeA,uBAAS;;AAAMC,2BAAA,GAAS,iBAAgB,WAAM,YAAN,mBAAe,EAAE;AAAA,KAAC;AAGzE,UAAA,gBAAgB,CAAC,YAA2B;AAChD,YAAM,iBAAiB,OAAO;AAAA,IAAA;AAEhC,UAAM,0BAA0B,CAAC,GAAQ,SAAwB,cAAc,UAAU;AACjF,YAAA,2BAA2B,GAAG,SAAS,WAAW;AAAA,IAAA;AAE1D,UAAM,oBAAoB,CAAC,GAAQ,SAAwB,SAAiB;AACpE,YAAA,qBAAqB,GAAG,SAAS,IAAI;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACzE7C,GAAG,gBAAgB,SAAS;"}
|
||||
{"version":3,"file":"message-plugin-layout.js","sources":["TUIKit/plugins/plugin-components/message-plugin-layout.vue","../../HBuilderX/plugins/uniapp-cli-vite/uniComponent:/RDov6aG555uuL3RrLW1pbmktcHJvZ3JhbS9UVUlLaXQvcGx1Z2lucy9wbHVnaW4tY29tcG9uZW50cy9tZXNzYWdlLXBsdWdpbi1sYXlvdXQudnVl"],"sourcesContent":["<template>\r\n <div class=\"message-plugin\">\r\n <!-- The following is displayed in the form of messageTip -->\r\n <div\r\n v-if=\"props.showStyle === 'tip'\"\r\n class=\"message-plugin-tip\"\r\n >\r\n <slot name=\"messageTip\" />\r\n </div>\r\n <!-- The following is displayed in the form of messageBubble -->\r\n <div\r\n v-else-if=\"props.showStyle === 'bubble'\"\r\n class=\"message-plugin-bubble-content\"\r\n @longpress=\"handleToggleMessageItem($event, messageModel, true)\"\r\n @click.prevent.right=\"handleToggleMessageItem($event, messageModel)\"\r\n @touchstart=\"handleH5LongPress($event, messageModel, 'touchstart')\"\r\n @touchend=\"handleH5LongPress($event, messageModel, 'touchend')\"\r\n @mouseover=\"handleH5LongPress($event, messageModel, 'touchend')\"\r\n >\r\n <MessageBubble\r\n :messageItem=\"messageModel\"\r\n :content=\"messageModel.getMessageContent()\"\r\n :blinkMessageIDList=\"props.blinkMessageIDList\"\r\n :classNameList=\"props.bubbleClassNameList\"\r\n @resendMessage=\"resendMessage(messageModel)\"\r\n >\r\n <!-- web message-bubble is a named slot, content area slotName is messageElement -->\r\n <template #messageElement>\r\n <slot\r\n v-if=\"!isUniFrameWork\"\r\n name=\"messageBubble\"\r\n />\r\n </template>\r\n <!-- uni-app message-bubble is an anonymous slot, no slotName -->\r\n <slot\r\n v-if=\"isUniFrameWork\"\r\n name=\"messageBubble\"\r\n />\r\n </MessageBubble>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\" setup>\r\nimport { computed } from '../../adapter-vue';\r\nimport { TUIStore, IMessageModel } from '@tencentcloud/chat-uikit-engine';\r\nimport MessageBubble from '../../components/TUIChat/message-list/message-elements/message-bubble.vue';\r\nimport { isUniFrameWork } from '../../utils/env';\r\n\r\ninterface IProps {\r\n message: IMessageModel;\r\n showStyle: string;\r\n bubbleClassNameList?: string[];\r\n blinkMessageIDList?: string[];\r\n}\r\n\r\nconst props = withDefaults(defineProps<IProps>(), {\r\n message: () => ({} as IMessageModel),\r\n showStyle: '',\r\n bubbleClassNameList: () => [] as string[],\r\n blinkMessageIDList: () => [] as string[],\r\n});\r\n\r\nconst emits = defineEmits(['resendMessage', 'handleToggleMessageItem', 'handleH5LongPress']);\r\nconst messageModel = computed(() => TUIStore.getMessageModel(props.message?.ID));\r\n\r\n// The following is for external interaction such as messageTool, no special processing is required, do not change\r\nconst resendMessage = (message: IMessageModel) => {\r\n emits('resendMessage', message);\r\n};\r\nconst handleToggleMessageItem = (e: any, message: IMessageModel, isLongpress = false) => {\r\n emits('handleToggleMessageItem', e, message, isLongpress);\r\n};\r\nconst handleH5LongPress = (e: any, message: IMessageModel, type: string) => {\r\n emits('handleH5LongPress', e, message, type);\r\n};\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.message-plugin-tip {\r\n color: #999;\r\n font-size: 12px;\r\n overflow-wrap: anywhere;\r\n display: flex;\r\n place-content: center center;\r\n align-items: center;\r\n text-align: center;\r\n margin: 0 10px 10px;\r\n}\r\n\r\n.message-tip-highlight {\r\n animation: highlight 1000ms infinite;\r\n\r\n @keyframes highlight {\r\n 50% {\r\n color: #ff9c19;\r\n }\r\n }\r\n\r\n @keyframes highlight {\r\n 50% {\r\n color: #ff9c19;\r\n }\r\n }\r\n}\r\n\r\n:deep(.message-bubble-room) {\r\n .message-bubble-main-content {\r\n .message-body {\r\n .message-body-main {\r\n .message-body-content {\r\n &.content-in,\r\n &.content-out {\r\n background-color: transparent;\r\n border-radius: 0;\r\n padding: 0;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n</style>\r\n","import Component from 'D:/项目/tk-mini-program/TUIKit/plugins/plugin-components/message-plugin-layout.vue'\nwx.createComponent(Component)"],"names":["computed","TUIStore"],"mappings":";;;;;;;AA8CA,MAAA,gBAA0B,MAAA;;;;;;;;;;;AAU1B,UAAM,QAAQ;AAOd,UAAM,QAAQ;AACR,UAAA,eAAeA,uBAAS;;AAAMC,2BAAA,GAAS,iBAAgB,WAAM,YAAN,mBAAe,EAAE;AAAA,KAAC;AAGzE,UAAA,gBAAgB,CAAC,YAA2B;AAChD,YAAM,iBAAiB,OAAO;AAAA,IAAA;AAEhC,UAAM,0BAA0B,CAAC,GAAQ,SAAwB,cAAc,UAAU;AACjF,YAAA,2BAA2B,GAAG,SAAS,WAAW;AAAA,IAAA;AAE1D,UAAM,oBAAoB,CAAC,GAAQ,SAAwB,SAAiB;AACpE,YAAA,qBAAqB,GAAG,SAAS,IAAI;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACzE7C,GAAG,gBAAgB,SAAS;"}
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
{"version":3,"file":"message-room-default.js","sources":["TUIKit/plugins/plugin-components/message-room/message-room-default.vue","/Users/plw/Documents/outsource/tk-mini-program/TUIKit/plugins/plugin-components/message-room/message-room-default.vue?type=component"],"sourcesContent":["<template>\n <div\n :class=\"[\n 'room-default',\n isUniFrameWork && 'room-default-uni',\n props.message.flow === 'in' ? 'room-default-in' : 'room-default-out',\n ]\"\n >\n {{ TUITranslateService.t(\"message.custom.自定义消息\") }}\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { TUITranslateService, IMessageModel } from '@tencentcloud/chat-uikit-engine';\nimport { isUniFrameWork } from '../../../utils/env';\n\ninterface IProps {\n message: IMessageModel;\n}\nconst props = withDefaults(defineProps<IProps>(), {\n message: () => ({} as IMessageModel),\n});\n</script>\n<style lang=\"scss\" scoped>\n.room-default {\n padding: 12px;\n font-size: 14px;\n\n &-uni{\n padding: 0;\n }\n\n &-in {\n background: #fbfbfb;\n border-radius: 0 10px;\n }\n\n &-out {\n background: #dceafd;\n border-radius: 10px 0 10px 10px;\n }\n}\n</style>\n","import Component from '/Users/plw/Documents/outsource/tk-mini-program/TUIKit/plugins/plugin-components/message-room/message-room-default.vue'\nwx.createComponent(Component)"],"names":[],"mappings":";;;;;;;;;AAkBA,UAAM,QAAQ;;;;;;;;;;;ACjBd,GAAG,gBAAgB,SAAS;"}
|
||||
{"version":3,"file":"message-room-default.js","sources":["TUIKit/plugins/plugin-components/message-room/message-room-default.vue","../../HBuilderX/plugins/uniapp-cli-vite/uniComponent:/RDov6aG555uuL3RrLW1pbmktcHJvZ3JhbS9UVUlLaXQvcGx1Z2lucy9wbHVnaW4tY29tcG9uZW50cy9tZXNzYWdlLXJvb20vbWVzc2FnZS1yb29tLWRlZmF1bHQudnVl"],"sourcesContent":["<template>\r\n <div\r\n :class=\"[\r\n 'room-default',\r\n isUniFrameWork && 'room-default-uni',\r\n props.message.flow === 'in' ? 'room-default-in' : 'room-default-out',\r\n ]\"\r\n >\r\n {{ TUITranslateService.t(\"message.custom.自定义消息\") }}\r\n </div>\r\n</template>\r\n<script setup lang=\"ts\">\r\nimport { TUITranslateService, IMessageModel } from '@tencentcloud/chat-uikit-engine';\r\nimport { isUniFrameWork } from '../../../utils/env';\r\n\r\ninterface IProps {\r\n message: IMessageModel;\r\n}\r\nconst props = withDefaults(defineProps<IProps>(), {\r\n message: () => ({} as IMessageModel),\r\n});\r\n</script>\r\n<style lang=\"scss\" scoped>\r\n.room-default {\r\n padding: 12px;\r\n font-size: 14px;\r\n\r\n &-uni{\r\n padding: 0;\r\n }\r\n\r\n &-in {\r\n background: #fbfbfb;\r\n border-radius: 0 10px;\r\n }\r\n\r\n &-out {\r\n background: #dceafd;\r\n border-radius: 10px 0 10px 10px;\r\n }\r\n}\r\n</style>\r\n","import Component from 'D:/项目/tk-mini-program/TUIKit/plugins/plugin-components/message-room/message-room-default.vue'\nwx.createComponent(Component)"],"names":[],"mappings":";;;;;;;;;AAkBA,UAAM,QAAQ;;;;;;;;;;;ACjBd,GAAG,gBAAgB,SAAS;"}
|
||||
Reference in New Issue
Block a user