Skip to content

Commit

Permalink
feat: 样式优化
Browse files Browse the repository at this point in the history
  • Loading branch information
wangdan-fit2cloud committed Jun 13, 2024
1 parent 6c950e1 commit 2fb8dee
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions ui/src/components/ai-chat/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down Expand Up @@ -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: {
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -608,6 +613,12 @@ watch(
{ deep: true, immediate: true }
)
onMounted(() => {
setTimeout(() => {
quickInputRef.value.textarea.style.height = '0'
}, 1000)
})
defineExpose({
setScrollBottom
})
Expand Down

0 comments on commit 2fb8dee

Please sign in to comment.