From b89ed80f20f2e07729a68f2c6ed2ca5134332a17 Mon Sep 17 00:00:00 2001 From: wujingjing <gersonwu@qq.com> Date: 星期五, 28 六月 2024 11:17:59 +0800 Subject: [PATCH] ywicon --- src/views/project/ch/home/component/waterRight/top.vue | 17 src/components/chat/Chat.vue | 29 + src/utils/getStyleSheets.ts | 54 ++ src/theme/element.scss | 8 src/views/project/ch/home/Home.vue | 8 customer_list/ch/static/fonts/fontawesome/fontawesome-webfont.eot | 0 customer_list/ch/static/fonts/fontawesome/fontawesome-webfont.ttf | 0 customer_list/ch/static/fonts/fontawesome/fontawesome-webfont.svg | 0 customer_list/ch/static/fonts/iconfont/iconfont.woff | 0 src/layout/component/sidebar/waterLeftAside/asideTitle.vue | 25 src/components/chat/components/Loding.vue | 2 customer_list/ch/static/fonts/fontawesome/fontawesome-webfont.woff | 0 customer_list/ch/static/fonts/ywiconfont/iconfont.woff2 | 0 /dev/null | 419 -------------------- customer_list/ch/static/fonts/iconfont/iconfont.css | 416 ++++++++++++++++++++ customer_list/ch/static/fonts/iconfont/iconfont.ttf | 0 customer_list/ch/static/fonts/ywiconfont/iconfont.css | 159 +++++++ customer_list/ch/static/fonts/ywiconfont/iconfont.ttf | 0 src/components/iconSelector/index.vue | 32 + customer_list/ch/static/fonts/iconfont/iconfont.woff2 | 0 customer_list/ch/static/fonts/fontawesome/fontawesome-webfont.woff2 | 0 src/utils/setIconfont.ts | 6 customer_list/ch/static/fonts/ywiconfont/iconfont.woff | 0 customer_list/ch/static/fonts/fontawesome/fontawesome.min.css | 0 24 files changed, 704 insertions(+), 471 deletions(-) diff --git a/customer_list/ch/static/fonts/fontawesome-webfont.eot b/customer_list/ch/static/fonts/fontawesome/fontawesome-webfont.eot similarity index 100% rename from customer_list/ch/static/fonts/fontawesome-webfont.eot rename to customer_list/ch/static/fonts/fontawesome/fontawesome-webfont.eot Binary files differ diff --git a/customer_list/ch/static/fonts/fontawesome-webfont.svg b/customer_list/ch/static/fonts/fontawesome/fontawesome-webfont.svg similarity index 100% rename from customer_list/ch/static/fonts/fontawesome-webfont.svg rename to customer_list/ch/static/fonts/fontawesome/fontawesome-webfont.svg diff --git a/customer_list/ch/static/fonts/fontawesome-webfont.ttf b/customer_list/ch/static/fonts/fontawesome/fontawesome-webfont.ttf similarity index 100% rename from customer_list/ch/static/fonts/fontawesome-webfont.ttf rename to customer_list/ch/static/fonts/fontawesome/fontawesome-webfont.ttf Binary files differ diff --git a/customer_list/ch/static/fonts/fontawesome-webfont.woff b/customer_list/ch/static/fonts/fontawesome/fontawesome-webfont.woff similarity index 100% rename from customer_list/ch/static/fonts/fontawesome-webfont.woff rename to customer_list/ch/static/fonts/fontawesome/fontawesome-webfont.woff Binary files differ diff --git a/customer_list/ch/static/fonts/fontawesome-webfont.woff2 b/customer_list/ch/static/fonts/fontawesome/fontawesome-webfont.woff2 similarity index 100% rename from customer_list/ch/static/fonts/fontawesome-webfont.woff2 rename to customer_list/ch/static/fonts/fontawesome/fontawesome-webfont.woff2 Binary files differ diff --git a/customer_list/ch/static/fonts/font-awesome.min.css b/customer_list/ch/static/fonts/fontawesome/fontawesome.min.css similarity index 100% rename from customer_list/ch/static/fonts/font-awesome.min.css rename to customer_list/ch/static/fonts/fontawesome/fontawesome.min.css diff --git a/customer_list/ch/static/fonts/iconfont.css b/customer_list/ch/static/fonts/iconfont.css deleted file mode 100644 index dceab43..0000000 --- a/customer_list/ch/static/fonts/iconfont.css +++ /dev/null @@ -1,419 +0,0 @@ -@font-face { - font-family: "iconfont"; /* Project id 2298093 */ - src: url('../fonts/iconfont.woff2') format('woff2'), - url('../fonts/iconfont.woff') format('woff'), - url('../fonts/iconfont.ttf') format('truetype'); -} - -.iconfont { - font-family: "iconfont" !important; - font-size: 16px; - font-style: normal; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.icon-quanjushezhi_o:before { - content: "\eb80"; -} - -.icon-yunshangchuan_o:before { - content: "\ebb3"; -} - -.icon-yunxiazai_o:before { - content: "\ebb4"; -} - -.icon-shuaxin:before { - content: "\e63e"; -} - -.icon-diannao1:before { - content: "\e622"; -} - -.icon-barcode-qr:before { - content: "\e61e"; -} - -.icon-zhongduancanshuchaxun:before { - content: "\e638"; -} - -.icon-shouye_dongtaihui:before { - content: "\e606"; -} - -.icon-putong:before { - content: "\e603"; -} - -.icon-dongtai:before { - content: "\e659"; -} - -.icon-wenducanshu-05:before { - content: "\e634"; -} - -.icon-zhongduancanshu:before { - content: "\e63b"; -} - -.icon-tongzhi1:before { - content: "\e63a"; -} - -.icon-tongzhi2:before { - content: "\e649"; -} - -.icon-tongzhi3:before { - content: "\e648"; -} - -.icon-tongzhi4:before { - content: "\e60c"; -} - -.icon-dianhua:before { - content: "\e615"; -} - -.icon-xianshimima:before { - content: "\e63c"; -} - -.icon-yincangmima:before { - content: "\e63d"; -} - -.icon-shuxing:before { - content: "\e67a"; -} - -.icon-juxingkaobei:before { - content: "\e7a5"; -} - -.icon-shuxingtu:before { - content: "\e685"; -} - -.icon-bolangneng:before { - content: "\e745"; -} - -.icon-bolangnengshiyanchang:before { - content: "\e746"; -} - -.icon--chaifenhang:before { - content: "\e6d1"; -} - -.icon--chaifenlie:before { - content: "\e6d0"; -} - -.icon-tupianyulan:before { - content: "\e67e"; -} - -.icon-15tupianyulan:before { - content: "\e624"; -} - -.icon-728bianjiqi_zitidaxiao:before { - content: "\e660"; -} - -.icon-ziti:before { - content: "\e7b1"; -} - -.icon-font-size:before { - content: "\eaef"; -} - -.icon-tuodong:before { - content: "\e6a8"; -} - -.icon-zhongyingwen1:before { - content: "\e7a3"; -} - -.icon-fuhao-yingwen:before { - content: "\e714"; -} - -.icon-fuhao-zhongwen:before { - content: "\e712"; -} - -.icon-diqiu:before { - content: "\e689"; -} - -.icon-xingqiu:before { - content: "\e65c"; -} - -.icon-diqiu1:before { - content: "\e631"; -} - -.icon-huanjingxingqiu:before { - content: "\e617"; -} - -.icon-zidingyibuju:before { - content: "\e637"; -} - -.icon-dayin:before { - content: "\e612"; -} - -.icon-step:before { - content: "\e601"; -} - -.icon-30xuanzhongyuanxingfill:before { - content: "\e677"; -} - -.icon-shibai:before { - content: "\e60b"; -} - -.icon-7_round_solid:before { - content: "\e64d"; -} - -.icon-6_round_solid:before { - content: "\e64e"; -} - -.icon-9_round_solid:before { - content: "\e64f"; -} - -.icon-1_round_solid:before { - content: "\e650"; -} - -.icon-5_round_solid:before { - content: "\e651"; -} - -.icon-2_round_solid:before { - content: "\e654"; -} - -.icon-0_round_solid:before { - content: "\e655"; -} - -.icon-3_round_solid:before { - content: "\e656"; -} - -.icon-4_round_solid:before { - content: "\e657"; -} - -.icon-8_round_solid:before { - content: "\e658"; -} - -.icon-radio-off-full:before { - content: "\ea6b"; -} - -.icon-tongzhi:before { - content: "\e600"; -} - -.icon-ditu:before { - content: "\e8bc"; -} - -.icon-ico:before { - content: "\e646"; -} - -.icon-chazhaobiaodanliebiao:before { - content: "\e76a"; -} - -.icon-biaodan:before { - content: "\e61d"; -} - -.icon-siweidaotu:before { - content: "\e614"; -} - -.icon-jiliandongxuanzeqi:before { - content: "\e616"; -} - -.icon-caijian:before { - content: "\e611"; -} - -.icon-fuwenben:before { - content: "\e7e4"; -} - -.icon-fuwenbenkuang:before { - content: "\e66f"; -} - -.icon-shangchuan:before { - content: "\e663"; -} - -.icon-xuanzeqi:before { - content: "\e635"; -} - -.icon-fangkuang:before { - content: "\e642"; -} - -.icon-gouxuan-weixuanzhong-xianxingfangkuang:before { - content: "\e77b"; -} - -.icon-shidu:before { - content: "\e60a"; -} - -.icon-yangan:before { - content: "\e67d"; -} - -.icon-wendu:before { - content: "\e686"; -} - -.icon-zaosheng:before { - content: "\e61c"; -} - -.icon-jinridaiban:before { - content: "\e60f"; -} - -.icon-AIshiyanshi:before { - content: "\e609"; -} - -.icon-shenqingkaiban:before { - content: "\e639"; -} - -.icon-zhongyingwenqiehuan:before { - content: "\e611"; -} - -.icon-zhongyingwen:before { - content: "\e605"; -} - -.icon-zhongyingzhuanhuan:before { - content: "\e6a2"; -} - -.icon-zhongyingwenyuyan:before { - content: "\e609"; -} - -.icon-shuju:before { - content: "\e613"; -} - -.icon-ico_shuju:before { - content: "\e6ff"; -} - -.icon-shuju1:before { - content: "\e60e"; -} - -.icon-fuzhiyemian:before { - content: "\e772"; -} - -.icon-caozuo-wailian:before { - content: "\e711"; -} - -.icon-icon-:before { - content: "\e620"; -} - -.icon-gerenzhongxin:before { - content: "\e60d"; -} - -.icon-caidan:before { - content: "\e652"; -} - -.icon-xitongshezhi:before { - content: "\e69b"; -} - -.icon-neiqianshujuchucun:before { - content: "\e62f"; -} - -.icon-shouye:before { - content: "\e653"; -} - -.icon-quanxian:before { - content: "\e610"; -} - -.icon-zujian:before { - content: "\e85e"; -} - -.icon-crew_feature:before { - content: "\e602"; -} - -.icon-gongju:before { - content: "\e62d"; -} - -.icon-skin:before { - content: "\e636"; -} - -.icon-shixinyuan:before { - content: "\e669"; -} - -.icon-webicon318:before { - content: "\e6a9"; -} - -.icon-dian:before { - content: "\e608"; -} - -.icon-fullscreen:before { - content: "\e623"; -} - -.icon-tuichuquanping:before { - content: "\e641"; -} - diff --git a/customer_list/ch/static/fonts/iconfont/iconfont.css b/customer_list/ch/static/fonts/iconfont/iconfont.css new file mode 100644 index 0000000..4971d6f --- /dev/null +++ b/customer_list/ch/static/fonts/iconfont/iconfont.css @@ -0,0 +1,416 @@ +@font-face { + font-family: 'iconfont'; /* Project id 2298093 */ + src: url('./iconfont.woff2') format('woff2'), url('./iconfont.woff') format('woff'), url('./iconfont.ttf') format('truetype'); +} + +.iconfont { + font-family: 'iconfont' !important; + font-size: 16px; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.icon-quanjushezhi_o:before { + content: '\eb80'; +} + +.icon-yunshangchuan_o:before { + content: '\ebb3'; +} + +.icon-yunxiazai_o:before { + content: '\ebb4'; +} + +.icon-shuaxin:before { + content: '\e63e'; +} + +.icon-diannao1:before { + content: '\e622'; +} + +.icon-barcode-qr:before { + content: '\e61e'; +} + +.icon-zhongduancanshuchaxun:before { + content: '\e638'; +} + +.icon-shouye_dongtaihui:before { + content: '\e606'; +} + +.icon-putong:before { + content: '\e603'; +} + +.icon-dongtai:before { + content: '\e659'; +} + +.icon-wenducanshu-05:before { + content: '\e634'; +} + +.icon-zhongduancanshu:before { + content: '\e63b'; +} + +.icon-tongzhi1:before { + content: '\e63a'; +} + +.icon-tongzhi2:before { + content: '\e649'; +} + +.icon-tongzhi3:before { + content: '\e648'; +} + +.icon-tongzhi4:before { + content: '\e60c'; +} + +.icon-dianhua:before { + content: '\e615'; +} + +.icon-xianshimima:before { + content: '\e63c'; +} + +.icon-yincangmima:before { + content: '\e63d'; +} + +.icon-shuxing:before { + content: '\e67a'; +} + +.icon-juxingkaobei:before { + content: '\e7a5'; +} + +.icon-shuxingtu:before { + content: '\e685'; +} + +.icon-bolangneng:before { + content: '\e745'; +} + +.icon-bolangnengshiyanchang:before { + content: '\e746'; +} + +.icon--chaifenhang:before { + content: '\e6d1'; +} + +.icon--chaifenlie:before { + content: '\e6d0'; +} + +.icon-tupianyulan:before { + content: '\e67e'; +} + +.icon-15tupianyulan:before { + content: '\e624'; +} + +.icon-728bianjiqi_zitidaxiao:before { + content: '\e660'; +} + +.icon-ziti:before { + content: '\e7b1'; +} + +.icon-font-size:before { + content: '\eaef'; +} + +.icon-tuodong:before { + content: '\e6a8'; +} + +.icon-zhongyingwen1:before { + content: '\e7a3'; +} + +.icon-fuhao-yingwen:before { + content: '\e714'; +} + +.icon-fuhao-zhongwen:before { + content: '\e712'; +} + +.icon-diqiu:before { + content: '\e689'; +} + +.icon-xingqiu:before { + content: '\e65c'; +} + +.icon-diqiu1:before { + content: '\e631'; +} + +.icon-huanjingxingqiu:before { + content: '\e617'; +} + +.icon-zidingyibuju:before { + content: '\e637'; +} + +.icon-dayin:before { + content: '\e612'; +} + +.icon-step:before { + content: '\e601'; +} + +.icon-30xuanzhongyuanxingfill:before { + content: '\e677'; +} + +.icon-shibai:before { + content: '\e60b'; +} + +.icon-7_round_solid:before { + content: '\e64d'; +} + +.icon-6_round_solid:before { + content: '\e64e'; +} + +.icon-9_round_solid:before { + content: '\e64f'; +} + +.icon-1_round_solid:before { + content: '\e650'; +} + +.icon-5_round_solid:before { + content: '\e651'; +} + +.icon-2_round_solid:before { + content: '\e654'; +} + +.icon-0_round_solid:before { + content: '\e655'; +} + +.icon-3_round_solid:before { + content: '\e656'; +} + +.icon-4_round_solid:before { + content: '\e657'; +} + +.icon-8_round_solid:before { + content: '\e658'; +} + +.icon-radio-off-full:before { + content: '\ea6b'; +} + +.icon-tongzhi:before { + content: '\e600'; +} + +.icon-ditu:before { + content: '\e8bc'; +} + +.icon-ico:before { + content: '\e646'; +} + +.icon-chazhaobiaodanliebiao:before { + content: '\e76a'; +} + +.icon-biaodan:before { + content: '\e61d'; +} + +.icon-siweidaotu:before { + content: '\e614'; +} + +.icon-jiliandongxuanzeqi:before { + content: '\e616'; +} + +.icon-caijian:before { + content: '\e611'; +} + +.icon-fuwenben:before { + content: '\e7e4'; +} + +.icon-fuwenbenkuang:before { + content: '\e66f'; +} + +.icon-shangchuan:before { + content: '\e663'; +} + +.icon-xuanzeqi:before { + content: '\e635'; +} + +.icon-fangkuang:before { + content: '\e642'; +} + +.icon-gouxuan-weixuanzhong-xianxingfangkuang:before { + content: '\e77b'; +} + +.icon-shidu:before { + content: '\e60a'; +} + +.icon-yangan:before { + content: '\e67d'; +} + +.icon-wendu:before { + content: '\e686'; +} + +.icon-zaosheng:before { + content: '\e61c'; +} + +.icon-jinridaiban:before { + content: '\e60f'; +} + +.icon-AIshiyanshi:before { + content: '\e609'; +} + +.icon-shenqingkaiban:before { + content: '\e639'; +} + +.icon-zhongyingwenqiehuan:before { + content: '\e611'; +} + +.icon-zhongyingwen:before { + content: '\e605'; +} + +.icon-zhongyingzhuanhuan:before { + content: '\e6a2'; +} + +.icon-zhongyingwenyuyan:before { + content: '\e609'; +} + +.icon-shuju:before { + content: '\e613'; +} + +.icon-ico_shuju:before { + content: '\e6ff'; +} + +.icon-shuju1:before { + content: '\e60e'; +} + +.icon-fuzhiyemian:before { + content: '\e772'; +} + +.icon-caozuo-wailian:before { + content: '\e711'; +} + +.icon-icon-:before { + content: '\e620'; +} + +.icon-gerenzhongxin:before { + content: '\e60d'; +} + +.icon-caidan:before { + content: '\e652'; +} + +.icon-xitongshezhi:before { + content: '\e69b'; +} + +.icon-neiqianshujuchucun:before { + content: '\e62f'; +} + +.icon-shouye:before { + content: '\e653'; +} + +.icon-quanxian:before { + content: '\e610'; +} + +.icon-zujian:before { + content: '\e85e'; +} + +.icon-crew_feature:before { + content: '\e602'; +} + +.icon-gongju:before { + content: '\e62d'; +} + +.icon-skin:before { + content: '\e636'; +} + +.icon-shixinyuan:before { + content: '\e669'; +} + +.icon-webicon318:before { + content: '\e6a9'; +} + +.icon-dian:before { + content: '\e608'; +} + +.icon-fullscreen:before { + content: '\e623'; +} + +.icon-tuichuquanping:before { + content: '\e641'; +} diff --git a/customer_list/ch/static/fonts/iconfont.ttf b/customer_list/ch/static/fonts/iconfont/iconfont.ttf similarity index 100% rename from customer_list/ch/static/fonts/iconfont.ttf rename to customer_list/ch/static/fonts/iconfont/iconfont.ttf Binary files differ diff --git a/customer_list/ch/static/fonts/iconfont.woff b/customer_list/ch/static/fonts/iconfont/iconfont.woff similarity index 100% rename from customer_list/ch/static/fonts/iconfont.woff rename to customer_list/ch/static/fonts/iconfont/iconfont.woff Binary files differ diff --git a/customer_list/ch/static/fonts/iconfont.woff2 b/customer_list/ch/static/fonts/iconfont/iconfont.woff2 similarity index 100% rename from customer_list/ch/static/fonts/iconfont.woff2 rename to customer_list/ch/static/fonts/iconfont/iconfont.woff2 Binary files differ diff --git a/customer_list/ch/static/fonts/ywiconfont/iconfont.css b/customer_list/ch/static/fonts/ywiconfont/iconfont.css new file mode 100644 index 0000000..140140a --- /dev/null +++ b/customer_list/ch/static/fonts/ywiconfont/iconfont.css @@ -0,0 +1,159 @@ +@font-face { + font-family: "ywicon"; /* Project id 4499025 */ + src: url('iconfont.woff2?t=1719544607897') format('woff2'), + url('iconfont.woff?t=1719544607897') format('woff'), + url('iconfont.ttf?t=1719544607897') format('truetype'); +} + +.ywicon { + font-family: "ywicon" !important; + font-size: 16px; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.icon-pointer:before { + content: "\e7bb"; +} + +.icon-weixin:before { + content: "\e695"; +} + +.icon-weibiaoti517:before { + content: "\e61d"; +} + +.icon-ai23:before { + content: "\e68a"; +} + +.icon-tishi:before { + content: "\e622"; +} + +.icon-zanting:before { + content: "\e67d"; +} + +.icon-yingyongzhongxin:before { + content: "\e67f"; +} + +.icon-tuichu:before { + content: "\e689"; +} + +.icon-compare:before { + content: "\e68e"; +} + +.icon-gerenxinxi_o:before { + content: "\ebcc"; +} + +.icon-fullscreen:before { + content: "\e601"; +} + +.icon-kaiji:before { + content: "\e626"; +} + +.icon-tuichuquanping:before { + content: "\e64c"; +} + +.icon-lanyalianjie:before { + content: "\e6c2"; +} + +.icon-select_icon:before { + content: "\e661"; +} + +.icon-pingmufangda:before { + content: "\e7e9"; +} + +.icon-daochu1:before { + content: "\e682"; +} + +.icon-kaiji2:before { + content: "\e641"; +} + +.icon-fenxiang2:before { + content: "\e62e"; +} + +.icon-guanbi:before { + content: "\e61f"; +} + +.icon-shaixuan1:before { + content: "\e6aa"; +} + +.icon-el-icon-copy-document:before { + content: "\e6b8"; +} + +.icon-buzan:before { + content: "\e677"; +} + +.icon-dianzan:before { + content: "\ec7f"; +} + +.icon-yulan:before { + content: "\e730"; +} + +.icon-guanbiyulan:before { + content: "\e788"; +} + +.icon-sanweiditu:before { + content: "\e605"; +} + +.icon-jiankong:before { + content: "\e7bd"; +} + +.icon-jiegou:before { + content: "\e672"; +} + +.icon-tuceng1:before { + content: "\e645"; +} + +.icon-shexiangtou:before { + content: "\e620"; +} + +.icon-shuibeng:before { + content: "\e604"; +} + +.icon-24shuidifa-tint-01:before { + content: "\e656"; +} + +.icon-liuliangji-:before { + content: "\e643"; +} + +.icon-zhuangtai:before { + content: "\e6c3"; +} + +.icon-a-appround15:before { + content: "\e92f"; +} + diff --git a/customer_list/ch/static/fonts/ywiconfont/iconfont.ttf b/customer_list/ch/static/fonts/ywiconfont/iconfont.ttf new file mode 100644 index 0000000..3db636a --- /dev/null +++ b/customer_list/ch/static/fonts/ywiconfont/iconfont.ttf Binary files differ diff --git a/customer_list/ch/static/fonts/ywiconfont/iconfont.woff b/customer_list/ch/static/fonts/ywiconfont/iconfont.woff new file mode 100644 index 0000000..cc3ea0f --- /dev/null +++ b/customer_list/ch/static/fonts/ywiconfont/iconfont.woff Binary files differ diff --git a/customer_list/ch/static/fonts/ywiconfont/iconfont.woff2 b/customer_list/ch/static/fonts/ywiconfont/iconfont.woff2 new file mode 100644 index 0000000..9956b86 --- /dev/null +++ b/customer_list/ch/static/fonts/ywiconfont/iconfont.woff2 Binary files differ diff --git a/src/components/chat/Chat.vue b/src/components/chat/Chat.vue index 0d6cdc2..364d0b3 100644 --- a/src/components/chat/Chat.vue +++ b/src/components/chat/Chat.vue @@ -3,19 +3,29 @@ <div class="h-full flex flex-col items-center overflow-y-auto"> <div ref="chatListDom" class="h-full"> <div - class="group flex px-4 py-3 hover:bg-slate-100 rounded-lg" + class="group flex px-4 py-4 hover:bg-slate-100 rounded-lg" v-for="(item, index) of messageList.filter((v) => v.role !== 'system')" :key="index" > - <img class="rounded-full size-10 mr-4" :src="roleImageMap[item.role]" alt="" srcset="" /> + <img class="rounded-full size-12 mr-4" :src="roleImageMap[item.role]" alt="" srcset="" /> <div class="flex"> - <div - :class="{ 'bg-[#d8d8ff]': item.role !== RoleEnum.user }" - class="prose text-sm rounded-[6px] p-4 leading-relaxed max-w-[100ch]" - v-if="item.content" - v-html="md.render(item.content)" - ></div> + <div v-if="item.content"> + <div + :class="{ 'bg-[#d8d8ff]': item.role === RoleEnum.assistant, 'bg-white': item.role === RoleEnum.user }" + class="prose text-sm rounded-[6px] p-4 leading-relaxed max-w-[100ch]" + v-html="md.render(item.content)" + ></div> + <div class=""> + <SvgIcon name="ele-CopyDocument"/> + <SvgIcon name="ele-Check"/> + <SvgIcon name="ywicon icon-dianzan"/> + <SvgIcon name="ywicon icon-buzan"/> + + + </div> + </div> + <Loding v-else /> </div> </div> @@ -35,6 +45,7 @@ import { md } from './libs/markdown'; import { RoleEnum, type ChatMessage, roleImageMap } from './types'; import PlayBar from '/@/components/chat/components/playBar/PlayBar.vue'; +import router from '/@/router'; let apiKey = ''; let isConfig = ref(false); @@ -66,6 +77,8 @@ if (getAPIKey()) { switchConfigStatus(); } + + const inputValue = history.state.inputValue; }); const sendChatMessage = async (content: string = messageContent.value) => { diff --git a/src/components/chat/components/Loding.vue b/src/components/chat/components/Loding.vue index 9f3f5cf..3368187 100644 --- a/src/components/chat/components/Loding.vue +++ b/src/components/chat/components/Loding.vue @@ -1,5 +1,5 @@ <template> - <div class="com__box"> + <div class="com__box flex-center"> <div class="loading"> <div></div> <div></div> diff --git a/src/components/iconSelector/index.vue b/src/components/iconSelector/index.vue index 0c44d11..d2f7cc2 100644 --- a/src/components/iconSelector/index.vue +++ b/src/components/iconSelector/index.vue @@ -33,6 +33,9 @@ <div class="icon-selector-warp"> <div class="icon-selector-warp-title">{{ title }}</div> <el-tabs v-model="state.fontIconTabActive" @tab-click="onIconClick"> + <el-tab-pane lazy label="yw" name="yw"> + <IconList :list="fontIconSheetsFilterList" :empty="emptyDescription" :prefix="state.fontIconPrefix" @get-icon="onColClick" /> + </el-tab-pane> <el-tab-pane lazy label="ali" name="ali"> <IconList :list="fontIconSheetsFilterList" :empty="emptyDescription" :prefix="state.fontIconPrefix" @get-icon="onColClick" /> </el-tab-pane> @@ -111,9 +114,11 @@ fontIconWidth: 0, fontIconSearch: '', fontIconPlaceholder: '', - fontIconTabActive: 'ali', + fontIconTabActive: 'yw', fontIconList: { ali: [], + yw: [], + ele: [], awe: [], }, @@ -145,7 +150,8 @@ // 鏍规嵁 tab name 绫诲瀷璁剧疆鍥炬爣 const fontIconTabNameList = () => { let iconList: any = []; - if (state.fontIconTabActive === 'ali') iconList = state.fontIconList.ali; + if (state.fontIconTabActive === 'yw') iconList = state.fontIconList.yw; + else if (state.fontIconTabActive === 'ali') iconList = state.fontIconList.ali; else if (state.fontIconTabActive === 'ele') iconList = state.fontIconList.ele; else if (state.fontIconTabActive === 'awe') iconList = state.fontIconList.awe; return iconList; @@ -158,8 +164,9 @@ }; // 澶勭悊 icon 绫诲瀷锛岀敤浜庡洖鏄炬椂锛宼ab 楂樹寒涓庡垵濮嬪寲鏁版嵁 const initFontIconName = () => { - let name = 'ali'; - if (props.modelValue!.indexOf('iconfont') > -1) name = 'ali'; + let name = 'yw'; + if (props.modelValue!.indexOf('ywiconfont') > -1) name = 'yw'; + else if (props.modelValue!.indexOf('iconfont') > -1) name = 'ali'; else if (props.modelValue!.indexOf('ele-') > -1) name = 'ele'; else if (props.modelValue!.indexOf('fa') > -1) name = 'awe'; // 鍒濆鍖� tab 楂樹寒鍥炴樉 @@ -167,23 +174,30 @@ return name; }; // 鍒濆鍖栨暟鎹� -const initFontIconData = async (name: string) => { - if (name === 'ali') { +const initFontIconData = (name: string) => { + if (name === 'yw') { + // 闃块噷瀛椾綋鍥炬爣浣跨敤 `yw xxx` + if (state.fontIconList.yw.length > 0) return; + initIconfont.yw().then((res: any) => { + state.fontIconList.yw = res.map((i: string) => `ywicon ${i}`); + }); + } + else if (name === 'ali') { // 闃块噷瀛椾綋鍥炬爣浣跨敤 `iconfont xxx` if (state.fontIconList.ali.length > 0) return; - await initIconfont.ali().then((res: any) => { + initIconfont.ali().then((res: any) => { state.fontIconList.ali = res.map((i: string) => `iconfont ${i}`); }); } else if (name === 'ele') { // element plus 鍥炬爣 if (state.fontIconList.ele.length > 0) return; - await initIconfont.ele().then((res: any) => { + initIconfont.ele().then((res: any) => { state.fontIconList.ele = res; }); } else if (name === 'awe') { // fontawesome瀛椾綋鍥炬爣浣跨敤 `fa xxx` if (state.fontIconList.awe.length > 0) return; - await initIconfont.awe().then((res: any) => { + initIconfont.awe().then((res: any) => { state.fontIconList.awe = res.map((i: string) => `fa ${i}`); }); } diff --git a/src/layout/component/sidebar/waterLeftAside/asideTitle.vue b/src/layout/component/sidebar/waterLeftAside/asideTitle.vue index 0d2ab7b..8dde9bb 100644 --- a/src/layout/component/sidebar/waterLeftAside/asideTitle.vue +++ b/src/layout/component/sidebar/waterLeftAside/asideTitle.vue @@ -5,8 +5,8 @@ class="flex items-center set-li" v-for="(item, index) in state.asideTitleList" :key="index" - @click="handleClick(item.id)" - :class="{ 'set-li-active': state.currentActive === item.id }" + @click="handleClick(item)" + :class="{ 'set-li-active': item.routerName === currentRoute.name }" > <img :src="item.icon" alt="" class="pl-2.5 pr-2.5 w-4 h-4" style="box-sizing: content-box" /> <span class="font-medium text-sm text-white tracking-wide">{{ item.title }}</span> @@ -30,17 +30,21 @@ <script setup lang="ts"> import { reactive } from 'vue'; import { gotoRoute } from '/@/utils/route'; +import router from '/@/router'; let state = reactive({ asideTitleList: [ { id: 1, icon: '/static/images/wave/AsideIcon.png', title: '搴旂敤鍦烘櫙', + routerName:'Scenario', }, { id: 2, icon: '/static/images/wave/AsideIcon.png', title: '甯姪涓績', + // routerName:'Scenario', + }, { id: 3, @@ -51,19 +55,18 @@ id: 4, icon: '/static/images/wave/AsideIcon.png', title: '鍏充簬姘村姟AI', + routerName:'AboutUs', + }, ], - currentActive: 0, }); -const handleClick = (id) => { - state.currentActive = id; - if (id == 1) { - gotoRoute({ name: 'Scenario' }); - } - if (id == 4) { - gotoRoute({ name: 'AboutUs' }); - } +const handleClick = (item) => { + gotoRoute({name:item.routerName}); + }; + + +const currentRoute = router.currentRoute; </script> <style scoped lang="scss"> .aisde-title { diff --git a/src/theme/element.scss b/src/theme/element.scss index 434ab38..fe3f780 100644 --- a/src/theme/element.scss +++ b/src/theme/element.scss @@ -5,13 +5,19 @@ // 绗笁鏂瑰瓧浣撳浘鏍囧ぇ灏� .el-button:not(.is-circle) i.el-icon, .el-button i.iconfont, +.el-button i.ywicon, + .el-button i.fa, .el-button--default i.iconfont, +.el-button--default i.ywicon, + .el-button--default i.fa { font-size: 14px !important; margin-right: 5px; } .el-button--small i.iconfont, +.el-button--small i.ywicon, + .el-button--small i.fa { font-size: 12px !important; margin-right: 5px; @@ -112,6 +118,8 @@ // 绗笁鏂瑰浘鏍囧瓧浣撻棿璺�/澶у皬璁剧疆 .el-menu-item .iconfont, .el-sub-menu .iconfont, +.el-menu-item .ywicon, +.el-sub-menu .ywicon, .el-menu-item .fa, .el-sub-menu .fa { @include generalIcon; diff --git a/src/utils/getStyleSheets.ts b/src/utils/getStyleSheets.ts index e57a073..2b8629a 100644 --- a/src/utils/getStyleSheets.ts +++ b/src/utils/getStyleSheets.ts @@ -1,15 +1,15 @@ -import { nextTick } from 'vue'; import * as svg from '@element-plus/icons-vue'; +import { nextTick } from 'vue'; // 鑾峰彇闃块噷瀛椾綋鍥炬爣 const getAlicdnIconfont = () => { return new Promise((resolve, reject) => { nextTick(() => { const styles: any = document.styleSheets; - let sheetsList = []; - let sheetsIconList = []; + const sheetsList = []; + const sheetsIconList = []; for (let i = 0; i < styles.length; i++) { - if (styles[i].href && styles[i].href.indexOf('at.alicdn.com') > -1) { + if (styles[i].href && styles[i].href.indexOf('iconfont') > -1 && styles[i].href.indexOf('ywiconfont') === -1) { sheetsList.push(styles[i]); } } @@ -17,7 +17,38 @@ for (let j = 0; j < sheetsList[i].cssRules.length; j++) { if (sheetsList[i].cssRules[j].selectorText && sheetsList[i].cssRules[j].selectorText.indexOf('.icon-') > -1) { sheetsIconList.push( - `${sheetsList[i].cssRules[j].selectorText.substring(1, sheetsList[i].cssRules[j].selectorText.length).replace(/\:\:before/gi, '')}` + `${sheetsList[i].cssRules[j].selectorText + .substring(1, sheetsList[i].cssRules[j].selectorText.length) + .replace(/\:\:before/gi, '')}` + ); + } + } + } + if (sheetsIconList.length > 0) resolve(sheetsIconList); + else reject('鏈幏鍙栧埌鍊硷紝璇峰埛鏂伴噸璇�'); + }); + }); +}; + +// 鑾峰彇涔夌淮瀛椾綋鍥炬爣 +const getYwCdnIconfont = () => { + return new Promise((resolve, reject) => { + nextTick(() => { + const styles: any = document.styleSheets; + const sheetsList = []; + const sheetsIconList = []; + for (let i = 0; i < styles.length; i++) { + if (styles[i].href && styles[i].href.indexOf('ywiconfont') > -1) { + sheetsList.push(styles[i]); + } + } + for (let i = 0; i < sheetsList.length; i++) { + for (let j = 0; j < sheetsList[i].cssRules.length; j++) { + if (sheetsList[i].cssRules[j].selectorText && sheetsList[i].cssRules[j].selectorText.indexOf('.icon-') > -1) { + sheetsIconList.push( + `${sheetsList[i].cssRules[j].selectorText + .substring(1, sheetsList[i].cssRules[j].selectorText.length) + .replace(/\:\:before/gi, '')}` ); } } @@ -48,10 +79,10 @@ return new Promise((resolve, reject) => { nextTick(() => { const styles: any = document.styleSheets; - let sheetsList = []; - let sheetsIconList = []; + const sheetsList = []; + const sheetsIconList = []; for (let i = 0; i < styles.length; i++) { - if (styles[i].href && styles[i].href.indexOf('font-awesome') > -1) { + if (styles[i].href && styles[i].href.indexOf('fontawesome') > -1) { sheetsList.push(styles[i]); } } @@ -64,7 +95,9 @@ ) { if (/::before/.test(sheetsList[i].cssRules[j].selectorText)) { sheetsIconList.push( - `${sheetsList[i].cssRules[j].selectorText.substring(1, sheetsList[i].cssRules[j].selectorText.length).replace(/\:\:before/gi, '')}` + `${sheetsList[i].cssRules[j].selectorText + .substring(1, sheetsList[i].cssRules[j].selectorText.length) + .replace(/\:\:before/gi, '')}` ); } } @@ -95,6 +128,9 @@ awe: () => { return getAwesomeIconfont(); }, + yw: () => { + return getYwCdnIconfont(); + }, }; // 瀵煎嚭鏂规硶 diff --git a/src/utils/setIconfont.ts b/src/utils/setIconfont.ts index 05bb54d..2374479 100644 --- a/src/utils/setIconfont.ts +++ b/src/utils/setIconfont.ts @@ -1,7 +1,9 @@ // 瀛椾綋鍥炬爣 url const cssCdnUrlList: Array<string> = [ - './static/fonts/iconfont.css', - './static/fonts/font-awesome.min.css', + './static/fonts/iconfont/iconfont.css', + './static/fonts/ywiconfont/iconfont.css', + './static/fonts/fontawesome/fontawesome.min.css', + ]; // 绗笁鏂� js url const jsCdnUrlList: Array<string> = []; diff --git a/src/views/project/ch/home/Home.vue b/src/views/project/ch/home/Home.vue index 779a2bd..e1f4c0d 100644 --- a/src/views/project/ch/home/Home.vue +++ b/src/views/project/ch/home/Home.vue @@ -7,11 +7,10 @@ <div class="homeBox w100"> <div class="flex items-center flex-column mt-20"> <div class="flex items-center flex-column"> - <waterTop @sendClick="sendClick" /> + <waterTop /> <waterCenter /> <waterBottom /> </div> - </div> </div> <p class="declare"> @@ -35,11 +34,6 @@ import router from '/@/router'; -const sendClick = () => { - router.push({ - name:'AskAnswer' - }) -}; </script> <style scoped lang="scss"> .pc-chat_room { diff --git a/src/views/project/ch/home/component/waterRight/top.vue b/src/views/project/ch/home/component/waterRight/top.vue index 862779b..0e707fc 100644 --- a/src/views/project/ch/home/component/waterRight/top.vue +++ b/src/views/project/ch/home/component/waterRight/top.vue @@ -19,17 +19,24 @@ </div> </div> </div> - <PlayBar @send-click="sendClick"/> - + <PlayBar v-model="inputValue" @send-click="sendClick" /> </template> <script setup lang="ts"> -import { reactive } from 'vue'; -import PlayBar from '/@/components/chat/components/playBar/PlayBar.vue' +import { reactive, ref } from 'vue'; +import PlayBar from '/@/components/chat/components/playBar/PlayBar.vue'; +import router from '/@/router'; const emits = defineEmits(['sendClick']); +const inputValue = ref(''); const sendClick = () => { - emits('sendClick'); + if(!inputValue.value) return; + router.push({ + name: 'AskAnswer', + state: { + inputValue: inputValue.value, + }, + }); }; let state = reactive({ roleList: [ -- Gitblit v1.9.3