优化页面

This commit is contained in:
pengxiaolong
2025-06-11 22:16:44 +08:00
parent 3c2d7e5959
commit 931d867c09
806 changed files with 87462 additions and 331 deletions

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
{"version":3,"file":"index.js","sources":["TUIKit/components/TUIChat/chat-header/index.vue","../../HBuilderX/plugins/uniapp-cli-vite/uniComponent:/RDov6aG555uuL3RrLW1pbmktcHJvZ3JhbS9UVUlLaXQvY29tcG9uZW50cy9UVUlDaGF0L2NoYXQtaGVhZGVyL2luZGV4LnZ1ZQ"],"sourcesContent":["<template>\r\n <view style=\"display: none;\" />\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { onMounted, onUnmounted, ref } from '../../../adapter-vue';\r\nimport {\r\n TUIStore,\r\n StoreName,\r\n IConversationModel,\r\n TUITranslateService,\r\n} from '@tencentcloud/chat-uikit-engine';\r\nimport { TUIGlobal } from '@tencentcloud/universal-api';\r\nimport { onLoad, onNavigationBarButtonTap } from '@dcloudio/uni-app';\r\n\r\nconst emits = defineEmits(['openGroupManagement']);\r\nconst props = defineProps(['isGroup']);\r\n\r\nconst currentConversation = ref<IConversationModel>();\r\nconst typingStatus = ref(false);\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst setChatHeaderContent = (content: string) => {\r\n TUIGlobal?.setNavigationBarTitle({\r\n title: content || '云通信 IM',\r\n });\r\n};\r\n\r\nonMounted(() => {\r\n TUIStore.watch(StoreName.CONV, {\r\n currentConversation: onCurrentConversationUpdated,\r\n });\r\n TUIStore.watch(StoreName.CHAT, {\r\n typingStatus: onTypingStatusUpdated,\r\n });\r\n});\r\n\r\nonUnmounted(() => {\r\n TUIStore.unwatch(StoreName.CONV, {\r\n currentConversation: onCurrentConversationUpdated,\r\n });\r\n TUIStore.unwatch(StoreName.CHAT, {\r\n typingStatus: onTypingStatusUpdated,\r\n });\r\n});\r\n\r\nonLoad(() => {\r\n setChatHeaderContent(currentConversation.value?.getShowName());\r\n});\r\n\r\nfunction onCurrentConversationUpdated(conversation: IConversationModel) {\r\n currentConversation.value = conversation;\r\n if (!typingStatus.value) {\r\n setChatHeaderContent(currentConversation?.value?.getShowName());\r\n }\r\n}\r\n\r\nfunction onTypingStatusUpdated(status: boolean) {\r\n typingStatus.value = status;\r\n if (typingStatus.value) {\r\n setChatHeaderContent(TUITranslateService.t('TUIChat.对方正在输入'));\r\n } else {\r\n setChatHeaderContent(currentConversation.value?.getShowName());\r\n }\r\n}\r\n</script>\r\n","import Component from 'D:/项目/tk-mini-program/TUIKit/components/TUIChat/chat-header/index.vue'\nwx.createComponent(Component)"],"names":["ref","TUIGlobal","onMounted","TUIStore","StoreName","onUnmounted","onLoad","TUITranslateService","Component"],"mappings":";;;;;;;;AAkBA,UAAM,sBAAsBA,cAAAA;AACtB,UAAA,eAAeA,kBAAI,KAAK;AAyBxB,UAAA,uBAAuB,CAAC,YAAoB;;AAChDC,0BAAAA,MAAAA,mBAAW,sBAAsB;AAAA,QAC/B,OAAO,WAAW;AAAA,MAAA;AAAA,IACnB;AAGHC,kBAAAA,UAAU,MAAM;AACLC,uBAAA,MAAMC,gBAAU,MAAM;AAAA,QAC7B,qBAAqB;AAAA,MAAA,CACtB;AACQD,uBAAA,MAAMC,gBAAU,MAAM;AAAA,QAC7B,cAAc;AAAA,MAAA,CACf;AAAA,IAAA,CACF;AAEDC,kBAAAA,YAAY,MAAM;AACPF,uBAAA,QAAQC,gBAAU,MAAM;AAAA,QAC/B,qBAAqB;AAAA,MAAA,CACtB;AACQD,uBAAA,QAAQC,gBAAU,MAAM;AAAA,QAC/B,cAAc;AAAA,MAAA,CACf;AAAA,IAAA,CACF;AAEDE,kBAAAA,OAAO,MAAM;;AACU,4BAAA,yBAAoB,UAApB,mBAA2B,aAAa;AAAA,IAAA,CAC9D;AAED,aAAS,6BAA6B,cAAkC;;AACtE,0BAAoB,QAAQ;AACxB,UAAA,CAAC,aAAa,OAAO;AACF,8BAAA,gEAAqB,UAArB,mBAA4B,aAAa;AAAA,MAChE;AAAA,IACF;AAEA,aAAS,sBAAsB,QAAiB;;AAC9C,mBAAa,QAAQ;AACrB,UAAI,aAAa,OAAO;AACD,6BAAAC,cAAA,GAAoB,EAAE,gBAAgB,CAAC;AAAA,MAAA,OACvD;AACgB,8BAAA,yBAAoB,UAApB,mBAA2B,aAAa;AAAA,MAC/D;AAAA,IACF;;;;;;ACrFA,GAAG,gBAAgBC,SAAS;"}
{"version":3,"file":"index.js","sources":["TUIKit/components/TUIChat/chat-header/index.vue","../../HBuilderX/plugins/uniapp-cli-vite/uniComponent:/RDov6aG555uuL3RrLW1pbmktcHJvZ3JhbS9UVUlLaXQvY29tcG9uZW50cy9UVUlDaGF0L2NoYXQtaGVhZGVyL2luZGV4LnZ1ZQ"],"sourcesContent":["<template>\r\n <view style=\"display: flex;\" />\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { onMounted, onUnmounted, ref } from '../../../adapter-vue';\r\nimport {\r\n TUIStore,\r\n StoreName,\r\n IConversationModel,\r\n TUITranslateService,\r\n} from '@tencentcloud/chat-uikit-engine';\r\nimport { TUIGlobal } from '@tencentcloud/universal-api';\r\nimport { onLoad, onNavigationBarButtonTap } from '@dcloudio/uni-app';\r\n\r\nconst emits = defineEmits(['openGroupManagement']);\r\nconst props = defineProps(['isGroup']);\r\n\r\nconst currentConversation = ref<IConversationModel>();\r\nconst typingStatus = ref(false);\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst setChatHeaderContent = (content: string) => {\r\n TUIGlobal?.setNavigationBarTitle({\r\n title: content || '云通信 IM',\r\n });\r\n};\r\n\r\nonMounted(() => {\r\n TUIStore.watch(StoreName.CONV, {\r\n currentConversation: onCurrentConversationUpdated,\r\n });\r\n TUIStore.watch(StoreName.CHAT, {\r\n typingStatus: onTypingStatusUpdated,\r\n });\r\n});\r\n\r\nonUnmounted(() => {\r\n TUIStore.unwatch(StoreName.CONV, {\r\n currentConversation: onCurrentConversationUpdated,\r\n });\r\n TUIStore.unwatch(StoreName.CHAT, {\r\n typingStatus: onTypingStatusUpdated,\r\n });\r\n});\r\n\r\nonLoad(() => {\r\n setChatHeaderContent(currentConversation.value?.getShowName());\r\n});\r\n\r\nfunction onCurrentConversationUpdated(conversation: IConversationModel) {\r\n currentConversation.value = conversation;\r\n if (!typingStatus.value) {\r\n setChatHeaderContent(currentConversation?.value?.getShowName());\r\n }\r\n}\r\n\r\nfunction onTypingStatusUpdated(status: boolean) {\r\n typingStatus.value = status;\r\n if (typingStatus.value) {\r\n setChatHeaderContent(TUITranslateService.t('TUIChat.对方正在输入'));\r\n } else {\r\n setChatHeaderContent(currentConversation.value?.getShowName());\r\n }\r\n}\r\n</script>\r\n","import Component from 'D:/项目/tk-mini-program/TUIKit/components/TUIChat/chat-header/index.vue'\nwx.createComponent(Component)"],"names":["ref","TUIGlobal","onMounted","TUIStore","StoreName","onUnmounted","onLoad","TUITranslateService","Component"],"mappings":";;;;;;;;AAkBA,UAAM,sBAAsBA,cAAAA;AACtB,UAAA,eAAeA,kBAAI,KAAK;AAyBxB,UAAA,uBAAuB,CAAC,YAAoB;;AAChDC,0BAAAA,MAAAA,mBAAW,sBAAsB;AAAA,QAC/B,OAAO,WAAW;AAAA,MAAA;AAAA,IACnB;AAGHC,kBAAAA,UAAU,MAAM;AACLC,uBAAA,MAAMC,gBAAU,MAAM;AAAA,QAC7B,qBAAqB;AAAA,MAAA,CACtB;AACQD,uBAAA,MAAMC,gBAAU,MAAM;AAAA,QAC7B,cAAc;AAAA,MAAA,CACf;AAAA,IAAA,CACF;AAEDC,kBAAAA,YAAY,MAAM;AACPF,uBAAA,QAAQC,gBAAU,MAAM;AAAA,QAC/B,qBAAqB;AAAA,MAAA,CACtB;AACQD,uBAAA,QAAQC,gBAAU,MAAM;AAAA,QAC/B,cAAc;AAAA,MAAA,CACf;AAAA,IAAA,CACF;AAEDE,kBAAAA,OAAO,MAAM;;AACU,4BAAA,yBAAoB,UAApB,mBAA2B,aAAa;AAAA,IAAA,CAC9D;AAED,aAAS,6BAA6B,cAAkC;;AACtE,0BAAoB,QAAQ;AACxB,UAAA,CAAC,aAAa,OAAO;AACF,8BAAA,gEAAqB,UAArB,mBAA4B,aAAa;AAAA,MAChE;AAAA,IACF;AAEA,aAAS,sBAAsB,QAAiB;;AAC9C,mBAAa,QAAQ;AACrB,UAAI,aAAa,OAAO;AACD,6BAAAC,cAAA,GAAoB,EAAE,gBAAgB,CAAC;AAAA,MAAA,OACvD;AACgB,8BAAA,yBAAoB,UAApB,mBAA2B,aAAa;AAAA,MAC/D;AAAA,IACF;;;;;;ACrFA,GAAG,gBAAgBC,SAAS;"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
{"version":3,"file":"request.js","sources":["components/request.js"],"sourcesContent":["import addPrefixToHeaderIcon from './addPrefixToHeaderIcon.js'\r\nexport default function request(urldata) {\r\n const { url, data, method, header, userInfo } = urldata;\r\n const baseUrl = \"https://api.yolojt.com/\"+ url;\r\n // const baseUrl = \"http://192.168.0.218:8086/\"+ url;\r\n if (userInfo) {\r\n return new Promise((resolve, reject) => {\r\n uni.getStorage({\r\n key: \"userinfo\",\r\n success: (res) => {\r\n if (res.data) {\r\n if (res.data.nickName) {\r\n uni.request({\r\n url: baseUrl,\r\n data: data,\r\n method: method,\r\n header: header,\r\n success: function (res) {\r\n console.log(\"请求成功1\", res.data);\r\n resolve(addPrefixToHeaderIcon(res.data));\r\n // resolve(res.data);\r\n },\r\n fail: function (res) {\r\n reject(res);\r\n }\r\n });\r\n } else {\r\n uni.setStorageSync(\"lastPage\", getCurrentPages()[getCurrentPages().length - 1].route);\r\n uni.reLaunch({ url: \"/pages/UserInformation/UserInformation\" })\r\n }\r\n } else {\r\n uni.setStorageSync(\"lastPage\", getCurrentPages()[getCurrentPages().length - 1].route);\r\n uni.navigateTo({ url: '/pages/login/login' })\r\n }\r\n },\r\n fail: function (res) {\r\n uni.setStorageSync(\"lastPage\", getCurrentPages()[getCurrentPages().length - 1].route);\r\n uni.navigateTo({ url: '/pages/login/login' })\r\n reject(res);\r\n }\r\n });\r\n });\r\n } else {\r\n return new Promise((resolve, reject) => {\r\n uni.request({\r\n url: baseUrl,\r\n data: data,\r\n method: method,\r\n header: header,\r\n success: function (res) {\r\n console.log(\"请求成功2\", res);\r\n // resolve(res.data);\r\n resolve(addPrefixToHeaderIcon(res.data));\r\n },\r\n fail: function (res) {\r\n reject(res);\r\n }\r\n });\r\n });\r\n }\r\n\r\n}"],"names":["uni","res","addPrefixToHeaderIcon"],"mappings":";;;AACe,SAAS,QAAQ,SAAS;AACrC,QAAM,EAAE,KAAK,MAAM,QAAQ,QAAQ,SAAU,IAAG;AAChD,QAAM,UAAU,4BAA2B;AAE3C,MAAI,UAAU;AACV,WAAO,IAAI,QAAQ,CAAC,SAAS,WAAW;AACpCA,oBAAAA,MAAI,WAAW;AAAA,QACX,KAAK;AAAA,QACL,SAAS,CAAC,QAAQ;AACd,cAAI,IAAI,MAAM;AACV,gBAAI,IAAI,KAAK,UAAU;AACnBA,4BAAAA,MAAI,QAAQ;AAAA,gBACR,KAAK;AAAA,gBACL;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA,SAAS,SAAUC,MAAK;AACpBD,gCAAA,MAAA,MAAA,OAAA,+BAAY,SAASC,KAAI,IAAI;AAC7B,0BAAQC,iCAAqB,sBAACD,KAAI,IAAI,CAAC;AAAA,gBAE1C;AAAA,gBACD,MAAM,SAAUA,MAAK;AACjB,yBAAOA,IAAG;AAAA,gBACb;AAAA,cACjC,CAA6B;AAAA,YAC7B,OAA+B;AACHD,kCAAI,eAAe,YAAY,gBAAiB,EAAC,gBAAiB,EAAC,SAAS,CAAC,EAAE,KAAK;AACpFA,4BAAAA,MAAI,SAAS,EAAE,KAAK,yCAAwC,CAAE;AAAA,YACjE;AAAA,UACzB,OAA2B;AACHA,gCAAI,eAAe,YAAY,gBAAiB,EAAC,gBAAiB,EAAC,SAAS,CAAC,EAAE,KAAK;AACpFA,0BAAAA,MAAI,WAAW,EAAE,KAAK,qBAAoB,CAAE;AAAA,UAC/C;AAAA,QACJ;AAAA,QACD,MAAM,SAAU,KAAK;AACjBA,8BAAI,eAAe,YAAY,gBAAiB,EAAC,gBAAiB,EAAC,SAAS,CAAC,EAAE,KAAK;AACpFA,wBAAAA,MAAI,WAAW,EAAE,KAAK,qBAAoB,CAAE;AAC5C,iBAAO,GAAG;AAAA,QACb;AAAA,MACjB,CAAa;AAAA,IACb,CAAS;AAAA,EACT,OAAW;AACH,WAAO,IAAI,QAAQ,CAAC,SAAS,WAAW;AACpCA,oBAAAA,MAAI,QAAQ;AAAA,QACR,KAAK;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,QACA,SAAS,SAAU,KAAK;AACpBA,wBAAY,MAAA,MAAA,OAAA,+BAAA,SAAS,GAAG;AAExB,kBAAQE,iCAAqB,sBAAC,IAAI,IAAI,CAAC;AAAA,QAC1C;AAAA,QACD,MAAM,SAAU,KAAK;AACjB,iBAAO,GAAG;AAAA,QACb;AAAA,MACjB,CAAa;AAAA,IACb,CAAS;AAAA,EACJ;AAEL;;"}
{"version":3,"file":"request.js","sources":["components/request.js"],"sourcesContent":["import addPrefixToHeaderIcon from './addPrefixToHeaderIcon.js'\r\nexport default function request(urldata) {\r\n const { url, data, method, header, userInfo } = urldata;\r\n // const baseUrl = \"http://49.235.115.212:8086/\"+ url;\r\n // const baseUrl = \"https://pk.zhukeping.com/\"+ url;\r\n const baseUrl = \"http://120.26.251.180:8086/\"+ url;\r\n // const baseUrl = \"http://192.168.0.218:8086/\"+ url;\r\n if (userInfo) {\r\n return new Promise((resolve, reject) => {\r\n uni.getStorage({\r\n key: \"userinfo\",\r\n success: (res) => {\r\n if (res.data) {\r\n if (res.data.nickName) {\r\n uni.request({\r\n url: baseUrl,\r\n data: data,\r\n method: method,\r\n header: header,\r\n success: function (res) {\r\n console.log(\"请求成功1\", res.data);\r\n resolve(addPrefixToHeaderIcon(res.data));\r\n // resolve(res.data);\r\n },\r\n fail: function (res) {\r\n reject(res);\r\n }\r\n });\r\n } else {\r\n uni.setStorageSync(\"lastPage\", getCurrentPages()[getCurrentPages().length - 1].route);\r\n uni.reLaunch({ url: \"/pages/UserInformation/UserInformation\" })\r\n }\r\n } else {\r\n uni.setStorageSync(\"lastPage\", getCurrentPages()[getCurrentPages().length - 1].route);\r\n uni.navigateTo({ url: '/pages/login/login' })\r\n }\r\n },\r\n fail: function (res) {\r\n uni.setStorageSync(\"lastPage\", getCurrentPages()[getCurrentPages().length - 1].route);\r\n uni.navigateTo({ url: '/pages/login/login' })\r\n reject(res);\r\n }\r\n });\r\n });\r\n } else {\r\n return new Promise((resolve, reject) => {\r\n uni.request({\r\n url: baseUrl,\r\n data: data,\r\n method: method,\r\n header: header,\r\n success: function (res) {\r\n console.log(\"请求成功2\", res);\r\n // resolve(res.data);\r\n resolve(addPrefixToHeaderIcon(res.data));\r\n },\r\n fail: function (res) {\r\n reject(res);\r\n }\r\n });\r\n });\r\n }\r\n\r\n}"],"names":["uni","res","addPrefixToHeaderIcon"],"mappings":";;;AACe,SAAS,QAAQ,SAAS;AACrC,QAAM,EAAE,KAAK,MAAM,QAAQ,QAAQ,SAAU,IAAG;AAGhD,QAAM,UAAU,gCAA+B;AAE/C,MAAI,UAAU;AACV,WAAO,IAAI,QAAQ,CAAC,SAAS,WAAW;AACpCA,oBAAAA,MAAI,WAAW;AAAA,QACX,KAAK;AAAA,QACL,SAAS,CAAC,QAAQ;AACd,cAAI,IAAI,MAAM;AACV,gBAAI,IAAI,KAAK,UAAU;AACnBA,4BAAAA,MAAI,QAAQ;AAAA,gBACR,KAAK;AAAA,gBACL;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA,SAAS,SAAUC,MAAK;AACpBD,gCAAA,MAAA,MAAA,OAAA,+BAAY,SAASC,KAAI,IAAI;AAC7B,0BAAQC,iCAAqB,sBAACD,KAAI,IAAI,CAAC;AAAA,gBAE1C;AAAA,gBACD,MAAM,SAAUA,MAAK;AACjB,yBAAOA,IAAG;AAAA,gBACb;AAAA,cACjC,CAA6B;AAAA,YAC7B,OAA+B;AACHD,kCAAI,eAAe,YAAY,gBAAiB,EAAC,gBAAiB,EAAC,SAAS,CAAC,EAAE,KAAK;AACpFA,4BAAAA,MAAI,SAAS,EAAE,KAAK,yCAAwC,CAAE;AAAA,YACjE;AAAA,UACzB,OAA2B;AACHA,gCAAI,eAAe,YAAY,gBAAiB,EAAC,gBAAiB,EAAC,SAAS,CAAC,EAAE,KAAK;AACpFA,0BAAAA,MAAI,WAAW,EAAE,KAAK,qBAAoB,CAAE;AAAA,UAC/C;AAAA,QACJ;AAAA,QACD,MAAM,SAAU,KAAK;AACjBA,8BAAI,eAAe,YAAY,gBAAiB,EAAC,gBAAiB,EAAC,SAAS,CAAC,EAAE,KAAK;AACpFA,wBAAAA,MAAI,WAAW,EAAE,KAAK,qBAAoB,CAAE;AAC5C,iBAAO,GAAG;AAAA,QACb;AAAA,MACjB,CAAa;AAAA,IACb,CAAS;AAAA,EACT,OAAW;AACH,WAAO,IAAI,QAAQ,CAAC,SAAS,WAAW;AACpCA,oBAAAA,MAAI,QAAQ;AAAA,QACR,KAAK;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,QACA,SAAS,SAAU,KAAK;AACpBA,wBAAY,MAAA,MAAA,OAAA,+BAAA,SAAS,GAAG;AAExB,kBAAQE,iCAAqB,sBAAC,IAAI,IAAI,CAAC;AAAA,QAC1C;AAAA,QACD,MAAM,SAAU,KAAK;AACjB,iBAAO,GAAG;AAAA,QACb;AAAA,MACjB,CAAa;AAAA,IACb,CAAS;AAAA,EACJ;AAEL;;"}

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
{"version":3,"file":"Forum.js","sources":["pages/Forum/Forum.vue","../../HBuilderX/plugins/uniapp-cli-vite/uniPage:/cGFnZXMvRm9ydW0vRm9ydW0udnVl"],"sourcesContent":["<template>\r\n <view class=\"forum\">\r\n <view class=\"bg\">\r\n <image class=\"bgImg\" src=\"https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/HomeBackground.png\" mode=\"scaleToFill\" />\r\n </view>\r\n <view class=\"title\">论坛</view>\r\n\r\n\r\n </view>\r\n <view class=\"tabBar\">\r\n <tabBar></tabBar>\r\n </view>\r\n</template>\r\n\r\n<script>\r\nimport tabBar from \"../../components/tabBar/tabBar\";\r\n export default {\r\n data() {\r\n return {\r\n title: 'Hello'\r\n }\r\n },\r\n onLoad() {\r\n // 页面加载时执行\r\n },\r\n methods: {\r\n // 方法定义\r\n },\r\n components: {\r\n tabBar\r\n }\r\n }\r\n</script>\r\n\r\n<style scoped>\r\n.bg {\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n bottom: 0;\r\n z-index: -1;\r\n}\r\n.bgImg {\r\n width: 100%;\r\n height: 100%;\r\n}\r\n.title {\r\n position: absolute;\r\n top: 120rpx;\r\n left: 345rpx;\r\n font-size: 34rpx;\r\n color: #100e0f;\r\n font-weight: bold;\r\n}\r\n</style>","import MiniProgramPage from 'D:/项目/tk-mini-program/pages/Forum/Forum.vue'\nwx.createPage(MiniProgramPage)"],"names":[],"mappings":";;AAeA,eAAe,MAAW;AACtB,MAAK,YAAU;AAAA,EACX,OAAO;AACH,WAAO;AAAA,MACH,OAAO;AAAA,IACX;AAAA,EACH;AAAA,EACD,SAAS;AAAA,EAER;AAAA,EACD,SAAS;AAAA;AAAA,EAER;AAAA,EACD,YAAY;AAAA,IACR;AAAA,EACJ;AACJ;;;;;;;;;;;;;AC9BJ,GAAG,WAAW,eAAe;"}
{"version":3,"file":"Forum.js","sources":["pages/Forum/Forum.vue","../../HBuilderX/plugins/uniapp-cli-vite/uniPage:/cGFnZXMvRm9ydW0vRm9ydW0udnVl"],"sourcesContent":["<template>\r\n <view class=\"forum\">\r\n <view class=\"bg\">\r\n <image class=\"bgImg\" src=\"https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/HomeBackground.png\" mode=\"scaleToFill\" />\r\n </view>\r\n <view class=\"title\">论坛</view>\r\n\r\n\r\n </view>\r\n <view class=\"tabBar\">\r\n <tabBar :tabIndex=\"1\"></tabBar>\r\n </view>\r\n</template>\r\n\r\n<script>\r\nimport tabBar from \"../../components/tabBar/tabBar\";\r\n export default {\r\n data() {\r\n return {\r\n title: 'Hello'\r\n }\r\n },\r\n onLoad() {\r\n // 页面加载时执行\r\n },\r\n methods: {\r\n // 方法定义\r\n },\r\n components: {\r\n tabBar\r\n }\r\n }\r\n</script>\r\n\r\n<style scoped>\r\n.bg {\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n bottom: 0;\r\n z-index: -1;\r\n}\r\n.bgImg {\r\n width: 100%;\r\n height: 100%;\r\n}\r\n.title {\r\n position: absolute;\r\n top: 120rpx;\r\n left: 345rpx;\r\n font-size: 34rpx;\r\n color: #100e0f;\r\n font-weight: bold;\r\n}\r\n</style>","import MiniProgramPage from 'D:/项目/tk-mini-program/pages/Forum/Forum.vue'\nwx.createPage(MiniProgramPage)"],"names":[],"mappings":";;AAeA,eAAe,MAAW;AACtB,MAAK,YAAU;AAAA,EACX,OAAO;AACH,WAAO;AAAA,MACH,OAAO;AAAA,IACX;AAAA,EACH;AAAA,EACD,SAAS;AAAA,EAER;AAAA,EACD,SAAS;AAAA;AAAA,EAER;AAAA,EACD,YAAY;AAAA,IACR;AAAA,EACJ;AACJ;;;;;;;;;;;;;;;;;AC9BJ,GAAG,WAAW,eAAe;"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,284 @@
"use strict";
const common_vendor = require("./common/vendor.js");
const components_NationalDictionary = require("./components/NationalDictionary.js");
const components_request = require("./components/request.js");
const _sfc_main = {
data() {
return {
genders: 0,
//性别
Gender: [
{ label: "男", value: 1 },
{ label: "女", value: 2 }
],
Country: components_NationalDictionary.optionsArray,
countrys: "",
//国家
nameAnchor: "",
//主播名称
numberCoins: "",
//金币数量
session: "",
//场数
remarks: "",
//备注
Display: false,
Hint: false,
datetimesingle: "",
//日期
id: null,
//用户id
sendingTime: "",
//发送时间
filterable: true,
//是否可搜索
AnchorProfilePicture: ""
//主播头像
};
},
mounted() {
common_vendor.index.getStorage({
key: "userinfo",
success: (res) => {
this.id = res.data.id;
}
});
},
methods: {
gender(item) {
this.genders = item.value;
common_vendor.index.__f__("log", "at pages/NewAddedPk/NewAddedPk.vue:182", item);
},
country(item) {
this.countrys = item.value;
common_vendor.index.__f__("log", "at pages/NewAddedPk/NewAddedPk.vue:187", item);
},
handleOverlayClick(event) {
if (event.target === this.$el) {
this.Display = false;
this.Hint = false;
}
},
open() {
if (this.Display) {
this.Display = false;
this.Hint = false;
this.nameAnchor = "";
this.genders = 0;
this.numberCoins = "";
this.remarks = "";
this.datetimesingle = "";
this.countrys = "";
this.session = "";
} else {
this.Display = true;
}
},
//获取主播名称以及头像地址
blur(event) {
if (this.nameAnchor !== event.target.value) {
this.nameAnchor = event.target.value;
common_vendor.index.showLoading({
title: "正在验证主播",
mask: true
});
common_vendor.index.request({
url: "https://python.yolojt.com/api/" + this.nameAnchor,
success: (res) => {
if (res.data.code === 200) {
common_vendor.index.hideLoading();
common_vendor.index.showToast({
title: "查询成功",
icon: "none",
duration: 3e3
});
this.AnchorProfilePicture = res.data.data;
} else {
common_vendor.index.hideLoading();
common_vendor.index.showToast({
title: "未查询到该主播",
icon: "none",
duration: 3e3
});
}
},
fail: function(res) {
common_vendor.index.hideLoading();
common_vendor.index.showToast({
title: "网络请求失败",
icon: "none",
duration: 3e3
});
}
});
} else {
return;
}
},
async Publish() {
if (this.nameAnchor === "" || this.genders === 0 || this.numberCoins === "" || this.countrys === "" || this.datetimesingle === "" || this.session === "" || this.AnchorProfilePicture === "") {
this.Hint = true;
return;
}
if (this.remarks.includes(this.nameAnchor)) {
common_vendor.index.showToast({
title: "备注中不能包含主播昵称",
icon: "none",
duration: 2e3
});
return;
}
const isoString = this.datetimesingle.replace(" ", "T");
const timestamp = Date.parse(isoString);
if (isNaN(timestamp)) {
throw new Error(`Invalid date format: ${this.datetimesingle}`);
}
this.sendingTime = Math.floor(timestamp / 1e3);
const secondsTimestamp = Math.floor(Date.now() / 1e3);
if (this.sendingTime < secondsTimestamp) {
common_vendor.index.showToast({
title: "日期不能早于当前时间",
icon: "none",
duration: 2e3
});
return;
}
common_vendor.index.showLoading({
title: "发布中...",
mask: true
});
const res = await components_request.request({
url: "pk/addPkData",
method: "POST",
data: {
anchorId: this.nameAnchor,
pkTime: this.sendingTime,
sex: this.genders,
country: this.countrys,
coin: this.numberCoins,
remark: this.remarks,
senderId: this.id,
anchorIcon: this.AnchorProfilePicture,
pkNumber: this.session
},
userInfo: true
});
if (res.code === 200) {
this.Display = false;
this.Hint = false;
this.nameAnchor = "";
this.genders = 0;
this.numberCoins = "";
this.remarks = "";
this.datetimesingle = "";
this.session = "";
this.AnchorProfilePicture = "";
common_vendor.index.hideLoading();
common_vendor.index.showToast({
title: "发布成功",
icon: "success",
duration: 2e3
});
} else {
common_vendor.index.hideLoading();
common_vendor.index.showToast({
title: "发布失败",
icon: "none",
duration: 2e3
});
}
}
}
};
if (!Array) {
const _easycom_wht_select2 = common_vendor.resolveComponent("wht-select");
const _easycom_uni_number_box2 = common_vendor.resolveComponent("uni-number-box");
const _easycom_uni_datetime_picker2 = common_vendor.resolveComponent("uni-datetime-picker");
const _easycom_uni_easyinput2 = common_vendor.resolveComponent("uni-easyinput");
(_easycom_wht_select2 + _easycom_uni_number_box2 + _easycom_uni_datetime_picker2 + _easycom_uni_easyinput2)();
}
const _easycom_wht_select = () => "./uni_modules/wht-select/components/wht-select/wht-select.js";
const _easycom_uni_number_box = () => "./uni_modules/uni-number-box/components/uni-number-box/uni-number-box.js";
const _easycom_uni_datetime_picker = () => "./uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.js";
const _easycom_uni_easyinput = () => "./uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.js";
if (!Math) {
(_easycom_wht_select + _easycom_uni_number_box + _easycom_uni_datetime_picker + _easycom_uni_easyinput)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: $data.Display
}, $data.Display ? common_vendor.e({
b: common_vendor.o$1(($event) => $options.open()),
c: common_vendor.o$1((...args) => _ctx.NameAnchor && _ctx.NameAnchor(...args)),
d: common_vendor.o$1((...args) => $options.blur && $options.blur(...args)),
e: $data.nameAnchor === "" && $data.Hint === true
}, $data.nameAnchor === "" && $data.Hint === true ? {} : {}, {
f: common_vendor.o$1($options.country),
g: common_vendor.p({
backgroundColor: "#ffffff",
placeholderColor: "#666666",
textColor: "#666666",
borderColor: "#ffffff",
options: $data.Country,
filterable: $data.filterable,
placeholder: "请选择国家"
}),
h: $data.countrys === "" && $data.Hint === true
}, $data.countrys === "" && $data.Hint === true ? {} : {}, {
i: common_vendor.o$1($options.gender),
j: common_vendor.p({
backgroundColor: "#ffffff",
placeholderColor: "#666666",
textColor: "#666666",
borderColor: "#ffffff",
options: $data.Gender,
placeholder: "性别"
}),
k: $data.genders === 0
}, $data.genders === 0 ? {} : {}, {
l: $data.genders === 1
}, $data.genders === 1 ? {} : {}, {
m: $data.genders === 2
}, $data.genders === 2 ? {} : {}, {
n: $data.genders === 0 && $data.Hint === true
}, $data.genders === 0 && $data.Hint === true ? {} : {}, {
o: common_vendor.o$1(($event) => $data.numberCoins = $event),
p: common_vendor.p({
max: 9999999999,
background: "#03ABA8",
modelValue: $data.numberCoins
}),
q: $data.numberCoins === "" && $data.Hint === true
}, $data.numberCoins === "" && $data.Hint === true ? {} : {}, {
r: common_vendor.o$1(($event) => $data.datetimesingle = $event),
s: common_vendor.p({
type: "datetime",
["hide-second"]: "true",
modelValue: $data.datetimesingle
}),
t: $data.datetimesingle === "" && $data.Hint === true
}, $data.datetimesingle === "" && $data.Hint === true ? {} : {}, {
v: common_vendor.o$1(($event) => $data.session = $event),
w: common_vendor.p({
background: "#03ABA8",
modelValue: $data.session
}),
x: $data.session === "" && $data.Hint === true
}, $data.session === "" && $data.Hint === true ? {} : {}, {
y: common_vendor.o$1(($event) => $data.remarks = $event),
z: common_vendor.p({
type: "textarea",
placeholder: "备注",
maxlength: "-1",
modelValue: $data.remarks
}),
A: common_vendor.o$1(($event) => $options.Publish()),
B: common_vendor.o$1(() => {
}),
C: common_vendor.n($data.Display ? "create-module" : "close-animation "),
D: common_vendor.o$1(($event) => $options.open())
}) : {});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-96d38e2b"]]);
exports.MiniProgramPage = MiniProgramPage;
//# sourceMappingURL=../.sourcemap/mp-weixin/NewAddedPk.js.map

View File

@@ -0,0 +1,6 @@
"use strict";
const common_vendor = require("../common/vendor.js");
let vueVersion;
vueVersion = 3;
common_vendor.index.__f__("warn", "at TUIKit/adapter-vue.ts:13", `[adapter-vue]: vue version is ${vueVersion}`);
//# sourceMappingURL=../../.sourcemap/mp-weixin/TUIKit/adapter-vue.js.map

View File

@@ -0,0 +1,59 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
require("../../../adapter-vue.js");
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "index",
props: ["isGroup"],
emits: ["openGroupManagement"],
setup(__props, { emit: __emit }) {
const currentConversation = common_vendor.ref();
const typingStatus = common_vendor.ref(false);
const setChatHeaderContent = (content) => {
var _a;
(_a = common_vendor.i) == null ? void 0 : _a.setNavigationBarTitle({
title: content || "云通信 IM"
});
};
common_vendor.onMounted(() => {
common_vendor.Jt.watch(common_vendor.o.CONV, {
currentConversation: onCurrentConversationUpdated
});
common_vendor.Jt.watch(common_vendor.o.CHAT, {
typingStatus: onTypingStatusUpdated
});
});
common_vendor.onUnmounted(() => {
common_vendor.Jt.unwatch(common_vendor.o.CONV, {
currentConversation: onCurrentConversationUpdated
});
common_vendor.Jt.unwatch(common_vendor.o.CHAT, {
typingStatus: onTypingStatusUpdated
});
});
common_vendor.onLoad(() => {
var _a;
setChatHeaderContent((_a = currentConversation.value) == null ? void 0 : _a.getShowName());
});
function onCurrentConversationUpdated(conversation) {
var _a;
currentConversation.value = conversation;
if (!typingStatus.value) {
setChatHeaderContent((_a = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _a.getShowName());
}
}
function onTypingStatusUpdated(status) {
var _a;
typingStatus.value = status;
if (typingStatus.value) {
setChatHeaderContent(common_vendor.Wt.t("TUIChat.对方正在输入"));
} else {
setChatHeaderContent((_a = currentConversation.value) == null ? void 0 : _a.getShowName());
}
}
return (_ctx, _cache) => {
return {};
};
}
});
wx.createComponent(_sfc_main);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/chat-header/index.js.map

View File

@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@@ -0,0 +1 @@
<view style="display:flex"/>

View File

@@ -0,0 +1,69 @@
"use strict";
class TUIChatConfig {
constructor() {
this.chatType = "";
this.features = {
DownloadFile: true,
CopyMessage: true,
DeleteMessage: true,
RevokeMessage: true,
QuoteMessage: true,
ForwardMessage: true,
TranslateMessage: true,
VoiceToText: true,
MultiSelection: true,
EmojiReaction: true,
InputEmoji: true,
InputStickers: true,
InputImage: true,
InputVoice: true,
InputVideo: true,
InputFile: true,
InputEvaluation: true,
InputQuickReplies: true,
InputCustomMessage: true,
InputMention: true,
MessageSearch: true,
ReadStatus: true
};
this.theme = "light";
}
static getInstance() {
if (!TUIChatConfig.instance) {
TUIChatConfig.instance = new TUIChatConfig();
}
return TUIChatConfig.instance;
}
setChatType(chatType) {
this.chatType = chatType;
}
getChatType() {
return this.chatType;
}
hideTUIChatFeatures(features) {
if (!features) {
return;
}
features.forEach((feature) => {
if (this.features[feature]) {
this.features[feature] = false;
}
});
}
getFeatureConfig(key) {
if (key) {
return this.features[key];
}
return this.features;
}
setTheme(theme) {
this.theme = theme;
}
getTheme() {
return this.theme;
}
}
const ChatConfig = TUIChatConfig.getInstance();
ChatConfig.hideTUIChatFeatures.bind(ChatConfig);
exports.ChatConfig = ChatConfig;
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/config.js.map

View File

@@ -0,0 +1,6 @@
"use strict";
const CUSTOM_BIG_EMOJI_URL = "";
const CUSTOM_BIG_EMOJI_GROUP_LIST = [];
exports.CUSTOM_BIG_EMOJI_GROUP_LIST = CUSTOM_BIG_EMOJI_GROUP_LIST;
exports.CUSTOM_BIG_EMOJI_URL = CUSTOM_BIG_EMOJI_URL;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/emoji-config/custom-emoji.js.map

View File

@@ -0,0 +1,159 @@
"use strict";
var _a, _b;
const TUIKit_components_TUIChat_emojiConfig_locales_zh_cn = require("./locales/zh_cn.js");
const TUIKit_components_TUIChat_emojiConfig_locales_en = require("./locales/en.js");
const TUIKit_constant = require("../../../constant.js");
const DEFAULT_BASIC_EMOJI_URL = "https://web.sdk.qcloud.com/im/assets/emoji-plugin/";
const DEFAULT_BIG_EMOJI_URL = "https://web.sdk.qcloud.com/im/assets/face-elem/";
const DEFAULT_BASIC_EMOJI_URL_MAPPING = {
"[TUIEmoji_Expect]": "emoji_0@2x.png",
"[TUIEmoji_Blink]": "emoji_1@2x.png",
"[TUIEmoji_Guffaw]": "emoji_2@2x.png",
"[TUIEmoji_KindSmile]": "emoji_3@2x.png",
"[TUIEmoji_Haha]": "emoji_4@2x.png",
"[TUIEmoji_Cheerful]": "emoji_5@2x.png",
"[TUIEmoji_Smile]": "emoji_6@2x.png",
"[TUIEmoji_Sorrow]": "emoji_7@2x.png",
"[TUIEmoji_Speechless]": "emoji_8@2x.png",
"[TUIEmoji_Amazed]": "emoji_9@2x.png",
"[TUIEmoji_Complacent]": "emoji_10@2x.png",
"[TUIEmoji_Lustful]": "emoji_11@2x.png",
"[TUIEmoji_Stareyes]": "emoji_12@2x.png",
"[TUIEmoji_Giggle]": "emoji_13@2x.png",
"[TUIEmoji_Daemon]": "emoji_14@2x.png",
"[TUIEmoji_Rage]": "emoji_15@2x.png",
"[TUIEmoji_Yawn]": "emoji_16@2x.png",
"[TUIEmoji_TearsLaugh]": "emoji_17@2x.png",
"[TUIEmoji_Silly]": "emoji_18@2x.png",
"[TUIEmoji_Wail]": "emoji_19@2x.png",
"[TUIEmoji_Kiss]": "emoji_20@2x.png",
"[TUIEmoji_Trapped]": "emoji_21@2x.png",
"[TUIEmoji_Fear]": "emoji_22@2x.png",
"[TUIEmoji_BareTeeth]": "emoji_23@2x.png",
"[TUIEmoji_FlareUp]": "emoji_24@2x.png",
"[TUIEmoji_Tact]": "emoji_25@2x.png",
"[TUIEmoji_Shit]": "emoji_26@2x.png",
"[TUIEmoji_ShutUp]": "emoji_27@2x.png",
"[TUIEmoji_Sigh]": "emoji_28@2x.png",
"[TUIEmoji_Hehe]": "emoji_29@2x.png",
"[TUIEmoji_Silent]": "emoji_30@2x.png",
"[TUIEmoji_Skull]": "emoji_31@2x.png",
"[TUIEmoji_Mask]": "emoji_32@2x.png",
"[TUIEmoji_Beer]": "emoji_33@2x.png",
"[TUIEmoji_Cake]": "emoji_34@2x.png",
"[TUIEmoji_RedPacket]": "emoji_35@2x.png",
"[TUIEmoji_Bombs]": "emoji_36@2x.png",
"[TUIEmoji_Ai]": "emoji_37@2x.png",
"[TUIEmoji_Celebrate]": "emoji_38@2x.png",
"[TUIEmoji_Bless]": "emoji_39@2x.png",
"[TUIEmoji_Flower]": "emoji_40@2x.png",
"[TUIEmoji_Watermelon]": "emoji_41@2x.png",
"[TUIEmoji_Cow]": "emoji_42@2x.png",
"[TUIEmoji_Fool]": "emoji_43@2x.png",
"[TUIEmoji_Surprised]": "emoji_44@2x.png",
"[TUIEmoji_Askance]": "emoji_45@2x.png",
"[TUIEmoji_Monster]": "emoji_46@2x.png",
"[TUIEmoji_Pig]": "emoji_47@2x.png",
"[TUIEmoji_Coffee]": "emoji_48@2x.png",
"[TUIEmoji_Ok]": "emoji_49@2x.png",
"[TUIEmoji_Heart]": "emoji_50@2x.png",
"[TUIEmoji_Sun]": "emoji_51@2x.png",
"[TUIEmoji_Moon]": "emoji_52@2x.png",
"[TUIEmoji_Star]": "emoji_53@2x.png",
"[TUIEmoji_Rich]": "emoji_54@2x.png",
"[TUIEmoji_Fortune]": "emoji_55@2x.png",
"[TUIEmoji_857]": "emoji_56@2x.png",
"[TUIEmoji_666]": "emoji_57@2x.png",
"[TUIEmoji_Prohibit]": "emoji_58@2x.png",
"[TUIEmoji_Convinced]": "emoji_59@2x.png",
"[TUIEmoji_Knife]": "emoji_60@2x.png",
"[TUIEmoji_Like]": "emoji_61@2x.png"
};
const BIG_EMOJI_GROUP_LIST = [
{
emojiGroupID: 1,
type: TUIKit_constant.EMOJI_TYPE.BIG,
url: DEFAULT_BIG_EMOJI_URL,
list: [
"yz00",
"yz01",
"yz02",
"yz03",
"yz04",
"yz05",
"yz06",
"yz07",
"yz08",
"yz09",
"yz10",
"yz11",
"yz12",
"yz13",
"yz14",
"yz15",
"yz16",
"yz17"
]
},
{
emojiGroupID: 2,
type: TUIKit_constant.EMOJI_TYPE.BIG,
url: DEFAULT_BIG_EMOJI_URL,
list: [
"ys00",
"ys01",
"ys02",
"ys03",
"ys04",
"ys05",
"ys06",
"ys07",
"ys08",
"ys09",
"ys10",
"ys11",
"ys12",
"ys13",
"ys14",
"ys15"
]
},
{
emojiGroupID: 3,
type: TUIKit_constant.EMOJI_TYPE.BIG,
url: DEFAULT_BIG_EMOJI_URL,
list: [
"gcs00",
"gcs01",
"gcs02",
"gcs03",
"gcs04",
"gcs05",
"gcs06",
"gcs07",
"gcs08",
"gcs09",
"gcs10",
"gcs11",
"gcs12",
"gcs13",
"gcs14",
"gcs15",
"gcs16"
]
}
];
const BASIC_EMOJI_NAME_TO_KEY_MAPPING = {
...Object.fromEntries(
(_a = Object.entries(TUIKit_components_TUIChat_emojiConfig_locales_zh_cn.Emoji)) == null ? void 0 : _a.map(([key, val]) => [val, key])
),
...Object.fromEntries(
(_b = Object.entries(TUIKit_components_TUIChat_emojiConfig_locales_en.Emoji)) == null ? void 0 : _b.map(([key, val]) => [val, key])
)
};
exports.BASIC_EMOJI_NAME_TO_KEY_MAPPING = BASIC_EMOJI_NAME_TO_KEY_MAPPING;
exports.BIG_EMOJI_GROUP_LIST = BIG_EMOJI_GROUP_LIST;
exports.DEFAULT_BASIC_EMOJI_URL = DEFAULT_BASIC_EMOJI_URL;
exports.DEFAULT_BASIC_EMOJI_URL_MAPPING = DEFAULT_BASIC_EMOJI_URL_MAPPING;
exports.DEFAULT_BIG_EMOJI_URL = DEFAULT_BIG_EMOJI_URL;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/emoji-config/default-emoji.js.map

View File

@@ -0,0 +1,77 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
const TUIKit_components_TUIChat_emojiConfig_customEmoji = require("./custom-emoji.js");
const TUIKit_components_TUIChat_emojiConfig_defaultEmoji = require("./default-emoji.js");
const TUIKit_components_TUIChat_emojiConfig_locales_zh_cn = require("./locales/zh_cn.js");
const TUIKit_constant = require("../../../constant.js");
const TUIKit_utils_env = require("../../../utils/env.js");
const BASIC_EMOJI_URL = TUIKit_components_TUIChat_emojiConfig_defaultEmoji.DEFAULT_BASIC_EMOJI_URL;
const BASIC_EMOJI_URL_MAPPING = TUIKit_components_TUIChat_emojiConfig_defaultEmoji.DEFAULT_BASIC_EMOJI_URL_MAPPING;
const EMOJI_GROUP_LIST = [
{
emojiGroupID: 0,
type: TUIKit_constant.EMOJI_TYPE.BASIC,
url: BASIC_EMOJI_URL,
list: Object.keys(BASIC_EMOJI_URL_MAPPING)
},
...TUIKit_components_TUIChat_emojiConfig_defaultEmoji.BIG_EMOJI_GROUP_LIST,
...TUIKit_components_TUIChat_emojiConfig_customEmoji.CUSTOM_BIG_EMOJI_GROUP_LIST
];
const convertKeyToEmojiName = (key) => {
return TUIKit_utils_env.isWeChat ? TUIKit_components_TUIChat_emojiConfig_locales_zh_cn.Emoji[key] : common_vendor.Wt.t(`Emoji.${key}`);
};
const transformTextWithKeysToEmojiNames = (text) => {
if (!text) {
return "";
}
const reg = /(\[.+?\])/g;
let txt = text;
if (reg.test(text)) {
txt = text.replace(reg, (match) => BASIC_EMOJI_URL_MAPPING[match] ? convertKeyToEmojiName(match) : match);
}
return txt;
};
const transformTextWithEmojiNamesToKeys = (text) => {
if (!text) {
return "";
}
const reg = /(\[.+?\])/g;
let txt = text;
if (reg.test(text)) {
txt = text.replace(reg, (match) => TUIKit_components_TUIChat_emojiConfig_defaultEmoji.BASIC_EMOJI_NAME_TO_KEY_MAPPING[match] || match);
}
return txt;
};
const parseTextToRenderArray = (text) => {
const emojiRegex = /\[([^\]]+)\]/g;
const result = [];
let match;
let lastIndex = 0;
while ((match = emojiRegex.exec(text)) !== null) {
const startIndex = match.index;
const endIndex = emojiRegex.lastIndex;
const emojiKey = match[0];
if (startIndex > lastIndex) {
result.push({ type: "text", content: text.substring(lastIndex, startIndex) });
}
const emojiUrl = BASIC_EMOJI_URL + BASIC_EMOJI_URL_MAPPING[emojiKey];
if (emojiUrl) {
result.push({ type: "image", content: emojiUrl, emojiKey });
} else {
result.push({ type: "text", content: emojiKey });
}
lastIndex = endIndex;
emojiRegex.lastIndex = lastIndex;
}
if (lastIndex < text.length) {
result.push({ type: "text", content: text.substring(lastIndex) });
}
return result;
};
exports.BASIC_EMOJI_URL_MAPPING = BASIC_EMOJI_URL_MAPPING;
exports.EMOJI_GROUP_LIST = EMOJI_GROUP_LIST;
exports.convertKeyToEmojiName = convertKeyToEmojiName;
exports.parseTextToRenderArray = parseTextToRenderArray;
exports.transformTextWithEmojiNamesToKeys = transformTextWithEmojiNamesToKeys;
exports.transformTextWithKeysToEmojiNames = transformTextWithKeysToEmojiNames;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/emoji-config/index.js.map

View File

@@ -0,0 +1,67 @@
"use strict";
const Emoji = {
"[TUIEmoji_Smile]": "[Smile]",
"[TUIEmoji_Expect]": "[Expect]",
"[TUIEmoji_Blink]": "[Blink]",
"[TUIEmoji_Guffaw]": "[Guffaw]",
"[TUIEmoji_KindSmile]": "[KindSmile]",
"[TUIEmoji_Haha]": "[Haha]",
"[TUIEmoji_Cheerful]": "[Cheerful]",
"[TUIEmoji_Speechless]": "[Speechless]",
"[TUIEmoji_Amazed]": "[Amazed]",
"[TUIEmoji_Sorrow]": "[Sorrow]",
"[TUIEmoji_Complacent]": "[Complacent]",
"[TUIEmoji_Silly]": "[Silly]",
"[TUIEmoji_Lustful]": "[Lustful]",
"[TUIEmoji_Giggle]": "[Giggle]",
"[TUIEmoji_Kiss]": "[Kiss]",
"[TUIEmoji_Wail]": "[Wail]",
"[TUIEmoji_TearsLaugh]": "[TearsLaugh]",
"[TUIEmoji_Trapped]": "[Trapped]",
"[TUIEmoji_Mask]": "[Mask]",
"[TUIEmoji_Fear]": "[Fear]",
"[TUIEmoji_BareTeeth]": "[BareTeeth]",
"[TUIEmoji_FlareUp]": "[FlareUp]",
"[TUIEmoji_Yawn]": "[Yawn]",
"[TUIEmoji_Tact]": "[Tact]",
"[TUIEmoji_Stareyes]": "[StarEyes]",
"[TUIEmoji_ShutUp]": "[ShutUp]",
"[TUIEmoji_Sigh]": "[Sigh]",
"[TUIEmoji_Hehe]": "[Hehe]",
"[TUIEmoji_Silent]": "[Silent]",
"[TUIEmoji_Surprised]": "[Surprised]",
"[TUIEmoji_Askance]": "[Askance]]",
"[TUIEmoji_Ok]": "[OK]",
"[TUIEmoji_Shit]": "[Shit]",
"[TUIEmoji_Monster]": "[Monster]",
"[TUIEmoji_Daemon]": "[Daemon]",
"[TUIEmoji_Rage]": "[Rage]",
"[TUIEmoji_Fool]": "[Fool]",
"[TUIEmoji_Pig]": "[Pig]",
"[TUIEmoji_Cow]": "[Cow]",
"[TUIEmoji_Ai]": "[AI]",
"[TUIEmoji_Skull]": "[Skull]",
"[TUIEmoji_Bombs]": "[Bombs]",
"[TUIEmoji_Coffee]": "[Coffee]",
"[TUIEmoji_Cake]": "[Cake]",
"[TUIEmoji_Beer]": "[Beer]",
"[TUIEmoji_Flower]": "[Flower]",
"[TUIEmoji_Watermelon]": "[Watermelon]",
"[TUIEmoji_Rich]": "[Rich]",
"[TUIEmoji_Heart]": "[Heart]",
"[TUIEmoji_Moon]": "[Moon]",
"[TUIEmoji_Sun]": "[Sun]",
"[TUIEmoji_Star]": "[Star]",
"[TUIEmoji_RedPacket]": "[RedPacket]",
"[TUIEmoji_Celebrate]": "[Celebrate]",
"[TUIEmoji_Bless]": "[Bless]",
"[TUIEmoji_Fortune]": "[Fortune]",
"[TUIEmoji_Convinced]": "[Convinced]",
"[TUIEmoji_Prohibit]": "[Prohibit]",
"[TUIEmoji_666]": "[666]",
"[TUIEmoji_857]": "[857]",
"[TUIEmoji_Knife]": "[Knife]",
"[TUIEmoji_Like]": "[Like]"
};
exports.Emoji = Emoji;
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/emoji-config/locales/en.js.map

View File

@@ -0,0 +1,67 @@
"use strict";
const Emoji = {
"[TUIEmoji_Smile]": "[微笑]",
"[TUIEmoji_Expect]": "[期待]",
"[TUIEmoji_Blink]": "[眨眼]",
"[TUIEmoji_Guffaw]": "[大笑]",
"[TUIEmoji_KindSmile]": "[姨母笑]",
"[TUIEmoji_Haha]": "[哈哈哈]",
"[TUIEmoji_Cheerful]": "[愉快]",
"[TUIEmoji_Speechless]": "[无语]",
"[TUIEmoji_Amazed]": "[惊讶]",
"[TUIEmoji_Sorrow]": "[悲伤]",
"[TUIEmoji_Complacent]": "[得意]",
"[TUIEmoji_Silly]": "[傻了]",
"[TUIEmoji_Lustful]": "[色]",
"[TUIEmoji_Giggle]": "[憨笑]",
"[TUIEmoji_Kiss]": "[亲亲]",
"[TUIEmoji_Wail]": "[大哭]",
"[TUIEmoji_TearsLaugh]": "[哭笑]",
"[TUIEmoji_Trapped]": "[困]",
"[TUIEmoji_Mask]": "[口罩]",
"[TUIEmoji_Fear]": "[恐惧]",
"[TUIEmoji_BareTeeth]": "[龇牙]",
"[TUIEmoji_FlareUp]": "[发怒]",
"[TUIEmoji_Yawn]": "[打哈欠]",
"[TUIEmoji_Tact]": "[机智]",
"[TUIEmoji_Stareyes]": "[星星眼]",
"[TUIEmoji_ShutUp]": "[闭嘴]",
"[TUIEmoji_Sigh]": "[叹气]",
"[TUIEmoji_Hehe]": "[呵呵]",
"[TUIEmoji_Silent]": "[收声]",
"[TUIEmoji_Surprised]": "[惊喜]",
"[TUIEmoji_Askance]": "[白眼]",
"[TUIEmoji_Ok]": "[OK]",
"[TUIEmoji_Shit]": "[便便]",
"[TUIEmoji_Monster]": "[怪兽]",
"[TUIEmoji_Daemon]": "[恶魔]",
"[TUIEmoji_Rage]": "[恶魔怒]",
"[TUIEmoji_Fool]": "[衰]",
"[TUIEmoji_Pig]": "[猪]",
"[TUIEmoji_Cow]": "[牛]",
"[TUIEmoji_Ai]": "[AI]",
"[TUIEmoji_Skull]": "[骷髅]",
"[TUIEmoji_Bombs]": "[炸弹]",
"[TUIEmoji_Coffee]": "[咖啡]",
"[TUIEmoji_Cake]": "[蛋糕]",
"[TUIEmoji_Beer]": "[啤酒]",
"[TUIEmoji_Flower]": "[花]",
"[TUIEmoji_Watermelon]": "[瓜]",
"[TUIEmoji_Rich]": "[壕]",
"[TUIEmoji_Heart]": "[爱心]",
"[TUIEmoji_Moon]": "[月亮]",
"[TUIEmoji_Sun]": "[太阳]",
"[TUIEmoji_Star]": "[星星]",
"[TUIEmoji_RedPacket]": "[红包]",
"[TUIEmoji_Celebrate]": "[庆祝]",
"[TUIEmoji_Bless]": "[福]",
"[TUIEmoji_Fortune]": "[发]",
"[TUIEmoji_Convinced]": "[服]",
"[TUIEmoji_Prohibit]": "[禁]",
"[TUIEmoji_666]": "[666]",
"[TUIEmoji_857]": "[857]",
"[TUIEmoji_Knife]": "[刀]",
"[TUIEmoji_Like]": "[赞]"
};
exports.Emoji = Emoji;
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/emoji-config/locales/zh_cn.js.map

View File

@@ -0,0 +1,24 @@
"use strict";
const common_vendor = require("../../../common/vendor.js");
const TUIKit_index = require("../../index.js");
const initChat = (options) => {
TUIKit_index.TUIChatKit.init();
const { chat } = common_vendor.A.getContext();
if (options && options.conversationID && (chat == null ? void 0 : chat.isReady())) {
const { conversationID } = options;
if (!conversationID.startsWith("C2C") && !conversationID.startsWith("GROUP")) {
common_vendor.index.__f__("warn", "at TUIKit/components/TUIChat/entry-chat-only.ts:22", "conversationID from options is invalid.");
return;
}
common_vendor.Xt.switchConversation(conversationID);
}
};
const logout = (flag) => {
if (flag) {
return common_vendor.A.logout();
}
return Promise.resolve();
};
exports.initChat = initChat;
exports.logout = logout;
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/entry-chat-only.js.map

View File

@@ -0,0 +1,144 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
require("../../../adapter-vue.js");
const TUIKit_components_common_Toast_index = require("../../common/Toast/index.js");
const TUIKit_utils_env = require("../../../utils/env.js");
const TUIKit_components_TUIChat_utils_utils = require("../utils/utils.js");
const TUIKit_components_TUIChat_offlinePushInfoManager_index = require("../offlinePushInfoManager/index.js");
const TUIKit_components_common_Toast_type = require("../../common/Toast/type.js");
if (!Math) {
(Transfer + Overlay)();
}
const Overlay = () => "../../common/Overlay/index.js";
const Transfer = () => "../../common/Transfer/index.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "index",
emits: ["toggleMultipleSelectMode"],
setup(__props, { emit: __emit }) {
const emits = __emit;
let selectedToForwardMessageIDList = [];
let isMergeForward = false;
const isShowForwardPanel = common_vendor.ref(false);
const customConversationList = common_vendor.ref();
common_vendor.onMounted(() => {
common_vendor.Jt.watch(common_vendor.o.CUSTOM, {
singleForwardMessageID: onSingleForwardMessageIDUpdated,
multipleForwardMessageID: onMultipleForwardMessageIDUpdated
});
});
common_vendor.onUnmounted(() => {
common_vendor.Jt.unwatch(common_vendor.o.CUSTOM, {
singleForwardMessageID: onSingleForwardMessageIDUpdated,
multipleForwardMessageID: onMultipleForwardMessageIDUpdated
});
clearStoreData();
});
function onSingleForwardMessageIDUpdated(messageID) {
if (typeof messageID !== "undefined") {
isMergeForward = false;
selectedToForwardMessageIDList = [messageID];
openForwardPanel();
}
}
function onMultipleForwardMessageIDUpdated(params) {
if (!params) {
return;
}
isMergeForward = false;
const {
isMergeForward: _isMergeForward,
messageIDList: selectedMessageIDList
} = params || {};
if ((selectedMessageIDList == null ? void 0 : selectedMessageIDList.length) > 0) {
isMergeForward = _isMergeForward;
selectedToForwardMessageIDList = selectedMessageIDList;
openForwardPanel();
} else {
TUIKit_components_common_Toast_index.Toast({
message: common_vendor.Wt.t("TUIChat.未选择消息"),
type: TUIKit_components_common_Toast_type.TOAST_TYPE.ERROR
});
}
}
function clearStoreData() {
common_vendor.Jt.update(common_vendor.o.CUSTOM, "singleForwardMessageID", void 0);
common_vendor.Jt.update(common_vendor.o.CUSTOM, "multipleForwardMessageID", void 0);
}
function closeForwardPanel() {
clearStoreData();
isShowForwardPanel.value = false;
}
function openForwardPanel() {
getTransforRenderDataList();
isShowForwardPanel.value = true;
}
function finishSelected(selectedConvIDWrapperList) {
if ((selectedConvIDWrapperList == null ? void 0 : selectedConvIDWrapperList.length) === 0)
return;
const selectedConversationList = selectedConvIDWrapperList.map((IDWrapper) => common_vendor.Jt.getConversationModel(IDWrapper.userID));
const unsentMessageQueue = selectedToForwardMessageIDList.map((messageID) => common_vendor.Jt.getMessageModel(messageID)).sort((a, b) => a.time - b.time);
const forwardPromises = selectedConversationList.map((conversation) => {
const offlinePushInfoCreateParams = {
conversation,
messageType: common_vendor.qt.TYPES.MSG_MERGER
};
return common_vendor.Qt.sendForwardMessage(
[conversation],
unsentMessageQueue,
{
needMerge: isMergeForward,
offlinePushInfo: TUIKit_components_TUIChat_offlinePushInfoManager_index.OfflinePushInfoManager.create(offlinePushInfoCreateParams),
params: {
needReadReceipt: TUIKit_components_TUIChat_utils_utils.isEnabledMessageReadReceiptGlobal()
}
}
);
});
Promise.allSettled(forwardPromises).then((results) => {
for (const result of results) {
const { status } = result;
if (status === "rejected") {
const errorMessage = result.reason.code === 80001 ? common_vendor.Wt.t("TUIChat.内容包含敏感词汇") : result.reason.message;
TUIKit_components_common_Toast_index.Toast({
message: errorMessage,
type: TUIKit_components_common_Toast_type.TOAST_TYPE.ERROR
});
break;
}
}
});
closeForwardPanel();
emits("toggleMultipleSelectMode", false);
}
function getTransforRenderDataList() {
const conversationList = common_vendor.Jt.getData(common_vendor.o.CONV, "conversationList");
customConversationList.value = conversationList.map((conversation) => {
return {
// To achieve reusability of Transfer, userID is used here instead of ConversationID
userID: conversation.conversationID,
nick: conversation.getShowName(),
avatar: conversation.getAvatar()
};
});
}
return (_ctx, _cache) => {
return {
a: common_vendor.o$1(closeForwardPanel),
b: common_vendor.o$1(finishSelected),
c: common_vendor.p({
title: common_vendor.unref(common_vendor.Wt).t("TUIChat.转发"),
isSearch: false,
isCustomItem: false,
list: common_vendor.unref(customConversationList),
isHiddenBackIcon: common_vendor.unref(TUIKit_utils_env.isUniFrameWork)
}),
d: common_vendor.p({
visible: common_vendor.unref(isShowForwardPanel),
useMask: false
})
};
};
}
});
wx.createComponent(_sfc_main);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/forward/index.js.map

View File

@@ -0,0 +1,7 @@
{
"component": true,
"usingComponents": {
"overlay": "../../common/Overlay/index",
"transfer": "../../common/Transfer/index"
}
}

View File

@@ -0,0 +1 @@
<overlay wx:if="{{d}}" u-s="{{['d']}}" u-i="3f0343b7-0" bind:__l="__l" u-p="{{d}}"><transfer wx:if="{{c}}" bindcancel="{{a}}" bindsubmit="{{b}}" u-i="3f0343b7-1,3f0343b7-0" bind:__l="__l" u-p="{{c}}"/></overlay>

View File

@@ -0,0 +1,4 @@
"use strict";
const TUIKit_components_index = require("../index.js");
wx.createPage(TUIKit_components_index.MiniProgramPage$1);
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/index.js.map

View File

@@ -0,0 +1,11 @@
{
"navigationBarTitleText": "腾讯云 IM",
"usingComponents": {
"chat-header": "./chat-header/index",
"message-list": "./message-list/index",
"message-input": "./message-input/index",
"multiple-select-panel": "./mulitple-select-panel/index",
"forward": "./forward/index",
"message-input-toolbar": "./message-input-toolbar/index"
}
}

View File

@@ -0,0 +1 @@
<view class="dingweizhibox data-v-04dfedea"></view><view class="chat data-v-04dfedea"><view class="{{['data-v-04dfedea', 'tui-chat', O]}}"><view wx:if="{{a}}" class="{{['data-v-04dfedea', 'tui-chat-default', b]}}"><slot/></view><view wx:if="{{c}}" class="{{['data-v-04dfedea', 'tui-chat', K]}}"><chat-header wx:if="{{h}}" class="{{['data-v-04dfedea', 'tui-chat-header', d, e]}}" bindcloseChat="{{f}}" bindopenGroupManagement="{{g}}" u-i="04dfedea-0" bind:__l="__l" u-p="{{h}}"/><forward class="data-v-04dfedea" bindtoggleMultipleSelectMode="{{i}}" u-i="04dfedea-1" bind:__l="__l"/><message-list wx:if="{{o}}" u-r="messageListRef" class="{{['r', 'data-v-04dfedea', 'tui-chat-message-list', k]}}" bindhandleEditor="{{l}}" bindcloseInputToolBar="{{m}}" bindtoggleMultipleSelectMode="{{n}}" u-i="04dfedea-2" bind:__l="__l" u-p="{{o}}"/><view wx:if="{{p}}" class="{{['data-v-04dfedea', 'tui-chat-leave-group', r && 'tui-chat-leave-group-mobile']}}">{{q}}</view><multiple-select-panel wx:elif="{{s}}" class="data-v-04dfedea" bindoneByOneForwardMessage="{{t}}" bindmergeForwardMessage="{{v}}" bindtoggleMultipleSelectMode="{{w}}" u-i="04dfedea-3" bind:__l="__l"/><block wx:else><message-input-toolbar wx:if="{{x}}" class="{{['data-v-04dfedea', 'tui-chat-message-input-toolbar', y, z]}}" bindinsertEmoji="{{A}}" bindchangeToolbarDisplayType="{{B}}" bindscrollToLatestMessage="{{C}}" u-i="04dfedea-4" bind:__l="__l" u-p="{{D}}"/><message-input wx:if="{{J}}" u-r="messageInputRef" class="{{['r', 'data-v-04dfedea', 'tui-chat-message-input', F, G, H]}}" bindchangeToolbarDisplayType="{{I}}" u-i="04dfedea-5" bind:__l="__l" u-p="{{J}}"/></block></view><view wx:if="{{L}}" class="group-profile data-v-04dfedea" bindtap="{{N}}">{{M}}</view></view></view>

View File

@@ -0,0 +1,707 @@
.Navigation {
width: 100%;
height: 100rpx;
z-index: 999;
}
.Navigationimg {
width: 100%;
height: 200rpx;
position: absolute;
top: 0;
left: 0;
z-index: -1;
}
.Navigation {
width: 100%;
height: 200rpx;
z-index: 999;
display: flex;
justify-content: center;
align-items: center;
}
.Navigation-left{
width: 100%;
height: 200rpx;
z-index: 998;
}
.Return {
width: 70rpx;
height: 70rpx;
position: absolute;
top: 120rpx;
left: 360rpx;
z-index: 999;
font-weight: bold;
}
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
body.data-v-40b33296, div.data-v-40b33296, ul.data-v-40b33296, ol.data-v-40b33296, dt.data-v-40b33296, dd.data-v-40b33296, li.data-v-40b33296, dl.data-v-40b33296, h1.data-v-40b33296, h2.data-v-40b33296, h3.data-v-40b33296, h4.data-v-40b33296, p.data-v-40b33296 {
margin: 0;
padding: 0;
font-style: normal;
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
}
ol.data-v-40b33296, ul.data-v-40b33296, li.data-v-40b33296 {
list-style: none;
}
img.data-v-40b33296 {
border: 0;
vertical-align: middle;
pointer-events: none;
}
body.data-v-40b33296 {
color: #000;
background: #FFF;
}
.clear.data-v-40b33296 {
clear: both;
height: 1px;
width: 100%;
overflow: hidden;
margin-top: -1px;
}
a.data-v-40b33296 {
color: #000;
text-decoration: none;
cursor: pointer;
}
a.data-v-40b33296:hover {
text-decoration: none;
}
input.data-v-40b33296, textarea.data-v-40b33296 {
-webkit-user-select: auto;
user-select: auto;
}
input.data-v-40b33296:focus, input.data-v-40b33296:active, textarea.data-v-40b33296:focus, textarea.data-v-40b33296:active {
outline: none;
}
.chat-aside.data-v-40b33296 {
position: absolute;
top: 50px;
right: 0;
box-sizing: border-box;
width: 360px !important;
border-radius: 8px 0 0 8px;
z-index: 9999;
max-height: calc(100% - 50px);
}
.tui-conversation.data-v-40b33296 {
width: 100%;
height: 100%;
flex: 1;
overflow: hidden;
display: flex;
flex-direction: column;
}
.tui-conversation-list.data-v-40b33296 {
overflow: auto;
}
.tui-conversation-header.data-v-40b33296 {
width: 100%;
position: relative;
}
.tui-conversation-header .list.data-v-40b33296 {
display: flex;
align-items: center;
border-bottom: 1px solid #F4F5F9;
padding: 7px 0;
}
.tui-conversation-header .list-item.data-v-40b33296 {
flex: 1;
display: flex;
position: relative;
padding: 7px;
cursor: pointer;
-webkit-user-select: none;
user-select: none;
}
.tui-conversation-header-item.data-v-40b33296 {
flex: 1;
display: flex;
align-items: center;
}
.tui-conversation-header-item-title.data-v-40b33296 {
padding: 0 8px;
font-size: 16px;
font-weight: normal;
}
.tui-conversation-header-children.data-v-40b33296 {
position: absolute;
top: 100%;
z-index: 3;
padding: 7px 9px;
border-bottom: none;
box-shadow: 0 3px 7px 0 #0003;
flex-direction: column;
}
.network.data-v-40b33296 {
padding: 0 12px;
display: flex;
align-items: center;
}
.network .icon-error.data-v-40b33296 {
display: flex;
justify-content: center;
align-items: center;
width: 15px;
height: 15px;
border-radius: 15px;
color: #fff;
font-style: normal;
}
.network-content.data-v-40b33296 {
padding: 5px;
font-size: 12px;
line-height: 22px;
}
.plus.data-v-40b33296 {
display: inline-block;
width: 30px;
height: 30px;
position: relative;
}
.plus.data-v-40b33296::before,
.plus.data-v-40b33296::after {
content: "";
position: absolute;
background-color: #232832;
border-radius: 0.5px;
width: 1px;
height: 14px;
left: 0;
right: 0;
top: 0;
bottom: 0;
margin: auto;
}
.plus.data-v-40b33296::after {
transform: rotate(90deg);
width: 0.5px;
}
.network-content.data-v-40b33296 {
font-family: PingFangSC-Regular;
font-weight: 400;
color: #e54545;
letter-spacing: 0;
}
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
body.data-v-fdde69b1, div.data-v-fdde69b1, ul.data-v-fdde69b1, ol.data-v-fdde69b1, dt.data-v-fdde69b1, dd.data-v-fdde69b1, li.data-v-fdde69b1, dl.data-v-fdde69b1, h1.data-v-fdde69b1, h2.data-v-fdde69b1, h3.data-v-fdde69b1, h4.data-v-fdde69b1, p.data-v-fdde69b1 {
margin: 0;
padding: 0;
font-style: normal;
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
}
ol.data-v-fdde69b1, ul.data-v-fdde69b1, li.data-v-fdde69b1 {
list-style: none;
}
img.data-v-fdde69b1 {
border: 0;
vertical-align: middle;
pointer-events: none;
}
body.data-v-fdde69b1 {
color: #000;
background: #FFF;
}
.clear.data-v-fdde69b1 {
clear: both;
height: 1px;
width: 100%;
overflow: hidden;
margin-top: -1px;
}
a.data-v-fdde69b1 {
color: #000;
text-decoration: none;
cursor: pointer;
}
a.data-v-fdde69b1:hover {
text-decoration: none;
}
input.data-v-fdde69b1, textarea.data-v-fdde69b1 {
-webkit-user-select: auto;
user-select: auto;
}
input.data-v-fdde69b1:focus, input.data-v-fdde69b1:active, textarea.data-v-fdde69b1:focus, textarea.data-v-fdde69b1:active {
outline: none;
}
.chat-aside.data-v-fdde69b1 {
position: absolute;
top: 50px;
right: 0;
box-sizing: border-box;
width: 360px !important;
border-radius: 8px 0 0 8px;
z-index: 9999;
max-height: calc(100% - 50px);
}
.tui-search-main-global.data-v-fdde69b1 {
width: 100%;
height: -webkit-fit-content;
height: fit-content;
}
.tui-search-main-conversation.data-v-fdde69b1 {
width: 100%;
height: 100%;
background: #fff;
box-shadow: 0 1px 10px 0 rgba(2, 16, 43, 0.15);
}
.tui-search .tui-search-global-header.data-v-fdde69b1 {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
.tui-search .tui-search-conversation.data-v-fdde69b1 {
width: 100%;
height: 100%;
overflow: hidden;
}
.tui-search-h5-full-screen.data-v-fdde69b1 {
position: absolute;
width: 100%;
height: 100%;
overflow: hidden;
display: flex;
flex-direction: column;
z-index: 1000;
background: #fff;
}
.tui-search-h5-global.data-v-fdde69b1, .tui-search-h5-conversation.data-v-fdde69b1 {
width: 100%;
height: 100%;
display: flex;
flex: 1;
flex-direction: column;
}
.tui-search-h5-conversation.data-v-fdde69b1 {
overflow: hidden;
}
.tui-search-h5.tui-search-main-conversation.data-v-fdde69b1 {
box-shadow: none;
}
.tui-search-h5 .search-input.data-v-fdde69b1,
.tui-search-h5 .search-container.data-v-fdde69b1,
.tui-search-h5 .search-result.data-v-fdde69b1 {
min-width: 0;
box-sizing: border-box;
display: flex;
flex: 1;
overflow: hidden;
}
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
body.data-v-32d81a7d, div.data-v-32d81a7d, ul.data-v-32d81a7d, ol.data-v-32d81a7d, dt.data-v-32d81a7d, dd.data-v-32d81a7d, li.data-v-32d81a7d, dl.data-v-32d81a7d, h1.data-v-32d81a7d, h2.data-v-32d81a7d, h3.data-v-32d81a7d, h4.data-v-32d81a7d, p.data-v-32d81a7d {
margin: 0;
padding: 0;
font-style: normal;
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
}
ol.data-v-32d81a7d, ul.data-v-32d81a7d, li.data-v-32d81a7d {
list-style: none;
}
img.data-v-32d81a7d {
border: 0;
vertical-align: middle;
pointer-events: none;
}
body.data-v-32d81a7d {
color: #000;
background: #FFF;
}
.clear.data-v-32d81a7d {
clear: both;
height: 1px;
width: 100%;
overflow: hidden;
margin-top: -1px;
}
a.data-v-32d81a7d {
color: #000;
text-decoration: none;
cursor: pointer;
}
a.data-v-32d81a7d:hover {
text-decoration: none;
}
input.data-v-32d81a7d, textarea.data-v-32d81a7d {
-webkit-user-select: auto;
user-select: auto;
}
input.data-v-32d81a7d:focus, input.data-v-32d81a7d:active, textarea.data-v-32d81a7d:focus, textarea.data-v-32d81a7d:active {
outline: none;
}
.chat-aside.data-v-32d81a7d {
position: absolute;
top: 50px;
right: 0;
box-sizing: border-box;
width: 360px !important;
border-radius: 8px 0 0 8px;
z-index: 9999;
max-height: calc(100% - 50px);
}
.tui-contact.data-v-32d81a7d {
width: 100%;
height: 100%;
box-sizing: border-box;
display: flex;
overflow: hidden;
}
.tui-contact-left.data-v-32d81a7d {
min-width: 285px;
flex: 0 0 24%;
overflow: hidden;
display: flex;
flex-direction: column;
}
.tui-contact-right.data-v-32d81a7d {
border-left: 1px solid #f4f5f9;
flex: 1;
overflow: hidden;
}
.tui-contact-h5.data-v-32d81a7d {
position: relative;
}
.tui-contact-h5-left.data-v-32d81a7d, .tui-contact-h5-right.data-v-32d81a7d {
width: 100%;
height: 100%;
flex: 1;
}
.tui-contact-h5-right.data-v-32d81a7d {
position: absolute;
z-index: 100;
}
.tui-contact-h5-left-list.data-v-32d81a7d {
overflow-y: auto;
}
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.tui-group.data-v-61238656 {
width: 100%;
height: 100%;
}
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
body.data-v-04dfedea, div.data-v-04dfedea, ul.data-v-04dfedea, ol.data-v-04dfedea, dt.data-v-04dfedea, dd.data-v-04dfedea, li.data-v-04dfedea, dl.data-v-04dfedea, h1.data-v-04dfedea, h2.data-v-04dfedea, h3.data-v-04dfedea, h4.data-v-04dfedea, p.data-v-04dfedea {
margin: 0;
padding: 0;
font-style: normal;
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
}
ol.data-v-04dfedea, ul.data-v-04dfedea, li.data-v-04dfedea {
list-style: none;
}
img.data-v-04dfedea {
border: 0;
vertical-align: middle;
pointer-events: none;
}
body.data-v-04dfedea {
color: #000;
background: #FFF;
}
.clear.data-v-04dfedea {
clear: both;
height: 1px;
width: 100%;
overflow: hidden;
margin-top: -1px;
}
a.data-v-04dfedea {
color: #000;
text-decoration: none;
cursor: pointer;
}
a.data-v-04dfedea:hover {
text-decoration: none;
}
input.data-v-04dfedea, textarea.data-v-04dfedea {
-webkit-user-select: auto;
user-select: auto;
}
input.data-v-04dfedea:focus, input.data-v-04dfedea:active, textarea.data-v-04dfedea:focus, textarea.data-v-04dfedea:active {
outline: none;
}
.chat-aside.data-v-04dfedea {
position: absolute;
top: 50px;
right: 0;
box-sizing: border-box;
width: 360px !important;
border-radius: 8px 0 0 8px;
z-index: 9999;
max-height: calc(100% - 50px);
}
.tui-chat.data-v-04dfedea {
width: 100%;
height: 100%;
max-width: 100%;
overflow: hidden;
box-sizing: border-box;
display: flex;
flex-direction: column;
position: relative;
}
.tui-chat-default.data-v-04dfedea {
width: 100%;
height: 100%;
box-sizing: border-box;
display: flex;
}
.tui-chat-header.data-v-04dfedea {
padding: 10px;
box-sizing: border-box;
display: flex;
}
.tui-chat-message-list.data-v-04dfedea {
flex: 1;
overflow: hidden;
display: flex;
}
.tui-chat-leave-group.data-v-04dfedea {
font-size: 14px;
height: 160px;
border-top: 1px solid #efefef;
justify-content: center;
align-items: center;
}
.tui-chat-leave-group-mobile.data-v-04dfedea {
height: 50px;
}
.tui-chat-message-input.data-v-04dfedea {
height: 160px;
display: flex;
}
.chat.data-v-04dfedea {
display: block;
height: 85%;
overflow: hidden;
}
.tui-chat-h5-message-list.data-v-04dfedea {
flex: 1;
overflow: hidden;
display: flex;
}
.tui-chat-h5-message-input.data-v-04dfedea {
height: auto;
padding: 10px 10px 0;
border-top: 1px solid #eee;
}
.tui-chat-h5-message-input-toolbar.data-v-04dfedea {
order: 1;
border: none;
}
.tui-chat-uniapp-header.data-v-04dfedea {
display: none;
}
.group-profile.data-v-04dfedea {
position: absolute;
top: 14%;
right: 0;
width: 50px;
height: 30px;
line-height: 30px;
color: #000;
font-size: 10px;
border-top-left-radius: 20px;
border-bottom-left-radius: 20px;
padding-left: 15px;
z-index: 100;
background-color: #ccc;
opacity: 0.5;
}
.tui-chat-uni-message-input.data-v-04dfedea {
max-height: 370px;
padding: 10px;
}
.tui-chat-uni-message-input-toolbar.data-v-04dfedea {
z-index: 100;
}
.tui-chat-wx-message-input.data-v-04dfedea {
padding: 0;
}
.data-v-04dfedea:not(not) {
display: flex;
flex-direction: column;
box-sizing: border-box;
min-width: 0;
}
.dingweizhibox{
width: 100%;
height: 15%;
}
.tui-chat{
width: 100%;
height: 15%;
}
.tui-chat-h5 {
width: 100%;
height: 100%;
}
.tui-chat-uniapp-header{
width: 100%;
height: 100%;
}
.Navigation {
width: 100%;
height: 10%;
position: fixed;
top: 0;
left: 0;
z-index: 999;
display: flex;
justify-content: center;
align-items: center;
}
.Navigationimg {
width: 100%;
height: 200rpx;
position: absolute;
top: 0;
left: 0;
z-index: -1;
}
.Navigation {
width: 100%;
height: 200rpx;
z-index: 999;
display: flex;
justify-content: center;
align-items: center;
}
.Return {
width: 50rpx;
height: 50rpx;
position: absolute;
top: 100rpx;
left: 40rpx;
z-index: 999;
}
.Navigation-name{
width: 50rpx;
height: 50rpx;
position: absolute;
top: 100rpx;
left: 300rpx;
z-index: 999;
}

View File

@@ -0,0 +1,150 @@
"use strict";
const common_vendor = require("../../../../../common/vendor.js");
require("../../../../adapter-vue.js");
const common_assets = require("../../../../../common/assets.js");
const TUIKit_constant = require("../../../../constant.js");
const TUIKit_utils_env = require("../../../../utils/env.js");
const TUIKit_components_TUIChat_utils_utils = require("../../utils/utils.js");
const TUIKit_components_TUIChat_emojiConfig_index = require("../../emoji-config/index.js");
const TUIKit_components_TUIChat_config = require("../../config.js");
if (!Math) {
Icon();
}
const Icon = () => "../../../common/Icon.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "emoji-picker-dialog",
emits: ["insertEmoji", "onClose", "sendMessage"],
setup(__props, { emit: __emit }) {
var _a;
const faceIcon = TUIKit_components_TUIChat_config.ChatConfig.getTheme() === "dark" ? common_assets.faceIconDark : common_assets.faceIconLight;
const emits = __emit;
const currentTabIndex = common_vendor.ref(0);
const currentConversation = common_vendor.ref();
common_vendor.ref();
const emojiPickerListRef = common_vendor.ref();
const featureConfig = TUIKit_components_TUIChat_config.ChatConfig.getFeatureConfig();
const list = common_vendor.ref(initEmojiList());
const currentTabItem = common_vendor.ref(list == null ? void 0 : list.value[0]);
const currentEmojiList = common_vendor.ref((_a = list == null ? void 0 : list.value[0]) == null ? void 0 : _a.list);
common_vendor.onMounted(() => {
common_vendor.Jt.watch(common_vendor.o.CONV, {
currentConversation: onCurrentConversationUpdate
});
});
common_vendor.onUnmounted(() => {
common_vendor.Jt.unwatch(common_vendor.o.CONV, {
currentConversation: onCurrentConversationUpdate
});
});
const toggleEmojiTab = (index) => {
var _a2;
currentTabIndex.value = index;
currentTabItem.value = list == null ? void 0 : list.value[index];
currentEmojiList.value = (_a2 = list == null ? void 0 : list.value[index]) == null ? void 0 : _a2.list;
if (!TUIKit_utils_env.isUniFrameWork) {
(emojiPickerListRef == null ? void 0 : emojiPickerListRef.value) && (emojiPickerListRef.value.scrollTop = 0);
}
};
const select = (item, index) => {
var _a2, _b, _c;
const options = {
emoji: { key: item, name: TUIKit_components_TUIChat_emojiConfig_index.convertKeyToEmojiName(item) },
type: (_a2 = currentTabItem == null ? void 0 : currentTabItem.value) == null ? void 0 : _a2.type
};
switch ((_b = currentTabItem == null ? void 0 : currentTabItem.value) == null ? void 0 : _b.type) {
case TUIKit_constant.EMOJI_TYPE.BASIC:
options.url = ((_c = currentTabItem == null ? void 0 : currentTabItem.value) == null ? void 0 : _c.url) + TUIKit_components_TUIChat_emojiConfig_index.BASIC_EMOJI_URL_MAPPING[item];
if (TUIKit_utils_env.isUniFrameWork) {
common_vendor.index.$emit("insert-emoji", options);
} else {
emits("insertEmoji", options);
}
break;
case TUIKit_constant.EMOJI_TYPE.BIG:
sendFaceMessage(index, currentTabItem.value);
break;
case TUIKit_constant.EMOJI_TYPE.CUSTOM:
sendFaceMessage(index, currentTabItem.value);
break;
}
TUIKit_utils_env.isPC && emits("onClose");
};
const sendFaceMessage = (index, listItem) => {
var _a2, _b, _c, _d, _e;
const options = {
to: ((_b = (_a2 = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _a2.groupProfile) == null ? void 0 : _b.groupID) || ((_d = (_c = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _c.userProfile) == null ? void 0 : _d.userID),
conversationType: (_e = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _e.type,
payload: {
index: listItem.emojiGroupID,
data: listItem.list[index]
},
needReadReceipt: TUIKit_components_TUIChat_utils_utils.isEnabledMessageReadReceiptGlobal()
};
common_vendor.Qt.sendFaceMessage(options);
};
function sendMessage() {
common_vendor.index.$emit("send-message-in-emoji-picker");
}
function onCurrentConversationUpdate(conversation) {
currentConversation.value = conversation;
}
function initEmojiList() {
return TUIKit_components_TUIChat_emojiConfig_index.EMOJI_GROUP_LIST.filter((item) => {
if (item.type === TUIKit_constant.EMOJI_TYPE.BASIC) {
return featureConfig.InputEmoji;
}
if (item.type === TUIKit_constant.EMOJI_TYPE.BIG) {
return featureConfig.InputStickers;
}
if (item.type === TUIKit_constant.EMOJI_TYPE.CUSTOM) {
return featureConfig.InputStickers;
}
});
}
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.f(common_vendor.unref(currentEmojiList), (childrenItem, childrenIndex, i0) => {
return common_vendor.e(common_vendor.unref(currentTabItem).type === common_vendor.unref(TUIKit_constant.EMOJI_TYPE).BASIC ? {
a: common_vendor.unref(currentTabItem).url + common_vendor.unref(TUIKit_components_TUIChat_emojiConfig_index.BASIC_EMOJI_URL_MAPPING)[childrenItem]
} : common_vendor.unref(currentTabItem).type === common_vendor.unref(TUIKit_constant.EMOJI_TYPE).BIG ? {
b: common_vendor.unref(currentTabItem).url + childrenItem + "@2x.png"
} : {
c: common_vendor.unref(currentTabItem).url + childrenItem
}, {
d: childrenIndex,
e: common_vendor.o$1(($event) => select(childrenItem, childrenIndex), childrenIndex)
});
}),
b: common_vendor.unref(currentTabItem).type === common_vendor.unref(TUIKit_constant.EMOJI_TYPE).BASIC,
c: common_vendor.unref(currentTabItem).type === common_vendor.unref(TUIKit_constant.EMOJI_TYPE).BIG,
d: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "emoji-picker-h5-list"),
e: common_vendor.f(common_vendor.unref(list), (item, index, i0) => {
return common_vendor.e({
a: item.type === common_vendor.unref(TUIKit_constant.EMOJI_TYPE).BASIC
}, item.type === common_vendor.unref(TUIKit_constant.EMOJI_TYPE).BASIC ? {
b: "194fb307-0-" + i0,
c: common_vendor.p({
file: common_vendor.unref(faceIcon)
})
} : item.type === common_vendor.unref(TUIKit_constant.EMOJI_TYPE).BIG ? {
e: item.url + item.list[0] + "@2x.png"
} : {
f: item.url + item.list[0]
}, {
d: item.type === common_vendor.unref(TUIKit_constant.EMOJI_TYPE).BIG,
g: index,
h: common_vendor.o$1(($event) => toggleEmojiTab(index), index)
});
}),
f: common_vendor.unref(TUIKit_utils_env.isUniFrameWork)
}, common_vendor.unref(TUIKit_utils_env.isUniFrameWork) ? {
g: common_vendor.o$1(sendMessage)
} : {}, {
h: !common_vendor.unref(TUIKit_utils_env.isPC) ? 1 : ""
});
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-194fb307"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/emoji-picker/emoji-picker-dialog.js.map

View File

@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"icon": "../../../common/Icon"
}
}

View File

@@ -0,0 +1 @@
<view ref="emojiPickerDialog" class="{{['data-v-194fb307', 'emoji-picker', h && 'emoji-picker-h5']}}"><view ref="emojiPickerListRef" class="{{['data-v-194fb307', 'emoji-picker-list', d]}}"><view wx:for="{{a}}" wx:for-item="childrenItem" wx:key="d" class="emoji-picker-list-item data-v-194fb307" bindtap="{{childrenItem.e}}"><image wx:if="{{b}}" class="emoji data-v-194fb307" src="{{childrenItem.a}}"></image><image wx:elif="{{c}}" class="emoji-big data-v-194fb307" src="{{childrenItem.b}}"></image><image wx:else class="emoji-custom emoji-big data-v-194fb307" src="{{childrenItem.c}}"></image></view></view><view class="emoji-picker-tab data-v-194fb307"><view wx:for="{{e}}" wx:for-item="item" wx:key="g" class="emoji-picker-tab-item data-v-194fb307" bindtap="{{item.h}}"><icon wx:if="{{item.a}}" class="icon data-v-194fb307" u-i="{{item.b}}" bind:__l="__l" u-p="{{item.c}}"/><image wx:elif="{{item.d}}" class="icon-big data-v-194fb307" src="{{item.e}}"></image><image wx:else class="icon-custom icon-big data-v-194fb307" src="{{item.f}}"></image></view><view wx:if="{{f}}" class="send-btn data-v-194fb307" bindtap="{{g}}"> 发送 </view></view></view>

View File

@@ -0,0 +1,143 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
body.data-v-194fb307, div.data-v-194fb307, ul.data-v-194fb307, ol.data-v-194fb307, dt.data-v-194fb307, dd.data-v-194fb307, li.data-v-194fb307, dl.data-v-194fb307, h1.data-v-194fb307, h2.data-v-194fb307, h3.data-v-194fb307, h4.data-v-194fb307, p.data-v-194fb307 {
margin: 0;
padding: 0;
font-style: normal;
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
}
ol.data-v-194fb307, ul.data-v-194fb307, li.data-v-194fb307 {
list-style: none;
}
img.data-v-194fb307 {
border: 0;
vertical-align: middle;
pointer-events: none;
}
body.data-v-194fb307 {
color: #000;
background: #FFF;
}
.clear.data-v-194fb307 {
clear: both;
height: 1px;
width: 100%;
overflow: hidden;
margin-top: -1px;
}
a.data-v-194fb307 {
color: #000;
text-decoration: none;
cursor: pointer;
}
a.data-v-194fb307:hover {
text-decoration: none;
}
input.data-v-194fb307, textarea.data-v-194fb307 {
-webkit-user-select: auto;
user-select: auto;
}
input.data-v-194fb307:focus, input.data-v-194fb307:active, textarea.data-v-194fb307:focus, textarea.data-v-194fb307:active {
outline: none;
}
.chat-aside.data-v-194fb307 {
position: absolute;
top: 50px;
right: 0;
box-sizing: border-box;
width: 360px !important;
border-radius: 8px 0 0 8px;
z-index: 9999;
max-height: calc(100% - 50px);
}
.emoji-picker.data-v-194fb307 {
width: 405px;
height: 300px;
display: flex;
flex-direction: column;
}
.emoji-picker-list.data-v-194fb307 {
flex: 1;
display: flex;
flex-wrap: wrap;
overflow-y: auto;
margin: 2px;
}
.emoji-picker-list.data-v-194fb307::-webkit-scrollbar {
display: none;
}
.emoji-picker-list-item.data-v-194fb307 {
cursor: pointer;
padding: 5px;
}
.emoji-picker-list-item .emoji.data-v-194fb307 {
width: 30px;
height: 30px;
}
.emoji-picker-list-item .emoji-big.data-v-194fb307 {
width: 70px;
height: 70px;
}
.emoji-picker-tab.data-v-194fb307 {
display: flex;
align-items: center;
}
.emoji-picker-tab-item.data-v-194fb307 {
padding: 0 10px;
cursor: pointer;
}
.emoji-picker-tab-item .icon.data-v-194fb307 {
margin: 10px;
width: 20px;
height: 20px;
}
.emoji-picker-tab-item .icon-big.data-v-194fb307 {
margin: 2px 0;
width: 30px;
height: 30px;
}
.emoji-picker-h5.data-v-194fb307 {
width: 100%;
}
.emoji-picker-h5-list.data-v-194fb307 {
justify-content: space-between;
}
.emoji-picker-h5-list.data-v-194fb307::after {
content: "";
display: block;
flex: 1 1 auto;
}
.emoji-picker-h5 .send-btn.data-v-194fb307 {
width: 50px;
height: 30px;
background-color: #55C06A;
position: absolute;
right: 10px;
font-size: 16px;
color: #fff;
text-align: center;
line-height: 30px;
}

View File

@@ -0,0 +1,137 @@
"use strict";
const common_vendor = require("../../../../../common/vendor.js");
require("../../../../adapter-vue.js");
const TUIKit_utils_env = require("../../../../utils/env.js");
const common_assets = require("../../../../../common/assets.js");
const TUIKit_components_TUIChat_utils_utils = require("../../utils/utils.js");
const TUIKit_components_TUIChat_offlinePushInfoManager_index = require("../../offlinePushInfoManager/index.js");
const TUIKit_components_TUIChat_config = require("../../config.js");
if (!Math) {
ToolbarItemContainer();
}
const ToolbarItemContainer = () => "../toolbar-item-container/index.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "index",
props: {
// Image source: only valid for uni-app version, web version only supports selecting images from the album.
// album: Select from album
// camera: Take a photo using the camera
imageSourceType: {
type: String,
default: "album"
}
},
setup(__props) {
const props = __props;
const inputRef = common_vendor.ref();
const currentConversation = common_vendor.ref();
const theme = TUIKit_components_TUIChat_config.ChatConfig.getTheme();
const IMAGE_TOOLBAR_SHOW_MAP = {
web_album: {
icon: theme === "dark" ? common_assets.imageIconDark : common_assets.imageIconLight,
title: "图片"
},
uni_album: {
icon: common_assets.imageUniIcon,
title: "图片"
},
uni_camera: {
icon: common_assets.cameraUniIcon,
title: "拍照"
}
};
common_vendor.Jt.watch(common_vendor.o.CONV, {
currentConversation: (conversation) => {
currentConversation.value = conversation;
}
});
const imageToolbarForShow = common_vendor.computed(() => {
if (TUIKit_utils_env.isUniFrameWork) {
return props.imageSourceType === "camera" ? IMAGE_TOOLBAR_SHOW_MAP["uni_camera"] : IMAGE_TOOLBAR_SHOW_MAP["uni_album"];
} else {
return IMAGE_TOOLBAR_SHOW_MAP["web_album"];
}
});
const onIconClick = () => {
var _a, _b, _c, _d;
if (TUIKit_utils_env.isUniFrameWork) {
if (TUIKit_utils_env.isWeChat && ((_a = common_vendor.i) == null ? void 0 : _a.chooseMedia)) {
(_b = common_vendor.i) == null ? void 0 : _b.chooseMedia({
count: 1,
mediaType: ["image"],
sizeType: ["original", "compressed"],
sourceType: [props.imageSourceType],
// Use camera or select from album.
success: function(res) {
sendImageMessage(res);
}
});
} else {
(_c = common_vendor.i) == null ? void 0 : _c.chooseImage({
count: 1,
sourceType: [props.imageSourceType],
// Use camera or select from album.
success: function(res) {
sendImageMessage(res);
}
});
}
} else {
if ((_d = inputRef.value) == null ? void 0 : _d.click) {
inputRef.value.click();
}
}
};
const sendImageInWeb = (e) => {
var _a, _b;
if (((_b = (_a = e == null ? void 0 : e.target) == null ? void 0 : _a.files) == null ? void 0 : _b.length) <= 0) {
return;
}
sendImageMessage(e == null ? void 0 : e.target);
e.target.value = "";
};
const sendImageMessage = (files) => {
var _a, _b, _c, _d, _e;
if (!files) {
return;
}
const options = {
to: ((_b = (_a = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _a.groupProfile) == null ? void 0 : _b.groupID) || ((_d = (_c = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _c.userProfile) == null ? void 0 : _d.userID),
conversationType: (_e = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _e.type,
payload: {
file: files
},
needReadReceipt: TUIKit_components_TUIChat_utils_utils.isEnabledMessageReadReceiptGlobal()
};
const offlinePushInfoCreateParams = {
conversation: currentConversation.value,
payload: options.payload,
messageType: common_vendor.qt.TYPES.MSG_IMAGE
};
const sendMessageOptions = {
offlinePushInfo: TUIKit_components_TUIChat_offlinePushInfoManager_index.OfflinePushInfoManager.create(offlinePushInfoCreateParams)
};
common_vendor.Qt.sendImageMessage(options, sendMessageOptions);
};
return (_ctx, _cache) => {
return common_vendor.e({
a: !common_vendor.unref(TUIKit_utils_env.isUniFrameWork)
}, !common_vendor.unref(TUIKit_utils_env.isUniFrameWork) ? {
b: common_vendor.o$1(sendImageInWeb),
c: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "image-upload-h5")
} : {}, {
d: common_vendor.o$1(onIconClick),
e: common_vendor.p({
iconFile: common_vendor.unref(imageToolbarForShow).icon,
title: common_vendor.unref(imageToolbarForShow).title,
iconWidth: common_vendor.unref(TUIKit_utils_env.isUniFrameWork) ? "32px" : "20px",
iconHeight: common_vendor.unref(TUIKit_utils_env.isUniFrameWork) ? "25px" : "18px",
needDialog: false
})
});
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-2d15f470"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/image-upload/index.js.map

View File

@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"toolbar-item-container": "../toolbar-item-container/index"
}
}

View File

@@ -0,0 +1 @@
<toolbar-item-container wx:if="{{e}}" class="data-v-2d15f470" u-s="{{['d']}}" bindonIconClick="{{d}}" u-i="2d15f470-0" bind:__l="__l" u-p="{{e}}"><view wx:if="{{a}}" class="{{['data-v-2d15f470', 'image-upload', c]}}"><input class="data-v-2d15f470" ref="inputRef" title="图片" type="file" data-type="image" accept="image/gif,image/jpeg,image/jpg,image/png,image/bmp,image/webp" bindchange="{{b}}"></input></view></toolbar-item-container>

View File

@@ -0,0 +1,75 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
body.data-v-2d15f470, div.data-v-2d15f470, ul.data-v-2d15f470, ol.data-v-2d15f470, dt.data-v-2d15f470, dd.data-v-2d15f470, li.data-v-2d15f470, dl.data-v-2d15f470, h1.data-v-2d15f470, h2.data-v-2d15f470, h3.data-v-2d15f470, h4.data-v-2d15f470, p.data-v-2d15f470 {
margin: 0;
padding: 0;
font-style: normal;
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
}
ol.data-v-2d15f470, ul.data-v-2d15f470, li.data-v-2d15f470 {
list-style: none;
}
img.data-v-2d15f470 {
border: 0;
vertical-align: middle;
pointer-events: none;
}
body.data-v-2d15f470 {
color: #000;
background: #FFF;
}
.clear.data-v-2d15f470 {
clear: both;
height: 1px;
width: 100%;
overflow: hidden;
margin-top: -1px;
}
a.data-v-2d15f470 {
color: #000;
text-decoration: none;
cursor: pointer;
}
a.data-v-2d15f470:hover {
text-decoration: none;
}
input.data-v-2d15f470, textarea.data-v-2d15f470 {
-webkit-user-select: auto;
user-select: auto;
}
input.data-v-2d15f470:focus, input.data-v-2d15f470:active, textarea.data-v-2d15f470:focus, textarea.data-v-2d15f470:active {
outline: none;
}
.chat-aside.data-v-2d15f470 {
position: absolute;
top: 50px;
right: 0;
box-sizing: border-box;
width: 360px !important;
border-radius: 8px 0 0 8px;
z-index: 9999;
max-height: calc(100% - 50px);
}

View File

@@ -0,0 +1,260 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
require("../../../adapter-vue.js");
const TUIKit_components_TUIChat_config = require("../config.js");
const TUIKit_utils_enableSampleTaskStatus = require("../../../utils/enableSampleTaskStatus.js");
const TUIKit_components_TUIChat_offlinePushInfoManager_index = require("../offlinePushInfoManager/index.js");
const TUIKit_components_TUIChat_offlinePushInfoManager_const = require("../offlinePushInfoManager/const.js");
if (!Math) {
(EmojiPickerDialog + ImageUpload + VideoUpload + Words + ToolbarItemContainer + UserSelector)();
}
const ImageUpload = () => "./image-upload/index.js";
const VideoUpload = () => "./video-upload/index.js";
const Words = () => "./words/index.js";
const ToolbarItemContainer = () => "./toolbar-item-container/index.js";
const EmojiPickerDialog = () => "./emoji-picker/emoji-picker-dialog.js";
const UserSelector = () => "./user-selector/index.js";
const __default__ = {
options: {
styleIsolation: "shared"
}
};
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
...__default__,
__name: "index",
props: {
displayType: {}
},
setup(__props) {
const props = __props;
const currentConversation = common_vendor.ref();
const isGroup = common_vendor.ref(false);
const selectorShowType = common_vendor.ref("");
const userSelectorRef = common_vendor.ref();
const currentUserSelectorExtension = common_vendor.ref();
const currentExtensionList = common_vendor.ref([]);
const isSwiperIndicatorDotsEnable = common_vendor.ref(false);
const featureConfig = TUIKit_components_TUIChat_config.ChatConfig.getFeatureConfig();
const neededCountFirstPage = common_vendor.ref(8);
const slicePos = common_vendor.ref(0);
const computeToolbarPaging = () => {
if (featureConfig.InputImage && featureConfig.InputVideo) {
neededCountFirstPage.value -= 4;
} else if (featureConfig.InputImage || featureConfig.InputVideo) {
neededCountFirstPage.value -= 2;
}
slicePos.value = neededCountFirstPage.value;
neededCountFirstPage.value -= currentExtensionList.value.length;
if (neededCountFirstPage.value === 1) {
isSwiperIndicatorDotsEnable.value = featureConfig.InputEvaluation && featureConfig.InputQuickReplies;
} else if (neededCountFirstPage.value < 1) {
isSwiperIndicatorDotsEnable.value = featureConfig.InputEvaluation || featureConfig.InputQuickReplies;
}
};
common_vendor.onMounted(() => {
common_vendor.Jt.watch(common_vendor.o.CUSTOM, {
activeConversation: onActiveConversationUpdate
});
});
common_vendor.onUnmounted(() => {
common_vendor.Jt.unwatch(common_vendor.o.CUSTOM, {
activeConversation: onActiveConversationUpdate
});
});
const onActiveConversationUpdate = (conversationID) => {
var _a;
if (!conversationID) {
return;
}
if (conversationID !== ((_a = currentConversation.value) == null ? void 0 : _a.conversationID)) {
getExtensionList();
computeToolbarPaging();
currentConversation.value = common_vendor.Jt.getData(common_vendor.o.CONV, "currentConversation");
isGroup.value = conversationID.startsWith(common_vendor.qt.TYPES.CONV_GROUP);
}
};
const getExtensionList = () => {
const chatType = TUIKit_components_TUIChat_config.ChatConfig.getChatType();
const params = { chatType };
if (chatType === common_vendor.E.TUIChat.TYPE.CUSTOMER_SERVICE) {
params.filterVoice = true;
params.filterVideo = true;
TUIKit_utils_enableSampleTaskStatus.enableSampleTaskStatus("customerService");
}
currentExtensionList.value = [
...common_vendor.R.getExtensionList(common_vendor.E.TUIChat.EXTENSION.INPUT_MORE.EXT_ID, params)
].filter((extension) => {
var _a;
if (((_a = extension == null ? void 0 : extension.data) == null ? void 0 : _a.name) === "search") {
return featureConfig.MessageSearch;
}
return true;
});
reportExtension(currentExtensionList.value);
};
function reportExtension(extensionList) {
extensionList.forEach((extension) => {
var _a;
const _name = (_a = extension == null ? void 0 : extension.data) == null ? void 0 : _a.name;
if (_name === "voiceCall") {
common_vendor.ss.reportFeature(203, "voice-call");
} else if (_name === "videoCall") {
common_vendor.ss.reportFeature(203, "video-call");
} else if (_name === "quickRoom") {
common_vendor.ss.reportFeature(204);
}
});
}
const onExtensionClick = (extension) => {
var _a, _b, _c;
const extensionModel = currentExtensionList.value.find(
(targetExtension) => {
var _a2, _b2;
return ((_a2 = targetExtension == null ? void 0 : targetExtension.data) == null ? void 0 : _a2.name) === ((_b2 = extension == null ? void 0 : extension.data) == null ? void 0 : _b2.name);
}
);
switch ((_a = extensionModel == null ? void 0 : extensionModel.data) == null ? void 0 : _a.name) {
case "voiceCall":
onCallExtensionClicked(extensionModel, 1);
break;
case "videoCall":
onCallExtensionClicked(extensionModel, 2);
break;
case "search":
(_c = (_b = extensionModel == null ? void 0 : extensionModel.listener) == null ? void 0 : _b.onClicked) == null ? void 0 : _c.call(_b);
break;
}
};
const onCallExtensionClicked = (extension, callType) => {
var _a, _b, _c, _d, _e, _f, _g;
selectorShowType.value = (_a = extension == null ? void 0 : extension.data) == null ? void 0 : _a.name;
if (((_b = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _b.type) === common_vendor.qt.TYPES.CONV_C2C) {
(_f = (_c = extension == null ? void 0 : extension.listener) == null ? void 0 : _c.onClicked) == null ? void 0 : _f.call(_c, {
userIDList: [(_e = (_d = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _d.conversationID) == null ? void 0 : _e.slice(3)],
type: callType,
callParams: {
offlinePushInfo: TUIKit_components_TUIChat_offlinePushInfoManager_index.OfflinePushInfoManager.getOfflinePushInfo(TUIKit_components_TUIChat_offlinePushInfoManager_const.PUSH_SCENE.CALL)
}
});
} else if (isGroup.value) {
currentUserSelectorExtension.value = extension;
((_g = userSelectorRef == null ? void 0 : userSelectorRef.value) == null ? void 0 : _g.toggleShow) && userSelectorRef.value.toggleShow(true);
}
};
const genExtensionIcon = (extension) => {
return extension == null ? void 0 : extension.icon;
};
const genExtensionText = (extension) => {
return extension == null ? void 0 : extension.text;
};
const onUserSelectorSubmit = (selectedInfo) => {
var _a, _b, _c;
(_c = (_b = (_a = currentUserSelectorExtension.value) == null ? void 0 : _a.listener) == null ? void 0 : _b.onClicked) == null ? void 0 : _c.call(_b, {
...selectedInfo,
callParams: {
offlinePushInfo: TUIKit_components_TUIChat_offlinePushInfoManager_index.OfflinePushInfoManager.getOfflinePushInfo(TUIKit_components_TUIChat_offlinePushInfoManager_const.PUSH_SCENE.CALL)
}
});
currentUserSelectorExtension.value = null;
};
const onUserSelectorCancel = () => {
currentUserSelectorExtension.value = null;
};
const handleSwiperDotShow = (showStatus) => {
isSwiperIndicatorDotsEnable.value = neededCountFirstPage.value <= 1 && !showStatus;
};
return (_ctx, _cache) => {
return common_vendor.e({
a: props.displayType === "emojiPicker"
}, props.displayType === "emojiPicker" ? {} : common_vendor.e({
b: common_vendor.unref(featureConfig).InputImage
}, common_vendor.unref(featureConfig).InputImage ? {
c: common_vendor.p({
imageSourceType: "camera"
})
} : {}, {
d: common_vendor.unref(featureConfig).InputImage
}, common_vendor.unref(featureConfig).InputImage ? {
e: common_vendor.p({
imageSourceType: "album"
})
} : {}, {
f: common_vendor.unref(featureConfig).InputVideo
}, common_vendor.unref(featureConfig).InputVideo ? {
g: common_vendor.p({
videoSourceType: "album"
})
} : {}, {
h: common_vendor.unref(featureConfig).InputVideo
}, common_vendor.unref(featureConfig).InputVideo ? {
i: common_vendor.p({
videoSourceType: "camera"
})
} : {}, {
j: common_vendor.unref(currentExtensionList).length > 0
}, common_vendor.unref(currentExtensionList).length > 0 ? {
k: common_vendor.f(common_vendor.unref(currentExtensionList).slice(0, common_vendor.unref(slicePos)), (extension, index, i0) => {
return {
a: index
};
})
} : {}, {
l: common_vendor.unref(neededCountFirstPage) === 1
}, common_vendor.unref(neededCountFirstPage) === 1 ? common_vendor.e({
m: common_vendor.unref(featureConfig).InputQuickReplies
}, common_vendor.unref(featureConfig).InputQuickReplies ? {
n: common_vendor.o$1(handleSwiperDotShow)
} : {}) : {}, {
o: common_vendor.unref(neededCountFirstPage) > 1
}, common_vendor.unref(neededCountFirstPage) > 1 ? common_vendor.e({
p: common_vendor.unref(featureConfig).InputQuickReplies
}, common_vendor.unref(featureConfig).InputQuickReplies ? {
q: common_vendor.o$1(handleSwiperDotShow)
} : {}) : {}, {
r: common_vendor.unref(neededCountFirstPage) <= 1
}, common_vendor.unref(neededCountFirstPage) <= 1 ? common_vendor.e({
s: common_vendor.f(common_vendor.unref(currentExtensionList).slice(common_vendor.unref(slicePos)), (extension, index, i0) => {
return common_vendor.e({
a: extension
}, extension ? {
b: common_vendor.o$1(($event) => onExtensionClick(extension), index),
c: "76f68da4-7-" + i0,
d: common_vendor.p({
iconFile: genExtensionIcon(extension),
title: genExtensionText(extension),
iconWidth: "25px",
iconHeight: "25px",
needDialog: false
})
} : {}, {
e: index
});
}),
t: common_vendor.unref(neededCountFirstPage) === 1
}, common_vendor.unref(neededCountFirstPage) === 1 ? common_vendor.e({
v: common_vendor.unref(featureConfig).InputQuickReplies
}, common_vendor.unref(featureConfig).InputQuickReplies ? {
w: common_vendor.o$1(handleSwiperDotShow)
} : {}) : common_vendor.e({
x: common_vendor.unref(featureConfig).InputQuickReplies
}, common_vendor.unref(featureConfig).InputQuickReplies ? {
y: common_vendor.o$1(handleSwiperDotShow)
} : {})) : {}, {
z: common_vendor.unref(isSwiperIndicatorDotsEnable)
}), {
A: common_vendor.sr(userSelectorRef, "76f68da4-10", {
"k": "userSelectorRef"
}),
B: common_vendor.o$1(onUserSelectorSubmit),
C: common_vendor.o$1(onUserSelectorCancel),
D: common_vendor.p({
type: common_vendor.unref(selectorShowType),
currentConversation: common_vendor.unref(currentConversation),
isGroup: common_vendor.unref(isGroup)
})
});
};
}
});
wx.createComponent(_sfc_main);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/index.js.map

View File

@@ -0,0 +1,11 @@
{
"component": true,
"usingComponents": {
"image-upload": "./image-upload/index",
"video-upload": "./video-upload/index",
"words": "./words/index",
"toolbar-item-container": "./toolbar-item-container/index",
"emoji-picker-dialog": "./emoji-picker/emoji-picker-dialog",
"user-selector": "./user-selector/index"
}
}

View File

@@ -0,0 +1 @@
<view class="{{['message-input-toolbar', 'message-input-toolbar-h5', 'message-input-toolbar-uni']}}"><view wx:if="{{a}}"><emoji-picker-dialog u-i="76f68da4-0" bind:__l="__l"/></view><view wx:else><swiper class="{{['message-input-toolbar-swiper']}}" indicator-dots="{{z}}" autoplay="{{false}}" circular="{{false}}"><swiper-item class="{{['message-input-toolbar-list', 'message-input-toolbar-h5-list', 'message-input-toolbar-uni-list']}}"><image-upload wx:if="{{b}}" u-i="76f68da4-1" bind:__l="__l" u-p="{{c}}"/><image-upload wx:if="{{d}}" u-i="76f68da4-2" bind:__l="__l" u-p="{{e}}"/><video-upload wx:if="{{f}}" u-i="76f68da4-3" bind:__l="__l" u-p="{{g}}"/><video-upload wx:if="{{h}}" u-i="76f68da4-4" bind:__l="__l" u-p="{{i}}"/><block wx:if="{{j}}"><view wx:for="{{k}}" wx:for-item="extension" wx:key="a"></view></block><block wx:if="{{l}}"><words wx:if="{{m}}" bindonDialogPopupShowOrHide="{{n}}" u-i="76f68da4-5" bind:__l="__l"/></block><block wx:if="{{o}}"><words wx:if="{{p}}" bindonDialogPopupShowOrHide="{{q}}" u-i="76f68da4-6" bind:__l="__l"/></block></swiper-item><swiper-item wx:if="{{r}}" class="{{['message-input-toolbar-list', 'message-input-toolbar-h5-list', 'message-input-toolbar-uni-list']}}"><view wx:for="{{s}}" wx:for-item="extension" wx:key="e"><toolbar-item-container wx:if="{{extension.a}}" bindonIconClick="{{extension.b}}" u-i="{{extension.c}}" bind:__l="__l" u-p="{{extension.d}}"/></view><block wx:if="{{t}}"><words wx:if="{{v}}" bindonDialogPopupShowOrHide="{{w}}" u-i="76f68da4-8" bind:__l="__l"/></block><block wx:else><words wx:if="{{x}}" bindonDialogPopupShowOrHide="{{y}}" u-i="76f68da4-9" bind:__l="__l"/></block></swiper-item></swiper></view><user-selector wx:if="{{D}}" class="r" u-r="userSelectorRef" bindsubmit="{{B}}" bindcancel="{{C}}" u-i="76f68da4-10" bind:__l="__l" u-p="{{D}}"/></view>

View File

@@ -0,0 +1,254 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
body, div, ul, ol, dt, dd, li, dl, h1, h2, h3, h4, p {
margin: 0;
padding: 0;
font-style: normal;
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
}
ol, ul, li {
list-style: none;
}
img {
border: 0;
vertical-align: middle;
pointer-events: none;
}
body {
color: #000;
background: #FFF;
}
.clear {
clear: both;
height: 1px;
width: 100%;
overflow: hidden;
margin-top: -1px;
}
a {
color: #000;
text-decoration: none;
cursor: pointer;
}
a:hover {
text-decoration: none;
}
input, textarea {
-webkit-user-select: auto;
user-select: auto;
}
input:focus, input:active, textarea:focus, textarea:active {
outline: none;
}
.chat-aside {
position: absolute;
top: 50px;
right: 0;
box-sizing: border-box;
width: 360px !important;
border-radius: 8px 0 0 8px;
z-index: 9999;
max-height: calc(100% - 50px);
}
/* stylelint-disable */
.message-input-toolbar {
border-top: 1px solid #f4f5f9;
width: 100%;
max-width: 100%;
display: flex;
flex-direction: row;
justify-content: space-between;
z-index: 100;
user-select: none;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
}
.message-input-toolbar-list {
display: flex;
flex-direction: row;
align-items: center;
}
.message-input-toolbar-list .extension-list {
list-style: none;
display: flex;
}
.message-input-toolbar-list .extension-list-item {
width: 20px;
height: 20px;
padding: 12px 10px 1px;
cursor: pointer;
}
.message-input-toolbar-h5 {
padding: 5px 10px;
box-sizing: border-box;
flex-direction: column;
}
.message-input-toolbar-uni {
background-color: #ebf0f6;
flex-direction: column;
z-index: 100;
}
.message-input-toolbar-uni-list {
flex: 1;
display: grid;
grid-template-columns: repeat(4, 25%);
grid-template-rows: repeat(2, 100px);
}
wx-swiper .wx-swiper-wrapper,
wx-swiper .wx-swiper-slides,
wx-swiper .wx-swiper-slide-frame,
.message-input-toolbar-list {
overflow: visible !important;
}
.message-input-toolbar .bottom-popup,
.message-input-toolbar .bottom-popup-h5,
.message-input-toolbar .bottom-popup-uni {
position: -webkit-sticky !important;
position: sticky !important;
}
.message-input-toolbar-swiper {
width: 100%;
height: 220px;
}
.message-input-toolbar-swiper .uni-swiper-wrapper,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper {
overflow: visible !important;
}
.message-input-toolbar-swiper .uni-swiper-wrapper .uni-swiper-slides,
.message-input-toolbar-swiper .uni-swiper-wrapper .wx-swiper-slides,
.message-input-toolbar-swiper .uni-swiper-wrapper wx-swiper .wx-swiper-slides,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .uni-swiper-slides,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .wx-swiper-slides,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper wx-swiper .wx-swiper-slides {
overflow: visible !important;
}
.message-input-toolbar-swiper .uni-swiper-wrapper .uni-swiper-slides .uni-swiper-slide-frame,
.message-input-toolbar-swiper .uni-swiper-wrapper .uni-swiper-slides .wx-swiper-slide-frame,
.message-input-toolbar-swiper .uni-swiper-wrapper .uni-swiper-slides wx-swiper .wx-swiper-slide-frame,
.message-input-toolbar-swiper .uni-swiper-wrapper .wx-swiper-slides .uni-swiper-slide-frame,
.message-input-toolbar-swiper .uni-swiper-wrapper .wx-swiper-slides .wx-swiper-slide-frame,
.message-input-toolbar-swiper .uni-swiper-wrapper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame,
.message-input-toolbar-swiper .uni-swiper-wrapper wx-swiper .wx-swiper-slides .uni-swiper-slide-frame,
.message-input-toolbar-swiper .uni-swiper-wrapper wx-swiper .wx-swiper-slides .wx-swiper-slide-frame,
.message-input-toolbar-swiper .uni-swiper-wrapper wx-swiper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .uni-swiper-slides .uni-swiper-slide-frame,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .uni-swiper-slides .wx-swiper-slide-frame,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .uni-swiper-slides wx-swiper .wx-swiper-slide-frame,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .wx-swiper-slides .uni-swiper-slide-frame,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .wx-swiper-slides .wx-swiper-slide-frame,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper wx-swiper .wx-swiper-slides .uni-swiper-slide-frame,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper wx-swiper .wx-swiper-slides .wx-swiper-slide-frame,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper wx-swiper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame {
overflow: visible !important;
}
.message-input-toolbar-swiper .uni-swiper-wrapper .uni-swiper-slides .uni-swiper-slide-frame .message-input-toolbar-list,
.message-input-toolbar-swiper .uni-swiper-wrapper .uni-swiper-slides .wx-swiper-slide-frame .message-input-toolbar-list,
.message-input-toolbar-swiper .uni-swiper-wrapper .uni-swiper-slides wx-swiper .wx-swiper-slide-frame .message-input-toolbar-list,
.message-input-toolbar-swiper .uni-swiper-wrapper .wx-swiper-slides .uni-swiper-slide-frame .message-input-toolbar-list,
.message-input-toolbar-swiper .uni-swiper-wrapper .wx-swiper-slides .wx-swiper-slide-frame .message-input-toolbar-list,
.message-input-toolbar-swiper .uni-swiper-wrapper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame .message-input-toolbar-list,
.message-input-toolbar-swiper .uni-swiper-wrapper wx-swiper .wx-swiper-slides .uni-swiper-slide-frame .message-input-toolbar-list,
.message-input-toolbar-swiper .uni-swiper-wrapper wx-swiper .wx-swiper-slides .wx-swiper-slide-frame .message-input-toolbar-list,
.message-input-toolbar-swiper .uni-swiper-wrapper wx-swiper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame .message-input-toolbar-list,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .uni-swiper-slides .uni-swiper-slide-frame .message-input-toolbar-list,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .uni-swiper-slides .wx-swiper-slide-frame .message-input-toolbar-list,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .uni-swiper-slides wx-swiper .wx-swiper-slide-frame .message-input-toolbar-list,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .wx-swiper-slides .uni-swiper-slide-frame .message-input-toolbar-list,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .wx-swiper-slides .wx-swiper-slide-frame .message-input-toolbar-list,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame .message-input-toolbar-list,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper wx-swiper .wx-swiper-slides .uni-swiper-slide-frame .message-input-toolbar-list,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper wx-swiper .wx-swiper-slides .wx-swiper-slide-frame .message-input-toolbar-list,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper wx-swiper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame .message-input-toolbar-list {
overflow: visible !important;
}
.message-input-toolbar-swiper .uni-swiper-wrapper .uni-swiper-slides .uni-swiper-slide-frame .toolbar-item-container-uni,
.message-input-toolbar-swiper .uni-swiper-wrapper .uni-swiper-slides .wx-swiper-slide-frame .toolbar-item-container-uni,
.message-input-toolbar-swiper .uni-swiper-wrapper .uni-swiper-slides wx-swiper .wx-swiper-slide-frame .toolbar-item-container-uni,
.message-input-toolbar-swiper .uni-swiper-wrapper .wx-swiper-slides .uni-swiper-slide-frame .toolbar-item-container-uni,
.message-input-toolbar-swiper .uni-swiper-wrapper .wx-swiper-slides .wx-swiper-slide-frame .toolbar-item-container-uni,
.message-input-toolbar-swiper .uni-swiper-wrapper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame .toolbar-item-container-uni,
.message-input-toolbar-swiper .uni-swiper-wrapper wx-swiper .wx-swiper-slides .uni-swiper-slide-frame .toolbar-item-container-uni,
.message-input-toolbar-swiper .uni-swiper-wrapper wx-swiper .wx-swiper-slides .wx-swiper-slide-frame .toolbar-item-container-uni,
.message-input-toolbar-swiper .uni-swiper-wrapper wx-swiper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame .toolbar-item-container-uni,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .uni-swiper-slides .uni-swiper-slide-frame .toolbar-item-container-uni,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .uni-swiper-slides .wx-swiper-slide-frame .toolbar-item-container-uni,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .uni-swiper-slides wx-swiper .wx-swiper-slide-frame .toolbar-item-container-uni,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .wx-swiper-slides .uni-swiper-slide-frame .toolbar-item-container-uni,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .wx-swiper-slides .wx-swiper-slide-frame .toolbar-item-container-uni,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame .toolbar-item-container-uni,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper wx-swiper .wx-swiper-slides .uni-swiper-slide-frame .toolbar-item-container-uni,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper wx-swiper .wx-swiper-slides .wx-swiper-slide-frame .toolbar-item-container-uni,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper wx-swiper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame .toolbar-item-container-uni {
position: static !important;
}
.message-input-toolbar-swiper .uni-swiper-wrapper .uni-swiper-slides .uni-swiper-slide-frame .toolbar-item-container-dialog,
.message-input-toolbar-swiper .uni-swiper-wrapper .uni-swiper-slides .wx-swiper-slide-frame .toolbar-item-container-dialog,
.message-input-toolbar-swiper .uni-swiper-wrapper .uni-swiper-slides wx-swiper .wx-swiper-slide-frame .toolbar-item-container-dialog,
.message-input-toolbar-swiper .uni-swiper-wrapper .wx-swiper-slides .uni-swiper-slide-frame .toolbar-item-container-dialog,
.message-input-toolbar-swiper .uni-swiper-wrapper .wx-swiper-slides .wx-swiper-slide-frame .toolbar-item-container-dialog,
.message-input-toolbar-swiper .uni-swiper-wrapper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame .toolbar-item-container-dialog,
.message-input-toolbar-swiper .uni-swiper-wrapper wx-swiper .wx-swiper-slides .uni-swiper-slide-frame .toolbar-item-container-dialog,
.message-input-toolbar-swiper .uni-swiper-wrapper wx-swiper .wx-swiper-slides .wx-swiper-slide-frame .toolbar-item-container-dialog,
.message-input-toolbar-swiper .uni-swiper-wrapper wx-swiper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame .toolbar-item-container-dialog,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .uni-swiper-slides .uni-swiper-slide-frame .toolbar-item-container-dialog,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .uni-swiper-slides .wx-swiper-slide-frame .toolbar-item-container-dialog,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .uni-swiper-slides wx-swiper .wx-swiper-slide-frame .toolbar-item-container-dialog,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .wx-swiper-slides .uni-swiper-slide-frame .toolbar-item-container-dialog,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .wx-swiper-slides .wx-swiper-slide-frame .toolbar-item-container-dialog,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame .toolbar-item-container-dialog,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper wx-swiper .wx-swiper-slides .uni-swiper-slide-frame .toolbar-item-container-dialog,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper wx-swiper .wx-swiper-slides .wx-swiper-slide-frame .toolbar-item-container-dialog,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper wx-swiper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame .toolbar-item-container-dialog {
position: absolute !important;
background: transparent;
left: -10px;
bottom: -5px;
}
.message-input-toolbar-swiper .uni-swiper-wrapper .uni-swiper-slides .uni-swiper-slide-frame .toolbar-item-container-dialog .bottom-popup-uni,
.message-input-toolbar-swiper .uni-swiper-wrapper .uni-swiper-slides .wx-swiper-slide-frame .toolbar-item-container-dialog .bottom-popup-uni,
.message-input-toolbar-swiper .uni-swiper-wrapper .uni-swiper-slides wx-swiper .wx-swiper-slide-frame .toolbar-item-container-dialog .bottom-popup-uni,
.message-input-toolbar-swiper .uni-swiper-wrapper .wx-swiper-slides .uni-swiper-slide-frame .toolbar-item-container-dialog .bottom-popup-uni,
.message-input-toolbar-swiper .uni-swiper-wrapper .wx-swiper-slides .wx-swiper-slide-frame .toolbar-item-container-dialog .bottom-popup-uni,
.message-input-toolbar-swiper .uni-swiper-wrapper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame .toolbar-item-container-dialog .bottom-popup-uni,
.message-input-toolbar-swiper .uni-swiper-wrapper wx-swiper .wx-swiper-slides .uni-swiper-slide-frame .toolbar-item-container-dialog .bottom-popup-uni,
.message-input-toolbar-swiper .uni-swiper-wrapper wx-swiper .wx-swiper-slides .wx-swiper-slide-frame .toolbar-item-container-dialog .bottom-popup-uni,
.message-input-toolbar-swiper .uni-swiper-wrapper wx-swiper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame .toolbar-item-container-dialog .bottom-popup-uni,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .uni-swiper-slides .uni-swiper-slide-frame .toolbar-item-container-dialog .bottom-popup-uni,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .uni-swiper-slides .wx-swiper-slide-frame .toolbar-item-container-dialog .bottom-popup-uni,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .uni-swiper-slides wx-swiper .wx-swiper-slide-frame .toolbar-item-container-dialog .bottom-popup-uni,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .wx-swiper-slides .uni-swiper-slide-frame .toolbar-item-container-dialog .bottom-popup-uni,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .wx-swiper-slides .wx-swiper-slide-frame .toolbar-item-container-dialog .bottom-popup-uni,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame .toolbar-item-container-dialog .bottom-popup-uni,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper wx-swiper .wx-swiper-slides .uni-swiper-slide-frame .toolbar-item-container-dialog .bottom-popup-uni,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper wx-swiper .wx-swiper-slides .wx-swiper-slide-frame .toolbar-item-container-dialog .bottom-popup-uni,
.message-input-toolbar-swiper wx-swiper .wx-swiper-wrapper wx-swiper .wx-swiper-slides wx-swiper .wx-swiper-slide-frame .toolbar-item-container-dialog .bottom-popup-uni {
position: -webkit-sticky !important;
position: sticky !important;
}

View File

@@ -0,0 +1,119 @@
"use strict";
const common_vendor = require("../../../../../common/vendor.js");
require("../../../../adapter-vue.js");
const TUIKit_utils_env = require("../../../../utils/env.js");
const TUIKit_components_TUIChat_config = require("../../config.js");
if (!Math) {
(Icon + BottomPopup)();
}
const Icon = () => "../../../common/Icon.js";
const BottomPopup = () => "../../../common/BottomPopup/index.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "index",
props: {
iconFile: {
type: String,
required: true
},
title: {
type: String,
default: ""
},
needDialog: {
type: Boolean,
default: true
},
iconWidth: {
type: String,
default: "20px"
},
iconHeight: {
type: String,
default: "20px"
},
// Whether to display the bottom popup dialog on mobile devices
// Invalid on PC
needBottomPopup: {
type: Boolean,
default: false
}
},
emits: ["onIconClick", "onDialogClose", "onDialogShow"],
setup(__props, { expose: __expose, emit: __emit }) {
const props = __props;
const emits = __emit;
const isDark = common_vendor.ref(TUIKit_components_TUIChat_config.ChatConfig.getTheme() === "dark");
const showDialog = common_vendor.ref(false);
const toolbarItemRef = common_vendor.ref();
const dialogRef = common_vendor.ref();
const toggleToolbarItem = () => {
emits("onIconClick", dialogRef);
if (TUIKit_utils_env.isPC) {
common_vendor.O.listen({
domRefs: toolbarItemRef.value,
handler: closeToolbarItem
});
}
if (!props.needDialog) {
return;
}
toggleDialogDisplay(!showDialog.value);
};
const closeToolbarItem = () => {
showDialog.value = false;
emits("onDialogClose", dialogRef);
};
const toggleDialogDisplay = (showStatus) => {
if (showDialog.value === showStatus) {
return;
}
showDialog.value = showStatus;
switch (showStatus) {
case true:
emits("onDialogShow", dialogRef);
break;
case false:
emits("onDialogClose", dialogRef);
}
};
const onPopupClose = () => {
showDialog.value = false;
};
__expose({
toggleDialogDisplay
});
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.p({
file: props.iconFile,
width: props.iconWidth,
height: props.iconHeight
}),
b: common_vendor.n(common_vendor.unref(TUIKit_utils_env.isUniFrameWork) && "toolbar-item-container-uni-icon"),
c: common_vendor.o$1(toggleToolbarItem),
d: common_vendor.unref(TUIKit_utils_env.isUniFrameWork)
}, common_vendor.unref(TUIKit_utils_env.isUniFrameWork) ? {
e: common_vendor.t(props.title)
} : {}, {
f: props.needBottomPopup && !common_vendor.unref(TUIKit_utils_env.isPC)
}, props.needBottomPopup && !common_vendor.unref(TUIKit_utils_env.isPC) ? {
g: common_vendor.o$1(() => {
}),
h: common_vendor.o$1(onPopupClose),
i: common_vendor.p({
show: common_vendor.unref(showDialog)
})
} : {}, {
j: common_vendor.unref(showDialog),
k: common_vendor.n(common_vendor.unref(isDark) && "toolbar-item-container-dialog-dark"),
l: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "toolbar-item-container-h5-dialog"),
m: common_vendor.n(common_vendor.unref(TUIKit_utils_env.isUniFrameWork) && "toolbar-item-container-uni-dialog"),
n: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "toolbar-item-container-h5"),
o: common_vendor.n(common_vendor.unref(TUIKit_utils_env.isUniFrameWork) && "toolbar-item-container-uni")
});
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-bf58df78"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/toolbar-item-container/index.js.map

View File

@@ -0,0 +1,7 @@
{
"component": true,
"usingComponents": {
"icon": "../../../common/Icon",
"bottom-popup": "../../../common/BottomPopup/index"
}
}

View File

@@ -0,0 +1 @@
<view ref="toolbarItemRef" class="{{['data-v-bf58df78', 'toolbar-item-container', n, o]}}"><view class="{{['data-v-bf58df78', 'toolbar-item-container-icon', b]}}" bindtap="{{c}}"><icon wx:if="{{a}}" class="icon data-v-bf58df78" u-i="bf58df78-0" bind:__l="__l" u-p="{{a}}"/></view><view wx:if="{{d}}" class="{{['data-v-bf58df78', 'toolbar-item-container-uni-title']}}">{{e}}</view><view hidden="{{!j}}" ref="dialogRef" class="{{['data-v-bf58df78', 'toolbar-item-container-dialog', k, l, m]}}"><bottom-popup wx:if="{{f}}" u-s="{{['d']}}" class="toolbar-bottom-popup data-v-bf58df78" catchtouchmove="{{g}}" bindonClose="{{h}}" u-i="bf58df78-1" bind:__l="__l" u-p="{{i}}"><slot/></bottom-popup><slot wx:else/></view></view>

View File

@@ -0,0 +1,140 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
body.data-v-bf58df78, div.data-v-bf58df78, ul.data-v-bf58df78, ol.data-v-bf58df78, dt.data-v-bf58df78, dd.data-v-bf58df78, li.data-v-bf58df78, dl.data-v-bf58df78, h1.data-v-bf58df78, h2.data-v-bf58df78, h3.data-v-bf58df78, h4.data-v-bf58df78, p.data-v-bf58df78 {
margin: 0;
padding: 0;
font-style: normal;
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
}
ol.data-v-bf58df78, ul.data-v-bf58df78, li.data-v-bf58df78 {
list-style: none;
}
img.data-v-bf58df78 {
border: 0;
vertical-align: middle;
pointer-events: none;
}
body.data-v-bf58df78 {
color: #000;
background: #FFF;
}
.clear.data-v-bf58df78 {
clear: both;
height: 1px;
width: 100%;
overflow: hidden;
margin-top: -1px;
}
a.data-v-bf58df78 {
color: #000;
text-decoration: none;
cursor: pointer;
}
a.data-v-bf58df78:hover {
text-decoration: none;
}
input.data-v-bf58df78, textarea.data-v-bf58df78 {
-webkit-user-select: auto;
user-select: auto;
}
input.data-v-bf58df78:focus, input.data-v-bf58df78:active, textarea.data-v-bf58df78:focus, textarea.data-v-bf58df78:active {
outline: none;
}
.chat-aside.data-v-bf58df78 {
position: absolute;
top: 50px;
right: 0;
box-sizing: border-box;
width: 360px !important;
border-radius: 8px 0 0 8px;
z-index: 9999;
max-height: calc(100% - 50px);
}
.toolbar-item-container-dialog.data-v-bf58df78 {
background: #fff;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}
.toolbar-item-container.data-v-bf58df78 {
position: relative;
}
.toolbar-item-container-icon.data-v-bf58df78 {
padding: 8px;
cursor: pointer;
-webkit-tap-highlight-color: transparent;
}
.toolbar-item-container-dialog.data-v-bf58df78 {
z-index: 5;
position: absolute;
background: #fff;
box-shadow: 0 2px 4px -3px rgba(32, 77, 141, 0.03), 0 6px 10px 1px rgba(32, 77, 141, 0.06), 0 3px 14px 2px rgba(32, 77, 141, 0.05);
width: -webkit-fit-content;
width: fit-content;
height: -webkit-fit-content;
height: fit-content;
bottom: 35px;
}
.toolbar-item-container-dialog-dark.data-v-bf58df78 {
background: #22262E;
box-shadow: 0 8px 40px 0 rgba(23, 25, 31, 0.6), 0 4px 12px 0 rgba(23, 25, 31, 0.8);
}
.toolbar-item-container-h5-dialog.data-v-bf58df78 {
position: static !important;
width: 100%;
box-shadow: none;
}
.toolbar-item-container-uni.data-v-bf58df78 {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
position: static;
}
.toolbar-item-container-uni-icon.data-v-bf58df78 {
background: #fff;
border-radius: 15px;
width: 60px;
height: 60px;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
}
.toolbar-item-container-uni-title.data-v-bf58df78 {
font-size: 14px;
color: #8F959D;
}
.toolbar-item-container-uni-dialog.data-v-bf58df78 {
position: absolute !important;
background: transparent;
left: -10px;
bottom: -5px;
}
.toolbar-item-container-uni-dialog .toolbar-bottom-popup.data-v-bf58df78 {
position: -webkit-sticky;
position: sticky;
}

View File

@@ -0,0 +1,134 @@
"use strict";
const common_vendor = require("../../../../../common/vendor.js");
require("../../../../adapter-vue.js");
const TUIKit_utils_env = require("../../../../utils/env.js");
if (!Math) {
(Transfer + Dialog)();
}
const Dialog = () => "../../../common/Dialog/index.js";
const Transfer = () => "../../../common/Transfer/index.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "index",
props: {
// type: voiceCall/groupCall/...
type: {
type: String,
default: ""
},
currentConversation: {
type: Object,
default: () => ({})
},
isGroup: {
type: Boolean,
default: false
}
},
emits: ["submit", "cancel"],
setup(__props, { expose: __expose, emit: __emit }) {
const props = __props;
const emits = __emit;
const show = common_vendor.ref(false);
const groupID = common_vendor.ref("");
const memberList = common_vendor.ref([]);
const searchMemberList = common_vendor.ref([]);
const selfUserID = common_vendor.ref("");
const titleMap = {
voiceCall: "发起群语音",
videoCall: "发起群视频"
};
const title = common_vendor.computed(() => {
return titleMap[props.type] ? titleMap[props.type] : "";
});
common_vendor.Zt.getUserProfile().then((res) => {
var _a;
if ((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.userID) {
selfUserID.value = res.data.userID;
}
});
common_vendor.watch(
() => {
var _a;
return [(_a = props == null ? void 0 : props.currentConversation) == null ? void 0 : _a.conversationID, show.value];
},
(newVal, oldVal) => {
if (newVal && newVal !== oldVal) {
if (props.isGroup && show.value) {
groupID.value = props.currentConversation.groupProfile.groupID;
common_vendor.es.getGroupMemberList({
groupID: groupID.value
}).then((res) => {
var _a, _b;
memberList.value = (_b = (_a = res == null ? void 0 : res.data) == null ? void 0 : _a.memberList) == null ? void 0 : _b.filter(
(user) => (user == null ? void 0 : user.userID) !== selfUserID.value
);
searchMemberList.value = memberList.value;
});
} else {
groupID.value = "";
memberList.value = [];
searchMemberList.value = memberList.value;
}
}
},
{
immediate: true
}
);
const search = (searchInfo) => {
var _a;
const results = (_a = memberList.value) == null ? void 0 : _a.filter(
(member) => (member == null ? void 0 : member.userID) === searchInfo
);
searchMemberList.value = (results == null ? void 0 : results.length) ? results : memberList.value;
};
const submit = (selectedMemberList) => {
const userIDList = [];
selectedMemberList == null ? void 0 : selectedMemberList.forEach((user) => {
(user == null ? void 0 : user.userID) && userIDList.push(user.userID);
});
if (props.type === "voiceCall") {
emits("submit", { userIDList, groupID: groupID.value, type: 1 });
} else if (props.type === "videoCall") {
emits("submit", { userIDList, groupID: groupID.value, type: 2 });
}
searchMemberList.value = memberList.value;
toggleShow(false);
};
const cancel = () => {
searchMemberList.value = memberList.value;
emits("cancel");
toggleShow(false);
};
const toggleShow = (showStatus) => {
show.value = showStatus;
};
__expose({
toggleShow
});
return (_ctx, _cache) => {
return {
a: common_vendor.o$1(search),
b: common_vendor.o$1(submit),
c: common_vendor.o$1(cancel),
d: common_vendor.p({
isSearch: true,
title: common_vendor.unref(title),
list: common_vendor.unref(searchMemberList),
isH5: !common_vendor.unref(TUIKit_utils_env.isPC),
isRadio: false
}),
e: common_vendor.o$1(toggleShow),
f: common_vendor.p({
show: common_vendor.unref(show),
isH5: !common_vendor.unref(TUIKit_utils_env.isPC),
isHeaderShow: false,
isFooterShow: false,
background: false
})
};
};
}
});
wx.createComponent(_sfc_main);
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/user-selector/index.js.map

View File

@@ -0,0 +1,7 @@
{
"component": true,
"usingComponents": {
"dialog": "../../../common/Dialog/index",
"transfer": "../../../common/Transfer/index"
}
}

View File

@@ -0,0 +1 @@
<dialog wx:if="{{f}}" u-s="{{['d']}}" bindupdateShow="{{e}}" u-i="e0d32194-0" bind:__l="__l" u-p="{{f}}"><transfer wx:if="{{d}}" bindsearch="{{a}}" bindsubmit="{{b}}" bindcancel="{{c}}" u-i="e0d32194-1,e0d32194-0" bind:__l="__l" u-p="{{d}}"/></dialog>

View File

@@ -0,0 +1,131 @@
"use strict";
const common_vendor = require("../../../../../common/vendor.js");
require("../../../../adapter-vue.js");
const TUIKit_utils_env = require("../../../../utils/env.js");
const common_assets = require("../../../../../common/assets.js");
const TUIKit_components_TUIChat_utils_utils = require("../../utils/utils.js");
const TUIKit_components_TUIChat_offlinePushInfoManager_index = require("../../offlinePushInfoManager/index.js");
const TUIKit_components_TUIChat_config = require("../../config.js");
if (!Math) {
ToolbarItemContainer();
}
const ToolbarItemContainer = () => "../toolbar-item-container/index.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "index",
props: {
// Video source, only valid for uni-app version, web version only supports selecting videos from files
// album: Select from files
// camera: Take a video using the camera
videoSourceType: {
type: String,
default: "album"
}
},
setup(__props) {
const props = __props;
const inputRef = common_vendor.ref();
const currentConversation = common_vendor.ref();
common_vendor.Jt.watch(common_vendor.o.CONV, {
currentConversation: (conversation) => {
currentConversation.value = conversation;
}
});
const handleIcon = () => {
if (TUIKit_utils_env.isUniFrameWork) {
switch (props.videoSourceType) {
case "album":
return common_assets.videoUniIcon;
case "camera":
return common_assets.cameraUniIcon;
default:
return common_assets.videoUniIcon;
}
} else {
const videoIcon = TUIKit_components_TUIChat_config.ChatConfig.getTheme() === "dark" ? common_assets.videoIconDark : common_assets.videoIconLight;
return videoIcon;
}
};
const handleTitle = () => {
if (TUIKit_utils_env.isUniFrameWork && props.videoSourceType === "camera") {
return "录制";
} else {
return "视频";
}
};
const onIconClick = () => {
var _a, _b, _c, _d, _e;
if (TUIKit_utils_env.isUniFrameWork) {
if (TUIKit_utils_env.isWeChat && ((_a = common_vendor.i) == null ? void 0 : _a.chooseMedia)) {
(_b = common_vendor.i) == null ? void 0 : _b.chooseMedia({
mediaType: ["video"],
count: 1,
sourceType: [props.videoSourceType],
maxDuration: 60,
success: function(res) {
sendVideoMessage(res);
}
});
} else {
(_c = common_vendor.i) == null ? void 0 : _c.chooseVideo({
count: 1,
sourceType: [props.videoSourceType],
compressed: false,
success: function(res) {
sendVideoMessage(res);
}
});
}
} else {
((_d = inputRef == null ? void 0 : inputRef.value) == null ? void 0 : _d.click) && ((_e = inputRef == null ? void 0 : inputRef.value) == null ? void 0 : _e.click());
}
};
const sendVideoInWeb = (e) => {
var _a, _b;
if (((_b = (_a = e == null ? void 0 : e.target) == null ? void 0 : _a.files) == null ? void 0 : _b.length) <= 0) {
return;
}
sendVideoMessage(e == null ? void 0 : e.target);
e.target.value = "";
};
const sendVideoMessage = (file) => {
var _a, _b, _c, _d, _e;
if (!file) {
return;
}
const options = {
to: ((_b = (_a = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _a.groupProfile) == null ? void 0 : _b.groupID) || ((_d = (_c = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _c.userProfile) == null ? void 0 : _d.userID),
conversationType: (_e = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _e.type,
payload: {
file
},
needReadReceipt: TUIKit_components_TUIChat_utils_utils.isEnabledMessageReadReceiptGlobal()
};
const offlinePushInfoCreateParams = {
conversation: currentConversation.value,
payload: options.payload,
messageType: common_vendor.qt.TYPES.MSG_VIDEO
};
const sendMessageOptions = {
offlinePushInfo: TUIKit_components_TUIChat_offlinePushInfoManager_index.OfflinePushInfoManager.create(offlinePushInfoCreateParams)
};
common_vendor.Qt.sendVideoMessage(options, sendMessageOptions);
};
return (_ctx, _cache) => {
return {
a: common_vendor.o$1(sendVideoInWeb),
b: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "video-upload-h5"),
c: common_vendor.o$1(onIconClick),
d: common_vendor.p({
iconFile: handleIcon(),
title: handleTitle(),
needDialog: false,
iconWidth: common_vendor.unref(TUIKit_utils_env.isUniFrameWork) ? "32px" : "20px",
iconHeight: common_vendor.unref(TUIKit_utils_env.isUniFrameWork) ? props.videoSourceType === "album" ? "20px" : "25px" : "18px"
})
};
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-11a33e36"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/video-upload/index.js.map

View File

@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"toolbar-item-container": "../toolbar-item-container/index"
}
}

View File

@@ -0,0 +1 @@
<toolbar-item-container wx:if="{{d}}" class="data-v-11a33e36" u-s="{{['d']}}" bindonIconClick="{{c}}" u-i="11a33e36-0" bind:__l="__l" u-p="{{d}}"><view class="{{['data-v-11a33e36', 'video-upload', b]}}"><input class="data-v-11a33e36" ref="inputRef" title="视频" type="file" data-type="video" accept="video/*" bindchange="{{a}}"></input></view></toolbar-item-container>

View File

@@ -0,0 +1,75 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
body.data-v-11a33e36, div.data-v-11a33e36, ul.data-v-11a33e36, ol.data-v-11a33e36, dt.data-v-11a33e36, dd.data-v-11a33e36, li.data-v-11a33e36, dl.data-v-11a33e36, h1.data-v-11a33e36, h2.data-v-11a33e36, h3.data-v-11a33e36, h4.data-v-11a33e36, p.data-v-11a33e36 {
margin: 0;
padding: 0;
font-style: normal;
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
}
ol.data-v-11a33e36, ul.data-v-11a33e36, li.data-v-11a33e36 {
list-style: none;
}
img.data-v-11a33e36 {
border: 0;
vertical-align: middle;
pointer-events: none;
}
body.data-v-11a33e36 {
color: #000;
background: #FFF;
}
.clear.data-v-11a33e36 {
clear: both;
height: 1px;
width: 100%;
overflow: hidden;
margin-top: -1px;
}
a.data-v-11a33e36 {
color: #000;
text-decoration: none;
cursor: pointer;
}
a.data-v-11a33e36:hover {
text-decoration: none;
}
input.data-v-11a33e36, textarea.data-v-11a33e36 {
-webkit-user-select: auto;
user-select: auto;
}
input.data-v-11a33e36:focus, input.data-v-11a33e36:active, textarea.data-v-11a33e36:focus, textarea.data-v-11a33e36:active {
outline: none;
}
.chat-aside.data-v-11a33e36 {
position: absolute;
top: 50px;
right: 0;
box-sizing: border-box;
width: 360px !important;
border-radius: 8px 0 0 8px;
z-index: 9999;
max-height: calc(100% - 50px);
}

View File

@@ -0,0 +1,87 @@
"use strict";
const common_vendor = require("../../../../../common/vendor.js");
require("../../../../adapter-vue.js");
const common_assets = require("../../../../../common/assets.js");
const TUIKit_components_TUIChat_utils_wordsList = require("../../utils/wordsList.js");
const TUIKit_components_TUIChat_utils_utils = require("../../utils/utils.js");
const TUIKit_utils_env = require("../../../../utils/env.js");
const TUIKit_components_TUIChat_config = require("../../config.js");
if (!Math) {
ToolbarItemContainer();
}
const ToolbarItemContainer = () => "../toolbar-item-container/index.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "index",
emits: ["onDialogPopupShowOrHide"],
setup(__props, { emit: __emit }) {
const wordsIcon = TUIKit_components_TUIChat_config.ChatConfig.getTheme() === "dark" ? common_assets.wordsIconDark : common_assets.wordsIconLight;
const emits = __emit;
const currentConversation = common_vendor.ref();
const container = common_vendor.ref();
common_vendor.Jt.watch(common_vendor.o.CONV, {
currentConversation: (conversation) => {
currentConversation.value = conversation;
}
});
const selectWord = (item) => {
var _a, _b, _c, _d, _e, _f;
const options = {
to: ((_b = (_a = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _a.groupProfile) == null ? void 0 : _b.groupID) || ((_d = (_c = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _c.userProfile) == null ? void 0 : _d.userID),
conversationType: (_e = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _e.type,
payload: {
text: common_vendor.Wt.t(`Words.${item.value}`)
},
needReadReceipt: TUIKit_components_TUIChat_utils_utils.isEnabledMessageReadReceiptGlobal()
};
common_vendor.Qt.sendTextMessage(options);
(_f = container == null ? void 0 : container.value) == null ? void 0 : _f.toggleDialogDisplay(false);
};
const closeDialog = () => {
var _a;
(_a = container == null ? void 0 : container.value) == null ? void 0 : _a.toggleDialogDisplay(false);
};
const onDialogShow = () => {
emits("onDialogPopupShowOrHide", true);
};
const onDialogClose = () => {
emits("onDialogPopupShowOrHide", false);
};
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("Words.常用语-快捷回复工具")),
b: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "words-h5-header-title"),
c: !common_vendor.unref(TUIKit_utils_env.isPC)
}, !common_vendor.unref(TUIKit_utils_env.isPC) ? {
d: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "words-h5-header-close"),
e: common_vendor.o$1(closeDialog)
} : {}, {
f: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "words-h5-header"),
g: common_vendor.f(common_vendor.unref(TUIKit_components_TUIChat_utils_wordsList.wordsList), (item, index, i0) => {
return {
a: common_vendor.t(common_vendor.unref(common_vendor.Wt).t(`Words.${item.value}`)),
b: index,
c: common_vendor.o$1(($event) => selectWord(item), index)
};
}),
h: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "words-h5-list-item"),
i: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "words-h5-list"),
j: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "words-h5"),
k: common_vendor.sr(container, "ac0e1580-0", {
"k": "container"
}),
l: common_vendor.o$1(onDialogShow),
m: common_vendor.o$1(onDialogClose),
n: common_vendor.p({
iconFile: common_vendor.unref(wordsIcon),
title: "常用语",
needBottomPopup: true,
iconWidth: common_vendor.unref(TUIKit_utils_env.isUniFrameWork) ? "26px" : "20px",
iconHeight: common_vendor.unref(TUIKit_utils_env.isUniFrameWork) ? "26px" : "20px"
})
});
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-ac0e1580"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/words/index.js.map

View File

@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"toolbar-item-container": "../toolbar-item-container/index"
}
}

View File

@@ -0,0 +1 @@
<toolbar-item-container wx:if="{{n}}" class="r data-v-ac0e1580" u-s="{{['d']}}" u-r="container" bindonDialogShow="{{l}}" bindonDialogClose="{{m}}" u-i="ac0e1580-0" bind:__l="__l" u-p="{{n}}"><view class="{{['data-v-ac0e1580', 'words', j]}}"><view class="{{['data-v-ac0e1580', 'words-header', f]}}"><label class="{{['data-v-ac0e1580', 'words-header-title', b]}}">{{a}}</label><label wx:if="{{c}}" class="{{['data-v-ac0e1580', 'words-header-close', d]}}" bindtap="{{e}}"> 关闭 </label></view><view class="{{['data-v-ac0e1580', 'words-list', i]}}"><view wx:for="{{g}}" wx:for-item="item" wx:key="b" class="{{['data-v-ac0e1580', 'words-list-item', h]}}" bindtap="{{item.c}}">{{item.a}}</view></view></view></toolbar-item-container>

View File

@@ -0,0 +1,142 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
body.data-v-ac0e1580, div.data-v-ac0e1580, ul.data-v-ac0e1580, ol.data-v-ac0e1580, dt.data-v-ac0e1580, dd.data-v-ac0e1580, li.data-v-ac0e1580, dl.data-v-ac0e1580, h1.data-v-ac0e1580, h2.data-v-ac0e1580, h3.data-v-ac0e1580, h4.data-v-ac0e1580, p.data-v-ac0e1580 {
margin:0;
padding:0;
font-style:normal;
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
}
ol.data-v-ac0e1580, ul.data-v-ac0e1580, li.data-v-ac0e1580 {
list-style:none;
}
img.data-v-ac0e1580 {
border:0;
vertical-align:middle;
pointer-events:none;
}
body.data-v-ac0e1580 {
color:#000;
background:#FFF;
}
.clear.data-v-ac0e1580 {
clear:both;
height:1px;
width:100%;
overflow:hidden;
margin-top:-1px;
}
a.data-v-ac0e1580 {
color:#000;
text-decoration:none;
cursor: pointer;
}
a.data-v-ac0e1580:hover {
text-decoration:none;
}
input.data-v-ac0e1580, textarea.data-v-ac0e1580 {
-webkit-user-select: auto;
user-select: auto;
}
input.data-v-ac0e1580:focus, input.data-v-ac0e1580:active, textarea.data-v-ac0e1580:focus, textarea.data-v-ac0e1580:active {
outline: none;
}
.chat-aside.data-v-ac0e1580 {
position: absolute;
top: 50px;
right: 0;
box-sizing: border-box;
width: 360px !important;
border-radius: 8px 0 0 8px;
z-index: 9999;
max-height: calc(100% - 50px);
}
.words.data-v-ac0e1580 {
background-color: #ffffff;
}
.words-header-close.data-v-ac0e1580 {
color: #3370ff;
}
.words.data-v-ac0e1580 {
z-index: 5;
width: 315px;
padding: 12px;
display: flex;
flex-direction: column;
width: 19.13rem;
height: 12.44rem;
overflow-y: auto;
}
.words-header.data-v-ac0e1580 {
display: flex;
justify-content: space-between;
font-size: 14px;
font-weight: 500;
}
.words-list.data-v-ac0e1580 {
flex: 1;
display: flex;
flex-direction: column;
cursor: pointer;
}
.words-list-item.data-v-ac0e1580 {
cursor: pointer;
padding: 4px 0;
font-size: 14px;
color: #50545c;
line-height: 18px;
}
.words-list-item.data-v-ac0e1580:hover {
color: #006eff;
}
.words-h5.data-v-ac0e1580 {
width: 100%;
box-sizing: border-box;
max-height: 80vh;
height: -webkit-fit-content;
height: fit-content;
overflow: hidden;
display: flex;
flex-direction: column;
}
.words-h5-header-title.data-v-ac0e1580 {
font-size: 18px;
line-height: 40px;
}
.words-h5-list.data-v-ac0e1580 {
flex: 1;
overflow-y: scroll;
}
.words-h5-list-item.data-v-ac0e1580 {
cursor: none;
-webkit-tap-highlight-color: transparent;
-moz-tap-highlight-color: transparent;
padding: 12px 0;
font-size: 16px;
color: #50545c;
line-height: 18px;
border-bottom: 1px solid #eeeeee;
}

View File

@@ -0,0 +1,176 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
require("../../../adapter-vue.js");
const common_assets = require("../../../../common/assets.js");
const TUIKit_utils_env = require("../../../utils/env.js");
const TUIKit_components_TUIChat_utils_sendMessage = require("../utils/sendMessage.js");
const TUIKit_components_TUIChat_config = require("../config.js");
if (!Math) {
(MessageInputAudio + MessageInputEditor + MessageInputAt + Icon + MessageQuote)();
}
const MessageInputEditor = () => "./message-input-editor.js";
const MessageInputAt = () => "./message-input-at/index.js";
const MessageInputAudio = () => "./message-input-audio.js";
const MessageQuote = () => "./message-input-quote/index.js";
const Icon = () => "../../common/Icon.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "index",
props: {
placeholder: { default: "this is placeholder" },
isMuted: { type: Boolean, default: true },
muteText: { default: "" },
enableInput: { type: Boolean, default: true },
enableAt: { type: Boolean, default: true },
enableTyping: { type: Boolean, default: true },
replyOrReference: { default: () => ({}) },
inputToolbarDisplayType: { default: "none" }
},
emits: ["changeToolbarDisplayType"],
setup(__props, { expose: __expose, emit: __emit }) {
const emits = __emit;
const props = __props;
const editor = common_vendor.ref();
const messageInputAtRef = common_vendor.ref();
const currentConversation = common_vendor.ref();
const isGroup = common_vendor.ref(false);
const displayType = common_vendor.ref("editor");
const featureConfig = TUIKit_components_TUIChat_config.ChatConfig.getFeatureConfig();
const isRenderVoice = common_vendor.ref(featureConfig.InputVoice);
const isRenderEmojiPicker = common_vendor.ref(featureConfig.InputEmoji || featureConfig.InputStickers);
const isRenderMore = common_vendor.ref(featureConfig.InputImage || featureConfig.InputVideo || featureConfig.InputEvaluation || featureConfig.InputQuickReplies);
common_vendor.onMounted(() => {
common_vendor.Jt.watch(common_vendor.o.CONV, {
currentConversation: onCurrentConversationUpdated
});
common_vendor.Jt.watch(common_vendor.o.CHAT, {
quoteMessage: onQuoteMessageUpdated
});
});
common_vendor.onUnmounted(() => {
common_vendor.Jt.unwatch(common_vendor.o.CONV, {
currentConversation: onCurrentConversationUpdated
});
common_vendor.Jt.unwatch(common_vendor.o.CHAT, {
quoteMessage: onQuoteMessageUpdated
});
});
common_vendor.watch(() => props.inputToolbarDisplayType, (newVal) => {
if (newVal !== "none") {
changeDisplayType("editor");
}
});
function changeDisplayType(display) {
displayType.value = display;
if (display === "audio") {
emits("changeToolbarDisplayType", "none");
}
}
function changeToolbarDisplayType(displayType2) {
emits("changeToolbarDisplayType", displayType2);
}
const onTyping = (inputContentEmpty, inputBlur) => {
TUIKit_components_TUIChat_utils_sendMessage.sendTyping(inputContentEmpty, inputBlur);
};
const onAt = (show) => {
var _a;
(_a = messageInputAtRef == null ? void 0 : messageInputAtRef.value) == null ? void 0 : _a.toggleAtList(show);
};
const onFocus = () => {
if (TUIKit_utils_env.isH5) {
emits("changeToolbarDisplayType", "none");
}
};
const insertEmoji = (emoji) => {
var _a, _b;
((_a = editor == null ? void 0 : editor.value) == null ? void 0 : _a.addEmoji) && ((_b = editor == null ? void 0 : editor.value) == null ? void 0 : _b.addEmoji(emoji));
};
const insertAt = (atInfo) => {
var _a, _b;
((_a = editor == null ? void 0 : editor.value) == null ? void 0 : _a.insertAt) && ((_b = editor == null ? void 0 : editor.value) == null ? void 0 : _b.insertAt(atInfo));
};
const onAtListOpen = () => {
var _a, _b;
((_a = editor == null ? void 0 : editor.value) == null ? void 0 : _a.blur) && ((_b = editor == null ? void 0 : editor.value) == null ? void 0 : _b.blur());
};
const reEdit = (content) => {
var _a, _b;
(_a = editor == null ? void 0 : editor.value) == null ? void 0 : _a.resetEditor();
(_b = editor == null ? void 0 : editor.value) == null ? void 0 : _b.setEditorContent(content);
};
function onCurrentConversationUpdated(conversation) {
var _a;
currentConversation.value = conversation;
isGroup.value = ((_a = currentConversation.value) == null ? void 0 : _a.type) === common_vendor.qt.TYPES.CONV_GROUP;
}
function onQuoteMessageUpdated(options) {
if ((options == null ? void 0 : options.message) && (options == null ? void 0 : options.type) === "quote") {
changeDisplayType("editor");
}
}
__expose({
insertEmoji,
reEdit
});
return (_ctx, _cache) => {
return common_vendor.e({
a: (common_vendor.unref(TUIKit_utils_env.isWeChat) || common_vendor.unref(TUIKit_utils_env.isApp)) && common_vendor.unref(isRenderVoice)
}, (common_vendor.unref(TUIKit_utils_env.isWeChat) || common_vendor.unref(TUIKit_utils_env.isApp)) && common_vendor.unref(isRenderVoice) ? {
b: common_vendor.unref(displayType) === "audio" ? 1 : "",
c: common_vendor.o$1(changeDisplayType),
d: common_vendor.p({
isEnableAudio: common_vendor.unref(displayType) === "audio"
})
} : {}, {
e: common_vendor.sr(editor, "ceb9e230-1", {
"k": "editor"
}),
f: common_vendor.unref(displayType) === "editor",
g: common_vendor.o$1(onTyping),
h: common_vendor.o$1(onAt),
i: common_vendor.o$1(onFocus),
j: common_vendor.p({
placeholder: props.placeholder,
isMuted: props.isMuted,
muteText: props.muteText,
enableInput: props.enableInput,
enableAt: props.enableAt,
enableTyping: props.enableTyping,
isGroup: common_vendor.unref(isGroup)
}),
k: props.enableAt
}, props.enableAt ? {
l: common_vendor.sr(messageInputAtRef, "ceb9e230-2", {
"k": "messageInputAtRef"
}),
m: common_vendor.o$1(insertAt),
n: common_vendor.o$1(onAtListOpen)
} : {}, {
o: common_vendor.unref(isRenderEmojiPicker)
}, common_vendor.unref(isRenderEmojiPicker) ? {
p: common_vendor.o$1(($event) => changeToolbarDisplayType("emojiPicker")),
q: common_vendor.p({
file: common_vendor.unref(common_assets.faceIcon),
size: "23px",
hotAreaSize: "3px"
})
} : {}, {
r: common_vendor.unref(isRenderMore)
}, common_vendor.unref(isRenderMore) ? {
s: common_vendor.o$1(($event) => changeToolbarDisplayType("tools")),
t: common_vendor.p({
file: common_vendor.unref(common_assets.moreIcon),
size: "23px",
hotAreaSize: "3px"
})
} : {}, {
v: common_vendor.p({
displayType: common_vendor.unref(displayType)
}),
w: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "message-input-h5")
});
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-ceb9e230"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/message-input/index.js.map

View File

@@ -0,0 +1,10 @@
{
"component": true,
"usingComponents": {
"message-input-editor": "./message-input-editor",
"message-input-at": "./message-input-at/index",
"message-input-audio": "./message-input-audio",
"message-quote": "./message-input-quote/index",
"icon": "../../common/Icon"
}
}

View File

@@ -0,0 +1 @@
<view class="{{['data-v-ceb9e230', 'message-input', w]}}"><view class="audio-main-content-line data-v-ceb9e230"><message-input-audio wx:if="{{a}}" class="{{['data-v-ceb9e230', b && 'message-input-wx-audio-open']}}" bindchangeDisplayType="{{c}}" u-i="ceb9e230-0" bind:__l="__l" u-p="{{d}}"/><message-input-editor wx:if="{{j}}" data-c-h="{{!f}}" u-r="editor" class="message-input-editor r data-v-ceb9e230" bindonTyping="{{g}}" bindonAt="{{h}}" bindonFocus="{{i}}" u-i="ceb9e230-1" bind:__l="__l" u-p="{{j}}"/><message-input-at wx:if="{{k}}" class="r data-v-ceb9e230" u-r="messageInputAtRef" bindinsertAt="{{m}}" bindonAtListOpen="{{n}}" u-i="ceb9e230-2" bind:__l="__l"/><icon wx:if="{{o}}" class="icon icon-face data-v-ceb9e230" bindonClick="{{p}}" u-i="ceb9e230-3" bind:__l="__l" u-p="{{q}}"/><icon wx:if="{{r}}" class="icon icon-more data-v-ceb9e230" bindonClick="{{s}}" u-i="ceb9e230-4" bind:__l="__l" u-p="{{t}}"/></view><view class="data-v-ceb9e230"><message-quote wx:if="{{v}}" class="data-v-ceb9e230" style="{{'min-width:' + 0}}" u-i="ceb9e230-5" bind:__l="__l" u-p="{{v}}"/></view></view>

View File

@@ -0,0 +1,107 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
body.data-v-ceb9e230, div.data-v-ceb9e230, ul.data-v-ceb9e230, ol.data-v-ceb9e230, dt.data-v-ceb9e230, dd.data-v-ceb9e230, li.data-v-ceb9e230, dl.data-v-ceb9e230, h1.data-v-ceb9e230, h2.data-v-ceb9e230, h3.data-v-ceb9e230, h4.data-v-ceb9e230, p.data-v-ceb9e230 {
margin: 0;
padding: 0;
font-style: normal;
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
}
ol.data-v-ceb9e230, ul.data-v-ceb9e230, li.data-v-ceb9e230 {
list-style: none;
}
img.data-v-ceb9e230 {
border: 0;
vertical-align: middle;
pointer-events: none;
}
body.data-v-ceb9e230 {
color: #000;
background: #FFF;
}
.clear.data-v-ceb9e230 {
clear: both;
height: 1px;
width: 100%;
overflow: hidden;
margin-top: -1px;
}
a.data-v-ceb9e230 {
color: #000;
text-decoration: none;
cursor: pointer;
}
a.data-v-ceb9e230:hover {
text-decoration: none;
}
input.data-v-ceb9e230, textarea.data-v-ceb9e230 {
-webkit-user-select: auto;
user-select: auto;
}
input.data-v-ceb9e230:focus, input.data-v-ceb9e230:active, textarea.data-v-ceb9e230:focus, textarea.data-v-ceb9e230:active {
outline: none;
}
.chat-aside.data-v-ceb9e230 {
position: absolute;
top: 50px;
right: 0;
box-sizing: border-box;
width: 360px !important;
border-radius: 8px 0 0 8px;
z-index: 9999;
max-height: calc(100% - 50px);
}
.data-v-ceb9e230:not(not) {
display: flex;
flex-direction: column;
min-width: 0;
box-sizing: border-box;
}
.message-input.data-v-ceb9e230 {
position: relative;
display: flex;
flex-direction: column;
border: none;
overflow: hidden;
background: #ebf0f6;
}
.message-input-h5.data-v-ceb9e230 {
padding: 10px 10px 15px;
}
.message-input-editor.data-v-ceb9e230 {
flex: 1;
display: flex;
}
.message-input .icon.data-v-ceb9e230 {
margin-left: 3px;
}
.message-input-wx-audio-open.data-v-ceb9e230 {
flex: 1;
}
.audio-main-content-line.data-v-ceb9e230 {
display: flex;
flex-direction: row;
align-items: center;
}

View File

@@ -0,0 +1,154 @@
"use strict";
const common_vendor = require("../../../../../common/vendor.js");
require("../../../../adapter-vue.js");
const TUIKit_utils_env = require("../../../../utils/env.js");
if (!Math) {
BottomPopup();
}
const BottomPopup = () => "../../../common/BottomPopup/index.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "index",
emits: ["onAtListOpen", "insertAt"],
setup(__props, { expose: __expose, emit: __emit }) {
const emits = __emit;
const MessageInputAt = common_vendor.ref();
const memberListItems = common_vendor.ref();
const showAtList = common_vendor.ref(false);
const memberList = common_vendor.ref();
const allMemberList = common_vendor.ref();
const showMemberList = common_vendor.ref();
const isGroup = common_vendor.ref(false);
const position = common_vendor.ref({
left: 0,
top: 0
});
const selectedIndex = common_vendor.ref(0);
const currentConversationID = common_vendor.ref("");
const all = {
userID: common_vendor.qt.TYPES.MSG_AT_ALL,
nick: "所有人",
isAll: true,
avatar: "https://web.sdk.qcloud.com/im/assets/images/at.svg"
};
common_vendor.Jt.watch(common_vendor.o.CONV, {
currentConversationID: (id) => {
var _a, _b;
if (id !== currentConversationID.value) {
currentConversationID.value = id;
memberList.value = [];
allMemberList.value = [];
showMemberList.value = [];
isGroup.value = false;
common_vendor.Jt.update(common_vendor.o.CUSTOM, "memberList", memberList.value);
if ((_a = currentConversationID == null ? void 0 : currentConversationID.value) == null ? void 0 : _a.startsWith("GROUP")) {
isGroup.value = true;
const groupID = (_b = currentConversationID == null ? void 0 : currentConversationID.value) == null ? void 0 : _b.substring(5);
common_vendor.es.switchGroup(groupID);
} else {
common_vendor.es.switchGroup("");
}
}
}
});
common_vendor.Jt.watch(common_vendor.o.GRP, {
currentGroupMemberList: (list) => {
memberList.value = list;
allMemberList.value = [all, ...memberList.value];
showMemberList.value = allMemberList.value;
common_vendor.Jt.update(common_vendor.o.CUSTOM, "memberList", memberList.value);
}
});
const toggleAtList = (show) => {
if (!isGroup.value) {
return;
}
showAtList.value = show;
if (showAtList.value) {
emits("onAtListOpen");
}
};
const handleAtListPosition = (positionData) => {
position.value = positionData;
};
const setCurrentSelectIndex = (index) => {
var _a, _b;
selectedIndex.value = index;
(_b = (_a = memberListItems.value) == null ? void 0 : _a[selectedIndex.value]) == null ? void 0 : _b.scrollIntoView(false);
};
const setShowMemberList = (list) => {
showMemberList.value = list;
};
common_vendor.i.toggleAtList = toggleAtList;
common_vendor.i.handleAtListPosition = handleAtListPosition;
common_vendor.i.setCurrentSelectIndex = setCurrentSelectIndex;
common_vendor.i.setShowMemberList = setShowMemberList;
__expose({
toggleAtList
});
common_vendor.watch(
() => [position.value, MessageInputAt == null ? void 0 : MessageInputAt.value],
() => {
var _a;
if (TUIKit_utils_env.isH5 || !(MessageInputAt == null ? void 0 : MessageInputAt.value) || !((_a = MessageInputAt == null ? void 0 : MessageInputAt.value) == null ? void 0 : _a.style)) {
return;
}
MessageInputAt.value.style.left = position.value.left + "px";
MessageInputAt.value.style.top = position.value.top - MessageInputAt.value.clientHeight + "px";
}
);
const closeAt = () => {
showAtList.value = false;
showMemberList.value = allMemberList.value;
position.value = {
left: 0,
top: 0
};
};
const selectItem = (index) => {
var _a;
if (TUIKit_utils_env.isPC && common_vendor.i.selectItem) {
common_vendor.i.selectItem(index);
} else {
if ((_a = showMemberList == null ? void 0 : showMemberList.value) == null ? void 0 : _a.length) {
const item = showMemberList == null ? void 0 : showMemberList.value[index];
emits("insertAt", {
id: item == null ? void 0 : item.userID,
label: (item == null ? void 0 : item.nick) || (item == null ? void 0 : item.userID)
});
}
}
closeAt();
};
const handleMemberAvatar = (item) => {
return (item == null ? void 0 : item.avatar) || "https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png";
};
const handleMemberName = (item) => {
return (item == null ? void 0 : item.nick) ? item == null ? void 0 : item.nick : item == null ? void 0 : item.userID;
};
return (_ctx, _cache) => {
return common_vendor.e({
a: !common_vendor.unref(TUIKit_utils_env.isPC)
}, !common_vendor.unref(TUIKit_utils_env.isPC) ? {
b: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("TUIChat.选择提醒的人"))
} : {}, {
c: common_vendor.f(common_vendor.unref(showMemberList), (item, index, i0) => {
return {
a: handleMemberAvatar(item),
b: common_vendor.t(handleMemberName(item)),
c: index,
d: common_vendor.n(index === common_vendor.unref(selectedIndex) && "selected"),
e: common_vendor.o$1(($event) => selectItem(index), index)
};
}),
d: common_vendor.n(common_vendor.unref(TUIKit_utils_env.isPC) ? "message-input-at" : "message-input-at-h5"),
e: common_vendor.o$1(closeAt),
f: common_vendor.p({
show: common_vendor.unref(showAtList)
})
});
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-7a11d573"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/message-input/message-input-at/index.js.map

View File

@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"bottom-popup": "../../../common/BottomPopup/index"
}
}

View File

@@ -0,0 +1 @@
<bottom-popup wx:if="{{f}}" class="data-v-7a11d573" u-s="{{['d']}}" bindonClose="{{e}}" u-i="7a11d573-0" bind:__l="__l" u-p="{{f}}"><view ref="MessageInputAt" class="{{['data-v-7a11d573', d]}}"><view ref="dialog" class="member-list data-v-7a11d573"><view wx:if="{{a}}" class="member-list-title data-v-7a11d573"><label class="title data-v-7a11d573">{{b}}</label></view><view class="member-list-box data-v-7a11d573"><view wx:for="{{c}}" wx:for-item="item" wx:key="c" ref="memberListItems" class="{{['member-list-box-body', 'data-v-7a11d573', item.d]}}" bindtap="{{item.e}}"><image class="member-list-box-body-avatar data-v-7a11d573" src="{{item.a}}"></image><label class="member-list-box-body-name data-v-7a11d573">{{item.b}}</label></view></view></view></view></bottom-popup>

View File

@@ -0,0 +1,168 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
body.data-v-7a11d573, div.data-v-7a11d573, ul.data-v-7a11d573, ol.data-v-7a11d573, dt.data-v-7a11d573, dd.data-v-7a11d573, li.data-v-7a11d573, dl.data-v-7a11d573, h1.data-v-7a11d573, h2.data-v-7a11d573, h3.data-v-7a11d573, h4.data-v-7a11d573, p.data-v-7a11d573 {
margin: 0;
padding: 0;
font-style: normal;
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
}
ol.data-v-7a11d573, ul.data-v-7a11d573, li.data-v-7a11d573 {
list-style: none;
}
img.data-v-7a11d573 {
border: 0;
vertical-align: middle;
pointer-events: none;
}
body.data-v-7a11d573 {
color: #000;
background: #FFF;
}
.clear.data-v-7a11d573 {
clear: both;
height: 1px;
width: 100%;
overflow: hidden;
margin-top: -1px;
}
a.data-v-7a11d573 {
color: #000;
text-decoration: none;
cursor: pointer;
}
a.data-v-7a11d573:hover {
text-decoration: none;
}
input.data-v-7a11d573, textarea.data-v-7a11d573 {
-webkit-user-select: auto;
user-select: auto;
}
input.data-v-7a11d573:focus, input.data-v-7a11d573:active, textarea.data-v-7a11d573:focus, textarea.data-v-7a11d573:active {
outline: none;
}
.chat-aside.data-v-7a11d573 {
position: absolute;
top: 50px;
right: 0;
box-sizing: border-box;
width: 360px !important;
border-radius: 8px 0 0 8px;
z-index: 9999;
max-height: calc(100% - 50px);
}
.message-input-at.data-v-7a11d573 {
position: fixed;
max-width: 15rem;
max-height: 10rem;
overflow: hidden auto;
background: #fff;
box-shadow: 0 0.06rem 0.63rem 0 rgba(2, 16, 43, 0.15);
border-radius: 0.13rem;
}
.member-list-box-header.data-v-7a11d573 {
height: 2.5rem;
padding-top: 5px;
cursor: pointer;
}
.member-list-box-header.data-v-7a11d573:hover {
background: rgba(0, 110, 255, 0.1);
}
.member-list-box span.data-v-7a11d573 {
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 12px;
color: #000;
letter-spacing: 0;
padding: 5px;
}
.member-list-box-body.data-v-7a11d573 {
height: 30px;
cursor: pointer;
display: flex;
align-items: center;
}
.member-list-box-body .selected.data-v-7a11d573, .member-list-box-body.data-v-7a11d573:hover {
background: rgba(0, 110, 255, 0.1);
}
.member-list-box-body-name.data-v-7a11d573 {
overflow: hidden;
white-space: nowrap;
word-wrap: break-word;
word-break: break-all;
text-overflow: ellipsis;
}
.member-list-box-body-avatar.data-v-7a11d573 {
width: 20px;
height: 20px;
padding-left: 10px;
}
.member-list-box .selected.data-v-7a11d573 {
background: rgba(0, 110, 255, 0.1);
}
.message-input-at-h5 .member-list.data-v-7a11d573 {
height: auto;
max-height: 500px;
width: 100%;
max-width: 100%;
background: white;
border-radius: 12px 12px 0 0;
display: flex;
flex-direction: column;
overflow: hidden;
}
.message-input-at-h5 .member-list-title.data-v-7a11d573 {
height: -webkit-fit-content;
height: fit-content;
width: calc(100% - 30px);
text-align: center;
vertical-align: middle;
padding: 15px;
}
.message-input-at-h5 .member-list-title .title.data-v-7a11d573 {
vertical-align: middle;
display: inline-block;
font-size: 16px;
}
.message-input-at-h5 .member-list-title .close.data-v-7a11d573 {
vertical-align: middle;
position: absolute;
right: 10px;
display: inline-block;
}
.message-input-at-h5 .member-list-box.data-v-7a11d573 {
flex: 1;
overflow-y: scroll;
}
.message-input-at-h5 .member-list-box-body.data-v-7a11d573 {
padding: 10px;
}
.message-input-at-h5 .member-list-box-body img.data-v-7a11d573 {
width: 26px;
height: 26px;
}
.message-input-at-h5 .member-list-box-body span.data-v-7a11d573 {
font-size: 14px;
}

View File

@@ -0,0 +1,199 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
require("../../../adapter-vue.js");
const common_assets = require("../../../../common/assets.js");
const TUIKit_components_common_Toast_index = require("../../common/Toast/index.js");
const TUIKit_utils_lodash = require("../../../utils/lodash.js");
const TUIKit_components_TUIChat_utils_utils = require("../utils/utils.js");
const TUIKit_components_common_Toast_type = require("../../common/Toast/type.js");
if (!Math) {
Icon();
}
const Icon = () => "../../common/Icon.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "message-input-audio",
props: {
isEnableAudio: { type: Boolean, default: false }
},
emits: ["changeDisplayType"],
setup(__props, { emit: __emit }) {
var _a;
const emits = __emit;
const props = __props;
let recordTime = 0;
let isManualCancelBySlide = false;
let recordTimer;
let firstTouchPageY = -1;
let isFingerTouchingScreen = false;
let isFirstAuthrizedRecord = false;
const recorderManager = (_a = common_vendor.i) == null ? void 0 : _a.getRecorderManager();
const isRecording = common_vendor.ref(false);
const touchBarText = common_vendor.ref("按住说话");
const modalText = common_vendor.ref("正在录音");
const isAudioTouchBarShow = common_vendor.ref(false);
const currentConversation = common_vendor.ref();
const recordConfig = {
// Duration of the recording, in ms, with a maximum value of 600000 (10 minutes)
duration: 6e4,
// Sampling rate
sampleRate: 44100,
// Number of recording channels
numberOfChannels: 1,
// Encoding bit rate
encodeBitRate: 192e3,
// Audio format
// Select this format to create audio messages that can be interoperable across all chat platforms (Android, iOS, WeChat Mini Programs, and Web).
format: "mp3"
};
function switchAudio() {
emits("changeDisplayType", props.isEnableAudio ? "editor" : "audio");
}
common_vendor.onMounted(() => {
recorderManager.onStart(onRecorderStart);
recorderManager.onStop(onRecorderStop);
recorderManager.onError(onRecorderError);
common_vendor.Jt.watch(common_vendor.o.CONV, {
currentConversation: onCurrentConverstaionUpdated
});
});
common_vendor.onUnmounted(() => {
common_vendor.Jt.unwatch(common_vendor.o.CONV, {
currentConversation: onCurrentConverstaionUpdated
});
});
function onCurrentConverstaionUpdated(conversation) {
currentConversation.value = conversation;
}
function initRecorder() {
initRecorderData();
initRecorderView();
}
function initRecorderView() {
isRecording.value = false;
touchBarText.value = "按住说话";
modalText.value = "正在录音";
}
function initRecorderData(options) {
clearInterval(recordTimer);
recordTimer = void 0;
recordTime = 0;
firstTouchPageY = -1;
isManualCancelBySlide = false;
if (!(options == null ? void 0 : options.hasError)) {
recorderManager.stop();
}
}
function handleTouchStart() {
if (isFingerTouchingScreen) {
isFirstAuthrizedRecord = true;
}
}
function handleLongPress() {
isFingerTouchingScreen = true;
recorderManager.start(recordConfig);
}
const handleTouchMove = TUIKit_utils_lodash.throttle(function(e) {
if (isRecording.value) {
const pageY = e.changedTouches[e.changedTouches.length - 1].pageY;
if (firstTouchPageY < 0) {
firstTouchPageY = pageY;
}
const offset = firstTouchPageY - pageY;
if (offset > 150) {
touchBarText.value = "抬起取消";
modalText.value = "松开手指 取消发送";
isManualCancelBySlide = true;
} else if (offset > 50) {
touchBarText.value = "抬起发送";
modalText.value = "继续上滑可取消";
isManualCancelBySlide = false;
} else {
touchBarText.value = "抬起发送";
modalText.value = "正在录音";
isManualCancelBySlide = false;
}
}
}, 100);
function handleTouchEnd() {
isFingerTouchingScreen = false;
recorderManager.stop();
}
function onRecorderStart() {
if (!isFingerTouchingScreen) {
isFirstAuthrizedRecord = true;
recorderManager.stop();
return;
}
recordTimer = setInterval(() => {
recordTime += 1;
}, 1e3);
touchBarText.value = "抬起发送";
isRecording.value = true;
}
function onRecorderStop(res) {
var _a2, _b, _c, _d, _e, _f;
if (isFirstAuthrizedRecord) {
isFirstAuthrizedRecord = false;
initRecorder();
return;
}
if (isManualCancelBySlide || !isRecording.value) {
initRecorder();
return;
}
clearInterval(recordTimer);
const tempFilePath = res.tempFilePath;
const duration = res.duration ? res.duration : recordTime * 1e3;
const fileSize = res.fileSize ? res.fileSize : 48 * recordTime / 8 * 1024;
if (duration < 1e3) {
TUIKit_components_common_Toast_index.Toast({
message: "录音时间太短",
type: TUIKit_components_common_Toast_type.TOAST_TYPE.NORMAL,
duration: 1500
});
} else {
const options = {
to: ((_b = (_a2 = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _a2.groupProfile) == null ? void 0 : _b.groupID) || ((_d = (_c = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _c.userProfile) == null ? void 0 : _d.userID),
conversationType: (_e = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _e.type,
payload: { file: { duration, tempFilePath, fileSize } },
needReadReceipt: TUIKit_components_TUIChat_utils_utils.isEnabledMessageReadReceiptGlobal()
};
(_f = common_vendor.Qt) == null ? void 0 : _f.sendAudioMessage(options);
}
initRecorder();
}
function onRecorderError() {
initRecorderData({ hasError: true });
initRecorderView();
}
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.o$1(switchAudio),
b: common_vendor.p({
file: common_vendor.unref(common_assets.audioIcon$1),
size: "23px",
hotAreaSize: "3px"
}),
c: props.isEnableAudio
}, props.isEnableAudio ? common_vendor.e({
d: common_vendor.t(common_vendor.unref(common_vendor.Wt).t(`TUIChat.${common_vendor.unref(touchBarText)}`)),
e: common_vendor.unref(isRecording)
}, common_vendor.unref(isRecording) ? {
f: common_vendor.t(common_vendor.unref(common_vendor.Wt).t(`TUIChat.${common_vendor.unref(modalText)}`))
} : {}, {
g: common_vendor.o$1(handleTouchStart),
h: common_vendor.o$1(handleLongPress),
i: common_vendor.o$1(
//@ts-ignore
(...args) => common_vendor.unref(handleTouchMove) && common_vendor.unref(handleTouchMove)(...args)
),
j: common_vendor.o$1(handleTouchEnd)
}) : {}, {
k: common_vendor.unref(isAudioTouchBarShow) ? 1 : ""
});
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-89320e8a"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/message-input/message-input-audio.js.map

View File

@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"icon": "../../common/Icon"
}
}

View File

@@ -0,0 +1 @@
<view class="{{['data-v-89320e8a', 'message-input-audio', k && 'message-input-audio-open']}}"><icon wx:if="{{b}}" class="audio-message-icon data-v-89320e8a" bindonClick="{{a}}" u-i="89320e8a-0" bind:__l="__l" u-p="{{b}}"/><view wx:if="{{c}}" class="audio-input-touch-bar data-v-89320e8a" bindtouchstart="{{g}}" bindlongpress="{{h}}" bindtouchmove="{{i}}" bindtouchend="{{j}}"><label class="data-v-89320e8a">{{d}}</label><view wx:if="{{e}}" class="record-modal data-v-89320e8a"><view class="red-mask data-v-89320e8a"/><view class="float-element moving-slider data-v-89320e8a"/><view class="float-element modal-title data-v-89320e8a">{{f}}</view></view></view></view>

View File

@@ -0,0 +1,145 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
body.data-v-89320e8a, div.data-v-89320e8a, ul.data-v-89320e8a, ol.data-v-89320e8a, dt.data-v-89320e8a, dd.data-v-89320e8a, li.data-v-89320e8a, dl.data-v-89320e8a, h1.data-v-89320e8a, h2.data-v-89320e8a, h3.data-v-89320e8a, h4.data-v-89320e8a, p.data-v-89320e8a {
margin: 0;
padding: 0;
font-style: normal;
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
}
ol.data-v-89320e8a, ul.data-v-89320e8a, li.data-v-89320e8a {
list-style: none;
}
img.data-v-89320e8a {
border: 0;
vertical-align: middle;
pointer-events: none;
}
body.data-v-89320e8a {
color: #000;
background: #FFF;
}
.clear.data-v-89320e8a {
clear: both;
height: 1px;
width: 100%;
overflow: hidden;
margin-top: -1px;
}
a.data-v-89320e8a {
color: #000;
text-decoration: none;
cursor: pointer;
}
a.data-v-89320e8a:hover {
text-decoration: none;
}
input.data-v-89320e8a, textarea.data-v-89320e8a {
-webkit-user-select: auto;
user-select: auto;
}
input.data-v-89320e8a:focus, input.data-v-89320e8a:active, textarea.data-v-89320e8a:focus, textarea.data-v-89320e8a:active {
outline: none;
}
.chat-aside.data-v-89320e8a {
position: absolute;
top: 50px;
right: 0;
box-sizing: border-box;
width: 360px !important;
border-radius: 8px 0 0 8px;
z-index: 9999;
max-height: calc(100% - 50px);
}
.message-input-audio.data-v-89320e8a {
display: flex;
flex-direction: row;
align-items: center;
}
.message-input-audio .audio-message-icon.data-v-89320e8a {
margin-right: 3px;
}
.message-input-audio .audio-input-touch-bar.data-v-89320e8a {
height: 39px;
flex: 1;
border-radius: 10px;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
background-color: #fff;
}
.message-input-audio .audio-input-touch-bar .record-modal.data-v-89320e8a {
height: 300rpx;
width: 60vw;
background-color: rgba(0, 0, 0, 0.8);
position: fixed;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
z-index: 9999;
border-radius: 24rpx;
display: flex;
flex-direction: column;
overflow: hidden;
}
.message-input-audio .audio-input-touch-bar .record-modal .red-mask.data-v-89320e8a {
position: absolute;
inset: 0;
background-color: rgba(255, 62, 72, 0.5);
opacity: 0;
transition: opacity 10ms linear;
z-index: 1;
}
.message-input-audio .audio-input-touch-bar .record-modal .moving-slider.data-v-89320e8a {
margin: 10vw;
width: 40rpx;
height: 16rpx;
border-radius: 4rpx;
background-color: #006fff;
animation: loading-89320e8a 1s ease-in-out infinite alternate;
z-index: 2;
}
.message-input-audio .audio-input-touch-bar .record-modal .float-element.data-v-89320e8a {
position: relative;
z-index: 2;
}
@keyframes loading-89320e8a {
0% {
transform: translate(0, 0);
}
100% {
transform: translate(30vw, 0);
background-color: #f5634a;
width: 40px;
}
}
.message-input-audio .audio-input-touch-bar .modal-title.data-v-89320e8a {
text-align: center;
color: #fff;
}
.message-input-audio-open.data-v-89320e8a {
flex: 1;
}

View File

@@ -0,0 +1,214 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
require("../../../adapter-vue.js");
const TUIKit_components_TUIChat_utils_conversationDraft = require("../utils/conversationDraft.js");
const TUIKit_components_TUIChat_emojiConfig_index = require("../emoji-config/index.js");
const TUIKit_utils_env = require("../../../utils/env.js");
const TUIKit_components_TUIChat_utils_sendMessage = require("../utils/sendMessage.js");
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "message-input-editor",
props: {
placeholder: {
type: String,
default: "this is placeholder"
},
replayOrReferenceMessage: {
type: Object,
default: () => ({}),
required: false
},
isMuted: {
type: Boolean,
default: true
},
muteText: {
type: String,
default: ""
},
enableInput: {
type: Boolean,
default: true
},
enableAt: {
type: Boolean,
default: true
},
enableTyping: {
type: Boolean,
default: true
},
isGroup: {
type: Boolean,
default: false
}
},
emits: ["onTyping", "onFocus", "onAt"],
setup(__props, { expose: __expose, emit: __emit }) {
const props = __props;
const emits = __emit;
const inputText = common_vendor.ref("");
common_vendor.ref();
const inputBlur = common_vendor.ref(true);
const inputContentEmpty = common_vendor.ref(true);
const allInsertedAtInfo = /* @__PURE__ */ new Map();
const currentConversation = common_vendor.ref();
const currentConversationID = common_vendor.ref("");
const currentQuoteMessage = common_vendor.ref();
common_vendor.onMounted(() => {
common_vendor.Jt.watch(common_vendor.o.CONV, {
currentConversation: onCurrentConversationUpdated
});
common_vendor.Jt.watch(common_vendor.o.CHAT, {
quoteMessage: onQuoteMessageUpdated
});
common_vendor.index.$on("insert-emoji", (data) => {
var _a;
inputText.value += (_a = data == null ? void 0 : data.emoji) == null ? void 0 : _a.name;
});
common_vendor.index.$on("send-message-in-emoji-picker", () => {
handleSendMessage();
});
});
common_vendor.onUnmounted(() => {
if (currentConversationID.value) {
TUIKit_components_TUIChat_utils_conversationDraft.DraftManager.setStore(currentConversationID.value, inputText.value, inputText.value, currentQuoteMessage.value);
}
common_vendor.index.$off("insertEmoji");
common_vendor.index.$off("send-message-in-emoji-picker");
common_vendor.Jt.unwatch(common_vendor.o.CONV, {
currentConversation: onCurrentConversationUpdated
});
common_vendor.Jt.unwatch(common_vendor.o.CHAT, {
quoteMessage: onQuoteMessageUpdated
});
reset();
});
const handleSendMessage = () => {
const messageList = getEditorContent();
resetEditor();
TUIKit_components_TUIChat_utils_sendMessage.sendMessages(messageList, currentConversation.value);
};
const insertAt = (atInfo) => {
if (!(allInsertedAtInfo == null ? void 0 : allInsertedAtInfo.has(atInfo == null ? void 0 : atInfo.id))) {
allInsertedAtInfo == null ? void 0 : allInsertedAtInfo.set(atInfo == null ? void 0 : atInfo.id, atInfo == null ? void 0 : atInfo.label);
}
inputText.value += atInfo == null ? void 0 : atInfo.label;
};
const getEditorContent = () => {
let text = inputText.value;
text = TUIKit_components_TUIChat_emojiConfig_index.transformTextWithEmojiNamesToKeys(text);
const atUserList = [];
allInsertedAtInfo == null ? void 0 : allInsertedAtInfo.forEach((value, key) => {
if (text == null ? void 0 : text.includes("@" + value)) {
atUserList.push(key);
}
});
const payload = {
text
};
if (atUserList == null ? void 0 : atUserList.length) {
payload.atUserList = atUserList;
}
return [
{
type: "text",
payload
}
];
};
const resetEditor = () => {
inputText.value = "";
inputContentEmpty.value = true;
allInsertedAtInfo == null ? void 0 : allInsertedAtInfo.clear();
};
const setEditorContent = (content) => {
inputText.value = content;
};
const onBlur = () => {
inputBlur.value = true;
};
const onFocus = (e) => {
var _a;
inputBlur.value = false;
emits("onFocus", (_a = e == null ? void 0 : e.detail) == null ? void 0 : _a.height);
};
const isEditorContentEmpty = () => {
var _a;
inputContentEmpty.value = ((_a = inputText == null ? void 0 : inputText.value) == null ? void 0 : _a.length) ? false : true;
};
const onInput = (e) => {
var _a, _b;
const text = (_a = e == null ? void 0 : e.detail) == null ? void 0 : _a.value;
isEditorContentEmpty();
if (props.isGroup && (text.endsWith("@") || text.endsWith("@\n"))) {
(_b = common_vendor.i) == null ? void 0 : _b.hideKeyboard();
emits("onAt", true);
}
};
common_vendor.watch(
() => [inputContentEmpty.value, inputBlur.value],
(newVal, oldVal) => {
if (newVal !== oldVal) {
emits("onTyping", inputContentEmpty.value, inputBlur.value);
}
},
{
immediate: true,
deep: true
}
);
function onCurrentConversationUpdated(conversation) {
const prevConversationID = currentConversationID.value;
currentConversation.value = conversation;
currentConversationID.value = conversation == null ? void 0 : conversation.conversationID;
if (prevConversationID !== currentConversationID.value) {
if (prevConversationID) {
TUIKit_components_TUIChat_utils_conversationDraft.DraftManager.setStore(
prevConversationID,
inputText.value,
inputText.value,
currentQuoteMessage.value
);
}
resetEditor();
if (currentConversationID.value) {
TUIKit_components_TUIChat_utils_conversationDraft.DraftManager.getStore(currentConversationID.value, setEditorContent);
}
}
}
function onQuoteMessageUpdated(options) {
currentQuoteMessage.value = options;
}
function reset() {
inputBlur.value = true;
currentConversation.value = null;
currentConversationID.value = "";
currentQuoteMessage.value = null;
resetEditor();
}
__expose({
insertAt,
resetEditor,
setEditorContent,
getEditorContent
});
return (_ctx, _cache) => {
return common_vendor.e({
a: props.isMuted
}, props.isMuted ? {
b: common_vendor.t(props.muteText)
} : {}, {
c: props.placeholder,
d: common_vendor.o$1(handleSendMessage),
e: common_vendor.o$1([($event) => common_vendor.isRef(inputText) ? inputText.value = $event.detail.value : null, onInput]),
f: common_vendor.o$1(onBlur),
g: common_vendor.o$1(onFocus),
h: common_vendor.unref(inputText),
i: !common_vendor.unref(TUIKit_utils_env.isPC) ? 1 : ""
});
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-6acc9af1"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/message-input/message-input-editor.js.map

View File

@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@@ -0,0 +1 @@
<view class="{{['data-v-6acc9af1', 'message-input-container', i && 'message-input-container-h5']}}"><view wx:if="{{a}}" class="message-input-mute data-v-6acc9af1">{{b}}</view><input id="editor" ref="inputRef" adjust-position="{{true}}" cursor-spacing="20" confirm-type="send" confirm-hold="{{true}}" maxlength="140" type="text" placeholder-class="input-placeholder" class="message-input-area data-v-6acc9af1" placeholder="{{c}}" auto-blur bindconfirm="{{d}}" bindinput="{{e}}" bindblur="{{f}}" bindfocus="{{g}}" value="{{h}}"></input></view>

View File

@@ -0,0 +1,104 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
body.data-v-6acc9af1, div.data-v-6acc9af1, ul.data-v-6acc9af1, ol.data-v-6acc9af1, dt.data-v-6acc9af1, dd.data-v-6acc9af1, li.data-v-6acc9af1, dl.data-v-6acc9af1, h1.data-v-6acc9af1, h2.data-v-6acc9af1, h3.data-v-6acc9af1, h4.data-v-6acc9af1, p.data-v-6acc9af1 {
margin: 0;
padding: 0;
font-style: normal;
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
}
ol.data-v-6acc9af1, ul.data-v-6acc9af1, li.data-v-6acc9af1 {
list-style: none;
}
img.data-v-6acc9af1 {
border: 0;
vertical-align: middle;
pointer-events: none;
}
body.data-v-6acc9af1 {
color: #000;
background: #FFF;
}
.clear.data-v-6acc9af1 {
clear: both;
height: 1px;
width: 100%;
overflow: hidden;
margin-top: -1px;
}
a.data-v-6acc9af1 {
color: #000;
text-decoration: none;
cursor: pointer;
}
a.data-v-6acc9af1:hover {
text-decoration: none;
}
input.data-v-6acc9af1, textarea.data-v-6acc9af1 {
-webkit-user-select: auto;
user-select: auto;
}
input.data-v-6acc9af1:focus, input.data-v-6acc9af1:active, textarea.data-v-6acc9af1:focus, textarea.data-v-6acc9af1:active {
outline: none;
}
.chat-aside.data-v-6acc9af1 {
position: absolute;
top: 50px;
right: 0;
box-sizing: border-box;
width: 360px !important;
border-radius: 8px 0 0 8px;
z-index: 9999;
max-height: calc(100% - 50px);
}
.message-input-container.data-v-6acc9af1 {
display: flex;
flex-direction: column;
flex: 1;
padding: 3px 10px 10px;
overflow: hidden;
}
.message-input-container-h5.data-v-6acc9af1 {
flex: 1;
height: auto;
background: #fff;
border-radius: 10px;
padding: 7px 0 7px 10px;
font-size: 16px !important;
max-height: 86px;
}
.message-input-container .message-input-mute.data-v-6acc9af1 {
flex: 1;
display: flex;
color: #999;
font-size: 14px;
justify-content: center;
align-items: center;
}
.message-input-container .message-input-area.data-v-6acc9af1 {
flex: 1;
overflow-y: scroll;
min-height: 25px;
}

View File

@@ -0,0 +1,94 @@
"use strict";
const common_vendor = require("../../../../../common/vendor.js");
require("../../../../adapter-vue.js");
const common_assets = require("../../../../../common/assets.js");
const TUIKit_utils_env = require("../../../../utils/env.js");
const TUIKit_components_TUIChat_emojiConfig_index = require("../../emoji-config/index.js");
if (!Math) {
Icon();
}
const Icon = () => "../../../common/Icon.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "index",
props: {
displayType: { default: "editor" }
},
setup(__props) {
const props = __props;
const TYPES = common_vendor.qt.TYPES;
const quoteMessage = common_vendor.ref();
common_vendor.onMounted(() => {
common_vendor.Jt.watch(common_vendor.o.CHAT, {
quoteMessage: onQuoteMessageUpdated
});
});
common_vendor.onUnmounted(() => {
common_vendor.Jt.unwatch(common_vendor.o.CHAT, {
quoteMessage: onQuoteMessageUpdated
});
});
const quoteContentText = common_vendor.computed(() => {
var _a, _b;
let _quoteContentText;
switch ((_a = quoteMessage.value) == null ? void 0 : _a.type) {
case TYPES.MSG_TEXT:
_quoteContentText = TUIKit_components_TUIChat_emojiConfig_index.transformTextWithKeysToEmojiNames((_b = quoteMessage.value.payload) == null ? void 0 : _b.text);
break;
case TYPES.MSG_IMAGE:
_quoteContentText = common_vendor.Wt.t("TUIChat.图片");
break;
case TYPES.MSG_AUDIO:
_quoteContentText = common_vendor.Wt.t("TUIChat.语音");
break;
case TYPES.MSG_VIDEO:
_quoteContentText = common_vendor.Wt.t("TUIChat.视频");
break;
case TYPES.MSG_FILE:
_quoteContentText = common_vendor.Wt.t("TUIChat.文件");
break;
case TYPES.MSG_CUSTOM:
_quoteContentText = common_vendor.Wt.t("TUIChat.自定义");
break;
case TYPES.MSG_FACE:
_quoteContentText = common_vendor.Wt.t("TUIChat.表情");
break;
case TYPES.MSG_MERGER:
_quoteContentText = common_vendor.Wt.t("TUIChat.聊天记录");
break;
default:
_quoteContentText = common_vendor.Wt.t("TUIChat.消息");
break;
}
return _quoteContentText;
});
function cancelQuote() {
common_vendor.Jt.update(common_vendor.o.CHAT, "quoteMessage", { message: void 0, type: "quote" });
}
function onQuoteMessageUpdated(options) {
if ((options == null ? void 0 : options.message) && (options == null ? void 0 : options.type) === "quote") {
quoteMessage.value = options.message;
} else {
quoteMessage.value = void 0;
}
}
return (_ctx, _cache) => {
return common_vendor.e({
a: Boolean(common_vendor.unref(quoteMessage)) && props.displayType !== "audio"
}, Boolean(common_vendor.unref(quoteMessage)) && props.displayType !== "audio" ? {
b: common_vendor.t(common_vendor.unref(quoteMessage).nick || common_vendor.unref(quoteMessage).from),
c: common_vendor.t(common_vendor.unref(quoteContentText)),
d: common_vendor.o$1(cancelQuote),
e: common_vendor.p({
file: common_vendor.unref(common_assets.closeIcon$2),
width: "11px",
height: "11px"
}),
f: common_vendor.unref(TUIKit_utils_env.isUniFrameWork) ? 1 : "",
g: common_vendor.unref(TUIKit_utils_env.isH5) ? 1 : ""
} : {});
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-0be2008a"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/message-input/message-input-quote/index.js.map

View File

@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"icon": "../../../common/Icon"
}
}

View File

@@ -0,0 +1 @@
<view wx:if="{{a}}" class="{{['data-v-0be2008a', 'input-quote-container', f && 'input-quote-container-uni', g && 'input-quote-container-h5']}}"><view class="input-quote-content data-v-0be2008a"><view class="max-one-line data-v-0be2008a">{{b}}: {{c}}</view><icon wx:if="{{e}}" class="input-quote-close-icon data-v-0be2008a" bindonClick="{{d}}" u-i="0be2008a-0" bind:__l="__l" u-p="{{e}}"/></view></view>

View File

@@ -0,0 +1,59 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.input-quote-container-h5.data-v-0be2008a, .input-quote-container-uni.data-v-0be2008a, .input-quote-container.data-v-0be2008a {
margin: 5px 100px 5px 8px;
display: flex;
flex: 0 1 auto;
}
.input-quote-container-h5 .input-quote-content.data-v-0be2008a, .input-quote-container-uni .input-quote-content.data-v-0be2008a, .input-quote-container .input-quote-content.data-v-0be2008a {
display: flex;
flex: 0 1 auto;
background-color: #fafafa;
border-radius: 8px;
padding: 12px;
font-size: 12px;
align-items: center;
line-height: 16px;
max-width: 100%;
box-sizing: border-box;
min-width: 0;
}
.input-quote-container-h5 .input-quote-content .max-one-line.data-v-0be2008a, .input-quote-container-uni .input-quote-content .max-one-line.data-v-0be2008a, .input-quote-container .input-quote-content .max-one-line.data-v-0be2008a {
flex: 0 1 auto;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.input-quote-container-h5 .input-quote-close-icon.data-v-0be2008a, .input-quote-container-uni .input-quote-close-icon.data-v-0be2008a, .input-quote-container .input-quote-close-icon.data-v-0be2008a {
margin-left: 5px;
padding: 5px;
}
.input-quote-container-uni.data-v-0be2008a {
margin: 5px 60px 0 30px;
}
.input-quote-container-h5.data-v-0be2008a {
margin: 5px 0 0;
}

View File

@@ -0,0 +1,618 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
require("../../../adapter-vue.js");
const TUIKit_components_TUIChat_messageList_link_index = require("./link/index.js");
const TUIKit_plugins_pluginComponents_index = require("../../../plugins/plugin-components/index.js");
const TUIKit_components_common_Toast_index = require("../../common/Toast/index.js");
const TUIKit_components_TUIChat_utils_utils = require("../utils/utils.js");
const TUIKit_utils_lodash = require("../../../utils/lodash.js");
const TUIKit_utils_env = require("../../../utils/env.js");
const TUIKit_components_TUIChat_utils_chatStorage = require("../utils/chatStorage.js");
const TUIKit_components_common_Toast_type = require("../../common/Toast/type.js");
if (!Math) {
(MessageGroupApplication + MessageTimestamp + MessageTip + MessageText + MessageImage + ProgressMessage + MessageVideo + MessageAudio + MessageRecord + MessageFile + MessageFace + MessageLocation + MessageCustom + MessageBubble + MessagePlugin + MessageRevoked + MessageTool + ScrollButton + Dialog + ReadReceiptPanel + SimpleMessageList + Drawer)();
}
const SimpleMessageList = () => "./message-elements/simple-message-list/index.js";
const MessageGroupApplication = () => "./message-group-application/index.js";
const MessageText = () => "./message-elements/message-text.js";
const MessageImage = () => "./message-elements/message-image.js";
const MessageAudio = () => "./message-elements/message-audio.js";
const MessageRecord = () => "./message-elements/message-record/index.js";
const MessageFile = () => "./message-elements/message-file.js";
const MessageFace = () => "./message-elements/message-face.js";
const MessageCustom = () => "./message-elements/message-custom.js";
const MessageTip = () => "./message-elements/message-tip.js";
const MessageBubble = () => "./message-elements/message-bubble.js";
const MessageLocation = () => "./message-elements/message-location.js";
const MessageTimestamp = () => "./message-elements/message-timestamp.js";
const MessageVideo = () => "./message-elements/message-video.js";
const MessageTool = () => "./message-tool/index.js";
const MessageRevoked = () => "./message-tool/message-revoked.js";
const MessagePlugin = () => "../../../plugins/plugin-components/message-plugin.js";
const ReadReceiptPanel = () => "./read-receipt-panel/index.js";
const ScrollButton = () => "./scroll-button/index.js";
const Dialog = () => "../../common/Dialog/index.js";
const Drawer = () => "../../common/Drawer/index.js";
const ProgressMessage = () => "../../common/ProgressMessage/index.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "index",
props: {
isGroup: { type: Boolean, default: false },
groupID: { default: "" },
isNotInGroup: { type: Boolean, default: false },
isMultipleSelectMode: { type: Boolean, default: false }
},
emits: ["closeInputToolBar", "handleEditor", "toggleMultipleSelectMode"],
setup(__props, { expose: __expose, emit: __emit }) {
var _a;
const emits = __emit;
const props = __props;
let selfAddValue = 0;
let observer = null;
let groupType;
const sentReceiptMessageID = /* @__PURE__ */ new Set();
const isOfficial = common_vendor.Jt.getData(common_vendor.o.APP, "isOfficial");
const thisInstance = ((_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.proxy) || common_vendor.getCurrentInstance();
const messageList = common_vendor.ref();
const multipleSelectedMessageIDList = common_vendor.ref([]);
const isCompleted = common_vendor.ref(false);
const currentConversationID = common_vendor.ref("");
const toggleID = common_vendor.ref("");
const scrollTop = common_vendor.ref(5e3);
const TYPES = common_vendor.ref(common_vendor.qt.TYPES);
const isLoadingMessage = common_vendor.ref(false);
const isLongpressing = common_vendor.ref(false);
const blinkMessageIDList = common_vendor.ref([]);
const messageTarget = common_vendor.ref();
const scrollButtonInstanceRef = common_vendor.ref();
const historyFirstMessageID = common_vendor.ref("");
const isShowSimpleMessageList = common_vendor.ref(false);
const simpleMessageListRenderMessageID = common_vendor.ref();
const audioPlayedMapping = common_vendor.ref({});
const broadcastNewAudioSrc = common_vendor.ref("");
const readStatusMessage = common_vendor.ref();
const isShowReadUserStatusPanel = common_vendor.ref(false);
const reSendDialogShow = common_vendor.ref(false);
const resendMessageData = common_vendor.ref();
const scrollToBottom = () => {
scrollTop.value += 300;
const timer2 = setTimeout(() => {
scrollTop.value += 1;
clearTimeout(timer2);
}, 300);
};
const onCurrentConversationIDUpdated = (conversationID) => {
currentConversationID.value = conversationID;
if (TUIKit_components_TUIChat_utils_utils.isEnabledMessageReadReceiptGlobal()) {
const { groupProfile } = common_vendor.Jt.getConversationModel(conversationID) || {};
groupType = groupProfile == null ? void 0 : groupProfile.type;
}
if (Object.keys(audioPlayedMapping.value).length > 0) {
TUIKit_components_TUIChat_utils_chatStorage.chatStorage.setChatStorage("audioPlayedMapping", audioPlayedMapping.value);
}
};
common_vendor.onMounted(() => {
audioPlayedMapping.value = TUIKit_components_TUIChat_utils_chatStorage.chatStorage.getChatStorage("audioPlayedMapping") || {};
common_vendor.Jt.watch(common_vendor.o.CHAT, {
messageList: onMessageListUpdated,
messageSource: onMessageSourceUpdated,
isCompleted: onChatCompletedUpdated
});
common_vendor.Jt.watch(common_vendor.o.CONV, {
currentConversationID: onCurrentConversationIDUpdated
});
common_vendor.v("messageList", thisInstance);
common_vendor.index.$on("scroll-to-bottom", scrollToLatestMessage);
});
common_vendor.onUnmounted(() => {
common_vendor.Jt.unwatch(common_vendor.o.CHAT, {
messageList: onMessageListUpdated,
isCompleted: onChatCompletedUpdated
});
common_vendor.Jt.unwatch(common_vendor.o.CONV, {
currentConversationID: onCurrentConversationIDUpdated
});
observer == null ? void 0 : observer.disconnect();
observer = null;
common_vendor.index.$off("scroll-to-bottom");
if (Object.keys(audioPlayedMapping.value).length > 0) {
TUIKit_components_TUIChat_utils_chatStorage.chatStorage.setChatStorage("audioPlayedMapping", audioPlayedMapping.value);
}
});
const handelScrollListScroll = TUIKit_utils_lodash.throttle(
function(e) {
var _a2;
(_a2 = scrollButtonInstanceRef.value) == null ? void 0 : _a2.judgeScrollOverOneScreen(e);
},
500,
{ leading: true }
);
function getGlobalAudioContext(audioMap, options) {
if (options == null ? void 0 : options.newAudioSrc) {
broadcastNewAudioSrc.value = options.newAudioSrc;
}
}
async function onMessageListUpdated(list) {
var _a2, _b, _c;
observer == null ? void 0 : observer.disconnect();
messageList.value = list.filter((message) => !message.isDeleted).map((message) => {
message.vueForRenderKey = `${message.ID}`;
return message;
});
const newLastMessage = (_b = messageList.value) == null ? void 0 : _b[((_a2 = messageList.value) == null ? void 0 : _a2.length) - 1];
if (messageTarget.value) {
scrollAndBlinkMessage(messageTarget.value);
} else if (!isLoadingMessage.value && !(((_c = scrollButtonInstanceRef.value) == null ? void 0 : _c.isScrollButtonVisible) && (newLastMessage == null ? void 0 : newLastMessage.flow) === "in")) {
common_vendor.nextTick$1(() => {
scrollToBottom();
});
}
if (TUIKit_components_TUIChat_utils_utils.isEnabledMessageReadReceiptGlobal()) {
common_vendor.nextTick$1(() => bindIntersectionObserver());
}
}
async function scrollToLatestMessage() {
try {
const { scrollHeight } = await common_vendor.P(
"#messageScrollList",
"messageList"
);
if (scrollHeight) {
scrollTop.value === scrollHeight ? scrollTop.value = scrollHeight + 1 : scrollTop.value = scrollHeight;
} else {
scrollToBottom();
}
} catch (error) {
scrollToBottom();
}
}
async function onMessageSourceUpdated(message) {
messageTarget.value = message;
scrollAndBlinkMessage(messageTarget.value);
}
function scrollAndBlinkMessage(message) {
var _a2;
if ((_a2 = messageList.value) == null ? void 0 : _a2.some(
(messageListItem) => (messageListItem == null ? void 0 : messageListItem.ID) === (message == null ? void 0 : message.ID)
)) {
common_vendor.nextTick$1(async () => {
await scrollToTargetMessage(message);
await blinkMessage(message == null ? void 0 : message.ID);
messageTarget.value = void 0;
});
}
}
function onChatCompletedUpdated(flag) {
isCompleted.value = flag;
}
const getHistoryMessageList = () => {
var _a2, _b;
isLoadingMessage.value = true;
const currentFirstMessageID = ((_b = (_a2 = messageList.value) == null ? void 0 : _a2[0]) == null ? void 0 : _b.ID) || "";
common_vendor.Qt.getMessageList().then(() => {
common_vendor.nextTick$1(() => {
historyFirstMessageID.value = currentFirstMessageID;
const timer2 = setTimeout(() => {
historyFirstMessageID.value = "";
isLoadingMessage.value = false;
clearTimeout(timer2);
}, 500);
});
});
};
const openComplaintLink = () => {
};
const handleToggleMessageItem = (e, message, index, isLongpress = false) => {
if (props.isMultipleSelectMode || props.isNotInGroup) {
return;
}
if (isLongpress) {
isLongpressing.value = true;
}
toggleID.value = message.ID;
};
let timer;
const handleH5LongPress = (e, message, index, type) => {
if (props.isMultipleSelectMode || props.isNotInGroup) {
return;
}
if (!TUIKit_utils_env.isH5)
return;
function longPressHandler() {
clearTimeout(timer);
handleToggleMessageItem(e, message, index, true);
}
function touchStartHandler() {
timer = setTimeout(longPressHandler, 500);
}
function touchEndHandler() {
clearTimeout(timer);
}
switch (type) {
case "touchstart":
touchStartHandler();
break;
case "touchend":
touchEndHandler();
setTimeout(() => {
isLongpressing.value = false;
}, 200);
break;
}
};
const handleEdit = (message) => {
emits("handleEditor", message, "reedit");
};
const resendMessage = (message) => {
reSendDialogShow.value = true;
resendMessageData.value = message;
};
const handleImagePreview = (index) => {
if (!messageList.value) {
return;
}
const imageMessageIndex = [];
const imageMessageList = messageList.value.filter((item, index2) => {
if (!item.isRevoked && !item.hasRiskContent && item.type === TYPES.value.MSG_IMAGE) {
imageMessageIndex.push(index2);
return true;
}
return false;
});
common_vendor.index.previewImage({
current: imageMessageIndex.indexOf(index),
urls: imageMessageList.map((message) => {
var _a2;
return (_a2 = message.payload.imageInfoArray) == null ? void 0 : _a2[2].url;
})
});
};
const resendMessageConfirm = () => {
reSendDialogShow.value = !reSendDialogShow.value;
const messageModel = resendMessageData.value;
messageModel.resendMessage();
};
function blinkMessage(messageID) {
return new Promise((resolve) => {
const index = blinkMessageIDList.value.indexOf(messageID);
if (index < 0) {
blinkMessageIDList.value.push(messageID);
const timer2 = setTimeout(() => {
blinkMessageIDList.value.splice(
blinkMessageIDList.value.indexOf(messageID),
1
);
clearTimeout(timer2);
resolve();
}, 3e3);
}
});
}
function scrollTo(scrollHeight) {
scrollTop.value = scrollHeight;
}
async function bindIntersectionObserver() {
if (!messageList.value || messageList.value.length === 0) {
return;
}
if (groupType === TYPES.value.GRP_AVCHATROOM || groupType === TYPES.value.GRP_COMMUNITY) {
return;
}
observer == null ? void 0 : observer.disconnect();
observer = common_vendor.index.createIntersectionObserver(thisInstance, {
threshold: [0.7],
observeAll: true
// In Uni-app, the `safetip` is also included, so a negative margin is needed to exclude it.
}).relativeTo("#messageScrollList", { top: -70 });
observer == null ? void 0 : observer.observe(".message-li.in .message-bubble-container", (res) => {
var _a2;
if (sentReceiptMessageID.has(res.id)) {
return;
}
const matchingMessage = messageList.value.find((message) => {
return res.id.indexOf(message.ID) > -1;
});
if (matchingMessage && matchingMessage.needReadReceipt && matchingMessage.flow === "in" && !((_a2 = matchingMessage.readReceiptInfo) == null ? void 0 : _a2.isPeerRead)) {
common_vendor.Qt.sendMessageReadReceipt([matchingMessage]);
sentReceiptMessageID.add(res.id);
}
});
}
function setReadReceiptPanelVisible(visible, message) {
if (visible && props.isNotInGroup) {
return;
}
if (!visible) {
readStatusMessage.value = void 0;
} else {
readStatusMessage.value = message;
}
isShowReadUserStatusPanel.value = visible;
}
async function scrollToTargetMessage(message) {
const targetMessageID = message.ID;
const isTargetMessageInScreen = messageList.value && messageList.value.some((msg) => msg.ID === targetMessageID);
if (targetMessageID && isTargetMessageInScreen) {
const timer2 = setTimeout(async () => {
try {
const scrollViewRect = await common_vendor.T(
"#messageScrollList",
"messageList"
);
const originalMessageRect = await common_vendor.T(
"#tui-" + targetMessageID,
"messageList"
);
const { scrollTop: scrollTop2 } = await common_vendor.P(
"#messageScrollList",
"messageList"
);
const finalScrollTop = originalMessageRect.top + scrollTop2 - scrollViewRect.top - selfAddValue++ % 2;
scrollTo(finalScrollTop);
clearTimeout(timer2);
} catch (error) {
}
}, 500);
} else {
TUIKit_components_common_Toast_index.Toast({
message: common_vendor.Wt.t("TUIChat.无法定位到原消息"),
type: TUIKit_components_common_Toast_type.TOAST_TYPE.WARNING
});
}
}
function onMessageListBackgroundClick() {
emits("closeInputToolBar");
}
common_vendor.watch(() => props.isMultipleSelectMode, (newValue) => {
if (!newValue) {
changeSelectMessageIDList({
type: "clearAll",
messageID: ""
});
}
});
function changeSelectMessageIDList({ type, messageID }) {
if (type === "clearAll") {
multipleSelectedMessageIDList.value = [];
} else if (type === "add" && !multipleSelectedMessageIDList.value.includes(messageID)) {
multipleSelectedMessageIDList.value.push(messageID);
} else if (type === "remove") {
multipleSelectedMessageIDList.value = multipleSelectedMessageIDList.value.filter((id) => id !== messageID);
}
}
function mergeForwardMessage() {
common_vendor.Jt.update(common_vendor.o.CUSTOM, "multipleForwardMessageID", {
isMergeForward: true,
messageIDList: multipleSelectedMessageIDList.value
});
}
function oneByOneForwardMessage() {
common_vendor.Jt.update(common_vendor.o.CUSTOM, "multipleForwardMessageID", {
isMergeForward: false,
messageIDList: multipleSelectedMessageIDList.value
});
}
function assignMessageIDInUniapp(messageID) {
simpleMessageListRenderMessageID.value = messageID;
isShowSimpleMessageList.value = true;
}
function setAudioPlayed(messageID) {
audioPlayedMapping.value[messageID] = true;
}
__expose({
oneByOneForwardMessage,
mergeForwardMessage,
scrollToLatestMessage
});
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.unref(isOfficial)
}, common_vendor.unref(isOfficial) ? {
b: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("TUIChat.【安全提示】本 APP 仅用于体验腾讯云即时通信 IM 产品功能,不可用于业务洽谈与拓展。请勿轻信汇款、中奖等涉及钱款的信息,勿轻易拨打陌生电话,谨防上当受骗。")),
c: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("TUIChat.点此投诉")),
d: common_vendor.o$1(($event) => openComplaintLink(common_vendor.unref(TUIKit_components_TUIChat_messageList_link_index.Link).complaint))
} : {}, {
e: _ctx.isGroup
}, _ctx.isGroup ? {
f: props.groupID,
g: common_vendor.p({
groupID: props.groupID
})
} : {}, {
h: !common_vendor.unref(isCompleted)
}, !common_vendor.unref(isCompleted) ? {
i: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("TUIChat.查看更多")),
j: common_vendor.o$1(getHistoryMessageList)
} : {}, {
k: common_vendor.f(common_vendor.unref(messageList), (item, index, i0) => {
return common_vendor.e({
a: "c85b5b22-1-" + i0,
b: common_vendor.p({
currTime: item.time,
prevTime: index > 0 ? common_vendor.unref(messageList)[index - 1].time : 0
}),
c: item.type === common_vendor.unref(TYPES).MSG_GRP_TIP || common_vendor.unref(TUIKit_components_TUIChat_utils_utils.isCreateGroupCustomMessage)(item)
}, item.type === common_vendor.unref(TYPES).MSG_GRP_TIP || common_vendor.unref(TUIKit_components_TUIChat_utils_utils.isCreateGroupCustomMessage)(item) ? {
d: "c85b5b22-2-" + i0,
e: common_vendor.p({
content: item.getMessageContent()
})
} : !item.isRevoked && !common_vendor.unref(TUIKit_plugins_pluginComponents_index.isPluginMessage)(item) ? common_vendor.e({
g: item.type === common_vendor.unref(TYPES).MSG_TEXT
}, item.type === common_vendor.unref(TYPES).MSG_TEXT ? {
h: "c85b5b22-4-" + i0 + "," + ("c85b5b22-3-" + i0),
i: common_vendor.p({
content: item.getMessageContent(),
messageItem: item
})
} : item.type === common_vendor.unref(TYPES).MSG_IMAGE ? {
k: common_vendor.o$1(($event) => handleImagePreview(index), item.vueForRenderKey),
l: "c85b5b22-6-" + i0 + "," + ("c85b5b22-5-" + i0),
m: common_vendor.p({
content: item.getMessageContent(),
messageItem: item
}),
n: "c85b5b22-5-" + i0 + "," + ("c85b5b22-3-" + i0),
o: common_vendor.p({
content: item.getMessageContent(),
messageItem: common_vendor.unref(TUIKit_components_TUIChat_utils_utils.deepCopy)(item)
})
} : item.type === common_vendor.unref(TYPES).MSG_VIDEO ? {
q: "c85b5b22-8-" + i0 + "," + ("c85b5b22-7-" + i0),
r: common_vendor.p({
content: item.getMessageContent(),
messageItem: item
}),
s: "c85b5b22-7-" + i0 + "," + ("c85b5b22-3-" + i0),
t: common_vendor.p({
content: item.getMessageContent(),
messageItem: common_vendor.unref(TUIKit_components_TUIChat_utils_utils.deepCopy)(item)
})
} : item.type === common_vendor.unref(TYPES).MSG_AUDIO ? {
w: common_vendor.o$1(setAudioPlayed, item.vueForRenderKey),
x: common_vendor.o$1(getGlobalAudioContext, item.vueForRenderKey),
y: "c85b5b22-9-" + i0 + "," + ("c85b5b22-3-" + i0),
z: common_vendor.p({
content: item.getMessageContent(),
messageItem: item,
broadcastNewAudioSrc: common_vendor.unref(broadcastNewAudioSrc)
})
} : item.type === common_vendor.unref(TYPES).MSG_MERGER ? {
B: common_vendor.o$1(assignMessageIDInUniapp, item.vueForRenderKey),
C: "c85b5b22-10-" + i0 + "," + ("c85b5b22-3-" + i0),
D: common_vendor.p({
renderData: item.payload,
messageItem: item
})
} : item.type === common_vendor.unref(TYPES).MSG_FILE ? {
F: "c85b5b22-11-" + i0 + "," + ("c85b5b22-3-" + i0),
G: common_vendor.p({
content: item.getMessageContent()
})
} : item.type === common_vendor.unref(TYPES).MSG_FACE ? {
I: "c85b5b22-12-" + i0 + "," + ("c85b5b22-3-" + i0),
J: common_vendor.p({
content: item.getMessageContent()
})
} : item.type === common_vendor.unref(TYPES).MSG_LOCATION ? {
L: "c85b5b22-13-" + i0 + "," + ("c85b5b22-3-" + i0),
M: common_vendor.p({
content: item.getMessageContent()
})
} : item.type === common_vendor.unref(TYPES).MSG_CUSTOM ? {
O: "c85b5b22-14-" + i0 + "," + ("c85b5b22-3-" + i0),
P: common_vendor.p({
content: item.getMessageContent(),
messageItem: item
})
} : {}, {
j: item.type === common_vendor.unref(TYPES).MSG_IMAGE,
p: item.type === common_vendor.unref(TYPES).MSG_VIDEO,
v: item.type === common_vendor.unref(TYPES).MSG_AUDIO,
A: item.type === common_vendor.unref(TYPES).MSG_MERGER,
E: item.type === common_vendor.unref(TYPES).MSG_FILE,
H: item.type === common_vendor.unref(TYPES).MSG_FACE,
K: item.type === common_vendor.unref(TYPES).MSG_LOCATION,
N: item.type === common_vendor.unref(TYPES).MSG_CUSTOM,
Q: common_vendor.o$1(($event) => resendMessage(item), item.vueForRenderKey),
R: common_vendor.o$1(blinkMessage, item.vueForRenderKey),
S: common_vendor.o$1(scrollTo, item.vueForRenderKey),
T: common_vendor.o$1(changeSelectMessageIDList, item.vueForRenderKey),
U: common_vendor.o$1(setReadReceiptPanelVisible, item.vueForRenderKey),
V: "c85b5b22-3-" + i0,
W: common_vendor.p({
messageItem: common_vendor.unref(TUIKit_components_TUIChat_utils_utils.deepCopy)(item),
content: item.getMessageContent(),
isAudioPlayed: common_vendor.unref(audioPlayedMapping)[item.ID],
blinkMessageIDList: common_vendor.unref(blinkMessageIDList),
isMultipleSelectMode: _ctx.isMultipleSelectMode,
multipleSelectedMessageIDList: common_vendor.unref(multipleSelectedMessageIDList)
}),
X: `msg-bubble-${item.ID}`,
Y: common_vendor.o$1(($event) => handleToggleMessageItem($event, item, index, true), item.vueForRenderKey),
Z: common_vendor.o$1(($event) => handleH5LongPress($event, item, index, "touchstart"), item.vueForRenderKey),
aa: common_vendor.o$1(($event) => handleH5LongPress($event, item, index, "touchend"), item.vueForRenderKey),
ab: common_vendor.o$1(($event) => handleH5LongPress($event, item, index, "touchend"), item.vueForRenderKey)
}) : !item.isRevoked && common_vendor.unref(TUIKit_plugins_pluginComponents_index.isPluginMessage)(item) ? {
ad: common_vendor.o$1(resendMessage, item.vueForRenderKey),
ae: common_vendor.o$1(handleToggleMessageItem, item.vueForRenderKey),
af: common_vendor.o$1(handleH5LongPress, item.vueForRenderKey),
ag: "c85b5b22-15-" + i0,
ah: common_vendor.p({
message: item
})
} : {
ai: common_vendor.o$1(($event) => handleEdit(item), item.vueForRenderKey),
aj: "c85b5b22-16-" + i0,
ak: common_vendor.p({
isEdit: item.type === common_vendor.unref(TYPES).MSG_TEXT,
messageItem: item
})
}, {
f: !item.isRevoked && !common_vendor.unref(TUIKit_plugins_pluginComponents_index.isPluginMessage)(item),
ac: !item.isRevoked && common_vendor.unref(TUIKit_plugins_pluginComponents_index.isPluginMessage)(item),
al: item.ID === common_vendor.unref(toggleID)
}, item.ID === common_vendor.unref(toggleID) ? {
am: item.flow === "out" ? 1 : "",
an: item.flow === "in" ? 1 : "",
ao: common_vendor.o$1(() => emits("toggleMultipleSelectMode"), item.vueForRenderKey),
ap: "c85b5b22-17-" + i0,
aq: common_vendor.p({
messageItem: item,
isMultipleSelectMode: _ctx.isMultipleSelectMode
})
} : {}, {
ar: common_vendor.o$1(($event) => toggleID.value = "", item.vueForRenderKey),
as: `tui-${item.ID}`,
at: item.vueForRenderKey,
av: common_vendor.n("message-li " + item.flow)
});
}),
l: common_vendor.unref(scrollTop),
m: `tui-${common_vendor.unref(historyFirstMessageID)}`,
n: common_vendor.o$1(
//@ts-ignore
(...args) => common_vendor.unref(handelScrollListScroll) && common_vendor.unref(handelScrollListScroll)(...args)
),
o: common_vendor.sr(scrollButtonInstanceRef, "c85b5b22-18", {
"k": "scrollButtonInstanceRef"
}),
p: common_vendor.o$1(scrollToLatestMessage),
q: common_vendor.unref(reSendDialogShow)
}, common_vendor.unref(reSendDialogShow) ? {
r: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("TUIChat.确认重发该消息?")),
s: common_vendor.o$1(($event) => resendMessageConfirm()),
t: common_vendor.o$1((e) => reSendDialogShow.value = e),
v: common_vendor.p({
show: common_vendor.unref(reSendDialogShow),
isH5: !common_vendor.unref(TUIKit_utils_env.isPC),
center: true,
isHeaderShow: common_vendor.unref(TUIKit_utils_env.isPC)
})
} : {}, {
w: common_vendor.unref(isShowReadUserStatusPanel)
}, common_vendor.unref(isShowReadUserStatusPanel) ? {
x: common_vendor.o$1(setReadReceiptPanelVisible),
y: common_vendor.p({
message: Object.assign({}, common_vendor.unref(readStatusMessage))
})
} : {}, {
z: common_vendor.o$1(($event) => isShowSimpleMessageList.value = false),
A: common_vendor.p({
isMounted: common_vendor.unref(isShowSimpleMessageList),
messageID: common_vendor.unref(simpleMessageListRenderMessageID)
}),
B: common_vendor.p({
visible: common_vendor.unref(isShowSimpleMessageList),
overlayColor: "transparent",
popDirection: "right"
}),
C: common_vendor.unref(TUIKit_utils_env.isMobile) ? 1 : "",
D: common_vendor.o$1(onMessageListBackgroundClick)
});
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-c85b5b22"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/message-list/index.js.map

View File

@@ -0,0 +1,27 @@
{
"component": true,
"usingComponents": {
"simple-message-list": "./message-elements/simple-message-list/index",
"message-group-application": "./message-group-application/index",
"message-text": "./message-elements/message-text",
"message-image": "./message-elements/message-image",
"message-audio": "./message-elements/message-audio",
"message-record": "./message-elements/message-record/index",
"message-file": "./message-elements/message-file",
"message-face": "./message-elements/message-face",
"message-custom": "./message-elements/message-custom",
"message-tip": "./message-elements/message-tip",
"message-bubble": "./message-elements/message-bubble",
"message-location": "./message-elements/message-location",
"message-timestamp": "./message-elements/message-timestamp",
"message-video": "./message-elements/message-video",
"message-tool": "./message-tool/index",
"message-revoked": "./message-tool/message-revoked",
"message-plugin": "../../../plugins/plugin-components/message-plugin",
"read-receipt-panel": "./read-receipt-panel/index",
"scroll-button": "./scroll-button/index",
"dialog": "../../common/Dialog/index",
"drawer": "../../common/Drawer/index",
"progress-message": "../../common/ProgressMessage/index"
}
}

View File

@@ -0,0 +1 @@
<view class="{{['data-v-c85b5b22', 'tui-chat', C && 'tui-chat-h5']}}" bindtap="{{D}}"><view class="tui-chat-main data-v-c85b5b22"><view wx:if="{{a}}" class="tui-chat-safe-tips data-v-c85b5b22"><label class="data-v-c85b5b22">{{b}}</label><navigator class="data-v-c85b5b22" bindtap="{{d}}">{{c}}</navigator></view><message-group-application wx:if="{{e}}" class="data-v-c85b5b22" key="{{f}}" u-i="c85b5b22-0" bind:__l="__l" u-p="{{g}}"/><scroll-view id="messageScrollList" class="tui-message-list data-v-c85b5b22" scroll-y="true" scroll-top="{{l}}" scroll-into-view="{{m}}" bindscroll="{{n}}"><view wx:if="{{h}}" class="message-more data-v-c85b5b22" bindtap="{{j}}">{{i}}</view><view wx:for="{{k}}" wx:for-item="item" wx:key="at" id="{{item.as}}" class="{{['data-v-c85b5b22', item.av]}}"><message-timestamp wx:if="{{item.b}}" class="data-v-c85b5b22" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"/><view class="message-item data-v-c85b5b22" bindtap="{{item.ar}}"><message-tip wx:if="{{item.c}}" class="data-v-c85b5b22" u-i="{{item.d}}" bind:__l="__l" u-p="{{item.e}}"/><view wx:elif="{{item.f}}" id="{{item.X}}" class="message-bubble-container data-v-c85b5b22" bindlongpress="{{item.Y}}" bindtouchstart="{{item.Z}}" bindtouchend="{{item.aa}}" bindmouseover="{{item.ab}}"><message-bubble wx:if="{{item.W}}" class="data-v-c85b5b22" u-s="{{['d']}}" bindresendMessage="{{item.Q}}" bindblinkMessage="{{item.R}}" bindscrollTo="{{item.S}}" bindchangeSelectMessageIDList="{{item.T}}" bindsetReadReceiptPanelVisible="{{item.U}}" u-i="{{item.V}}" bind:__l="__l" u-p="{{item.W}}"><message-text wx:if="{{item.g}}" class="data-v-c85b5b22" u-i="{{item.h}}" bind:__l="__l" u-p="{{item.i}}"/><progress-message wx:elif="{{item.j}}" class="data-v-c85b5b22" u-s="{{['d']}}" u-i="{{item.n}}" bind:__l="__l" u-p="{{item.o}}"><message-image wx:if="{{item.m}}" class="data-v-c85b5b22" bindpreviewImage="{{item.k}}" u-i="{{item.l}}" bind:__l="__l" u-p="{{item.m}}"/></progress-message><progress-message wx:elif="{{item.p}}" class="data-v-c85b5b22" u-s="{{['d']}}" u-i="{{item.s}}" bind:__l="__l" u-p="{{item.t}}"><message-video wx:if="{{item.r}}" class="data-v-c85b5b22" u-i="{{item.q}}" bind:__l="__l" u-p="{{item.r}}"/></progress-message><message-audio wx:elif="{{item.v}}" class="data-v-c85b5b22" bindsetAudioPlayed="{{item.w}}" bindgetGlobalAudioContext="{{item.x}}" u-i="{{item.y}}" bind:__l="__l" u-p="{{item.z}}"/><message-record wx:elif="{{item.A}}" class="data-v-c85b5b22" bindassignMessageIDInUniapp="{{item.B}}" u-i="{{item.C}}" bind:__l="__l" u-p="{{item.D}}"/><message-file wx:elif="{{item.E}}" class="data-v-c85b5b22" u-i="{{item.F}}" bind:__l="__l" u-p="{{item.G}}"/><message-face wx:elif="{{item.H}}" class="data-v-c85b5b22" u-i="{{item.I}}" bind:__l="__l" u-p="{{item.J}}"/><message-location wx:elif="{{item.K}}" class="data-v-c85b5b22" u-i="{{item.L}}" bind:__l="__l" u-p="{{item.M}}"/><message-custom wx:elif="{{item.N}}" class="data-v-c85b5b22" u-i="{{item.O}}" bind:__l="__l" u-p="{{item.P}}"/></message-bubble></view><message-plugin wx:elif="{{item.ac}}" class="data-v-c85b5b22" bindresendMessage="{{item.ad}}" bindhandleToggleMessageItem="{{item.ae}}" bindhandleH5LongPress="{{item.af}}" u-i="{{item.ag}}" bind:__l="__l" u-p="{{item.ah}}"/><message-revoked wx:else class="data-v-c85b5b22" bindmessageEdit="{{item.ai}}" u-i="{{item.aj}}" bind:__l="__l" u-p="{{item.ak||''}}"/><message-tool wx:if="{{item.al}}" class="{{['data-v-c85b5b22', 'message-tool', item.am && 'message-tool-out', item.an && 'message-tool-in']}}" bindtoggleMultipleSelectMode="{{item.ao}}" u-i="{{item.ap}}" bind:__l="__l" u-p="{{item.aq}}"/></view></view></scroll-view><scroll-button class="r data-v-c85b5b22" u-r="scrollButtonInstanceRef" bindscrollToLatestMessage="{{p}}" u-i="c85b5b22-18" bind:__l="__l"/><dialog wx:if="{{q}}" class="data-v-c85b5b22" u-s="{{['d']}}" bindsubmit="{{s}}" bindupdateShow="{{t}}" u-i="c85b5b22-19" bind:__l="__l" u-p="{{v}}"><view class="delDialog-title data-v-c85b5b22">{{r}}</view></dialog><read-receipt-panel wx:if="{{w}}" class="data-v-c85b5b22" bindsetReadReceiptPanelVisible="{{x}}" u-i="c85b5b22-20" bind:__l="__l" u-p="{{y}}"/><drawer wx:if="{{B}}" class="data-v-c85b5b22" u-s="{{['d']}}" u-i="c85b5b22-21" bind:__l="__l" u-p="{{B}}"><simple-message-list wx:if="{{A}}" class="data-v-c85b5b22" style="{{'height:' + '100%'}}" bindcloseOverlay="{{z}}" u-i="c85b5b22-22,c85b5b22-21" bind:__l="__l" u-p="{{A}}"/></drawer></view></view>

View File

@@ -0,0 +1,265 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
body.data-v-c85b5b22, div.data-v-c85b5b22, ul.data-v-c85b5b22, ol.data-v-c85b5b22, dt.data-v-c85b5b22, dd.data-v-c85b5b22, li.data-v-c85b5b22, dl.data-v-c85b5b22, h1.data-v-c85b5b22, h2.data-v-c85b5b22, h3.data-v-c85b5b22, h4.data-v-c85b5b22, p.data-v-c85b5b22 {
margin: 0;
padding: 0;
font-style: normal;
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
}
ol.data-v-c85b5b22, ul.data-v-c85b5b22, li.data-v-c85b5b22 {
list-style: none;
}
img.data-v-c85b5b22 {
border: 0;
vertical-align: middle;
pointer-events: none;
}
body.data-v-c85b5b22 {
color: #000;
background: #FFF;
}
.clear.data-v-c85b5b22 {
clear: both;
height: 1px;
width: 100%;
overflow: hidden;
margin-top: -1px;
}
a.data-v-c85b5b22 {
color: #000;
text-decoration: none;
cursor: pointer;
}
a.data-v-c85b5b22:hover {
text-decoration: none;
}
input.data-v-c85b5b22, textarea.data-v-c85b5b22 {
-webkit-user-select: auto;
user-select: auto;
}
input.data-v-c85b5b22:focus, input.data-v-c85b5b22:active, textarea.data-v-c85b5b22:focus, textarea.data-v-c85b5b22:active {
outline: none;
}
.chat-aside.data-v-c85b5b22 {
position: absolute;
top: 50px;
right: 0;
box-sizing: border-box;
width: 360px !important;
border-radius: 8px 0 0 8px;
z-index: 9999;
max-height: calc(100% - 50px);
}
.tui-chat .tui-message-list .message-more.data-v-c85b5b22 {
color: #999;
cursor: pointer;
}
.tui-chat .image-dialog.data-v-c85b5b22 {
background: rgba(0, 0, 0, 0.6);
}
.tui-chat .image-dialog header.data-v-c85b5b22 {
background: rgba(0, 0, 0, 0.49);
}
.tui-chat-h5 .tui-chat-header.data-v-c85b5b22 {
background: #FFF;
}
.tui-chat-h5 .tui-chat-footer.data-v-c85b5b22 {
background: #FFF;
}
.tui-chat-h5 .tui-chat-footer .input input.data-v-c85b5b22 {
background: #F4F5F9;
}
.tui-chat.data-v-c85b5b22 {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
overflow: hidden;
}
.tui-chat-main.data-v-c85b5b22 {
min-height: 0;
flex: 1;
overflow: hidden;
display: flex;
flex-direction: column;
position: relative;
}
.tui-chat-main .tui-chat-safe-tips.data-v-c85b5b22 {
padding: 12px 20px;
background-color: rgba(255, 149, 0, 0.1);
color: #ff8c39;
line-height: 18px;
font-family: PingFangSC-Regular;
font-style: normal;
font-weight: 400;
text-align: justify;
font-size: 12px;
}
.tui-chat-main .tui-chat-safe-tips a.data-v-c85b5b22 {
color: #006eff;
float: right;
}
.tui-chat-main .tui-chat-application-tips.data-v-c85b5b22 {
text-align: center;
width: 100%;
background: #fce4d3;
padding: 2px;
font-size: 12px;
}
.tui-chat-main .application-tips-btn.data-v-c85b5b22 {
color: #006eff;
padding-left: 10px;
}
.tui-chat-main .tui-message-list.data-v-c85b5b22 {
flex: 1;
height: 100%;
overflow: hidden auto;
}
.tui-chat-main .tui-message-list .message-more.data-v-c85b5b22 {
font-size: 14px;
padding: 5px;
text-align: center;
}
.tui-chat-main .tui-message-list .to-bottom-tip.data-v-c85b5b22 {
position: -webkit-sticky;
position: sticky;
bottom: 10px;
left: 100%;
margin-right: 15px;
width: 92px;
height: 28px;
padding: 0 5px;
background: #fff;
border: 1px solid #e0e0e0;
box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.06);
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
border-radius: 3px;
cursor: pointer;
}
.tui-chat-main .tui-message-list .to-bottom-tip-text.data-v-c85b5b22 {
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 10px;
color: #147aff;
letter-spacing: 0;
text-align: center;
padding-left: 3px;
}
.tui-chat-main .tui-message-list .message-li.data-v-c85b5b22 {
display: flex;
flex-direction: column;
}
.tui-chat-main .tui-message-list .message-li.data-v-c85b5b22:first-child {
margin-top: 5px;
}
.tui-chat-main .tui-message-list .message-li .message-item.data-v-c85b5b22 {
display: flex;
position: relative;
flex-direction: column;
}
.tui-chat-main .tui-message-list .message-li .message-item .message-tool.data-v-c85b5b22 {
z-index: 5;
position: absolute;
cursor: pointer;
transform: translateY(-100%);
}
.tui-chat-main .tui-message-list .message-li .message-item .message-tool-out.data-v-c85b5b22 {
right: 30px;
left: auto;
}
.tui-chat-main .tui-message-list .message-li .message-item .message-tool-in.data-v-c85b5b22 {
left: 30px;
right: auto;
}
.tui-chat-main .tui-message-list .message-li .message-item .message-tool-bottom.data-v-c85b5b22 {
z-index: 5;
bottom: 0;
transform: translateY(100%);
}
.tui-chat-main .tui-message-list .message-li .message-label.data-v-c85b5b22 {
max-width: 50px;
}
.tui-chat-main .tui-message-list .right.data-v-c85b5b22 {
flex-direction: row-reverse;
justify-content: flex-start;
}
.tui-chat .disabled.data-v-c85b5b22 {
position: relative;
}
.tui-chat .disabled.data-v-c85b5b22::before {
content: "";
position: absolute;
width: 100%;
height: 100%;
}
.image-dialog.data-v-c85b5b22 {
position: fixed;
z-index: 5;
width: 100vw;
height: calc(100vh - 63px);
top: 63px;
left: 0;
}
.image-dialog header.data-v-c85b5b22 {
display: flex;
justify-content: flex-end;
width: 100%;
box-sizing: border-box;
padding: 10px;
}
.data-v-c85b5b22::-webkit-scrollbar {
width: 6px;
height: 140px;
background-color: transparent;
}
.data-v-c85b5b22::-webkit-scrollbar-track {
border-radius: 10px;
}
.data-v-c85b5b22::-webkit-scrollbar-thumb {
border-radius: 10px;
background-color: #9a999c;
}
.tui-chat-h5.data-v-c85b5b22 {
flex: 1;
position: static;
}
.tui-chat-h5 .tui-chat-main .tui-message-list.data-v-c85b5b22 {
height: 100%;
}
.tui-chat-h5 .tui-chat-main .message-more.data-v-c85b5b22 {
color: #999;
cursor: pointer;
font-size: 14px;
}
.data-v-c85b5b22:not(not) {
display: flex;
flex-direction: column;
box-sizing: border-box;
min-width: 0;
}

View File

@@ -0,0 +1,25 @@
"use strict";
const Link = {
product: {
label: "产品文档",
url: "https://cloud.tencent.com/document/product/269/1499#.E7.BE.A4.E7.BB.84.E5.8A.9F.E8.83.BD"
},
customMessage: {
label: "自定义消息",
url: "https://web.sdk.qcloud.com/im/doc/zh-cn/SDK.html#createCustomMessage"
},
complaint: {
label: "点此投诉",
url: "https://cloud.tencent.com/apply/p/xc3oaubi98g"
},
implement: {
label: "集成TUICallKit",
url: "https://cloud.tencent.com/document/product/269/79861"
},
purchase: {
label: "开通腾讯实时音视频服务",
url: "https://cloud.tencent.com/document/product/1640/79968"
}
};
exports.Link = Link;
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/message-list/link/index.js.map

View File

@@ -0,0 +1,128 @@
"use strict";
const common_vendor = require("../../../../../common/vendor.js");
require("../../../../adapter-vue.js");
const TUIKit_components_common_Toast_index = require("../../../common/Toast/index.js");
const common_assets = require("../../../../../common/assets.js");
if (!Math) {
Icon();
}
const Icon = () => "../../../common/Icon.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "message-audio",
props: {
broadcastNewAudioSrc: {},
messageItem: { default: () => ({}) },
content: { default: () => ({}) }
},
emits: ["getGlobalAudioContext", "setAudioPlayed"],
setup(__props, { emit: __emit }) {
const emits = __emit;
const props = __props;
const audioMap = /* @__PURE__ */ new Map();
const isAudioPlaying = common_vendor.ref(false);
common_vendor.onUnmounted(() => {
var _a;
const audioContext = getAudio();
if (isAudioPlaying.value) {
stopAudio();
}
(_a = audioContext == null ? void 0 : audioContext.destroy) == null ? void 0 : _a.call(audioContext);
audioMap.delete("audio");
});
common_vendor.watch(() => props.broadcastNewAudioSrc, (newSrc) => {
if (newSrc !== props.content.url && isAudioPlaying.value) {
stopAudio();
isAudioPlaying.value = false;
}
});
function toggleClick() {
emits("getGlobalAudioContext", audioMap, { newAudioSrc: props.content.url });
if (props.messageItem.hasRiskContent || !props.content.url) {
TUIKit_components_common_Toast_index.Toast({
message: "暂不支持播放"
});
return;
}
const audioContext = getAudio();
if (!audioContext) {
audioMap.set("audio", common_vendor.index.createInnerAudioContext());
common_vendor.index.setInnerAudioOption({
obeyMuteSwitch: false
});
initAudioSrc();
}
toggleAudioPlayState();
}
function toggleAudioPlayState() {
if (!isAudioPlaying.value) {
playAudio();
} else {
stopAudio();
}
}
function initAudioSrc() {
const audioContext = getAudio();
if (!audioContext) {
return;
}
audioContext.src = props.content.url;
isAudioPlaying.value = false;
audioContext.onPlay(onAudioPlay);
audioContext.onStop(onAudioStop);
audioContext.onEnded(onAudioEnded);
audioContext.onError(onAudioError);
}
function playAudio() {
const audioContext = getAudio();
if (!audioContext) {
return;
}
audioContext.play();
if (props.messageItem.flow === "in") {
emits("setAudioPlayed", props.messageItem.ID);
}
}
function stopAudio() {
const audioContext = getAudio();
if (!audioContext) {
return;
}
try {
audioContext.stop();
} catch {
}
}
function onAudioPlay() {
isAudioPlaying.value = true;
}
function onAudioStop() {
isAudioPlaying.value = false;
}
function onAudioEnded() {
isAudioPlaying.value = false;
}
function onAudioError() {
common_vendor.index.__f__("warn", "at TUIKit/components/TUIChat/message-list/message-elements/message-audio.vue:156", "audio played error");
}
function getAudio() {
return audioMap.get("audio");
}
return (_ctx, _cache) => {
return {
a: common_vendor.unref(isAudioPlaying) ? 1 : "",
b: common_vendor.p({
width: "15px",
height: "20px",
file: common_vendor.unref(common_assets.audioIcon)
}),
c: common_vendor.t(props.content.second || 1),
d: `${props.content.second * 5}px`,
e: props.messageItem.flow === "out" ? 1 : "",
f: common_vendor.o$1(toggleClick)
};
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-066fcccf"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/message-list/message-elements/message-audio.js.map

View File

@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"icon": "../../../common/Icon"
}
}

View File

@@ -0,0 +1 @@
<view class="{{['data-v-066fcccf', 'message-audio', e && 'reserve']}}" bindtap="{{f}}"><view class="audio-icon-container data-v-066fcccf"><view class="{{['data-v-066fcccf', 'mask', a && 'play']}}"/><icon wx:if="{{b}}" class="icon data-v-066fcccf" u-i="066fcccf-0" bind:__l="__l" u-p="{{b}}"/></view><view class="time data-v-066fcccf" style="{{'width:' + d}}">{{c}} " </view></view>

View File

@@ -0,0 +1,100 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.data-v-066fcccf:not(not) {
display: flex;
flex-direction: column;
box-sizing: border-box;
min-width: 0;
}
.message-audio.data-v-066fcccf {
flex-direction: row;
flex: 0 0 auto;
cursor: pointer;
-webkit-tap-highlight-color: transparent;
overflow: hidden;
}
.message-audio .audio-icon-container.data-v-066fcccf {
width: 16px;
height: 20px;
position: relative;
flex: 0 0 auto;
flex-direction: row;
justify-content: flex-end;
margin: 0 7px 0 0;
overflow: hidden;
}
.message-audio .audio-icon-container .mask.data-v-066fcccf {
position: absolute;
z-index: 1;
width: 105%;
height: 105%;
left: 0;
top: 0;
transform-origin: right;
transform: scaleX(0);
background-color: #fbfbfb;
}
.message-audio .audio-icon-container .mask.play.data-v-066fcccf {
animation: audio-play-066fcccf 2s steps(1, end) infinite;
}
@keyframes audio-play-066fcccf {
0% {
transform: scaleX(0.7056);
}
50% {
transform: scaleX(0.3953);
}
75% {
transform: scaleX(0);
visibility: hidden;
}
100% {
transform: scaleX(0);
visibility: hidden;
}
}
.message-audio .time.data-v-066fcccf {
max-width: 165px;
min-width: 20px;
text-align: start;
white-space: nowrap;
}
.message-audio.reserve.data-v-066fcccf {
flex-direction: row-reverse;
}
.message-audio.reserve .time.data-v-066fcccf {
text-align: end;
}
.message-audio.reserve .audio-icon-container.data-v-066fcccf {
margin: 0 0 0 7px;
}
.message-audio.reserve .audio-icon-container .mask.data-v-066fcccf {
transform-origin: left;
background-color: #dceafd;
}
.message-audio.reserve .icon.data-v-066fcccf {
transform: rotate(180deg);
}

View File

@@ -0,0 +1,172 @@
"use strict";
const common_vendor = require("../../../../../common/vendor.js");
require("../../../../adapter-vue.js");
const common_assets = require("../../../../../common/assets.js");
const TUIKit_components_TUIChat_utils_utils = require("../../utils/utils.js");
const TUIKit_utils_env = require("../../../../utils/env.js");
if (!Math) {
(RadioSelect + Avatar + Icon + ReadStatus + MessageTranslate + MessageConvert + MessageQuote)();
}
const Icon = () => "../../../common/Icon.js";
const ReadStatus = () => "./read-status/index.js";
const MessageQuote = () => "./message-quote/index.js";
const Avatar = () => "../../../common/Avatar/index.js";
const MessageTranslate = () => "./message-translate/index.js";
const MessageConvert = () => "./message-convert/index.js";
const RadioSelect = () => "../../../common/RadioSelect/index.js";
const riskImageReplaceUrl = "https://web.sdk.qcloud.com/component/TUIKit/assets/has_risk_default.png";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "message-bubble",
props: {
messageItem: { default: () => ({}) },
content: { default: () => ({}) },
classNameList: { default: () => [] },
blinkMessageIDList: { default: () => [] },
isMultipleSelectMode: { type: Boolean, default: false },
isAudioPlayed: { type: Boolean, default: false },
multipleSelectedMessageIDList: { default: () => [] }
},
emits: ["resendMessage", "blinkMessage", "setReadReceiptPanelVisible", "changeSelectMessageIDList", "scrollTo"],
setup(__props, { emit: __emit }) {
const emits = __emit;
const props = __props;
const TYPES = common_vendor.qt.TYPES;
const needLoadingIconMessageType = [
TYPES.MSG_LOCATION,
TYPES.MSG_TEXT,
TYPES.MSG_CUSTOM,
TYPES.MSG_MERGER,
TYPES.MSG_FACE
];
const { blinkMessageIDList, messageItem: message } = common_vendor.toRefs(props);
const isMultipleSelected = common_vendor.computed(() => {
return props.multipleSelectedMessageIDList.includes(message.value.ID);
});
const isDisplayUnplayMark = common_vendor.computed(() => {
return message.value.flow === "in" && message.value.status === "success" && message.value.type === TYPES.MSG_AUDIO && !props.isAudioPlayed;
});
const containerClassNameList = common_vendor.computed(() => {
return [
"message-bubble",
isMultipleSelected.value ? "multiple-selected" : "",
...props.classNameList
];
});
const isNoPadding = common_vendor.computed(() => {
return [TYPES.MSG_IMAGE, TYPES.MSG_VIDEO, TYPES.MSG_MERGER].includes(message.value.type);
});
const riskContentText = common_vendor.computed(() => {
let content = common_vendor.Wt.t("TUIChat.涉及敏感内容") + ", ";
if (message.value.flow === "out") {
content += common_vendor.Wt.t("TUIChat.发送失败");
} else {
content += common_vendor.Wt.t(
message.value.type === TYPES.MSG_AUDIO ? "TUIChat.无法收听" : "TUIChat.无法查看"
);
}
return content;
});
const isBlink = common_vendor.computed(() => {
var _a, _b;
if ((_a = message.value) == null ? void 0 : _a.ID) {
return (_b = blinkMessageIDList == null ? void 0 : blinkMessageIDList.value) == null ? void 0 : _b.includes(message.value.ID);
}
return false;
});
function toggleMultipleSelect(isSelected) {
emits("changeSelectMessageIDList", {
type: isSelected ? "add" : "remove",
messageID: message.value.ID
});
}
function resendMessage() {
var _a;
if (!((_a = message.value) == null ? void 0 : _a.hasRiskContent)) {
emits("resendMessage");
}
}
function blinkMessage(messageID) {
emits("blinkMessage", messageID);
}
function scrollTo(scrollHeight) {
emits("scrollTo", scrollHeight);
}
function openReadUserPanel() {
emits("setReadReceiptPanelVisible", true, message.value);
}
return (_ctx, _cache) => {
return common_vendor.e({
a: props.isMultipleSelectMode
}, props.isMultipleSelectMode ? {
b: common_vendor.o$1(toggleMultipleSelect),
c: common_vendor.p({
isSelected: common_vendor.unref(isMultipleSelected)
})
} : {}, {
d: common_vendor.p({
useSkeletonAnimation: true,
url: common_vendor.unref(message).avatar || ""
}),
e: common_vendor.unref(message).flow === "in" && common_vendor.unref(message).conversationType === "GROUP"
}, common_vendor.unref(message).flow === "in" && common_vendor.unref(message).conversationType === "GROUP" ? {
f: common_vendor.t(props.content.showName)
} : {}, {
g: (common_vendor.unref(message).type === common_vendor.unref(TYPES).MSG_IMAGE || common_vendor.unref(message).type === common_vendor.unref(TYPES).MSG_VIDEO) && common_vendor.unref(message).hasRiskContent
}, (common_vendor.unref(message).type === common_vendor.unref(TYPES).MSG_IMAGE || common_vendor.unref(message).type === common_vendor.unref(TYPES).MSG_VIDEO) && common_vendor.unref(message).hasRiskContent ? {
h: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "message-risk-replace-h5"),
i: riskImageReplaceUrl
} : {}, {
j: common_vendor.unref(message).hasRiskContent
}, common_vendor.unref(message).hasRiskContent ? {
k: common_vendor.t(common_vendor.unref(riskContentText))
} : {}, {
l: common_vendor.n(common_vendor.unref(message).flow === "out" ? "content-out" : "content-in"),
m: common_vendor.n(common_vendor.unref(message).hasRiskContent && "content-has-risk"),
n: common_vendor.n(common_vendor.unref(isNoPadding) ? "content-no-padding" : ""),
o: common_vendor.n(common_vendor.unref(isNoPadding) && common_vendor.unref(isBlink) ? "blink-shadow" : ""),
p: common_vendor.n(!common_vendor.unref(isNoPadding) && common_vendor.unref(isBlink) ? "blink-content" : ""),
q: common_vendor.unref(isDisplayUnplayMark)
}, common_vendor.unref(isDisplayUnplayMark) ? {} : {}, {
r: common_vendor.unref(message).status === "fail" || common_vendor.unref(message).hasRiskContent
}, common_vendor.unref(message).status === "fail" || common_vendor.unref(message).hasRiskContent ? {
s: common_vendor.o$1(($event) => resendMessage())
} : {}, {
t: common_vendor.unref(message).status === "unSend" && needLoadingIconMessageType.includes(common_vendor.unref(message).type)
}, common_vendor.unref(message).status === "unSend" && needLoadingIconMessageType.includes(common_vendor.unref(message).type) ? {
v: common_vendor.p({
file: common_vendor.unref(common_assets.loadingIcon),
width: "15px",
height: "15px"
})
} : {}, {
w: common_vendor.o$1(openReadUserPanel),
x: common_vendor.p({
message: common_vendor.unref(TUIKit_components_TUIChat_utils_utils.shallowCopyMessage)(common_vendor.unref(message))
}),
y: common_vendor.n(common_vendor.unref(message).flow === "out" && "message-body-main-reverse"),
z: common_vendor.o$1(() => {
}),
A: common_vendor.n(common_vendor.unref(message).flow === "in" ? "" : "reverse"),
B: common_vendor.n(common_vendor.unref(message).flow === "out" ? "reverse" : "flex-row"),
C: common_vendor.p({
message: common_vendor.unref(message)
}),
D: common_vendor.n(common_vendor.unref(message).flow === "out" ? "reverse" : "flex-row"),
E: common_vendor.p({
message: common_vendor.unref(message)
}),
F: common_vendor.n(common_vendor.unref(message).flow === "out" ? "reverse" : "flex-row"),
G: common_vendor.o$1(blinkMessage),
H: common_vendor.o$1(scrollTo),
I: common_vendor.p({
message: common_vendor.unref(message)
}),
J: common_vendor.unref(message).flow === "out" ? 1 : "",
K: common_vendor.n(common_vendor.unref(containerClassNameList))
});
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-51fb22b7"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/message-list/message-elements/message-bubble.js.map

View File

@@ -0,0 +1,12 @@
{
"component": true,
"usingComponents": {
"icon": "../../../common/Icon",
"read-status": "./read-status/index",
"message-quote": "./message-quote/index",
"avatar": "../../../common/Avatar/index",
"message-translate": "./message-translate/index",
"message-convert": "./message-convert/index",
"radio-select": "../../../common/RadioSelect/index"
}
}

View File

@@ -0,0 +1 @@
<view class="{{['data-v-51fb22b7', K]}}"><radio-select wx:if="{{a}}" class="multiple-select-radio data-v-51fb22b7" bindonChange="{{b}}" u-i="51fb22b7-0" bind:__l="__l" u-p="{{c}}"/><view class="{{['data-v-51fb22b7', J && 'control-reverse']}}"><view class="message-bubble-content data-v-51fb22b7"><view class="{{['message-bubble-main-content', 'data-v-51fb22b7', A]}}"><avatar wx:if="{{d}}" class="data-v-51fb22b7" style="{{'flex:' + '0 0 auto'}}" u-i="51fb22b7-1" bind:__l="__l" u-p="{{d}}"/><view class="message-body data-v-51fb22b7" catchtap="{{z}}"><view wx:if="{{e}}" class="message-body-nick-name data-v-51fb22b7">{{f}}</view><view class="{{['data-v-51fb22b7', 'message-body-main', y]}}"><view class="{{['data-v-51fb22b7', 'blink', 'message-body-content', l, m, n, o, p]}}"><view class="content-main data-v-51fb22b7"><image wx:if="{{g}}" class="{{['data-v-51fb22b7', 'message-risk-replace', h]}}" src="{{i}}"></image><block wx:else><slot/></block></view><view wx:if="{{j}}" class="content-has-risk-tips data-v-51fb22b7">{{k}}</view></view><view wx:if="{{q}}" class="audio-unplay-mark data-v-51fb22b7"/><view wx:if="{{r}}" class="message-label fail data-v-51fb22b7" bindtap="{{s}}"> ! </view><icon wx:if="{{t}}" class="message-label loading-circle data-v-51fb22b7" u-i="51fb22b7-2" bind:__l="__l" u-p="{{v}}"/><read-status wx:if="{{x}}" class="message-label align-self-bottom data-v-51fb22b7" bindopenReadUserPanel="{{w}}" u-i="51fb22b7-3" bind:__l="__l" u-p="{{x}}"/></view></view></view><view class="message-bubble-extra-content data-v-51fb22b7"><message-translate wx:if="{{C}}" class="{{['data-v-51fb22b7', B]}}" u-i="51fb22b7-4" bind:__l="__l" u-p="{{C}}"/><message-convert wx:if="{{E}}" class="{{['data-v-51fb22b7', D]}}" u-i="51fb22b7-5" bind:__l="__l" u-p="{{E}}"/><message-quote wx:if="{{I}}" class="{{['data-v-51fb22b7', F]}}" bindblinkMessage="{{G}}" bindscrollTo="{{H}}" u-i="51fb22b7-6" bind:__l="__l" u-p="{{I}}"/></view></view></view></view>

View File

@@ -0,0 +1,226 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.data-v-51fb22b7:not(not) {
display: flex;
flex-direction: column;
min-width: 0;
box-sizing: border-box;
}
.flex-row.data-v-51fb22b7 {
display: flex;
}
.reverse.data-v-51fb22b7 {
display: flex;
flex-direction: row-reverse;
justify-content: flex-start;
}
.message-bubble.data-v-51fb22b7 {
padding: 10px 15px;
display: flex;
flex-direction: row;
user-select: none;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
}
.message-bubble.multiple-selected.data-v-51fb22b7 {
background-color: #f0f0f0;
}
.message-bubble .multiple-select-radio.data-v-51fb22b7 {
margin-right: 12px;
flex: 0 0 auto;
}
.message-bubble .control-reverse.data-v-51fb22b7 {
flex: 1 1 auto;
flex-direction: row-reverse;
}
.message-bubble .message-bubble-main-content.data-v-51fb22b7 {
display: flex;
flex-direction: row;
}
.message-bubble .message-bubble-main-content .message-avatar.data-v-51fb22b7 {
display: block;
width: 36px;
height: 36px;
border-radius: 5px;
flex: 0 0 auto;
}
.message-bubble .message-bubble-main-content .message-body.data-v-51fb22b7 {
display: flex;
flex: 0 1 auto;
flex-direction: column;
align-items: flex-start;
margin: 0 8px;
}
.message-bubble .message-bubble-main-content .message-body .message-body-nick-name.data-v-51fb22b7 {
display: block;
margin-bottom: 4px;
font-size: 12px;
color: #999;
max-width: 150px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.message-bubble .message-bubble-main-content .message-body .message-body-main.data-v-51fb22b7 {
max-width: 100%;
display: flex;
flex-direction: row;
min-width: 0;
box-sizing: border-box;
}
.message-bubble .message-bubble-main-content .message-body .message-body-main-reverse.data-v-51fb22b7 {
flex-direction: row-reverse;
}
.message-bubble .message-bubble-main-content .message-body .message-body-main .audio-unplay-mark.data-v-51fb22b7 {
flex: 0 0 auto;
width: 5px;
height: 5px;
border-radius: 50%;
background-color: #f00;
margin: 5px;
}
.message-bubble .message-bubble-main-content .message-body .message-body-main .message-body-content.data-v-51fb22b7 {
display: flex;
flex-direction: column;
min-width: 0;
box-sizing: border-box;
padding: 12px;
font-size: 14px;
color: #000;
letter-spacing: 0;
word-wrap: break-word;
word-break: break-all;
position: relative;
}
.message-bubble .message-bubble-main-content .message-body .message-body-main .message-body-content .content-main.data-v-51fb22b7 {
box-sizing: border-box;
display: flex;
flex-direction: column;
flex-shrink: 0;
align-content: flex-start;
border: 0 solid black;
margin: 0;
padding: 0;
min-width: 0;
}
.message-bubble .message-bubble-main-content .message-body .message-body-main .message-body-content .content-main .message-risk-replace.data-v-51fb22b7 {
width: 130px;
height: 130px;
}
.message-bubble .message-bubble-main-content .message-body .message-body-main .message-body-content .content-has-risk-tips.data-v-51fb22b7 {
font-size: 12px;
color: #fa5151;
font-family: PingFangSC-Regular;
margin-top: 5px;
border-top: 1px solid #e5c7c7;
padding-top: 5px;
}
.message-bubble .message-bubble-main-content .message-body .message-body-main .content-in.data-v-51fb22b7 {
background: #fbfbfb;
border-radius: 0 10px 10px;
}
.message-bubble .message-bubble-main-content .message-body .message-body-main .content-out.data-v-51fb22b7 {
background: #dceafd;
border-radius: 10px 0 10px 10px;
}
.message-bubble .message-bubble-main-content .message-body .message-body-main .content-no-padding.data-v-51fb22b7 {
padding: 0;
background: transparent;
border-radius: 10px;
overflow: hidden;
}
.message-bubble .message-bubble-main-content .message-body .message-body-main .content-no-padding.content-has-risk.data-v-51fb22b7 {
padding: 12px;
}
.message-bubble .message-bubble-main-content .message-body .message-body-main .content-has-risk.data-v-51fb22b7 {
background: rgba(250, 81, 81, 0.16);
}
.message-bubble .message-bubble-main-content .message-body .message-body-main .blink-shadow.data-v-51fb22b7 {
box-shadow: rgba(255, 156, 25, 0) 0 0 10px 0;
animation: shadow-blink-51fb22b7 1s linear 3;
}
@keyframes shadow-blink-51fb22b7 {
50% {
box-shadow: #ff9c19 0 0 10px 0;
}
}
.message-bubble .message-bubble-main-content .message-body .message-body-main .blink-content.data-v-51fb22b7 {
animation: reference-blink-51fb22b7 1s linear 3;
}
@keyframes reference-blink-51fb22b7 {
50% {
background-color: #ff9c19;
}
}
.message-bubble .message-bubble-main-content .message-body .message-body-main .message-label.data-v-51fb22b7 {
align-self: flex-end;
font-family: PingFangSC-Regular;
font-size: 12px;
color: #b6b8ba;
word-break: keep-all;
flex: 0 0 auto;
margin: 0 8px;
}
.message-bubble .message-bubble-main-content .message-body .message-body-main .message-label.fail.data-v-51fb22b7 {
width: 15px;
height: 15px;
border-radius: 15px;
background: red;
color: #fff;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
}
.message-bubble .message-bubble-main-content .message-body .message-body-main .message-label.loading-circle.data-v-51fb22b7 {
opacity: 0;
animation: circle-loading-51fb22b7 2s linear 1s infinite;
}
@keyframes circle-loading-51fb22b7 {
0% {
transform: rotate(0);
opacity: 1;
}
100% {
opacity: 1;
transform: rotate(360deg);
}
}
.message-bubble .message-bubble-main-content .message-body .message-body-main .align-self-bottom.data-v-51fb22b7 {
align-self: flex-end;
}
.message-bubble .reverse.data-v-51fb22b7 {
display: flex;
flex-direction: row-reverse;
justify-content: flex-start;
}
.message-bubble .message-bubble-extra-content.data-v-51fb22b7 {
display: flex;
flex-direction: column;
}

View File

@@ -0,0 +1,45 @@
"use strict";
const common_vendor = require("../../../../../../common/vendor.js");
require("../../../../../adapter-vue.js");
const TUIKit_components_TUIChat_utils_convertVoiceToText = require("../../../utils/convertVoiceToText.js");
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "convert-content",
props: {
message: { default: () => ({}) },
contentVisible: { type: Boolean }
},
emits: ["toggleErrorStatus"],
setup(__props, { emit: __emit }) {
const emits = __emit;
const props = __props;
const convertFinished = common_vendor.ref(false);
const convertText = common_vendor.ref("");
common_vendor.watch(() => props.contentVisible, (newVal) => {
if (newVal) {
TUIKit_components_TUIChat_utils_convertVoiceToText.convertor.get(props.message).then((text) => {
convertFinished.value = true;
convertText.value = text;
}).catch((err) => {
convertFinished.value = true;
emits("toggleErrorStatus", true);
convertText.value = err.message;
});
}
}, {
immediate: true
});
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.unref(convertFinished)
}, common_vendor.unref(convertFinished) ? {
b: common_vendor.t(common_vendor.unref(convertText))
} : {}, {
c: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("TUIChat.转换中")),
d: common_vendor.unref(convertFinished) ? 1 : ""
});
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-02f04f6f"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/message-list/message-elements/message-convert/convert-content.js.map

View File

@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

Some files were not shown because too many files have changed in this diff Show More