diff --git a/package.json b/package.json index b491aa9..5b2211b 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,9 @@ }, "dependencies": { "@element-plus/icons-vue": "^2.3.1", + "@floating-ui/core": "^1.7.0", + "@floating-ui/dom": "^1.7.0", + "@floating-ui/vue": "^1.1.6", "@jsonlee_12138/enum": "^1.0.4", "@vueuse/core": "^13.2.0", "@vueuse/integrations": "^13.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b939dc5..5ea15c7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,6 +11,15 @@ importers: '@element-plus/icons-vue': specifier: ^2.3.1 version: 2.3.1(vue@3.5.14(typescript@5.8.3)) + '@floating-ui/core': + specifier: ^1.7.0 + version: 1.7.0 + '@floating-ui/dom': + specifier: ^1.7.0 + version: 1.7.0 + '@floating-ui/vue': + specifier: ^1.1.6 + version: 1.1.6(vue@3.5.14(typescript@5.8.3)) '@jsonlee_12138/enum': specifier: ^1.0.4 version: 1.0.4 @@ -599,6 +608,9 @@ packages: '@floating-ui/utils@0.2.9': resolution: {integrity: sha512-MDWhGtE+eHw5JW7lq4qhc5yRLS11ERl1c7Z6Xd0a58DozHES6EnNNwUWbMiG4J9Cgj053Bhk8zvlhFYKVhULwg==} + '@floating-ui/vue@1.1.6': + resolution: {integrity: sha512-XFlUzGHGv12zbgHNk5FN2mUB7ROul3oG2ENdTpWdE+qMFxyNxWSRmsoyhiEnpmabNm6WnUvR1OvJfUfN4ojC1A==} + '@humanfs/core@0.19.1': resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==} engines: {node: '>=18.18.0'} @@ -725,67 +737,56 @@ packages: resolution: {integrity: sha512-46OzWeqEVQyX3N2/QdiU/CMXYDH/lSHpgfBkuhl3igpZiaB3ZIfSjKuOnybFVBQzjsLwkus2mjaESy8H41SzvA==} cpu: [arm] os: [linux] - libc: [glibc] '@rollup/rollup-linux-arm-musleabihf@4.41.0': resolution: {integrity: sha512-lfgW3KtQP4YauqdPpcUZHPcqQXmTmH4nYU0cplNeW583CMkAGjtImw4PKli09NFi2iQgChk4e9erkwlfYem6Lg==} cpu: [arm] os: [linux] - libc: [musl] '@rollup/rollup-linux-arm64-gnu@4.41.0': resolution: {integrity: sha512-nn8mEyzMbdEJzT7cwxgObuwviMx6kPRxzYiOl6o/o+ChQq23gfdlZcUNnt89lPhhz3BYsZ72rp0rxNqBSfqlqw==} cpu: [arm64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-arm64-musl@4.41.0': resolution: {integrity: sha512-l+QK99je2zUKGd31Gh+45c4pGDAqZSuWQiuRFCdHYC2CSiO47qUWsCcenrI6p22hvHZrDje9QjwSMAFL3iwXwQ==} cpu: [arm64] os: [linux] - libc: [musl] '@rollup/rollup-linux-loongarch64-gnu@4.41.0': resolution: {integrity: sha512-WbnJaxPv1gPIm6S8O/Wg+wfE/OzGSXlBMbOe4ie+zMyykMOeqmgD1BhPxZQuDqwUN+0T/xOFtL2RUWBspnZj3w==} cpu: [loong64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-powerpc64le-gnu@4.41.0': resolution: {integrity: sha512-eRDWR5t67/b2g8Q/S8XPi0YdbKcCs4WQ8vklNnUYLaSWF+Cbv2axZsp4jni6/j7eKvMLYCYdcsv8dcU+a6QNFg==} cpu: [ppc64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-riscv64-gnu@4.41.0': resolution: {integrity: sha512-TWrZb6GF5jsEKG7T1IHwlLMDRy2f3DPqYldmIhnA2DVqvvhY2Ai184vZGgahRrg8k9UBWoSlHv+suRfTN7Ua4A==} cpu: [riscv64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-riscv64-musl@4.41.0': resolution: {integrity: sha512-ieQljaZKuJpmWvd8gW87ZmSFwid6AxMDk5bhONJ57U8zT77zpZ/TPKkU9HpnnFrM4zsgr4kiGuzbIbZTGi7u9A==} cpu: [riscv64] os: [linux] - libc: [musl] '@rollup/rollup-linux-s390x-gnu@4.41.0': resolution: {integrity: sha512-/L3pW48SxrWAlVsKCN0dGLB2bi8Nv8pr5S5ocSM+S0XCn5RCVCXqi8GVtHFsOBBCSeR+u9brV2zno5+mg3S4Aw==} cpu: [s390x] os: [linux] - libc: [glibc] '@rollup/rollup-linux-x64-gnu@4.41.0': resolution: {integrity: sha512-XMLeKjyH8NsEDCRptf6LO8lJk23o9wvB+dJwcXMaH6ZQbbkHu2dbGIUindbMtRN6ux1xKi16iXWu6q9mu7gDhQ==} cpu: [x64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-x64-musl@4.41.0': resolution: {integrity: sha512-m/P7LycHZTvSQeXhFmgmdqEiTqSV80zn6xHaQ1JSqwCtD1YGtwEK515Qmy9DcB2HK4dOUVypQxvhVSy06cJPEg==} cpu: [x64] os: [linux] - libc: [musl] '@rollup/rollup-win32-arm64-msvc@4.41.0': resolution: {integrity: sha512-4yodtcOrFHpbomJGVEqZ8fzD4kfBeCbpsUy5Pqk4RluXOdsWdjLnjhiKy2w3qzcASWd04fp52Xz7JKarVJ5BTg==} @@ -1124,49 +1125,41 @@ packages: resolution: {integrity: sha512-jon9M7DKRLGZ9VYSkFMflvNqu9hDtOCEnO2QAryFWgT6o6AXU8du56V7YqnaLKr6rAbZBWYsYpikF226v423QA==} cpu: [arm64] os: [linux] - libc: [glibc] '@unrs/resolver-binding-linux-arm64-musl@1.7.2': resolution: {integrity: sha512-c8Cg4/h+kQ63pL43wBNaVMmOjXI/X62wQmru51qjfTvI7kmCy5uHTJvK/9LrF0G8Jdx8r34d019P1DVJmhXQpA==} cpu: [arm64] os: [linux] - libc: [musl] '@unrs/resolver-binding-linux-ppc64-gnu@1.7.2': resolution: {integrity: sha512-A+lcwRFyrjeJmv3JJvhz5NbcCkLQL6Mk16kHTNm6/aGNc4FwPHPE4DR9DwuCvCnVHvF5IAd9U4VIs/VvVir5lg==} cpu: [ppc64] os: [linux] - libc: [glibc] '@unrs/resolver-binding-linux-riscv64-gnu@1.7.2': resolution: {integrity: sha512-hQQ4TJQrSQW8JlPm7tRpXN8OCNP9ez7PajJNjRD1ZTHQAy685OYqPrKjfaMw/8LiHCt8AZ74rfUVHP9vn0N69Q==} cpu: [riscv64] os: [linux] - libc: [glibc] '@unrs/resolver-binding-linux-riscv64-musl@1.7.2': resolution: {integrity: sha512-NoAGbiqrxtY8kVooZ24i70CjLDlUFI7nDj3I9y54U94p+3kPxwd2L692YsdLa+cqQ0VoqMWoehDFp21PKRUoIQ==} cpu: [riscv64] os: [linux] - libc: [musl] '@unrs/resolver-binding-linux-s390x-gnu@1.7.2': resolution: {integrity: sha512-KaZByo8xuQZbUhhreBTW+yUnOIHUsv04P8lKjQ5otiGoSJ17ISGYArc+4vKdLEpGaLbemGzr4ZeUbYQQsLWFjA==} cpu: [s390x] os: [linux] - libc: [glibc] '@unrs/resolver-binding-linux-x64-gnu@1.7.2': resolution: {integrity: sha512-dEidzJDubxxhUCBJ/SHSMJD/9q7JkyfBMT77Px1npl4xpg9t0POLvnWywSk66BgZS/b2Hy9Y1yFaoMTFJUe9yg==} cpu: [x64] os: [linux] - libc: [glibc] '@unrs/resolver-binding-linux-x64-musl@1.7.2': resolution: {integrity: sha512-RvP+Ux3wDjmnZDT4XWFfNBRVG0fMsc+yVzNFUqOflnDfZ9OYujv6nkh+GOr+watwrW4wdp6ASfG/e7bkDradsw==} cpu: [x64] os: [linux] - libc: [musl] '@unrs/resolver-binding-wasm32-wasi@1.7.2': resolution: {integrity: sha512-y797JBmO9IsvXVRCKDXOxjyAE4+CcZpla2GSoBQ33TVb3ILXuFnMrbR/QQZoauBYeOFuu4w3ifWLw52sdHGz6g==} @@ -5266,6 +5259,15 @@ snapshots: '@floating-ui/utils@0.2.9': {} + '@floating-ui/vue@1.1.6(vue@3.5.14(typescript@5.8.3))': + dependencies: + '@floating-ui/dom': 1.7.0 + '@floating-ui/utils': 0.2.9 + vue-demi: 0.14.10(vue@3.5.14(typescript@5.8.3)) + transitivePeerDependencies: + - '@vue/composition-api' + - vue + '@humanfs/core@0.19.1': {} '@humanfs/node@0.16.6': diff --git a/src/components/DeepThinking/index.vue b/src/components/DeepThinking/index.vue new file mode 100644 index 0000000..4af6300 --- /dev/null +++ b/src/components/DeepThinking/index.vue @@ -0,0 +1,34 @@ + + + + + + diff --git a/src/components/ModelSelect/index.vue b/src/components/ModelSelect/index.vue index 098f1fa..0aed662 100644 --- a/src/components/ModelSelect/index.vue +++ b/src/components/ModelSelect/index.vue @@ -49,7 +49,7 @@ function handleClick(item: GetSessionListVO) {
-
+
-
- {{ item.modelName }} -
+ {{ item.modelName }}
@@ -106,11 +107,32 @@ function handleClick(item: GetSessionListVO) { .model-switch-box { color: var(--el-color-primary, #409eff); border: 1px solid var(--el-color-primary, #409eff); - border-radius: 15px; + border-radius: 10px; } .popover-content-box-item.is-select { color: var(--el-color-primary, #409eff); font-weight: 700; } + +.popover-content-box { + // background-color: red; + height: 200px; + display: flex; + flex-direction: column; + overflow-y: auto; + overflow-x: hidden; + + // 滚动条样式 + &::-webkit-scrollbar { + width: 4px; + } + &::-webkit-scrollbar-track { + background: #f5f5f5; + } + &::-webkit-scrollbar-thumb { + background: #ccc; + border-radius: 4px; + } +} diff --git a/src/components/Popover/index copy.vue b/src/components/Popover/index copy.vue new file mode 100644 index 0000000..3649bd5 --- /dev/null +++ b/src/components/Popover/index copy.vue @@ -0,0 +1,431 @@ + + + + + diff --git a/src/components/Popover/index.vue b/src/components/Popover/index.vue index d402c2b..07c3678 100644 --- a/src/components/Popover/index.vue +++ b/src/components/Popover/index.vue @@ -1,6 +1,29 @@ + - + diff --git a/src/layouts/components/Header/components/Avatar.vue b/src/layouts/components/Header/components/Avatar.vue index 1742c71..1afc833 100644 --- a/src/layouts/components/Header/components/Avatar.vue +++ b/src/layouts/components/Header/components/Avatar.vue @@ -95,7 +95,7 @@ function handleClick(item: any) { diff --git a/src/pages/chat/layouts/chatDefaul/index.vue b/src/pages/chat/layouts/chatDefaul/index.vue index 294e325..05c67e3 100644 --- a/src/pages/chat/layouts/chatDefaul/index.vue +++ b/src/pages/chat/layouts/chatDefaul/index.vue @@ -3,16 +3,12 @@ import ModelSelect from '@/components/ModelSelect/index.vue'; import WelecomeText from '@/components/WelecomeText/index.vue'; import { useUserStore } from '@/stores'; -import { useChatStore } from '@/stores/modules/chat'; import { useSessionStore } from '@/stores/modules/session'; const userStore = useUserStore(); -const chatStore = useChatStore(); const sessionStore = useSessionStore(); const senderValue = ref(''); -const isDeepThinking = computed(() => chatStore.isDeepThinking); - async function handleSend() { localStorage.setItem('chatContent', senderValue.value); await sessionStore.createSessionList({ @@ -22,11 +18,6 @@ async function handleSend() { remark: senderValue.value.slice(0, 10), }); } - -// 设置是否深度思考 -function setIsDeepThinking() { - chatStore.setDeepThinking(!chatStore.isDeepThinking); -}