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

File diff suppressed because one or more lines are too long

View File

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

View File

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