edit:模型模板
This commit is contained in:
parent
870ffb167a
commit
f02f6a8384
|
@ -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
|
@ -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": "思维导图",
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -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,10 +223,19 @@ 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) {
|
||||
if(index == 0){
|
||||
const item = messageElements.value[index]
|
||||
if(item.clientHeight > outerContainer.value.clientHeight ){
|
||||
item.scrollIntoView({ behavior: 'smooth', block: 'end' })
|
||||
}
|
||||
}
|
||||
else{
|
||||
// 平滑滚动到底部
|
||||
requestAnimationFrame(() => {
|
||||
container.scrollTo({
|
||||
|
@ -235,6 +244,8 @@ const handleScroll = (index) => {
|
|||
});
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
lastScrollTime = now;
|
||||
|
@ -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,
|
||||
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]
|
||||
// console.log(item.scrollTop, item.offsetHeight)
|
||||
|
||||
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
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue