From 923f49266b00bd05bf8a4037b29ecb706d1306ff Mon Sep 17 00:00:00 2001 From: houzhongjian <houzhongyi@126.com> Date: 星期三, 18 六月 2025 09:03:33 +0800 Subject: [PATCH] 转炉大模型功能完善 --- src/components/Dialog/src/DialogSuggest.vue | 51 +++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 39 insertions(+), 12 deletions(-) diff --git a/src/components/Dialog/src/DialogHistory.vue b/src/components/Dialog/src/DialogSuggest.vue similarity index 71% copy from src/components/Dialog/src/DialogHistory.vue copy to src/components/Dialog/src/DialogSuggest.vue index 02dc867..6d1723d 100644 --- a/src/components/Dialog/src/DialogHistory.vue +++ b/src/components/Dialog/src/DialogSuggest.vue @@ -1,7 +1,7 @@ <script lang="ts" setup> import { propTypes } from '@/utils/propTypes' import { isNumber } from '@/utils/is' -defineOptions({ name: 'DialogHistory' }) +defineOptions({ name: 'Dialog' }) const slots = useSlots() @@ -9,7 +9,7 @@ modelValue: propTypes.bool.def(false), title: propTypes.string.def('Dialog'), fullscreen: propTypes.bool.def(true), - width: propTypes.oneOfType([String, Number]).def('30%'), + width: propTypes.oneOfType([String, Number]).def('40%'), scroll: propTypes.bool.def(false), // 是否开启滚动条。如果是的话,按照 maxHeight 设置最大高度 maxHeight: propTypes.oneOfType([String, Number]).def('400px') }) @@ -50,40 +50,56 @@ } ) +const dialogStyle = computed(() => { + return { + height: unref(dialogHeight) + } +}) </script> <template> <ElDialog v-bind="getBindValue" - :fullscreen="isFullscreen" :close-on-click-modal="true" + :fullscreen="isFullscreen" :width="width" destroy-on-close lock-scroll draggable - class="history-dialog" + class="com-dialog" :show-close="false" > <template #header="{ close }"> - <div class="relative h-30px flex items-center justify-between pl-15px pr-15px"> + <div class="relative h-54px flex items-center justify-between pl-15px pr-15px"> <slot name="title"> {{ title }} </slot> <div - class="absolute right-15px top-[50%] h-40px flex translate-y-[-50%] items-center justify-between" + class="absolute right-15px top-[50%] h-54px flex translate-y-[-50%] items-center justify-between" > + <Icon + v-if="fullscreen" + class="is-hover mr-10px cursor-pointer" + :icon="isFullscreen ? 'radix-icons:exit-full-screen' : 'radix-icons:enter-full-screen'" + color="var(--el-color-info)" + hover-color="var(--el-color-primary)" + @click="toggleFull" + /> <Icon class="is-hover cursor-pointer" icon="ep:close" hover-color="var(--el-color-primary)" - color="#73C4FF" + color="var(--el-color-info)" @click="close" /> </div> </div> </template> - <slot></slot> + <ElScrollbar v-if="scroll" :style="dialogStyle"> + <slot></slot> + </ElScrollbar> + <slot v-else></slot> <template v-if="slots.footer" #footer> <slot name="footer"></slot> </template> @@ -91,10 +107,9 @@ </template> <style lang="scss"> -.history-dialog { - height: 90vh; +.com-dialog { + height: 62vh; color: #73C4FF; - margin-top: 30px; background: rgba(3,29,76,0.79); border-radius: 4px 4px 4px 4px; border: 1px solid; @@ -111,7 +126,7 @@ padding: 0; margin-right: 0 !important; background: - url("@/assets/ai/zhuanlu/common_title.png") left no-repeat, + url("@/assets/ai/zhuanlu/suggest_title.png") left no-repeat, linear-gradient(to bottom, #0a1633dd, #0a1633dd); /* 叠加深色遮罩 */ div { color: #73C4FF; @@ -123,6 +138,18 @@ color: #73C4FF; top: 0; } + + &__body { + padding: 15px !important; + } + + &__footer { + border-top: 1px solid var(--el-border-color); + } + + &__headerbtn { + top: 0; + } } } </style> -- Gitblit v1.9.3