feat: 样式优化

This commit is contained in:
wangdan-fit2cloud 2024-06-13 18:28:44 +08:00
parent 6c950e1268
commit 2fb8dee91e

View File

@ -146,7 +146,7 @@
ref="quickInputRef" ref="quickInputRef"
v-model="inputValue" v-model="inputValue"
placeholder="请输入" placeholder="请输入"
:autosize="{ minRows: 1, maxRows: common.isMobile() ? 4 : 10 }" :autosize="{ minRows: 1, maxRows: isMobile ? 4 : 10 }"
type="textarea" type="textarea"
:maxlength="100000" :maxlength="100000"
@keydown.enter="sendChatHandle($event)" @keydown.enter="sendChatHandle($event)"
@ -189,7 +189,8 @@ import { debounce } from 'lodash'
defineOptions({ name: 'AiChat' }) defineOptions({ name: 'AiChat' })
const route = useRoute() const route = useRoute()
const { const {
params: { accessToken, id } params: { accessToken, id },
query: { mode }
} = route as any } = route as any
const props = defineProps({ const props = defineProps({
data: { data: {
@ -217,6 +218,10 @@ const emit = defineEmits(['refresh', 'scroll'])
const { application, common } = useStore() const { application, common } = useStore()
const isMobile = computed(() => {
return common.isMobile() || mode === 'embed'
})
const ParagraphSourceDialogRef = ref() const ParagraphSourceDialogRef = ref()
const aiChatRef = ref() const aiChatRef = ref()
const quickInputRef = ref() const quickInputRef = ref()
@ -608,6 +613,12 @@ watch(
{ deep: true, immediate: true } { deep: true, immediate: true }
) )
onMounted(() => {
setTimeout(() => {
quickInputRef.value.textarea.style.height = '0'
}, 1000)
})
defineExpose({ defineExpose({
setScrollBottom setScrollBottom
}) })