feat: dressfor页面作为聊天起始
This commit is contained in:
@@ -6,8 +6,8 @@
|
||||
v-for="(line, index) in lines"
|
||||
:key="index"
|
||||
:class="['line', `line-${line.type}`]"
|
||||
></div> </template
|
||||
>>
|
||||
></div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -44,7 +44,8 @@ const calculateLines = (): Line[] => {
|
||||
// 这样当滚动到50%时,内容看起来和开始一样
|
||||
const availableWidth = containerWidth
|
||||
const lineWithGap = lineWidthPx + gapPx
|
||||
const linesNeeded = Math.ceil(availableWidth / lineWithGap)
|
||||
// 使用四舍五入让一个周期的宽度尽量接近容器宽度,减少滚动结束时的“回跳”感
|
||||
const linesNeeded = Math.max(1, Math.round(availableWidth / lineWithGap))
|
||||
|
||||
const generatedLines: Line[] = []
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ const shortcutList: string[] = [
|
||||
|
||||
const handleSend = (): void => {
|
||||
if (inputValue.value.trim()) {
|
||||
console.log('input发送消息:', inputValue.value)
|
||||
// console.log('input发送消息:', inputValue.value)
|
||||
emit('send-message', inputValue.value)
|
||||
inputValue.value = ''
|
||||
// 重置textarea高度
|
||||
|
||||
Reference in New Issue
Block a user