优化页面

This commit is contained in:
pengxiaolong
2025-06-09 23:02:05 +08:00
parent c5042d08c3
commit 8c70c2c850
605 changed files with 661 additions and 945 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/message-input-toolbar/words/index.vue","../../HBuilderX/plugins/uniapp-cli-vite/uniComponent:/RDov6aG555uuL3RrLW1pbmktcHJvZ3JhbS9UVUlLaXQvY29tcG9uZW50cy9UVUlDaGF0L21lc3NhZ2UtaW5wdXQtdG9vbGJhci93b3Jkcy9pbmRleC52dWU"],"sourcesContent":["<template>\n <ToolbarItemContainer\n ref=\"container\"\n :iconFile=\"wordsIcon\"\n title=\"常用语\"\n :needBottomPopup=\"true\"\n :iconWidth=\"isUniFrameWork ? '26px' : '20px'\"\n :iconHeight=\"isUniFrameWork ? '26px' : '20px'\"\n @onDialogShow=\"onDialogShow\"\n @onDialogClose=\"onDialogClose\"\n >\n <div :class=\"['words', !isPC && 'words-h5']\">\n <div :class=\"['words-header', !isPC && 'words-h5-header']\">\n <span :class=\"['words-header-title', !isPC && 'words-h5-header-title']\">\n {{ TUITranslateService.t(\"Words.常用语-快捷回复工具\") }}\n </span>\n <span\n v-if=\"!isPC\"\n :class=\"['words-header-close', !isPC && 'words-h5-header-close']\"\n @click=\"closeDialog\"\n >\n 关闭\n </span>\n </div>\n <ul :class=\"['words-list', !isPC && 'words-h5-list']\">\n <li\n v-for=\"(item, index) in wordsList\"\n :key=\"index\"\n :class=\"['words-list-item', !isPC && 'words-h5-list-item']\"\n @click=\"selectWord(item)\"\n >\n {{ TUITranslateService.t(`Words.${item.value}`) }}\n </li>\n </ul>\n </div>\n </ToolbarItemContainer>\n</template>\n<script setup lang=\"ts\">\nimport {\n TUITranslateService,\n TUIStore,\n StoreName,\n IConversationModel,\n SendMessageParams,\n TUIChatService,\n} from '@tencentcloud/chat-uikit-engine';\nimport { ref } from '../../../../adapter-vue';\nimport ToolbarItemContainer from '../toolbar-item-container/index.vue';\nimport wordsIconLight from '../../../../assets/icon/words-light.svg';\nimport wordsIconDark from '../../../../assets/icon/words-dark.svg';\nimport { wordsList } from '../../utils/wordsList';\nimport { isEnabledMessageReadReceiptGlobal } from '../../utils/utils';\nimport { isPC, isUniFrameWork } from '../../../../utils/env';\nimport TUIChatConfig from '../../config';\n\nconst wordsIcon = TUIChatConfig.getTheme() === 'dark' ? wordsIconDark : wordsIconLight;\nconst emits = defineEmits(['onDialogPopupShowOrHide']);\nconst currentConversation = ref<IConversationModel>();\nconst container = ref();\n\nTUIStore.watch(StoreName.CONV, {\n currentConversation: (conversation: IConversationModel) => {\n currentConversation.value = conversation;\n },\n});\n\nconst selectWord = (item: any) => {\n const options = {\n to:\n currentConversation?.value?.groupProfile?.groupID\n || currentConversation?.value?.userProfile?.userID,\n conversationType: currentConversation?.value?.type,\n payload: {\n text: TUITranslateService.t(`Words.${item.value}`),\n },\n needReadReceipt: isEnabledMessageReadReceiptGlobal(),\n } as SendMessageParams;\n TUIChatService.sendTextMessage(options);\n // close dialog after submit evaluate\n container?.value?.toggleDialogDisplay(false);\n};\n\nconst closeDialog = () => {\n container?.value?.toggleDialogDisplay(false);\n};\n\nconst onDialogShow = () => {\n emits('onDialogPopupShowOrHide', true);\n};\n\nconst onDialogClose = () => {\n emits('onDialogPopupShowOrHide', false);\n};\n</script>\n<style scoped lang=\"scss\" src=\"./style/index.scss\"></style>\n","import Component from 'D:/项目/tk-mini-program/TUIKit/components/TUIChat/message-input-toolbar/words/index.vue'\nwx.createComponent(Component)"],"names":["TUIChatConfig","wordsIconDark","wordsIconLight","ref","TUIStore","StoreName","TUITranslateService","isEnabledMessageReadReceiptGlobal","TUIChatService"],"mappings":";;;;;;;;;;;AA+CA,MAAA,uBAAiC,MAAA;;;;;AAQjC,UAAM,YAAYA,iCAAAA,WAAc,SAAS,MAAM,SAASC,cAAgB,gBAAAC;AACxE,UAAM,QAAQ;AACd,UAAM,sBAAsBC,cAAAA;AAC5B,UAAM,YAAYA,cAAAA;AAETC,qBAAA,MAAMC,gBAAU,MAAM;AAAA,MAC7B,qBAAqB,CAAC,iBAAqC;AACzD,4BAAoB,QAAQ;AAAA,MAC9B;AAAA,IAAA,CACD;AAEK,UAAA,aAAa,CAAC,SAAc;;AAChC,YAAM,UAAU;AAAA,QACd,MACE,sEAAqB,UAArB,mBAA4B,iBAA5B,mBAA0C,cACvC,sEAAqB,UAArB,mBAA4B,gBAA5B,mBAAyC;AAAA,QAC9C,mBAAkB,gEAAqB,UAArB,mBAA4B;AAAA,QAC9C,SAAS;AAAA,UACP,MAAMC,cAAoB,GAAA,EAAE,SAAS,KAAK,KAAK,EAAE;AAAA,QACnD;AAAA,QACA,iBAAiBC,sCAAAA,kCAAkC;AAAA,MAAA;AAErDC,uBAAe,gBAAgB,OAAO;AAE3B,mDAAA,UAAA,mBAAO,oBAAoB;AAAA,IAAK;AAG7C,UAAM,cAAc,MAAM;;AACb,mDAAA,UAAA,mBAAO,oBAAoB;AAAA,IAAK;AAG7C,UAAM,eAAe,MAAM;AACzB,YAAM,2BAA2B,IAAI;AAAA,IAAA;AAGvC,UAAM,gBAAgB,MAAM;AAC1B,YAAM,2BAA2B,KAAK;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC1FxC,GAAG,gBAAgB,SAAS;"}
{"version":3,"file":"index.js","sources":["TUIKit/components/TUIChat/message-input-toolbar/words/index.vue","../../HBuilderX/plugins/uniapp-cli-vite/uniComponent:/RDov6aG555uuL3RrLW1pbmktcHJvZ3JhbS9UVUlLaXQvY29tcG9uZW50cy9UVUlDaGF0L21lc3NhZ2UtaW5wdXQtdG9vbGJhci93b3Jkcy9pbmRleC52dWU"],"sourcesContent":["<template>\r\n <ToolbarItemContainer\r\n ref=\"container\"\r\n :iconFile=\"wordsIcon\"\r\n title=\"常用语\"\r\n :needBottomPopup=\"true\"\r\n :iconWidth=\"isUniFrameWork ? '26px' : '20px'\"\r\n :iconHeight=\"isUniFrameWork ? '26px' : '20px'\"\r\n @onDialogShow=\"onDialogShow\"\r\n @onDialogClose=\"onDialogClose\"\r\n >\r\n <div :class=\"['words', !isPC && 'words-h5']\">\r\n <div :class=\"['words-header', !isPC && 'words-h5-header']\">\r\n <span :class=\"['words-header-title', !isPC && 'words-h5-header-title']\">\r\n {{ TUITranslateService.t(\"Words.常用语-快捷回复工具\") }}\r\n </span>\r\n <span\r\n v-if=\"!isPC\"\r\n :class=\"['words-header-close', !isPC && 'words-h5-header-close']\"\r\n @click=\"closeDialog\"\r\n >\r\n 关闭\r\n </span>\r\n </div>\r\n <ul :class=\"['words-list', !isPC && 'words-h5-list']\">\r\n <li\r\n v-for=\"(item, index) in wordsList\"\r\n :key=\"index\"\r\n :class=\"['words-list-item', !isPC && 'words-h5-list-item']\"\r\n @click=\"selectWord(item)\"\r\n >\r\n {{ TUITranslateService.t(`Words.${item.value}`) }}\r\n </li>\r\n </ul>\r\n </div>\r\n </ToolbarItemContainer>\r\n</template>\r\n<script setup lang=\"ts\">\r\nimport {\r\n TUITranslateService,\r\n TUIStore,\r\n StoreName,\r\n IConversationModel,\r\n SendMessageParams,\r\n TUIChatService,\r\n} from '@tencentcloud/chat-uikit-engine';\r\nimport { ref } from '../../../../adapter-vue';\r\nimport ToolbarItemContainer from '../toolbar-item-container/index.vue';\r\nimport wordsIconLight from '../../../../assets/icon/words-light.svg';\r\nimport wordsIconDark from '../../../../assets/icon/words-dark.svg';\r\nimport { wordsList } from '../../utils/wordsList';\r\nimport { isEnabledMessageReadReceiptGlobal } from '../../utils/utils';\r\nimport { isPC, isUniFrameWork } from '../../../../utils/env';\r\nimport TUIChatConfig from '../../config';\r\n\r\nconst wordsIcon = TUIChatConfig.getTheme() === 'dark' ? wordsIconDark : wordsIconLight;\r\nconst emits = defineEmits(['onDialogPopupShowOrHide']);\r\nconst currentConversation = ref<IConversationModel>();\r\nconst container = ref();\r\n\r\nTUIStore.watch(StoreName.CONV, {\r\n currentConversation: (conversation: IConversationModel) => {\r\n currentConversation.value = conversation;\r\n },\r\n});\r\n\r\nconst selectWord = (item: any) => {\r\n const options = {\r\n to:\r\n currentConversation?.value?.groupProfile?.groupID\r\n || currentConversation?.value?.userProfile?.userID,\r\n conversationType: currentConversation?.value?.type,\r\n payload: {\r\n text: TUITranslateService.t(`Words.${item.value}`),\r\n },\r\n needReadReceipt: isEnabledMessageReadReceiptGlobal(),\r\n } as SendMessageParams;\r\n TUIChatService.sendTextMessage(options);\r\n // close dialog after submit evaluate\r\n container?.value?.toggleDialogDisplay(false);\r\n};\r\n\r\nconst closeDialog = () => {\r\n container?.value?.toggleDialogDisplay(false);\r\n};\r\n\r\nconst onDialogShow = () => {\r\n emits('onDialogPopupShowOrHide', true);\r\n};\r\n\r\nconst onDialogClose = () => {\r\n emits('onDialogPopupShowOrHide', false);\r\n};\r\n</script>\r\n<style scoped lang=\"scss\" src=\"./style/index.scss\"></style>\r\n","import Component from 'D:/项目/tk-mini-program/TUIKit/components/TUIChat/message-input-toolbar/words/index.vue'\nwx.createComponent(Component)"],"names":["TUIChatConfig","wordsIconDark","wordsIconLight","ref","TUIStore","StoreName","TUITranslateService","isEnabledMessageReadReceiptGlobal","TUIChatService"],"mappings":";;;;;;;;;;;AA+CA,MAAA,uBAAiC,MAAA;;;;;AAQjC,UAAM,YAAYA,iCAAAA,WAAc,SAAS,MAAM,SAASC,cAAgB,gBAAAC;AACxE,UAAM,QAAQ;AACd,UAAM,sBAAsBC,cAAAA;AAC5B,UAAM,YAAYA,cAAAA;AAETC,qBAAA,MAAMC,gBAAU,MAAM;AAAA,MAC7B,qBAAqB,CAAC,iBAAqC;AACzD,4BAAoB,QAAQ;AAAA,MAC9B;AAAA,IAAA,CACD;AAEK,UAAA,aAAa,CAAC,SAAc;;AAChC,YAAM,UAAU;AAAA,QACd,MACE,sEAAqB,UAArB,mBAA4B,iBAA5B,mBAA0C,cACvC,sEAAqB,UAArB,mBAA4B,gBAA5B,mBAAyC;AAAA,QAC9C,mBAAkB,gEAAqB,UAArB,mBAA4B;AAAA,QAC9C,SAAS;AAAA,UACP,MAAMC,cAAoB,GAAA,EAAE,SAAS,KAAK,KAAK,EAAE;AAAA,QACnD;AAAA,QACA,iBAAiBC,sCAAAA,kCAAkC;AAAA,MAAA;AAErDC,uBAAe,gBAAgB,OAAO;AAE3B,mDAAA,UAAA,mBAAO,oBAAoB;AAAA,IAAK;AAG7C,UAAM,cAAc,MAAM;;AACb,mDAAA,UAAA,mBAAO,oBAAoB;AAAA,IAAK;AAG7C,UAAM,eAAe,MAAM;AACzB,YAAM,2BAA2B,IAAI;AAAA,IAAA;AAGvC,UAAM,gBAAgB,MAAM;AAC1B,YAAM,2BAA2B,KAAK;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC1FxC,GAAG,gBAAgB,SAAS;"}