Merge branch 'main' of https://github.com/maxkb-dev/maxkb
This commit is contained in:
commit
a528de752b
@ -535,10 +535,20 @@ function sendChatHandle(event?: any) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 如果同时按下ctrl+回车键,则会换行
|
// 如果同时按下ctrl+回车键,则会换行
|
||||||
inputValue.value += '\n'
|
insertNewlineAtCursor()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const insertNewlineAtCursor = () => {
|
||||||
|
const textarea = document.querySelector('.el-textarea__inner') as HTMLTextAreaElement
|
||||||
|
const startPos = textarea.selectionStart
|
||||||
|
const endPos = textarea.selectionEnd
|
||||||
|
// 在光标处插入换行符
|
||||||
|
inputValue.value = inputValue.value.slice(0, startPos) + '\n' + inputValue.value.slice(endPos)
|
||||||
|
nextTick(() => {
|
||||||
|
textarea.setSelectionRange(startPos + 1, startPos + 1) // 光标定位到换行后位置
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
function deleteFile(index: number, val: string) {
|
function deleteFile(index: number, val: string) {
|
||||||
if (val === 'image') {
|
if (val === 'image') {
|
||||||
|
|||||||
@ -5,7 +5,7 @@ export default {
|
|||||||
loading: 'Loading',
|
loading: 'Loading',
|
||||||
noMore: 'No more! ',
|
noMore: 'No more! ',
|
||||||
selectParagraph: {
|
selectParagraph: {
|
||||||
title: 'Select Paragraph',
|
title: 'Select Segments',
|
||||||
error: 'Process only the failed segments',
|
error: 'Process only the failed segments',
|
||||||
all: 'All Segments'
|
all: 'All Segments'
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,9 +11,7 @@
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
[v-cloak] {
|
|
||||||
display: none !important;
|
|
||||||
}
|
|
||||||
html {
|
html {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|||||||
@ -3,14 +3,13 @@
|
|||||||
v-model="dialogVisible"
|
v-model="dialogVisible"
|
||||||
:title="$t('components.selectParagraph.title')"
|
:title="$t('components.selectParagraph.title')"
|
||||||
:before-close="close"
|
:before-close="close"
|
||||||
|
width="450"
|
||||||
>
|
>
|
||||||
<el-radio-group v-model="state" class="radio-block">
|
<el-radio-group v-model="state" class="radio-block">
|
||||||
<el-radio value="error" size="large" class="mb-16">{{
|
<el-radio value="error" size="large" class="mb-16">{{
|
||||||
$t('components.selectParagraph.error')
|
$t('components.selectParagraph.error')
|
||||||
}}</el-radio>
|
}}</el-radio>
|
||||||
<el-radio value="all" size="large">{{
|
<el-radio value="all" size="large">{{ $t('components.selectParagraph.all') }}</el-radio>
|
||||||
$t('components.selectParagraph.all')
|
|
||||||
}}</el-radio>
|
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user