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