企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
``` created() { window.addEventListener('scroll', this.handleScroll); }, destroyed() { window.removeEventListener('scroll', this.handleScroll); } ``` ```js handleScroll() { var top = document.documentElement.scrollTop || document.body.scrollTop; if(top > 0) { this.isShow = true; var opacity = top/200; if(opacity > 1) { opacity = 1; } this.opacitys.opacity = opacity; } else { this.isShow = false; } } ```