edit:模型模板

This commit is contained in:
lyc 2025-02-19 17:28:59 +08:00
parent 870ffb167a
commit f02f6a8384
7 changed files with 60 additions and 32 deletions

View File

@ -1,8 +1,8 @@
@font-face {
font-family: "iconfont"; /* Project id 4723712 */
src: url('iconfont.woff2?t=1737434703828') format('woff2'),
url('iconfont.woff?t=1737434703828') format('woff'),
url('iconfont.ttf?t=1737434703828') format('truetype');
src: url('iconfont.woff2?t=1739948469020') format('woff2'),
url('iconfont.woff?t=1739948469020') format('woff'),
url('iconfont.ttf?t=1739948469020') format('truetype');
}
.iconfont {
@ -13,6 +13,10 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-zhongxinshiyang:before {
content: "\e67b";
}
.icon-siweidaotu:before {
content: "\e606";
}

File diff suppressed because one or more lines are too long

View File

@ -5,6 +5,13 @@
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
{
"icon_id": "4320365",
"name": "重新试样",
"font_class": "zhongxinshiyang",
"unicode": "e67b",
"unicode_decimal": 59003
},
{
"icon_id": "11685410",
"name": "思维导图",

View File

@ -69,7 +69,7 @@
</div>
<div class="ai-btn" v-if="item.answer">
<el-button type="primary" link @click="againResult(index, item)">
<i class="iconfont icon-ai1"></i>
<i class="iconfont icon-zhongxinshiyang"></i>
重新研读
</el-button>
<el-button type="primary" link @click="onAdjust(index, item)">
@ -223,17 +223,28 @@ const handleScroll = (index) => {
const container = document.querySelector('.container-right-list');
if(isAgain.value){
scrollToTmp(index)
// const item = messageElements.value[index]
// item.scrollIntoView({ behavior: 'smooth', block: 'end' })
}
else{
if (container) {
//
requestAnimationFrame(() => {
container.scrollTo({
top: container.scrollHeight,
behavior: 'smooth',
if(index == 0){
const item = messageElements.value[index]
if(item.clientHeight > outerContainer.value.clientHeight ){
item.scrollIntoView({ behavior: 'smooth', block: 'end' })
}
}
else{
//
requestAnimationFrame(() => {
container.scrollTo({
top: container.scrollHeight,
behavior: 'smooth',
});
});
});
}
}
}
@ -242,24 +253,29 @@ const handleScroll = (index) => {
}
const tmpViewHeight = container.clientHeight
// const tmpViewContainer = document.querySelector('.container-right-list')
const scrollToTmp = (index) =>{
const container = document.querySelector('.container-right-list');
const beforHeight = messageElements.value.slice(0, index + 1).reduce((sum, item) => sum + item.clientHeight, 0);
console.log(beforHeight,'beforHeight', viewHeight)
if(beforHeight > tmpViewHeight){
container.scrollTo({
top: beforHeight - tmpViewHeight,
behavior: 'smooth',
});
const now = Date.now();
if (now - lastScrollTime >= scrollInterval) {
//
if(index == childTempList.value.length - 1){
console.log(outerContainer.value.scrollHeight)
requestAnimationFrame(() => {
outerContainer.value.scrollTo({
top: outerContainer.value.scrollHeight,
behavior: 'smooth',
});
});
}
else{
const item = messageElements.value[index]
if(item.clientHeight > outerContainer.value.clientHeight ){
item.scrollIntoView({ behavior: 'smooth', block: 'end' })
}
}
lastScrollTime = now;
}
const item = messageElements.value[index]
// console.log(item.scrollTop, item.offsetHeight)
}
//
@ -356,7 +372,7 @@ const againResult = async (index, item) => {
isAgain.value = true
childTempList.value[index].answer = ''
childTempList.value[index].showTypewriter = true
return
//
if (messageElements.value[index]) {
messageElements.value[index].scrollIntoView({
@ -647,14 +663,15 @@ onUnmounted(() => {
.iconfont {
margin-right: 3px;
font-size: 18px;
}
:deep(.el-button) {
font-size: 13px;
font-size: 14px;
}
.icon-ai1 {
font-size: 18px;
.icon-zhongxinshiyang {
font-size: 20px;
}
}
}