点击按钮触发滚动条向上滚动

参考: https://www.cnblogs.com/shayloyuki/p/16916054.html

核心代码

<div class='add-main-content' ref='addMainContent'>
<a-button style='margin-left: 10px' type='primary' @click='nextStepView'
>
下一步
</a-button>
</div>
nextStepView() {
// 滚动条提升
this.$nextTick(() => {
const container = this.$refs.addMainContent;
container.scrollTop = 0;
})
// 表单验证
if (!this.veritfyCurrent00FormFields()) {
return;
}
this.current++;
},
posted @   Felix_Openmind  阅读(85)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· winform 绘制太阳,地球,月球 运作规律
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· AI 智能体引爆开源社区「GitHub 热点速览」
· 写一个简单的SQL生成工具
历史上的今天:
2021-03-15 VMware Workstation 与 Device/Credential Guard 不兼容。
*{cursor: url(https://files-cdn.cnblogs.com/files/morango/fish-cursor.ico),auto;}
点击右上角即可分享
微信分享提示