edit:模型模板
This commit is contained in:
parent
870ffb167a
commit
f02f6a8384
|
@ -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
|
@ -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": "思维导图",
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue